Lines Matching refs:L

52 static int findfield (lua_State *L, int objidx, int level) {  in findfield()  argument
53 if (level == 0 || !lua_istable(L, -1)) in findfield()
55 lua_pushnil(L); /* start 'next' loop */ in findfield()
56 while (lua_next(L, -2)) { /* for each pair in table */ in findfield()
57 if (lua_type(L, -2) == LUA_TSTRING) { /* ignore non-string keys */ in findfield()
58 if (lua_rawequal(L, objidx, -1)) { /* found object? */ in findfield()
59 lua_pop(L, 1); /* remove value (but keep name) */ in findfield()
62 else if (findfield(L, objidx, level - 1)) { /* try recursively */ in findfield()
64 lua_pushliteral(L, "."); /* place '.' between the two names */ in findfield()
65 lua_replace(L, -3); /* (in the slot occupied by table) */ in findfield()
66 lua_concat(L, 3); /* lib_name.field_name */ in findfield()
70 lua_pop(L, 1); /* remove value */ in findfield()
79 static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { in pushglobalfuncname() argument
80 int top = lua_gettop(L); in pushglobalfuncname()
81 lua_getinfo(L, "f", ar); /* push function */ in pushglobalfuncname()
82 lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); in pushglobalfuncname()
83 if (findfield(L, top + 1, 2)) { in pushglobalfuncname()
84 const char *name = lua_tostring(L, -1); in pushglobalfuncname()
86 lua_pushstring(L, name + 3); /* push name without prefix */ in pushglobalfuncname()
87 lua_remove(L, -2); /* remove original name */ in pushglobalfuncname()
89 lua_copy(L, -1, top + 1); /* copy name to proper place */ in pushglobalfuncname()
90 lua_settop(L, top + 1); /* remove table "loaded" and name copy */ in pushglobalfuncname()
94 lua_settop(L, top); /* remove function and global table */ in pushglobalfuncname()
100 static void pushfuncname (lua_State *L, lua_Debug *ar) { in pushfuncname() argument
101 if (pushglobalfuncname(L, ar)) { /* try first a global name */ in pushfuncname()
102 lua_pushfstring(L, "function '%s'", lua_tostring(L, -1)); in pushfuncname()
103 lua_remove(L, -2); /* remove name */ in pushfuncname()
106 lua_pushfstring(L, "%s '%s'", ar->namewhat, ar->name); /* use it */ in pushfuncname()
108 lua_pushliteral(L, "main chunk"); in pushfuncname()
110 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined); in pushfuncname()
112 lua_pushliteral(L, "?"); in pushfuncname()
116 static int lastlevel (lua_State *L) { in lastlevel() argument
120 while (lua_getstack(L, le, &ar)) { li = le; le *= 2; } in lastlevel()
124 if (lua_getstack(L, m, &ar)) li = m + 1; in lastlevel()
131 LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, in luaL_traceback() argument
137 luaL_buffinit(L, &b); in luaL_traceback()
146 lua_pushfstring(L, "\n\t...\t(skipping %d levels)", n); in luaL_traceback()
153 lua_pushfstring(L, "\n\t%s: in ", ar.short_src); in luaL_traceback()
155 lua_pushfstring(L, "\n\t%s:%d: in ", ar.short_src, ar.currentline); in luaL_traceback()
157 pushfuncname(L, &ar); in luaL_traceback()
175 LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) { in luaL_argerror() argument
177 if (!lua_getstack(L, 0, &ar)) /* no stack frame? */ in luaL_argerror()
178 return luaL_error(L, "bad argument #%d (%s)", arg, extramsg); in luaL_argerror()
179 lua_getinfo(L, "n", &ar); in luaL_argerror()
183 return luaL_error(L, "calling '%s' on bad self (%s)", in luaL_argerror()
187 ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; in luaL_argerror()
188 return luaL_error(L, "bad argument #%d to '%s' (%s)", in luaL_argerror()
193 LUALIB_API int luaL_typeerror (lua_State *L, int arg, const char *tname) { in luaL_typeerror() argument
196 if (luaL_getmetafield(L, arg, "__name") == LUA_TSTRING) in luaL_typeerror()
197 typearg = lua_tostring(L, -1); /* use the given type name */ in luaL_typeerror()
198 else if (lua_type(L, arg) == LUA_TLIGHTUSERDATA) in luaL_typeerror()
201 typearg = luaL_typename(L, arg); /* standard name */ in luaL_typeerror()
202 msg = lua_pushfstring(L, "%s expected, got %s", tname, typearg); in luaL_typeerror()
203 return luaL_argerror(L, arg, msg); in luaL_typeerror()
207 static void tag_error (lua_State *L, int arg, int tag) { in tag_error() argument
208 luaL_typeerror(L, arg, lua_typename(L, tag)); in tag_error()
216 LUALIB_API void luaL_where (lua_State *L, int level) { in luaL_where() argument
218 if (lua_getstack(L, level, &ar)) { /* check function at level */ in luaL_where()
219 lua_getinfo(L, "Sl", &ar); /* get info about it */ in luaL_where()
221 lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline); in luaL_where()
225 lua_pushfstring(L, ""); /* else, no information available... */ in luaL_where()
234 LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) { in luaL_error() argument
237 luaL_where(L, 1); in luaL_error()
238 lua_pushvfstring(L, fmt, argp); in luaL_error()
240 lua_concat(L, 2); in luaL_error()
241 return lua_error(L); in luaL_error()
245 LUALIB_API int luaL_fileresult (lua_State *L, int stat, const char *fname) { in luaL_fileresult() argument
248 lua_pushboolean(L, 1); in luaL_fileresult()
252 luaL_pushfail(L); in luaL_fileresult()
254 lua_pushfstring(L, "%s: %s", fname, strerror(en)); in luaL_fileresult()
256 lua_pushstring(L, strerror(en)); in luaL_fileresult()
257 lua_pushinteger(L, en); in luaL_fileresult()
285 LUALIB_API int luaL_execresult (lua_State *L, int stat) { in luaL_execresult() argument
287 return luaL_fileresult(L, 0, NULL); in luaL_execresult()
292 lua_pushboolean(L, 1); in luaL_execresult()
294 luaL_pushfail(L); in luaL_execresult()
295 lua_pushstring(L, what); in luaL_execresult()
296 lua_pushinteger(L, stat); in luaL_execresult()
311 LUALIB_API int luaL_newmetatable (lua_State *L, const char *tname) { in luaL_newmetatable() argument
312 if (luaL_getmetatable(L, tname) != LUA_TNIL) /* name already in use? */ in luaL_newmetatable()
314 lua_pop(L, 1); in luaL_newmetatable()
315 lua_createtable(L, 0, 2); /* create metatable */ in luaL_newmetatable()
316 lua_pushstring(L, tname); in luaL_newmetatable()
317 lua_setfield(L, -2, "__name"); /* metatable.__name = tname */ in luaL_newmetatable()
318 lua_pushvalue(L, -1); in luaL_newmetatable()
319 lua_setfield(L, LUA_REGISTRYINDEX, tname); /* registry.name = metatable */ in luaL_newmetatable()
324 LUALIB_API void luaL_setmetatable (lua_State *L, const char *tname) { in luaL_setmetatable() argument
325 luaL_getmetatable(L, tname); in luaL_setmetatable()
326 lua_setmetatable(L, -2); in luaL_setmetatable()
330 LUALIB_API void *luaL_testudata (lua_State *L, int ud, const char *tname) { in luaL_testudata() argument
331 void *p = lua_touserdata(L, ud); in luaL_testudata()
333 if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ in luaL_testudata()
334 luaL_getmetatable(L, tname); /* get correct metatable */ in luaL_testudata()
335 if (!lua_rawequal(L, -1, -2)) /* not the same? */ in luaL_testudata()
337 lua_pop(L, 2); /* remove both metatables */ in luaL_testudata()
345 LUALIB_API void *luaL_checkudata (lua_State *L, int ud, const char *tname) { in luaL_checkudata() argument
346 void *p = luaL_testudata(L, ud, tname); in luaL_checkudata()
347 luaL_argexpected(L, p != NULL, ud, tname); in luaL_checkudata()
360 LUALIB_API int luaL_checkoption (lua_State *L, int arg, const char *def, in luaL_checkoption() argument
362 const char *name = (def) ? luaL_optstring(L, arg, def) : in luaL_checkoption()
363 luaL_checkstring(L, arg); in luaL_checkoption()
368 return luaL_argerror(L, arg, in luaL_checkoption()
369 lua_pushfstring(L, "invalid option '%s'", name)); in luaL_checkoption()
380 LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) { in luaL_checkstack() argument
381 if (l_unlikely(!lua_checkstack(L, space))) { in luaL_checkstack()
383 luaL_error(L, "stack overflow (%s)", msg); in luaL_checkstack()
385 luaL_error(L, "stack overflow"); in luaL_checkstack()
390 LUALIB_API void luaL_checktype (lua_State *L, int arg, int t) { in luaL_checktype() argument
391 if (l_unlikely(lua_type(L, arg) != t)) in luaL_checktype()
392 tag_error(L, arg, t); in luaL_checktype()
396 LUALIB_API void luaL_checkany (lua_State *L, int arg) { in luaL_checkany() argument
397 if (l_unlikely(lua_type(L, arg) == LUA_TNONE)) in luaL_checkany()
398 luaL_argerror(L, arg, "value expected"); in luaL_checkany()
402 LUALIB_API const char *luaL_checklstring (lua_State *L, int arg, size_t *len) { in luaL_checklstring() argument
403 const char *s = lua_tolstring(L, arg, len); in luaL_checklstring()
404 if (l_unlikely(!s)) tag_error(L, arg, LUA_TSTRING); in luaL_checklstring()
409 LUALIB_API const char *luaL_optlstring (lua_State *L, int arg, in luaL_optlstring() argument
411 if (lua_isnoneornil(L, arg)) { in luaL_optlstring()
416 else return luaL_checklstring(L, arg, len); in luaL_optlstring()
420 LUALIB_API lua_Number luaL_checknumber (lua_State *L, int arg) { in luaL_checknumber() argument
422 lua_Number d = lua_tonumberx(L, arg, &isnum); in luaL_checknumber()
424 tag_error(L, arg, LUA_TNUMBER); in luaL_checknumber()
429 LUALIB_API lua_Number luaL_optnumber (lua_State *L, int arg, lua_Number def) { in luaL_optnumber() argument
430 return luaL_opt(L, luaL_checknumber, arg, def); in luaL_optnumber()
434 static void interror (lua_State *L, int arg) { in interror() argument
435 if (lua_isnumber(L, arg)) in interror()
436 luaL_argerror(L, arg, "number has no integer representation"); in interror()
438 tag_error(L, arg, LUA_TNUMBER); in interror()
442 LUALIB_API lua_Integer luaL_checkinteger (lua_State *L, int arg) { in luaL_checkinteger() argument
444 lua_Integer d = lua_tointegerx(L, arg, &isnum); in luaL_checkinteger()
446 interror(L, arg); in luaL_checkinteger()
452 LUALIB_API lua_Integer luaL_optinteger (lua_State *L, int arg, in luaL_optinteger() argument
454 return luaL_opt(L, luaL_checkinteger, arg, def); in luaL_optinteger()
473 static void *resizebox (lua_State *L, int idx, size_t newsize) { in resizebox() argument
475 lua_Alloc allocf = lua_getallocf(L, &ud); in resizebox()
476 UBox *box = (UBox *)lua_touserdata(L, idx); in resizebox()
479 lua_pushliteral(L, "not enough memory"); in resizebox()
480 lua_error(L); /* raise a memory error */ in resizebox()
488 static int boxgc (lua_State *L) { in boxgc() argument
489 resizebox(L, 1, 0); in boxgc()
501 static void newbox (lua_State *L) { in newbox() argument
502 UBox *box = (UBox *)lua_newuserdatauv(L, sizeof(UBox), 0); in newbox()
505 if (luaL_newmetatable(L, "_UBOX*")) /* creating metatable? */ in newbox()
506 luaL_setfuncs(L, boxmt, 0); /* set its metamethods */ in newbox()
507 lua_setmetatable(L, -2); in newbox()
523 lua_assert(buffonstack(B) ? lua_touserdata(B->L, idx) != NULL \
524 : lua_touserdata(B->L, idx) == (void*)B)
535 return luaL_error(B->L, "buffer too large"); in newbuffsize()
552 lua_State *L = B->L; in prepbuffsize() local
557 newbuff = (char *)resizebox(L, boxidx, newsize); /* resize it */ in prepbuffsize()
559 lua_remove(L, boxidx); /* remove placeholder */ in prepbuffsize()
560 newbox(L); /* create a new box */ in prepbuffsize()
561 lua_insert(L, boxidx); /* move box to its intended position */ in prepbuffsize()
562 lua_toclose(L, boxidx); in prepbuffsize()
563 newbuff = (char *)resizebox(L, boxidx, newsize); in prepbuffsize()
595 lua_State *L = B->L; in luaL_pushresult() local
597 lua_pushlstring(L, B->b, B->n); in luaL_pushresult()
599 lua_closeslot(L, -2); /* close the box */ in luaL_pushresult()
600 lua_remove(L, -2); /* remove box or placeholder from the stack */ in luaL_pushresult()
620 lua_State *L = B->L; in luaL_addvalue() local
622 const char *s = lua_tolstring(L, -1, &len); in luaL_addvalue()
626 lua_pop(L, 1); /* pop string */ in luaL_addvalue()
630 LUALIB_API void luaL_buffinit (lua_State *L, luaL_Buffer *B) { in luaL_buffinit() argument
631 B->L = L; in luaL_buffinit()
635 lua_pushlightuserdata(L, (void*)B); /* push placeholder */ in luaL_buffinit()
639 LUALIB_API char *luaL_buffinitsize (lua_State *L, luaL_Buffer *B, size_t sz) { in luaL_buffinitsize() argument
640 luaL_buffinit(L, B); in luaL_buffinitsize()
661 LUALIB_API int luaL_ref (lua_State *L, int t) { in luaL_ref() argument
663 if (lua_isnil(L, -1)) { in luaL_ref()
664 lua_pop(L, 1); /* remove from stack */ in luaL_ref()
667 t = lua_absindex(L, t); in luaL_ref()
668 if (lua_rawgeti(L, t, freelist) == LUA_TNIL) { /* first access? */ in luaL_ref()
670 lua_pushinteger(L, 0); /* initialize as an empty list */ in luaL_ref()
671 lua_rawseti(L, t, freelist); /* ref = t[freelist] = 0 */ in luaL_ref()
674 lua_assert(lua_isinteger(L, -1)); in luaL_ref()
675 ref = (int)lua_tointeger(L, -1); /* ref = t[freelist] */ in luaL_ref()
677 lua_pop(L, 1); /* remove element from stack */ in luaL_ref()
679 lua_rawgeti(L, t, ref); /* remove it from list */ in luaL_ref()
680 lua_rawseti(L, t, freelist); /* (t[freelist] = t[ref]) */ in luaL_ref()
683 ref = (int)lua_rawlen(L, t) + 1; /* get a new reference */ in luaL_ref()
684 lua_rawseti(L, t, ref); in luaL_ref()
689 LUALIB_API void luaL_unref (lua_State *L, int t, int ref) { in luaL_unref() argument
691 t = lua_absindex(L, t); in luaL_unref()
692 lua_rawgeti(L, t, freelist); in luaL_unref()
693 lua_assert(lua_isinteger(L, -1)); in luaL_unref()
694 lua_rawseti(L, t, ref); /* t[ref] = t[freelist] */ in luaL_unref()
695 lua_pushinteger(L, ref); in luaL_unref()
696 lua_rawseti(L, t, freelist); /* t[freelist] = ref */ in luaL_unref()
716 static const char *getF (lua_State *L, void *ud, size_t *size) { in getF() argument
718 (void)L; /* not used */ in getF()
734 static int errfile (lua_State *L, const char *what, int fnameindex) { in errfile() argument
736 const char *filename = lua_tostring(L, fnameindex) + 1; in errfile()
737 lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); in errfile()
738 lua_remove(L, fnameindex); in errfile()
778 LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename, in luaL_loadfilex() argument
783 int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */ in luaL_loadfilex()
785 lua_pushliteral(L, "=stdin"); in luaL_loadfilex()
789 lua_pushfstring(L, "@%s", filename); in luaL_loadfilex()
791 if (lf.f == NULL) return errfile(L, "open", fnameindex); in luaL_loadfilex()
800 if (lf.f == NULL) return errfile(L, "reopen", fnameindex); in luaL_loadfilex()
806 status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode); in luaL_loadfilex()
810 lua_settop(L, fnameindex); /* ignore results from 'lua_load' */ in luaL_loadfilex()
811 return errfile(L, "read", fnameindex); in luaL_loadfilex()
813 lua_remove(L, fnameindex); in luaL_loadfilex()
824 static const char *getS (lua_State *L, void *ud, size_t *size) { in getS() argument
826 (void)L; /* not used */ in getS()
834 LUALIB_API int luaL_loadbufferx (lua_State *L, const char *buff, size_t size, in luaL_loadbufferx() argument
839 return lua_load(L, getS, &ls, name, mode); in luaL_loadbufferx()
843 LUALIB_API int luaL_loadstring (lua_State *L, const char *s) { in luaL_loadstring() argument
844 return luaL_loadbuffer(L, s, strlen(s), s); in luaL_loadstring()
851 LUALIB_API int luaL_getmetafield (lua_State *L, int obj, const char *event) { in luaL_getmetafield() argument
852 if (!lua_getmetatable(L, obj)) /* no metatable? */ in luaL_getmetafield()
856 lua_pushstring(L, event); in luaL_getmetafield()
857 tt = lua_rawget(L, -2); in luaL_getmetafield()
859 lua_pop(L, 2); /* remove metatable and metafield */ in luaL_getmetafield()
861 lua_remove(L, -2); /* remove only metatable */ in luaL_getmetafield()
867 LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) { in luaL_callmeta() argument
868 obj = lua_absindex(L, obj); in luaL_callmeta()
869 if (luaL_getmetafield(L, obj, event) == LUA_TNIL) /* no metafield? */ in luaL_callmeta()
871 lua_pushvalue(L, obj); in luaL_callmeta()
872 lua_call(L, 1, 1); in luaL_callmeta()
877 LUALIB_API lua_Integer luaL_len (lua_State *L, int idx) { in luaL_len() argument
880 lua_len(L, idx); in luaL_len()
881 l = lua_tointegerx(L, -1, &isnum); in luaL_len()
883 luaL_error(L, "object length is not an integer"); in luaL_len()
884 lua_pop(L, 1); /* remove object */ in luaL_len()
889 LUALIB_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) { in luaL_tolstring() argument
890 idx = lua_absindex(L,idx); in luaL_tolstring()
891 if (luaL_callmeta(L, idx, "__tostring")) { /* metafield? */ in luaL_tolstring()
892 if (!lua_isstring(L, -1)) in luaL_tolstring()
893 luaL_error(L, "'__tostring' must return a string"); in luaL_tolstring()
896 switch (lua_type(L, idx)) { in luaL_tolstring()
898 if (lua_isinteger(L, idx)) in luaL_tolstring()
899 lua_pushfstring(L, "%I", (LUAI_UACINT)lua_tointeger(L, idx)); in luaL_tolstring()
901 lua_pushfstring(L, "%f", (LUAI_UACNUMBER)lua_tonumber(L, idx)); in luaL_tolstring()
905 lua_pushvalue(L, idx); in luaL_tolstring()
908 lua_pushstring(L, (lua_toboolean(L, idx) ? "true" : "false")); in luaL_tolstring()
911 lua_pushliteral(L, "nil"); in luaL_tolstring()
914 int tt = luaL_getmetafield(L, idx, "__name"); /* try name */ in luaL_tolstring()
915 const char *kind = (tt == LUA_TSTRING) ? lua_tostring(L, -1) : in luaL_tolstring()
916 luaL_typename(L, idx); in luaL_tolstring()
917 lua_pushfstring(L, "%s: %p", kind, lua_topointer(L, idx)); in luaL_tolstring()
919 lua_remove(L, -2); /* remove '__name' */ in luaL_tolstring()
924 return lua_tolstring(L, -1, len); in luaL_tolstring()
933 LUALIB_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { in luaL_setfuncs() argument
934 luaL_checkstack(L, nup, "too many upvalues"); in luaL_setfuncs()
937 lua_pushboolean(L, 0); in luaL_setfuncs()
941 lua_pushvalue(L, -nup); in luaL_setfuncs()
942 lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ in luaL_setfuncs()
944 lua_setfield(L, -(nup + 2), l->name); in luaL_setfuncs()
946 lua_pop(L, nup); /* remove upvalues */ in luaL_setfuncs()
954 LUALIB_API int luaL_getsubtable (lua_State *L, int idx, const char *fname) { in luaL_getsubtable() argument
955 if (lua_getfield(L, idx, fname) == LUA_TTABLE) in luaL_getsubtable()
958 lua_pop(L, 1); /* remove previous result */ in luaL_getsubtable()
959 idx = lua_absindex(L, idx); in luaL_getsubtable()
960 lua_newtable(L); in luaL_getsubtable()
961 lua_pushvalue(L, -1); /* copy to be left at top */ in luaL_getsubtable()
962 lua_setfield(L, idx, fname); /* assign new table to field */ in luaL_getsubtable()
974 LUALIB_API void luaL_requiref (lua_State *L, const char *modname, in luaL_requiref() argument
976 luaL_getsubtable(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); in luaL_requiref()
977 lua_getfield(L, -1, modname); /* LOADED[modname] */ in luaL_requiref()
978 if (!lua_toboolean(L, -1)) { /* package not already loaded? */ in luaL_requiref()
979 lua_pop(L, 1); /* remove field */ in luaL_requiref()
980 lua_pushcfunction(L, openf); in luaL_requiref()
981 lua_pushstring(L, modname); /* argument to open function */ in luaL_requiref()
982 lua_call(L, 1, 1); /* call 'openf' to open module */ in luaL_requiref()
983 lua_pushvalue(L, -1); /* make copy of module (call result) */ in luaL_requiref()
984 lua_setfield(L, -3, modname); /* LOADED[modname] = module */ in luaL_requiref()
986 lua_remove(L, -2); /* remove LOADED table */ in luaL_requiref()
988 lua_pushvalue(L, -1); /* copy of module */ in luaL_requiref()
989 lua_setglobal(L, modname); /* _G[modname] = module */ in luaL_requiref()
1007 LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, in luaL_gsub() argument
1010 luaL_buffinit(L, &b); in luaL_gsub()
1013 return lua_tostring(L, -1); in luaL_gsub()
1028 static int panic (lua_State *L) { in panic() argument
1029 const char *msg = lua_tostring(L, -1); in panic()
1052 static int checkcontrol (lua_State *L, const char *message, int tocont) { in checkcontrol() argument
1057 lua_setwarnf(L, warnfoff, L); /* turn warnings off */ in checkcontrol()
1059 lua_setwarnf(L, warnfon, L); /* turn warnings on */ in checkcontrol()
1075 lua_State *L = (lua_State *)ud; in warnfcont() local
1078 lua_setwarnf(L, warnfcont, L); /* to be continued */ in warnfcont()
1081 lua_setwarnf(L, warnfon, L); /* next call is a new message */ in warnfcont()
1095 lua_State *L = lua_newstate(l_alloc, NULL); in luaL_newstate() local
1096 if (l_likely(L)) { in luaL_newstate()
1097 lua_atpanic(L, &panic); in luaL_newstate()
1098 lua_setwarnf(L, warnfoff, L); /* default is warnings off */ in luaL_newstate()
1100 return L; in luaL_newstate()
1104 LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz) { in luaL_checkversion_() argument
1105 lua_Number v = lua_version(L); in luaL_checkversion_()
1107 luaL_error(L, "core and library have incompatible numeric types"); in luaL_checkversion_()
1109 luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f", in luaL_checkversion_()