Lines Matching refs:L
58 static int findfield (lua_State *L, int objidx, int level) { in findfield() argument
59 if (level == 0 || !lua_istable(L, -1)) in findfield()
61 lua_pushnil(L); /* start 'next' loop */ in findfield()
62 while (lua_next(L, -2)) { /* for each pair in table */ in findfield()
63 if (lua_type(L, -2) == LUA_TSTRING) { /* ignore non-string keys */ in findfield()
64 if (lua_rawequal(L, objidx, -1)) { /* found object? */ in findfield()
65 lua_pop(L, 1); /* remove value (but keep name) */ in findfield()
68 else if (findfield(L, objidx, level - 1)) { /* try recursively */ in findfield()
70 lua_pushliteral(L, "."); /* place '.' between the two names */ in findfield()
71 lua_replace(L, -3); /* (in the slot occupied by table) */ in findfield()
72 lua_concat(L, 3); /* lib_name.field_name */ in findfield()
76 lua_pop(L, 1); /* remove value */ in findfield()
85 static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { in pushglobalfuncname() argument
86 int top = lua_gettop(L); in pushglobalfuncname()
87 lua_getinfo(L, "f", ar); /* push function */ in pushglobalfuncname()
88 lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); in pushglobalfuncname()
89 if (findfield(L, top + 1, 2)) { in pushglobalfuncname()
90 const char *name = lua_tostring(L, -1); in pushglobalfuncname()
92 lua_pushstring(L, name + 3); /* push name without prefix */ in pushglobalfuncname()
93 lua_remove(L, -2); /* remove original name */ in pushglobalfuncname()
95 lua_copy(L, -1, top + 1); /* copy name to proper place */ in pushglobalfuncname()
96 lua_settop(L, top + 1); /* remove table "loaded" and name copy */ in pushglobalfuncname()
100 lua_settop(L, top); /* remove function and global table */ in pushglobalfuncname()
106 static void pushfuncname (lua_State *L, lua_Debug *ar) { in pushfuncname() argument
107 if (pushglobalfuncname(L, ar)) { /* try first a global name */ in pushfuncname()
108 lua_pushfstring(L, "function '%s'", lua_tostring(L, -1)); in pushfuncname()
109 lua_remove(L, -2); /* remove name */ in pushfuncname()
112 lua_pushfstring(L, "%s '%s'", ar->namewhat, ar->name); /* use it */ in pushfuncname()
114 lua_pushliteral(L, "main chunk"); in pushfuncname()
116 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined); in pushfuncname()
118 lua_pushliteral(L, "?"); in pushfuncname()
122 static int lastlevel (lua_State *L) { in lastlevel() argument
126 while (lua_getstack(L, le, &ar)) { li = le; le *= 2; } in lastlevel()
130 if (lua_getstack(L, m, &ar)) li = m + 1; in lastlevel()
137 LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, in luaL_traceback() argument
143 luaL_buffinit(L, &b); in luaL_traceback()
152 lua_pushfstring(L, "\n\t...\t(skipping %d levels)", n); in luaL_traceback()
159 lua_pushfstring(L, "\n\t%s: in ", ar.short_src); in luaL_traceback()
161 lua_pushfstring(L, "\n\t%s:%d: in ", ar.short_src, ar.currentline); in luaL_traceback()
163 pushfuncname(L, &ar); in luaL_traceback()
181 LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) { in luaL_argerror() argument
183 if (!lua_getstack(L, 0, &ar)) /* no stack frame? */ in luaL_argerror()
184 return luaL_error(L, "bad argument #%d (%s)", arg, extramsg); in luaL_argerror()
185 lua_getinfo(L, "n", &ar); in luaL_argerror()
189 return luaL_error(L, "calling '%s' on bad self (%s)", in luaL_argerror()
193 ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; in luaL_argerror()
194 return luaL_error(L, "bad argument #%d to '%s' (%s)", in luaL_argerror()
199 LUALIB_API int luaL_typeerror (lua_State *L, int arg, const char *tname) { in luaL_typeerror() argument
202 if (luaL_getmetafield(L, arg, "__name") == LUA_TSTRING) in luaL_typeerror()
203 typearg = lua_tostring(L, -1); /* use the given type name */ in luaL_typeerror()
204 else if (lua_type(L, arg) == LUA_TLIGHTUSERDATA) in luaL_typeerror()
207 typearg = luaL_typename(L, arg); /* standard name */ in luaL_typeerror()
208 msg = lua_pushfstring(L, "%s expected, got %s", tname, typearg); in luaL_typeerror()
209 return luaL_argerror(L, arg, msg); in luaL_typeerror()
213 static void tag_error (lua_State *L, int arg, int tag) { in tag_error() argument
214 luaL_typeerror(L, arg, lua_typename(L, tag)); in tag_error()
222 LUALIB_API void luaL_where (lua_State *L, int level) { in luaL_where() argument
224 if (lua_getstack(L, level, &ar)) { /* check function at level */ in luaL_where()
225 lua_getinfo(L, "Sl", &ar); /* get info about it */ in luaL_where()
227 lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline); in luaL_where()
231 lua_pushfstring(L, ""); /* else, no information available... */ in luaL_where()
240 LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) { in luaL_error() argument
243 luaL_where(L, 1); in luaL_error()
244 lua_pushvfstring(L, fmt, argp); in luaL_error()
246 lua_concat(L, 2); in luaL_error()
247 return lua_error(L); in luaL_error()
252 LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { in luaL_fileresult() argument
255 lua_pushboolean(L, 1); in luaL_fileresult()
259 luaL_pushfail(L); in luaL_fileresult()
261 lua_pushfstring(L, "%s: %s", fname, strerror(en)); in luaL_fileresult()
263 lua_pushstring(L, strerror(en)); in luaL_fileresult()
264 lua_pushinteger(L, en); in luaL_fileresult()
294 LUALIB_API int luaL_execresult (lua_State *L, int stat) { in luaL_execresult() argument
296 return luaL_fileresult(L, 0, NULL); in luaL_execresult()
301 lua_pushboolean(L, 1); in luaL_execresult()
303 luaL_pushfail(L); in luaL_execresult()
304 lua_pushstring(L, what); in luaL_execresult()
305 lua_pushinteger(L, stat); in luaL_execresult()
321 LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) { in luaL_newmetatable() argument
322 if (luaL_getmetatable(L, tname) != LUA_TNIL) /* name already in use? */ in luaL_newmetatable()
324 lua_pop(L, 1); in luaL_newmetatable()
325 lua_createtable(L, 0, 2); /* create metatable */ in luaL_newmetatable()
326 lua_pushstring(L, tname); in luaL_newmetatable()
327 lua_setfield(L, -2, "__name"); /* metatable.__name = tname */ in luaL_newmetatable()
328 lua_pushvalue(L, -1); in luaL_newmetatable()
329 lua_setfield(L, LUA_REGISTRYINDEX, tname); /* registry.name = metatable */ in luaL_newmetatable()
334 LUALIB_API void luaL_setmetatable (lua_State *L, const char *tname) { in luaL_setmetatable() argument
335 luaL_getmetatable(L, tname); in luaL_setmetatable()
336 lua_setmetatable(L, -2); in luaL_setmetatable()
340 LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) { in luaL_testudata() argument
341 void *p = lua_touserdata(L, ud); in luaL_testudata()
343 if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ in luaL_testudata()
344 luaL_getmetatable(L, tname); /* get correct metatable */ in luaL_testudata()
345 if (!lua_rawequal(L, -1, -2)) /* not the same? */ in luaL_testudata()
347 lua_pop(L, 2); /* remove both metatables */ in luaL_testudata()
355 LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { in luaL_checkudata() argument
356 void *p = luaL_testudata(L, ud, tname); in luaL_checkudata()
357 luaL_argexpected(L, p != NULL, ud, tname); in luaL_checkudata()
370 LUALIB_API int luaL_checkoption (lua_State *L, int arg, const char *def, in luaL_checkoption() argument
372 const char *name = (def) ? luaL_optstring(L, arg, def) : in luaL_checkoption()
373 luaL_checkstring(L, arg); in luaL_checkoption()
378 return luaL_argerror(L, arg, in luaL_checkoption()
379 lua_pushfstring(L, "invalid option '%s'", name)); in luaL_checkoption()
390 LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) { in luaL_checkstack() argument
391 if (l_unlikely(!lua_checkstack(L, space))) { in luaL_checkstack()
393 luaL_error(L, "stack overflow (%s)", msg); in luaL_checkstack()
395 luaL_error(L, "stack overflow"); in luaL_checkstack()
400 LUALIB_API void luaL_checktype (lua_State *L, int arg, int t) { in luaL_checktype() argument
401 if (l_unlikely(lua_type(L, arg) != t)) in luaL_checktype()
402 tag_error(L, arg, t); in luaL_checktype()
406 LUALIB_API void luaL_checkany (lua_State *L, int arg) { in luaL_checkany() argument
407 if (l_unlikely(lua_type(L, arg) == LUA_TNONE)) in luaL_checkany()
408 luaL_argerror(L, arg, "value expected"); in luaL_checkany()
412 LUALIB_API const char *luaL_checklstring (lua_State *L, int arg, size_t *len) { in luaL_checklstring() argument
413 const char *s = lua_tolstring(L, arg, len); in luaL_checklstring()
414 if (l_unlikely(!s)) tag_error(L, arg, LUA_TSTRING); in luaL_checklstring()
419 LUALIB_API const char *luaL_optlstring (lua_State *L, int arg, in luaL_optlstring() argument
421 if (lua_isnoneornil(L, arg)) { in luaL_optlstring()
426 else return luaL_checklstring(L, arg, len); in luaL_optlstring()
430 LUALIB_API lua_Number luaL_checknumber (lua_State *L, int arg) { in luaL_checknumber() argument
432 lua_Number d = lua_tonumberx(L, arg, &isnum); in luaL_checknumber()
434 tag_error(L, arg, LUA_TNUMBER); in luaL_checknumber()
439 LUALIB_API lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number def) { in luaL_optnumber() argument
440 return luaL_opt(L, luaL_checknumber, arg, def); in luaL_optnumber()
445 static void interror (lua_State *L, int arg) { in interror() argument
446 if (lua_isnumber(L, arg)) in interror()
447 luaL_argerror(L, arg, "number has no integer representation"); in interror()
449 tag_error(L, arg, LUA_TNUMBER); in interror()
453 LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int arg) { in luaL_checkinteger() argument
455 lua_Integer d = lua_tointegerx(L, arg, &isnum); in luaL_checkinteger()
457 interror(L, arg); in luaL_checkinteger()
463 LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int arg, in luaL_optinteger() argument
465 return luaL_opt(L, luaL_checkinteger, arg, def); in luaL_optinteger()
485 static void *resizebox (lua_State *L, int idx, size_t newsize) { in resizebox() argument
487 lua_Alloc allocf = lua_getallocf(L, &ud); in resizebox()
488 UBox *box = (UBox *)lua_touserdata(L, idx); in resizebox()
491 lua_pushliteral(L, "not enough memory"); in resizebox()
492 lua_error(L); /* raise a memory error */ in resizebox()
500 static int boxgc (lua_State *L) { in boxgc() argument
501 resizebox(L, 1, 0); in boxgc()
513 static void newbox (lua_State *L) { in newbox() argument
514 UBox *box = (UBox *)lua_newuserdatauv(L, sizeof(UBox), 0); in newbox()
517 if (luaL_newmetatable(L, "_UBOX*")) /* creating metatable? */ in newbox()
518 luaL_setfuncs(L, boxmt, 0); /* set its metamethods */ in newbox()
519 lua_setmetatable(L, -2); in newbox()
535 lua_assert(buffonstack(B) ? lua_touserdata(B->L, idx) != NULL \
536 : lua_touserdata(B->L, idx) == (void*)B)
547 return luaL_error(B->L, "buffer too large"); in newbuffsize()
564 lua_State *L = B->L; in prepbuffsize() local
569 newbuff = (char *)resizebox(L, boxidx, newsize); /* resize it */ in prepbuffsize()
571 lua_remove(L, boxidx); /* remove placeholder */ in prepbuffsize()
572 newbox(L); /* create a new box */ in prepbuffsize()
573 lua_insert(L, boxidx); /* move box to its intended position */ in prepbuffsize()
574 lua_toclose(L, boxidx); in prepbuffsize()
575 newbuff = (char *)resizebox(L, boxidx, newsize); in prepbuffsize()
607 lua_State *L = B->L; in luaL_pushresult() local
609 lua_pushlstring(L, B->b, B->n); in luaL_pushresult()
611 lua_closeslot(L, -2); /* close the box */ in luaL_pushresult()
612 lua_remove(L, -2); /* remove box or placeholder from the stack */ in luaL_pushresult()
632 lua_State *L = B->L; in luaL_addvalue() local
634 const char *s = lua_tolstring(L, -1, &len); in luaL_addvalue()
638 lua_pop(L, 1); /* pop string */ in luaL_addvalue()
642 LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { in luaL_buffinit() argument
643 B->L = L; in luaL_buffinit()
647 lua_pushlightuserdata(L, (void*)B); /* push placeholder */ in luaL_buffinit()
651 LUALIB_API char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz) { in luaL_buffinitsize() argument
652 luaL_buffinit(L, B); in luaL_buffinitsize()
673 LUALIB_API int luaL_ref (lua_State *L, int t) { in luaL_ref() argument
675 if (lua_isnil(L, -1)) { in luaL_ref()
676 lua_pop(L, 1); /* remove from stack */ in luaL_ref()
679 t = lua_absindex(L, t); in luaL_ref()
680 if (lua_rawgeti(L, t, freelist) == LUA_TNIL) { /* first access? */ in luaL_ref()
682 lua_pushinteger(L, 0); /* initialize as an empty list */ in luaL_ref()
683 lua_rawseti(L, t, freelist); /* ref = t[freelist] = 0 */ in luaL_ref()
686 lua_assert(lua_isinteger(L, -1)); in luaL_ref()
687 ref = (int)lua_tointeger(L, -1); /* ref = t[freelist] */ in luaL_ref()
689 lua_pop(L, 1); /* remove element from stack */ in luaL_ref()
691 lua_rawgeti(L, t, ref); /* remove it from list */ in luaL_ref()
692 lua_rawseti(L, t, freelist); /* (t[freelist] = t[ref]) */ in luaL_ref()
695 ref = (int)lua_rawlen(L, t) + 1; /* get a new reference */ in luaL_ref()
696 lua_rawseti(L, t, ref); in luaL_ref()
701 LUALIB_API void luaL_unref (lua_State *L, int t, int ref) { in luaL_unref() argument
703 t = lua_absindex(L, t); in luaL_unref()
704 lua_rawgeti(L, t, freelist); in luaL_unref()
705 lua_assert(lua_isinteger(L, -1)); in luaL_unref()
706 lua_rawseti(L, t, ref); /* t[ref] = t[freelist] */ in luaL_unref()
707 lua_pushinteger(L, ref); in luaL_unref()
708 lua_rawseti(L, t, freelist); /* t[freelist] = ref */ in luaL_unref()
729 static const char *getF (lua_State *L, void *ud, size_t *size) { in getF() argument
731 (void)L; /* not used */ in getF()
747 static int errfile (lua_State *L, const char *what, int fnameindex) { in errfile() argument
749 const char *filename = lua_tostring(L, fnameindex) + 1; in errfile()
750 lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); in errfile()
751 lua_remove(L, fnameindex); in errfile()
791 LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename, in luaL_loadfilex() argument
796 int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */ in luaL_loadfilex()
798 lua_pushliteral(L, "=stdin"); in luaL_loadfilex()
802 lua_pushfstring(L, "@%s", filename); in luaL_loadfilex()
804 if (lf.f == NULL) return errfile(L, "open", fnameindex); in luaL_loadfilex()
813 if (lf.f == NULL) return errfile(L, "reopen", fnameindex); in luaL_loadfilex()
819 status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode); in luaL_loadfilex()
823 lua_settop(L, fnameindex); /* ignore results from 'lua_load' */ in luaL_loadfilex()
824 return errfile(L, "read", fnameindex); in luaL_loadfilex()
826 lua_remove(L, fnameindex); in luaL_loadfilex()
838 static const char *getS (lua_State *L, void *ud, size_t *size) { in getS() argument
840 (void)L; /* not used */ in getS()
848 LUALIB_API int luaL_loadbufferx (lua_State *L, const char *buff, size_t size, in luaL_loadbufferx() argument
853 return lua_load(L, getS, &ls, name, mode); in luaL_loadbufferx()
857 LUALIB_API int luaL_loadstring (lua_State *L, const char *s) { in luaL_loadstring() argument
858 return luaL_loadbuffer(L, s, strlen(s), s); in luaL_loadstring()
865 LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) { in luaL_getmetafield() argument
866 if (!lua_getmetatable(L, obj)) /* no metatable? */ in luaL_getmetafield()
870 lua_pushstring(L, event); in luaL_getmetafield()
871 tt = lua_rawget(L, -2); in luaL_getmetafield()
873 lua_pop(L, 2); /* remove metatable and metafield */ in luaL_getmetafield()
875 lua_remove(L, -2); /* remove only metatable */ in luaL_getmetafield()
881 LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) { in luaL_callmeta() argument
882 obj = lua_absindex(L, obj); in luaL_callmeta()
883 if (luaL_getmetafield(L, obj, event) == LUA_TNIL) /* no metafield? */ in luaL_callmeta()
885 lua_pushvalue(L, obj); in luaL_callmeta()
886 lua_call(L, 1, 1); in luaL_callmeta()
891 LUALIB_API lua_Integer luaL_len (lua_State *L, int idx) { in luaL_len() argument
894 lua_len(L, idx); in luaL_len()
895 l = lua_tointegerx(L, -1, &isnum); in luaL_len()
897 luaL_error(L, "object length is not an integer"); in luaL_len()
898 lua_pop(L, 1); /* remove object */ in luaL_len()
903 LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { in luaL_tolstring() argument
904 idx = lua_absindex(L,idx); in luaL_tolstring()
905 if (luaL_callmeta(L, idx, "__tostring")) { /* metafield? */ in luaL_tolstring()
906 if (!lua_isstring(L, -1)) in luaL_tolstring()
907 luaL_error(L, "'__tostring' must return a string"); in luaL_tolstring()
910 switch (lua_type(L, idx)) { in luaL_tolstring()
913 if (lua_isinteger(L, idx)) in luaL_tolstring()
915 lua_pushfstring(L, "%I", (LUAI_UACINT)lua_tointeger(L, idx)); in luaL_tolstring()
918 lua_pushfstring(L, "%f", (LUAI_UACNUMBER)lua_tonumber(L, idx)); in luaL_tolstring()
923 lua_pushvalue(L, idx); in luaL_tolstring()
926 lua_pushstring(L, (lua_toboolean(L, idx) ? "true" : "false")); in luaL_tolstring()
929 lua_pushliteral(L, "nil"); in luaL_tolstring()
932 int tt = luaL_getmetafield(L, idx, "__name"); /* try name */ in luaL_tolstring()
933 const char *kind = (tt == LUA_TSTRING) ? lua_tostring(L, -1) : in luaL_tolstring()
934 luaL_typename(L, idx); in luaL_tolstring()
935 lua_pushfstring(L, "%s: %p", kind, lua_topointer(L, idx)); in luaL_tolstring()
937 lua_remove(L, -2); /* remove '__name' */ in luaL_tolstring()
942 return lua_tolstring(L, -1, len); in luaL_tolstring()
951 LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { in luaL_setfuncs() argument
952 luaL_checkstack(L, nup, "too many upvalues"); in luaL_setfuncs()
955 lua_pushboolean(L, 0); in luaL_setfuncs()
959 lua_pushvalue(L, -nup); in luaL_setfuncs()
960 lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ in luaL_setfuncs()
962 lua_setfield(L, -(nup + 2), l->name); in luaL_setfuncs()
964 lua_pop(L, nup); /* remove upvalues */ in luaL_setfuncs()
972 LUALIB_API int luaL_getsubtable (lua_State *L, int idx, const char *fname) { in luaL_getsubtable() argument
973 if (lua_getfield(L, idx, fname) == LUA_TTABLE) in luaL_getsubtable()
976 lua_pop(L, 1); /* remove previous result */ in luaL_getsubtable()
977 idx = lua_absindex(L, idx); in luaL_getsubtable()
978 lua_newtable(L); in luaL_getsubtable()
979 lua_pushvalue(L, -1); /* copy to be left at top */ in luaL_getsubtable()
980 lua_setfield(L, idx, fname); /* assign new table to field */ in luaL_getsubtable()
992 LUALIB_API void luaL_requiref (lua_State *L, const char *modname, in luaL_requiref() argument
994 luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); in luaL_requiref()
995 lua_getfield(L, -1, modname); /* LOADED[modname] */ in luaL_requiref()
996 if (!lua_toboolean(L, -1)) { /* package not already loaded? */ in luaL_requiref()
997 lua_pop(L, 1); /* remove field */ in luaL_requiref()
998 lua_pushcfunction(L, openf); in luaL_requiref()
999 lua_pushstring(L, modname); /* argument to open function */ in luaL_requiref()
1000 lua_call(L, 1, 1); /* call 'openf' to open module */ in luaL_requiref()
1001 lua_pushvalue(L, -1); /* make copy of module (call result) */ in luaL_requiref()
1002 lua_setfield(L, -3, modname); /* LOADED[modname] = module */ in luaL_requiref()
1004 lua_remove(L, -2); /* remove LOADED table */ in luaL_requiref()
1006 lua_pushvalue(L, -1); /* copy of module */ in luaL_requiref()
1007 lua_setglobal(L, modname); /* _G[modname] = module */ in luaL_requiref()
1025 LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, in luaL_gsub() argument
1028 luaL_buffinit(L, &b); in luaL_gsub()
1031 return lua_tostring(L, -1); in luaL_gsub()
1047 static int panic (lua_State *L) { in panic() argument
1048 const char *msg = lua_tostring(L, -1); in panic()
1071 static int checkcontrol (lua_State *L, const char *message, int tocont) { in checkcontrol() argument
1076 lua_setwarnf(L, warnfoff, L); /* turn warnings off */ in checkcontrol()
1078 lua_setwarnf(L, warnfon, L); /* turn warnings on */ in checkcontrol()
1094 lua_State *L = (lua_State *)ud; in warnfcont() local
1097 lua_setwarnf(L, warnfcont, L); /* to be continued */ in warnfcont()
1100 lua_setwarnf(L, warnfon, L); /* next call is a new message */ in warnfcont()
1114 lua_State *L = lua_newstate(l_alloc, NULL); in luaL_newstate() local
1115 if (l_likely(L)) { in luaL_newstate()
1116 lua_atpanic(L, &panic); in luaL_newstate()
1117 lua_setwarnf(L, warnfoff, L); /* default is warnings off */ in luaL_newstate()
1119 return L; in luaL_newstate()
1124 LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz) { in luaL_checkversion_() argument
1125 lua_Number v = lua_version(L); in luaL_checkversion_()
1127 luaL_error(L, "core and library have incompatible numeric types"); in luaL_checkversion_()
1130 luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", in luaL_checkversion_()