Lines Matching refs:lua_State

164 typedef struct lua_State lua_State;  typedef
165 typedef int(*lua_CFunction)(lua_State*L);
166 typedef const char*(*lua_Reader)(lua_State*L,void*ud,size_t*sz);
170 static void lua_settop(lua_State*L,int idx);
171 static int lua_type(lua_State*L,int idx);
172 static const char* lua_tolstring(lua_State*L,int idx,size_t*len);
173 static size_t lua_objlen(lua_State*L,int idx);
174 static void lua_pushlstring(lua_State*L,const char*s,size_t l);
175 static void lua_pushcclosure(lua_State*L,lua_CFunction fn,int n);
176 static void lua_createtable(lua_State*L,int narr,int nrec);
177 static void lua_setfield(lua_State*L,int idx,const char*k);
192 typedef void(*lua_Hook)(lua_State*L,lua_Debug*ar);
385 static void*luaM_realloc_(lua_State*L,void*block,size_t oldsize,
387 static void*luaM_toobig(lua_State*L);
388 static void*luaM_growaux_(lua_State*L,void*block,int*size,
411 lua_State*L;
456 struct lua_State*mainthread;
461 struct lua_State{ struct
498 struct lua_State th; argument
511 static void luaE_freethread(lua_State*L,lua_State*L1);
515 static void luaG_typeerror(lua_State*L,const TValue*o,
517 static void luaG_runerror(lua_State*L,const char*fmt,...);
524 typedef void(*Pfunc)(lua_State*L,void*ud);
525 static int luaD_poscall(lua_State*L,StkId firstResult);
526 static void luaD_reallocCI(lua_State*L,int newsize);
527 static void luaD_reallocstack(lua_State*L,int newsize);
528 static void luaD_growstack(lua_State*L,int n);
529 static void luaD_throw(lua_State*L,int errcode);
530 static void*luaM_growaux_(lua_State*L,void*block,int*size,size_t size_elems, in luaM_growaux_()
548 static void*luaM_toobig(lua_State*L){ in luaM_toobig()
552 static void*luaM_realloc_(lua_State*L,void*block,size_t osize,size_t nsize){ in luaM_realloc_()
585 static void luaC_step(lua_State*L);
586 static void luaC_link(lua_State*L,GCObject*o,lu_byte tt);
587 static void luaC_linkupval(lua_State*L,UpVal*uv);
588 static void luaC_barrierf(lua_State*L,GCObject*o,GCObject*v);
589 static void luaC_barrierback(lua_State*L,Table*t);
595 static TString*luaS_newlstr(lua_State*L,const char*str,size_t l);
599 static int luaV_equalval(lua_State*L,const TValue*t1,const TValue*t2);
601 static int luaV_tostring(lua_State*L,StkId obj);
602 static void luaV_execute(lua_State*L,int nexeccalls);
603 static void luaV_concat(lua_State*L,int total,int last);
660 static void pushstr(lua_State*L,const char*str){ in pushstr()
664 static const char*luaO_pushvfstring(lua_State*L,const char*fmt,va_list argp){ in luaO_pushvfstring()
723 static const char*luaO_pushfstring(lua_State*L,const char*fmt,...){
769 static TValue*luaH_setnum(lua_State*L,Table*t,int key);
771 static TValue*luaH_set(lua_State*L,Table*t,const TValue*key);
777 static void luaT_init(lua_State*L){
799 static const TValue*luaT_gettmbyobj(lua_State*L,const TValue*o,TMS event){
815 static Closure*luaF_newCclosure(lua_State*L,int nelems,Table*e){
823 static Closure*luaF_newLclosure(lua_State*L,int nelems,Table*e){
832 static UpVal*luaF_newupval(lua_State*L){
839 static UpVal*luaF_findupval(lua_State*L,StkId level){
868 static void luaF_freeupval(lua_State*L,UpVal*uv){
873 static void luaF_close(lua_State*L,StkId level){
889 static Proto*luaF_newproto(lua_State*L){
913 static void luaF_freeproto(lua_State*L,Proto*f){
922 static void luaF_freeclosure(lua_State*L,Closure*c){
969 struct lua_State*L;
982 static Proto*luaY_parser(lua_State*L,ZIO*z,Mbuffer*buff,
989 static void luaD_seterrorobj(lua_State*L,int errcode,StkId oldtop){
1007 static void restore_stack_limit(lua_State*L){
1014 static void resetstack(lua_State*L,int status){
1025 static void luaD_throw(lua_State*L,int errcode){
1039 static int luaD_rawrunprotected(lua_State*L,Pfunc f,void*ud){
1050 static void correctstack(lua_State*L,TValue*oldstack){
1063 static void luaD_reallocstack(lua_State*L,int newsize){
1071 static void luaD_reallocCI(lua_State*L,int newsize){
1078 static void luaD_growstack(lua_State*L,int n){
1084 static CallInfo*growCI(lua_State*L){
1094 static StkId adjust_varargs(lua_State*L,Proto*p,int actual){
1112 static StkId tryfuncTM(lua_State*L,StkId func){
1125 static int luaD_precall(lua_State*L,StkId func,int nresults){
1179 static int luaD_poscall(lua_State*L,StkId firstResult){
1195 static void luaD_call(lua_State*L,StkId func,int nResults){
1207 static int luaD_pcall(lua_State*L,Pfunc func,void*u,
1235 static void f_parser(lua_State*L,void*ud){
1250 static int luaD_protectedparser(lua_State*L,ZIO*z,const char*name){
1259 static void luaS_resize(lua_State*L,int newsize){
1283 static TString*newlstr(lua_State*L,const char*str,size_t l,
1306 static TString*luaS_newlstr(lua_State*L,const char*str,size_t l){
1324 static Udata*luaS_newudata(lua_State*L,size_t s,Table*e){
1380 static int findindex(lua_State*L,Table*t,StkId key){
1401 static int luaH_next(lua_State*L,Table*t,StkId key){
1483 static void setarrayvector(lua_State*L,Table*t,int size){
1490 static void setnodevector(lua_State*L,Table*t,int size){
1513 static void resize(lua_State*L,Table*t,int nasize,int nhsize){
1537 static void luaH_resizearray(lua_State*L,Table*t,int nasize){
1541 static void rehash(lua_State*L,Table*t,const TValue*ek){
1555 static Table*luaH_new(lua_State*L,int narray,int nhash){
1568 static void luaH_free(lua_State*L,Table*t){
1581 static TValue*newkey(lua_State*L,Table*t,const TValue*key){
1653 static TValue*luaH_set(lua_State*L,Table*t,const TValue*key){
1665 static TValue*luaH_setnum(lua_State*L,Table*t,int key){
1675 static TValue*luaH_setstr(lua_State*L,Table*t,TString*key){
1785 static size_t luaC_separateudata(lua_State*L,int all){
1881 static void checkstacksizes(lua_State*L,StkId max){
1894 static void traversestack(global_State*g,lua_State*l){
1928 lua_State*th=gco2th(o);
1934 return sizeof(lua_State)+sizeof(TValue)*th->stacksize+
1988 static void freeobj(lua_State*L,GCObject*o){
2011 static GCObject**sweeplist(lua_State*L,GCObject**p,lu_mem count){
2031 static void checkSizes(lua_State*L){
2041 static void GCTM(lua_State*L){
2067 static void luaC_callGCTM(lua_State*L){
2071 static void luaC_freeall(lua_State*L){
2084 static void markroot(lua_State*L){
2102 static void atomic(lua_State*L){
2125 static l_mem singlestep(lua_State*L){
2174 static void luaC_step(lua_State*L){
2197 static void luaC_barrierf(lua_State*L,GCObject*o,GCObject*v){
2204 static void luaC_barrierback(lua_State*L,Table*t){
2211 static void luaC_link(lua_State*L,GCObject*o,lu_byte tt){
2218 static void luaC_linkupval(lua_State*L,UpVal*uv){
2248 struct lua_State*L;
2254 static void luaX_init(lua_State*L);
2258 #define tostate(l)(cast(lua_State*,cast(lu_byte*,l)+0))
2260 lua_State l;
2263 static void stack_init(lua_State*L1,lua_State*L){
2277 static void freestack(lua_State*L,lua_State*L1){
2281 static void f_luaopen(lua_State*L,void*ud){
2293 static void preinit_state(lua_State*L,global_State*g){
2312 static void close_state(lua_State*L){
2321 static void luaE_freethread(lua_State*L,lua_State*L1){
2324 luaM_freemem(L,fromstate(L1),state_size(lua_State));
2326 static lua_State*lua_newstate(lua_Alloc f,void*ud){
2328 lua_State*L;
2373 static void callallgcTM(lua_State*L,void*ud){
2377 static void lua_close(lua_State*L){
2397 static int currentpc(lua_State*L,CallInfo*ci){
2403 static int currentline(lua_State*L,CallInfo*ci){
2410 static int lua_getstack(lua_State*L,int level,lua_Debug*ar){
2455 static void collectvalidlines(lua_State*L,Closure*f){
2469 static int auxgetinfo(lua_State*L,const char*what,lua_Debug*ar,
2506 static int lua_getinfo(lua_State*L,const char*what,lua_Debug*ar){
2537 static void luaG_typeerror(lua_State*L,const TValue*o,const char*op){
2549 static void luaG_concaterror(lua_State*L,StkId p1,StkId p2){
2553 static void luaG_aritherror(lua_State*L,const TValue*p1,const TValue*p2){
2559 static int luaG_ordererror(lua_State*L,const TValue*p1,const TValue*p2){
2568 static void addinfo(lua_State*L,const char*msg){
2577 static void luaG_errormsg(lua_State*L){
2588 static void luaG_runerror(lua_State*L,const char*fmt,...){
2597 lua_State*L=z->L;
2605 static void luaZ_init(lua_State*L,ZIO*z,lua_Reader reader,void*data){
2612 static char*luaZ_openspace(lua_State*L,Mbuffer*buff,size_t n){
2683 static void luaX_init(lua_State*L){
2722 lua_State*L=ls->L;
2739 static void luaX_setinput(lua_State*L,LexState*ls,ZIO*z,TString*source){
3143 lua_State*L=fs->L;
3875 lua_State*L=ls->L;
3900 lua_State*L=ls->L;
3921 static Proto*luaY_parser(lua_State*L,ZIO*z,Mbuffer*buff,const char*name){
4698 static int luaV_tostring(lua_State*L,StkId obj){
4709 static void callTMres(lua_State*L,StkId res,const TValue*f,
4722 static void callTM(lua_State*L,const TValue*f,const TValue*p1,
4732 static void luaV_gettable(lua_State*L,const TValue*t,TValue*key,StkId val){
4755 static void luaV_settable(lua_State*L,const TValue*t,TValue*key,StkId val){
4782 static int call_binTM(lua_State*L,const TValue*p1,const TValue*p2,
4791 static const TValue*get_compTM(lua_State*L,Table*mt1,Table*mt2,
4803 static int call_orderTM(lua_State*L,const TValue*p1,const TValue*p2,
4833 static int luaV_lessthan(lua_State*L,const TValue*l,const TValue*r){
4845 static int lessequal(lua_State*L,const TValue*l,const TValue*r){
4859 static int luaV_equalval(lua_State*L,const TValue*t1,const TValue*t2){
4883 static void luaV_concat(lua_State*L,int total,int last){
4914 static void Arith(lua_State*L,StkId ra,const TValue*rb,
4944 static void luaV_execute(lua_State*L,int nexeccalls){
5313 static TValue*index2adr(lua_State*L,int idx){
5341 static Table*getcurrenv(lua_State*L){
5349 static int lua_checkstack(lua_State*L,int size){
5360 static lua_CFunction lua_atpanic(lua_State*L,lua_CFunction panicf){
5366 static int lua_gettop(lua_State*L){
5369 static void lua_settop(lua_State*L,int idx){
5381 static void lua_remove(lua_State*L,int idx){
5388 static void lua_insert(lua_State*L,int idx){
5396 static void lua_replace(lua_State*L,int idx){
5416 static void lua_pushvalue(lua_State*L,int idx){
5420 static int lua_type(lua_State*L,int idx){
5424 static const char*lua_typename(lua_State*L,int t){
5428 static int lua_iscfunction(lua_State*L,int idx){
5432 static int lua_isnumber(lua_State*L,int idx){
5437 static int lua_isstring(lua_State*L,int idx){
5441 static int lua_rawequal(lua_State*L,int index1,int index2){
5447 static int lua_lessthan(lua_State*L,int index1,int index2){
5456 static lua_Number lua_tonumber(lua_State*L,int idx){
5464 static lua_Integer lua_tointeger(lua_State*L,int idx){
5476 static int lua_toboolean(lua_State*L,int idx){
5480 static const char*lua_tolstring(lua_State*L,int idx,size_t*len){
5493 static size_t lua_objlen(lua_State*L,int idx){
5507 static lua_CFunction lua_tocfunction(lua_State*L,int idx){
5511 static void*lua_touserdata(lua_State*L,int idx){
5519 static void lua_pushnil(lua_State*L){
5523 static void lua_pushnumber(lua_State*L,lua_Number n){
5527 static void lua_pushinteger(lua_State*L,lua_Integer n){
5531 static void lua_pushlstring(lua_State*L,const char*s,size_t len){
5536 static void lua_pushstring(lua_State*L,const char*s){
5542 static const char*lua_pushvfstring(lua_State*L,const char*fmt,
5549 static const char*lua_pushfstring(lua_State*L,const char*fmt,...){
5558 static void lua_pushcclosure(lua_State*L,lua_CFunction fn,int n){
5570 static void lua_pushboolean(lua_State*L,int b){
5574 static int lua_pushthread(lua_State*L){
5579 static void lua_gettable(lua_State*L,int idx){
5585 static void lua_getfield(lua_State*L,int idx,const char*k){
5594 static void lua_rawget(lua_State*L,int idx){
5600 static void lua_rawgeti(lua_State*L,int idx,int n){
5607 static void lua_createtable(lua_State*L,int narray,int nrec){
5612 static int lua_getmetatable(lua_State*L,int objindex){
5637 static void lua_getfenv(lua_State*L,int idx){
5657 static void lua_settable(lua_State*L,int idx){
5665 static void lua_setfield(lua_State*L,int idx,const char*k){
5675 static void lua_rawset(lua_State*L,int idx){
5684 static void lua_rawseti(lua_State*L,int idx,int n){
5693 static int lua_setmetatable(lua_State*L,int objindex){
5726 static int lua_setfenv(lua_State*L,int idx){
5753 static void lua_call(lua_State*L,int nargs,int nresults){
5765 static void f_call(lua_State*L,void*ud){
5769 static int lua_pcall(lua_State*L,int nargs,int nresults,int errfunc){
5788 static int lua_load(lua_State*L,lua_Reader reader,void*data,
5797 static int lua_error(lua_State*L){
5802 static int lua_next(lua_State*L,int idx){
5815 static void lua_concat(lua_State*L,int n){
5827 static void*lua_newuserdata(lua_State*L,size_t size){
5841 static void luaI_openlib(lua_State*L,const char*libname,
5843 static int luaL_argerror(lua_State*L,int numarg,const char*extramsg);
5844 static const char* luaL_checklstring(lua_State*L,int numArg,
5846 static const char* luaL_optlstring(lua_State*L,int numArg,
5848 static lua_Integer luaL_checkinteger(lua_State*L,int numArg);
5849 static lua_Integer luaL_optinteger(lua_State*L,int nArg,
5851 static int luaL_error(lua_State*L,const char*fmt,...);
5852 static const char* luaL_findtable(lua_State*L,int idx,
5865 lua_State*L;
5871 static int luaL_argerror(lua_State*L,int narg,const char*extramsg){
5887 static int luaL_typerror(lua_State*L,int narg,const char*tname){
5892 static void tag_error(lua_State*L,int narg,int tag){
5895 static void luaL_where(lua_State*L,int level){
5906 static int luaL_error(lua_State*L,const char*fmt,...){
5915 static int luaL_newmetatable(lua_State*L,const char*tname){
5925 static void*luaL_checkudata(lua_State*L,int ud,const char*tname){
5939 static void luaL_checkstack(lua_State*L,int space,const char*mes){
5943 static void luaL_checktype(lua_State*L,int narg,int t){
5947 static void luaL_checkany(lua_State*L,int narg){
5951 static const char*luaL_checklstring(lua_State*L,int narg,size_t*len){
5956 static const char*luaL_optlstring(lua_State*L,int narg,
5965 static lua_Number luaL_checknumber(lua_State*L,int narg){
5971 static lua_Integer luaL_checkinteger(lua_State*L,int narg){
5977 static lua_Integer luaL_optinteger(lua_State*L,int narg,
5981 static int luaL_getmetafield(lua_State*L,int obj,const char*event){
5995 static void luaL_register(lua_State*L,const char*libname,
6004 static void luaI_openlib(lua_State*L,const char*libname,
6029 static const char*luaL_findtable(lua_State*L,int idx,
6068 lua_State*L=B->L;
6098 lua_State*L=B->L;
6113 static void luaL_buffinit(lua_State*L,luaL_Buffer*B){
6123 static const char*getF(lua_State*L,void*ud,size_t*size){
6135 static int errfile(lua_State*L,const char*what,int fnameindex){
6142 static int luaL_loadfile(lua_State*L,const char*filename){
6184 static const char*getS(lua_State*L,void*ud,size_t*size){
6192 static int luaL_loadbuffer(lua_State*L,const char*buff,size_t size,
6209 static int panic(lua_State*L){
6215 static lua_State*luaL_newstate(void){
6216 lua_State*L=lua_newstate(l_alloc,NULL);
6220 static int luaB_tonumber(lua_State*L){
6246 static int luaB_error(lua_State*L){
6256 static int luaB_setmetatable(lua_State*L){
6267 static void getfunc(lua_State*L,int opt){
6281 static int luaB_setfenv(lua_State*L){
6296 static int luaB_rawget(lua_State*L){
6303 static int luaB_type(lua_State*L){
6308 static int luaB_next(lua_State*L){
6318 static int luaB_pairs(lua_State*L){
6325 static int ipairsaux(lua_State*L){
6333 static int luaB_ipairs(lua_State*L){
6340 static int load_aux(lua_State*L,int status){
6349 static int luaB_loadstring(lua_State*L){
6355 static int luaB_loadfile(lua_State*L){
6359 static int luaB_assert(lua_State*L){
6365 static int luaB_unpack(lua_State*L){
6379 static int luaB_pcall(lua_State*L){
6387 static int luaB_newproxy(lua_State*L){
6426 static void auxopen(lua_State*L,const char*name,
6432 static void base_open(lua_State*L){
6448 static int luaopen_base(lua_State*L){
6453 static int tinsert(lua_State*L){
6479 static int tremove(lua_State*L){
6494 static void addfield(lua_State*L,luaL_Buffer*b,int i){
6501 static int tconcat(lua_State*L){
6519 static void set2(lua_State*L,int i,int j){
6523 static int sort_comp(lua_State*L,int a,int b){
6537 static void auxsort(lua_State*L,int l,int u){
6593 static int sort(lua_State*L){
6609 static int luaopen_table(lua_State*L){
6614 static int pushresult(lua_State*L,int i,const char*filename){
6630 static void fileerror(lua_State*L,int arg,const char*filename){
6635 static int io_type(lua_State*L){
6648 static FILE*tofile(lua_State*L){
6654 static FILE**newfile(lua_State*L){
6661 static int io_noclose(lua_State*L){
6666 static int io_pclose(lua_State*L){
6672 static int io_fclose(lua_State*L){
6678 static int aux_close(lua_State*L){
6683 static int io_close(lua_State*L){
6689 static int io_gc(lua_State*L){
6695 static int io_open(lua_State*L){
6702 static FILE*getiofile(lua_State*L,int findex){
6710 static int g_iofile(lua_State*L,int f,const char*mode){
6728 static int io_input(lua_State*L){
6731 static int io_output(lua_State*L){
6734 static int io_readline(lua_State*L);
6735 static void aux_lines(lua_State*L,int idx,int toclose){
6740 static int f_lines(lua_State*L){
6745 static int io_lines(lua_State*L){
6760 static int read_number(lua_State*L,FILE*f){
6771 static int test_eof(lua_State*L,FILE*f){
6777 static int read_line(lua_State*L,FILE*f){
6797 static int read_chars(lua_State*L,FILE*f,size_t n){
6813 static int g_read(lua_State*L,FILE*f,int first){
6858 static int io_read(lua_State*L){
6861 static int f_read(lua_State*L){
6864 static int io_readline(lua_State*L){
6882 static int g_write(lua_State*L,FILE*f,int arg){
6898 static int io_write(lua_State*L){
6901 static int f_write(lua_State*L){
6904 static int io_flush(lua_State*L){
6907 static int f_flush(lua_State*L){
6931 static void createmeta(lua_State*L){
6937 static void createstdfile(lua_State*L,FILE*f,int k,const char*fname){
6947 static void newfenv(lua_State*L,lua_CFunction cls){
6952 static int luaopen_io(lua_State*L){
6968 static int os_pushresult(lua_State*L,int i,const char*filename){
6981 static int os_remove(lua_State*L){
6985 static int os_exit(lua_State*L){
6993 static int luaopen_os(lua_State*L){
7002 static int str_sub(lua_State*L){
7014 static int str_lower(lua_State*L){
7025 static int str_upper(lua_State*L){
7036 static int str_rep(lua_State*L){
7047 static int str_byte(lua_State*L){
7064 static int str_char(lua_State*L){
7080 lua_State*L;
7360 static int str_find_aux(lua_State*L,int find){
7400 static int str_find(lua_State*L){
7403 static int str_match(lua_State*L){
7406 static int gmatch_aux(lua_State*L){
7430 static int gmatch(lua_State*L){
7460 lua_State*L=ms->L;
7488 static int str_gsub(lua_State*L){
7525 static void addquoted(lua_State*L,luaL_Buffer*b,int arg){
7553 static const char*scanformat(lua_State*L,const char*strfrmt,char*form){
7580 static int str_format(lua_State*L){
7661 static void createmetatable(lua_State*L){
7671 static int luaopen_string(lua_State*L){
7684 static void luaL_openlibs(lua_State*L){
7693 static UB barg(lua_State*L,int idx){
7700 static int tobit(lua_State*L){
7702 static int bnot(lua_State*L){
7704 static int band(lua_State*L){
7706 static int bor(lua_State*L){
7708 static int bxor(lua_State*L){
7710 static int lshift(lua_State*L){
7712 static int rshift(lua_State*L){
7714 static int arshift(lua_State*L){
7716 static int rol(lua_State*L){
7718 static int ror(lua_State*L){
7720 static int bswap(lua_State*L){
7722 static int tohex(lua_State*L){
7750 lua_State*L=luaL_newstate();