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){
1654 static TValue*luaH_set(lua_State*L,Table*t,const TValue*key){
1666 static TValue*luaH_setnum(lua_State*L,Table*t,int key){
1676 static TValue*luaH_setstr(lua_State*L,Table*t,TString*key){
1786 static size_t luaC_separateudata(lua_State*L,int all){
1882 static void checkstacksizes(lua_State*L,StkId max){
1895 static void traversestack(global_State*g,lua_State*l){
1929 lua_State*th=gco2th(o);
1935 return sizeof(lua_State)+sizeof(TValue)*th->stacksize+
1989 static void freeobj(lua_State*L,GCObject*o){
2012 static GCObject**sweeplist(lua_State*L,GCObject**p,lu_mem count){
2032 static void checkSizes(lua_State*L){
2042 static void GCTM(lua_State*L){
2068 static void luaC_callGCTM(lua_State*L){
2072 static void luaC_freeall(lua_State*L){
2085 static void markroot(lua_State*L){
2103 static void atomic(lua_State*L){
2126 static l_mem singlestep(lua_State*L){
2175 static void luaC_step(lua_State*L){
2198 static void luaC_barrierf(lua_State*L,GCObject*o,GCObject*v){
2205 static void luaC_barrierback(lua_State*L,Table*t){
2212 static void luaC_link(lua_State*L,GCObject*o,lu_byte tt){
2219 static void luaC_linkupval(lua_State*L,UpVal*uv){
2249 struct lua_State*L;
2255 static void luaX_init(lua_State*L);
2259 #define tostate(l)(cast(lua_State*,cast(lu_byte*,l)+0))
2261 lua_State l;
2264 static void stack_init(lua_State*L1,lua_State*L){
2278 static void freestack(lua_State*L,lua_State*L1){
2282 static void f_luaopen(lua_State*L,void*ud){
2294 static void preinit_state(lua_State*L,global_State*g){
2313 static void close_state(lua_State*L){
2322 static void luaE_freethread(lua_State*L,lua_State*L1){
2325 luaM_freemem(L,fromstate(L1),state_size(lua_State));
2327 static lua_State*lua_newstate(lua_Alloc f,void*ud){
2329 lua_State*L;
2374 static void callallgcTM(lua_State*L,void*ud){
2378 static void lua_close(lua_State*L){
2398 static int currentpc(lua_State*L,CallInfo*ci){
2404 static int currentline(lua_State*L,CallInfo*ci){
2411 static int lua_getstack(lua_State*L,int level,lua_Debug*ar){
2456 static void collectvalidlines(lua_State*L,Closure*f){
2470 static int auxgetinfo(lua_State*L,const char*what,lua_Debug*ar,
2507 static int lua_getinfo(lua_State*L,const char*what,lua_Debug*ar){
2538 static void luaG_typeerror(lua_State*L,const TValue*o,const char*op){
2550 static void luaG_concaterror(lua_State*L,StkId p1,StkId p2){
2554 static void luaG_aritherror(lua_State*L,const TValue*p1,const TValue*p2){
2560 static int luaG_ordererror(lua_State*L,const TValue*p1,const TValue*p2){
2569 static void addinfo(lua_State*L,const char*msg){
2578 static void luaG_errormsg(lua_State*L){
2589 static void luaG_runerror(lua_State*L,const char*fmt,...){
2598 lua_State*L=z->L;
2606 static void luaZ_init(lua_State*L,ZIO*z,lua_Reader reader,void*data){
2613 static char*luaZ_openspace(lua_State*L,Mbuffer*buff,size_t n){
2684 static void luaX_init(lua_State*L){
2723 lua_State*L=ls->L;
2740 static void luaX_setinput(lua_State*L,LexState*ls,ZIO*z,TString*source){
3144 lua_State*L=fs->L;
3876 lua_State*L=ls->L;
3901 lua_State*L=ls->L;
3922 static Proto*luaY_parser(lua_State*L,ZIO*z,Mbuffer*buff,const char*name){
4699 static int luaV_tostring(lua_State*L,StkId obj){
4710 static void callTMres(lua_State*L,StkId res,const TValue*f,
4723 static void callTM(lua_State*L,const TValue*f,const TValue*p1,
4733 static void luaV_gettable(lua_State*L,const TValue*t,TValue*key,StkId val){
4756 static void luaV_settable(lua_State*L,const TValue*t,TValue*key,StkId val){
4783 static int call_binTM(lua_State*L,const TValue*p1,const TValue*p2,
4792 static const TValue*get_compTM(lua_State*L,Table*mt1,Table*mt2,
4804 static int call_orderTM(lua_State*L,const TValue*p1,const TValue*p2,
4834 static int luaV_lessthan(lua_State*L,const TValue*l,const TValue*r){
4846 static int lessequal(lua_State*L,const TValue*l,const TValue*r){
4860 static int luaV_equalval(lua_State*L,const TValue*t1,const TValue*t2){
4884 static void luaV_concat(lua_State*L,int total,int last){
4915 static void Arith(lua_State*L,StkId ra,const TValue*rb,
4945 static void luaV_execute(lua_State*L,int nexeccalls){
5314 static TValue*index2adr(lua_State*L,int idx){
5342 static Table*getcurrenv(lua_State*L){
5350 static int lua_checkstack(lua_State*L,int size){
5361 static lua_CFunction lua_atpanic(lua_State*L,lua_CFunction panicf){
5367 static int lua_gettop(lua_State*L){
5370 static void lua_settop(lua_State*L,int idx){
5382 static void lua_remove(lua_State*L,int idx){
5389 static void lua_insert(lua_State*L,int idx){
5397 static void lua_replace(lua_State*L,int idx){
5417 static void lua_pushvalue(lua_State*L,int idx){
5421 static int lua_type(lua_State*L,int idx){
5425 static const char*lua_typename(lua_State*L,int t){
5429 static int lua_iscfunction(lua_State*L,int idx){
5433 static int lua_isnumber(lua_State*L,int idx){
5438 static int lua_isstring(lua_State*L,int idx){
5442 static int lua_rawequal(lua_State*L,int index1,int index2){
5448 static int lua_lessthan(lua_State*L,int index1,int index2){
5457 static lua_Number lua_tonumber(lua_State*L,int idx){
5465 static lua_Integer lua_tointeger(lua_State*L,int idx){
5477 static int lua_toboolean(lua_State*L,int idx){
5481 static const char*lua_tolstring(lua_State*L,int idx,size_t*len){
5494 static size_t lua_objlen(lua_State*L,int idx){
5508 static lua_CFunction lua_tocfunction(lua_State*L,int idx){
5512 static void*lua_touserdata(lua_State*L,int idx){
5520 static void lua_pushnil(lua_State*L){
5524 static void lua_pushnumber(lua_State*L,lua_Number n){
5528 static void lua_pushinteger(lua_State*L,lua_Integer n){
5532 static void lua_pushlstring(lua_State*L,const char*s,size_t len){
5537 static void lua_pushstring(lua_State*L,const char*s){
5543 static const char*lua_pushvfstring(lua_State*L,const char*fmt,
5550 static const char*lua_pushfstring(lua_State*L,const char*fmt,...){
5559 static void lua_pushcclosure(lua_State*L,lua_CFunction fn,int n){
5571 static void lua_pushboolean(lua_State*L,int b){
5575 static int lua_pushthread(lua_State*L){
5580 static void lua_gettable(lua_State*L,int idx){
5586 static void lua_getfield(lua_State*L,int idx,const char*k){
5595 static void lua_rawget(lua_State*L,int idx){
5601 static void lua_rawgeti(lua_State*L,int idx,int n){
5608 static void lua_createtable(lua_State*L,int narray,int nrec){
5613 static int lua_getmetatable(lua_State*L,int objindex){
5638 static void lua_getfenv(lua_State*L,int idx){
5658 static void lua_settable(lua_State*L,int idx){
5666 static void lua_setfield(lua_State*L,int idx,const char*k){
5676 static void lua_rawset(lua_State*L,int idx){
5685 static void lua_rawseti(lua_State*L,int idx,int n){
5694 static int lua_setmetatable(lua_State*L,int objindex){
5727 static int lua_setfenv(lua_State*L,int idx){
5754 static void lua_call(lua_State*L,int nargs,int nresults){
5766 static void f_call(lua_State*L,void*ud){
5770 static int lua_pcall(lua_State*L,int nargs,int nresults,int errfunc){
5789 static int lua_load(lua_State*L,lua_Reader reader,void*data,
5798 static int lua_error(lua_State*L){
5803 static int lua_next(lua_State*L,int idx){
5816 static void lua_concat(lua_State*L,int n){
5828 static void*lua_newuserdata(lua_State*L,size_t size){
5842 static void luaI_openlib(lua_State*L,const char*libname,
5844 static int luaL_argerror(lua_State*L,int numarg,const char*extramsg);
5845 static const char* luaL_checklstring(lua_State*L,int numArg,
5847 static const char* luaL_optlstring(lua_State*L,int numArg,
5849 static lua_Integer luaL_checkinteger(lua_State*L,int numArg);
5850 static lua_Integer luaL_optinteger(lua_State*L,int nArg,
5852 static int luaL_error(lua_State*L,const char*fmt,...);
5853 static const char* luaL_findtable(lua_State*L,int idx,
5866 lua_State*L;
5872 static int luaL_argerror(lua_State*L,int narg,const char*extramsg){
5888 static int luaL_typerror(lua_State*L,int narg,const char*tname){
5893 static void tag_error(lua_State*L,int narg,int tag){
5896 static void luaL_where(lua_State*L,int level){
5907 static int luaL_error(lua_State*L,const char*fmt,...){
5916 static int luaL_newmetatable(lua_State*L,const char*tname){
5926 static void*luaL_checkudata(lua_State*L,int ud,const char*tname){
5940 static void luaL_checkstack(lua_State*L,int space,const char*mes){
5944 static void luaL_checktype(lua_State*L,int narg,int t){
5948 static void luaL_checkany(lua_State*L,int narg){
5952 static const char*luaL_checklstring(lua_State*L,int narg,size_t*len){
5957 static const char*luaL_optlstring(lua_State*L,int narg,
5966 static lua_Number luaL_checknumber(lua_State*L,int narg){
5972 static lua_Integer luaL_checkinteger(lua_State*L,int narg){
5978 static lua_Integer luaL_optinteger(lua_State*L,int narg,
5982 static int luaL_getmetafield(lua_State*L,int obj,const char*event){
5996 static void luaL_register(lua_State*L,const char*libname,
6005 static void luaI_openlib(lua_State*L,const char*libname,
6030 static const char*luaL_findtable(lua_State*L,int idx,
6069 lua_State*L=B->L;
6099 lua_State*L=B->L;
6114 static void luaL_buffinit(lua_State*L,luaL_Buffer*B){
6124 static const char*getF(lua_State*L,void*ud,size_t*size){
6136 static int errfile(lua_State*L,const char*what,int fnameindex){
6143 static int luaL_loadfile(lua_State*L,const char*filename){
6185 static const char*getS(lua_State*L,void*ud,size_t*size){
6193 static int luaL_loadbuffer(lua_State*L,const char*buff,size_t size,
6210 static int panic(lua_State*L){
6216 static lua_State*luaL_newstate(void){
6217 lua_State*L=lua_newstate(l_alloc,NULL);
6221 static int luaB_tonumber(lua_State*L){
6247 static int luaB_error(lua_State*L){
6257 static int luaB_setmetatable(lua_State*L){
6268 static void getfunc(lua_State*L,int opt){
6282 static int luaB_setfenv(lua_State*L){
6297 static int luaB_rawget(lua_State*L){
6304 static int luaB_type(lua_State*L){
6309 static int luaB_next(lua_State*L){
6319 static int luaB_pairs(lua_State*L){
6326 static int ipairsaux(lua_State*L){
6334 static int luaB_ipairs(lua_State*L){
6341 static int load_aux(lua_State*L,int status){
6350 static int luaB_loadstring(lua_State*L){
6356 static int luaB_loadfile(lua_State*L){
6360 static int luaB_assert(lua_State*L){
6366 static int luaB_unpack(lua_State*L){
6380 static int luaB_pcall(lua_State*L){
6388 static int luaB_newproxy(lua_State*L){
6427 static void auxopen(lua_State*L,const char*name,
6433 static void base_open(lua_State*L){
6449 static int luaopen_base(lua_State*L){
6454 static int tinsert(lua_State*L){
6480 static int tremove(lua_State*L){
6495 static void addfield(lua_State*L,luaL_Buffer*b,int i){
6502 static int tconcat(lua_State*L){
6520 static void set2(lua_State*L,int i,int j){
6524 static int sort_comp(lua_State*L,int a,int b){
6538 static void auxsort(lua_State*L,int l,int u){
6594 static int sort(lua_State*L){
6610 static int luaopen_table(lua_State*L){
6615 static int pushresult(lua_State*L,int i,const char*filename){
6631 static void fileerror(lua_State*L,int arg,const char*filename){
6636 static int io_type(lua_State*L){
6649 static FILE*tofile(lua_State*L){
6655 static FILE**newfile(lua_State*L){
6662 static int io_noclose(lua_State*L){
6667 static int io_pclose(lua_State*L){
6673 static int io_fclose(lua_State*L){
6679 static int aux_close(lua_State*L){
6684 static int io_close(lua_State*L){
6690 static int io_gc(lua_State*L){
6696 static int io_open(lua_State*L){
6703 static FILE*getiofile(lua_State*L,int findex){
6711 static int g_iofile(lua_State*L,int f,const char*mode){
6729 static int io_input(lua_State*L){
6732 static int io_output(lua_State*L){
6735 static int io_readline(lua_State*L);
6736 static void aux_lines(lua_State*L,int idx,int toclose){
6741 static int f_lines(lua_State*L){
6746 static int io_lines(lua_State*L){
6761 static int read_number(lua_State*L,FILE*f){
6772 static int test_eof(lua_State*L,FILE*f){
6778 static int read_line(lua_State*L,FILE*f){
6798 static int read_chars(lua_State*L,FILE*f,size_t n){
6814 static int g_read(lua_State*L,FILE*f,int first){
6859 static int io_read(lua_State*L){
6862 static int f_read(lua_State*L){
6865 static int io_readline(lua_State*L){
6883 static int g_write(lua_State*L,FILE*f,int arg){
6899 static int io_write(lua_State*L){
6902 static int f_write(lua_State*L){
6905 static int io_flush(lua_State*L){
6908 static int f_flush(lua_State*L){
6932 static void createmeta(lua_State*L){
6938 static void createstdfile(lua_State*L,FILE*f,int k,const char*fname){
6948 static void newfenv(lua_State*L,lua_CFunction cls){
6953 static int luaopen_io(lua_State*L){
6969 static int os_pushresult(lua_State*L,int i,const char*filename){
6982 static int os_remove(lua_State*L){
6986 static int os_exit(lua_State*L){
6989 static int os_clock(lua_State*L){
6999 static int luaopen_os(lua_State*L){
7008 static int str_sub(lua_State*L){
7020 static int str_lower(lua_State*L){
7031 static int str_upper(lua_State*L){
7042 static int str_rep(lua_State*L){
7053 static int str_byte(lua_State*L){
7070 static int str_char(lua_State*L){
7086 lua_State*L;
7366 static int str_find_aux(lua_State*L,int find){
7406 static int str_find(lua_State*L){
7409 static int str_match(lua_State*L){
7412 static int gmatch_aux(lua_State*L){
7436 static int gmatch(lua_State*L){
7466 lua_State*L=ms->L;
7494 static int str_gsub(lua_State*L){
7531 static void addquoted(lua_State*L,luaL_Buffer*b,int arg){
7559 static const char*scanformat(lua_State*L,const char*strfrmt,char*form){
7586 static int str_format(lua_State*L){
7667 static void createmetatable(lua_State*L){
7677 static int luaopen_string(lua_State*L){
7690 static void luaL_openlibs(lua_State*L){
7699 static UB barg(lua_State*L,int idx){
7706 static int tobit(lua_State*L){
7708 static int bnot(lua_State*L){
7710 static int band(lua_State*L){
7712 static int bor(lua_State*L){
7714 static int bxor(lua_State*L){
7716 static int lshift(lua_State*L){
7718 static int rshift(lua_State*L){
7720 static int arshift(lua_State*L){
7722 static int rol(lua_State*L){
7724 static int ror(lua_State*L){
7726 static int bswap(lua_State*L){
7728 static int tohex(lua_State*L){
7756 lua_State*L=luaL_newstate();