Home
last modified time | relevance | path

Searched refs:lua_State (Results 1 – 25 of 70) sorted by relevance

123

/netbsd-src/external/mit/lua/dist/src/
H A Dlua.h61 typedef struct lua_State lua_State; typedef
110 typedef int (*lua_CFunction) (lua_State *L);
115 typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx);
121 typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz);
123 typedef int (*lua_Writer) (lua_State *L, const void *p, size_t sz, void *ud);
147 typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
167 LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud);
168 LUA_API void (lua_close) (lua_State *L);
169 LUA_API lua_State *(lua_newthread) (lua_State *L);
170 LUA_API int (lua_closethread) (lua_State *L, lua_State *from);
[all …]
H A Dlauxlib.h50 LUALIB_API void (luaL_checkversion_) (lua_State *L, lua_Number ver, size_t sz);
54 LUALIB_API int (luaL_getmetafield) (lua_State *L, int obj, const char *e);
55 LUALIB_API int (luaL_callmeta) (lua_State *L, int obj, const char *e);
56 LUALIB_API const char *(luaL_tolstring) (lua_State *L, int idx, size_t *len);
57 LUALIB_API int (luaL_argerror) (lua_State *L, int arg, const char *extramsg);
58 LUALIB_API int (luaL_typeerror) (lua_State *L, int arg, const char *tname);
59 LUALIB_API const char *(luaL_checklstring) (lua_State *L, int arg,
61 LUALIB_API const char *(luaL_optlstring) (lua_State *L, int arg,
63 LUALIB_API lua_Number (luaL_checknumber) (lua_State *L, int arg);
64 LUALIB_API lua_Number (luaL_optnumber) (lua_State *L, int arg, lua_Number def);
[all …]
H A Dlcorolib.c25 static lua_State *getco (lua_State *L) { in getco()
26 lua_State *co = lua_tothread(L, 1); in getco()
36 static int auxresume (lua_State *L, lua_State *co, int narg) { in auxresume()
60 static int luaB_coresume (lua_State *L) { in luaB_coresume()
61 lua_State *co = getco(L); in luaB_coresume()
77 static int luaB_auxwrap (lua_State *L) { in luaB_auxwrap()
78 lua_State *co = lua_tothread(L, lua_upvalueindex(1)); in luaB_auxwrap()
99 static int luaB_cocreate (lua_State *L) { in luaB_cocreate()
100 lua_State *NL; in luaB_cocreate()
109 static int luaB_cowrap (lua_State *L) { in luaB_cowrap()
[all …]
H A Dldo.h63 typedef void (*Pfunc) (lua_State *L, void *ud);
65 LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
66 LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
68 LUAI_FUNC void luaD_hook (lua_State *L, int event, int line,
70 LUAI_FUNC void luaD_hookcall (lua_State *L, CallInfo *ci);
71 LUAI_FUNC int luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func,
73 LUAI_FUNC CallInfo *luaD_precall (lua_State *L, StkId func, int nResults);
74 LUAI_FUNC void luaD_call (lua_State *L, StkId func, int nResults);
75 LUAI_FUNC void luaD_callnoyield (lua_State *L, StkId func, int nResults);
76 LUAI_FUNC StkId luaD_tryfuncTM (lua_State *L, StkId func);
[all …]
H A Dldblib.c39 static void checkstack (lua_State *L, lua_State *L1, int n) { in checkstack()
45 static int db_getregistry (lua_State *L) { in db_getregistry()
51 static int db_getmetatable (lua_State *L) { in db_getmetatable()
60 static int db_setmetatable (lua_State *L) { in db_setmetatable()
69 static int db_getuservalue (lua_State *L) { in db_getuservalue()
81 static int db_setuservalue (lua_State *L) { in db_setuservalue()
98 static lua_State *getthread (lua_State *L, int *arg) { in getthread()
115 static void settabss (lua_State *L, const char *k, const char *v) { in settabss()
120 static void settabsi (lua_State *L, const char *k, int v) { in settabsi()
125 static void settabsb (lua_State *L, const char *k, int v) { in settabsb()
[all …]
H A Dlauxlib.c58 static int findfield (lua_State *L, int objidx, int level) { in findfield()
85 static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { in pushglobalfuncname()
106 static void pushfuncname (lua_State *L, lua_Debug *ar) { in pushfuncname()
122 static int lastlevel (lua_State *L) { in lastlevel()
137 LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, in luaL_traceback()
181 LUALIB_API int luaL_argerror (lua_State *L, int arg, const char *extramsg) { in luaL_argerror()
199 LUALIB_API int luaL_typeerror (lua_State *L, int arg, const char *tname) { in luaL_typeerror()
213 static void tag_error (lua_State *L, int arg, int tag) { in tag_error()
222 LUALIB_API void luaL_where (lua_State *L, int level) { in luaL_where()
240 LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) { in luaL_error()
[all …]
H A Dlualib.h20 LUAMOD_API int (luaopen_base) (lua_State *L);
23 LUAMOD_API int (luaopen_coroutine) (lua_State *L);
26 LUAMOD_API int (luaopen_table) (lua_State *L);
29 LUAMOD_API int (luaopen_io) (lua_State *L);
32 LUAMOD_API int (luaopen_os) (lua_State *L);
35 LUAMOD_API int (luaopen_string) (lua_State *L);
38 LUAMOD_API int (luaopen_utf8) (lua_State *L);
41 LUAMOD_API int (luaopen_math) (lua_State *L);
44 LUAMOD_API int (luaopen_debug) (lua_State *L);
47 LUAMOD_API int (luaopen_package) (lua_State *L);
[all …]
H A Dliolib.c165 static int io_type (lua_State *L) { in io_type()
179 static int f_tostring (lua_State *L) { in f_tostring()
189 static FILE *tofile (lua_State *L) { in tofile()
203 static LStream *newprefile (lua_State *L) { in newprefile()
216 static int aux_close (lua_State *L) { in aux_close()
224 static int f_close (lua_State *L) { in f_close()
230 static int io_close (lua_State *L) { in io_close()
237 static int f_gc (lua_State *L) { in f_gc()
248 static int io_fclose (lua_State *L) { in io_fclose()
255 static LStream *newfile (lua_State *L) { in newfile()
[all …]
H A Dlbaselib.c28 static int luaB_print (lua_State *L) { in luaB_print()
49 static int luaB_warn (lua_State *L) { in luaB_warn()
85 static int luaB_tonumber (lua_State *L) { in luaB_tonumber()
118 static int luaB_error (lua_State *L) { in luaB_error()
130 static int luaB_getmetatable (lua_State *L) { in luaB_getmetatable()
141 static int luaB_setmetatable (lua_State *L) { in luaB_setmetatable()
153 static int luaB_rawequal (lua_State *L) { in luaB_rawequal()
161 static int luaB_rawlen (lua_State *L) { in luaB_rawlen()
170 static int luaB_rawget (lua_State *L) { in luaB_rawget()
178 static int luaB_rawset (lua_State *L) { in luaB_rawset()
[all …]
H A Dldebug.h42 LUAI_FUNC const char *luaG_findlocal (lua_State *L, CallInfo *ci, int n,
44 LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
46 LUAI_FUNC l_noret luaG_callerror (lua_State *L, const TValue *o);
47 LUAI_FUNC l_noret luaG_forerror (lua_State *L, const TValue *o,
49 LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,
51 LUAI_FUNC l_noret luaG_opinterror (lua_State *L, const TValue *p1,
54 LUAI_FUNC l_noret luaG_tointerror (lua_State *L, const TValue *p1,
56 LUAI_FUNC l_noret luaG_ordererror (lua_State *L, const TValue *p1,
58 LUAI_FUNC l_noret luaG_runerror (lua_State *L, const char *fmt, ...);
59 LUAI_FUNC const char *luaG_addinfo (lua_State *L, const char *msg,
[all …]
H A Dlapi.c66 static TValue *index2value (lua_State *L, int idx) { in index2value()
101 l_sinline StkId index2stack (lua_State *L, int idx) { in index2stack()
117 LUA_API int lua_checkstack (lua_State *L, int n) { in lua_checkstack()
134 LUA_API void lua_xmove (lua_State *from, lua_State *to, int n) { in lua_xmove()
150 LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf) { in lua_atpanic()
160 LUA_API lua_Number lua_version (lua_State *L) { in lua_version()
175 LUA_API int lua_absindex (lua_State *L, int idx) { in lua_absindex()
182 LUA_API int lua_gettop (lua_State *L) { in lua_gettop()
187 LUA_API void lua_settop (lua_State *L, int idx) { in lua_settop()
215 LUA_API void lua_closeslot (lua_State *L, int idx) { in lua_closeslot()
[all …]
H A Dloadlib.c94 static void *lsys_load (lua_State *L, const char *path, int seeglb);
101 static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym);
135 static void *lsys_load (lua_State *L, const char *path, int seeglb) { in lsys_load()
143 static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) { in lsys_sym()
179 static void setprogdir (lua_State *L) { in setprogdir()
196 static void pusherror (lua_State *L) { in pusherror()
211 static void *lsys_load (lua_State *L, const char *path, int seeglb) { in lsys_load()
219 static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) { in lsys_sym()
247 static void *lsys_load (lua_State *L, const char *path, int seeglb) { in lsys_load()
254 static lua_CFunction lsys_sym (lua_State *L, void *lib, const char *sym) { in lsys_sym()
[all …]
H A Dlmathlib.c31 static int math_abs (lua_State *L) { in math_abs()
42 static int math_sin (lua_State *L) { in math_sin()
47 static int math_cos (lua_State *L) { in math_cos()
52 static int math_tan (lua_State *L) { in math_tan()
57 static int math_asin (lua_State *L) { in math_asin()
62 static int math_acos (lua_State *L) { in math_acos()
67 static int math_atan (lua_State *L) { in math_atan()
75 static int math_toint (lua_State *L) { in math_toint()
88 static void pushnumint (lua_State *L, lua_Number d) { in pushnumint()
97 static int math_floor (lua_State *L) { in math_floor()
[all …]
H A Dltm.h79 LUAI_FUNC const char *luaT_objtypename (lua_State *L, const TValue *o);
82 LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o,
84 LUAI_FUNC void luaT_init (lua_State *L);
86 LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1,
88 LUAI_FUNC void luaT_callTMres (lua_State *L, const TValue *f,
90 LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
92 LUAI_FUNC void luaT_tryconcatTM (lua_State *L);
93 LUAI_FUNC void luaT_trybinassocTM (lua_State *L, const TValue *p1,
95 LUAI_FUNC void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2,
97 LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1,
[all …]
H A Dlstate.c41 lua_State l;
75 static unsigned int luai_makeseed (lua_State *L) { in luai_makeseed()
103 LUA_API int lua_setcstacklimit (lua_State *L, unsigned int limit) { in lua_setcstacklimit()
109 CallInfo *luaE_extendCI (lua_State *L) { in luaE_extendCI()
126 void luaE_freeCI (lua_State *L) { in luaE_freeCI()
142 void luaE_shrinkCI (lua_State *L) { in luaE_shrinkCI()
169 void luaE_checkcstack (lua_State *L) { in luaE_checkcstack()
177 LUAI_FUNC void luaE_incCstack (lua_State *L) { in luaE_incCstack()
184 static void stack_init (lua_State *L1, lua_State *L) { in stack_init()
207 static void freestack (lua_State *L) { in freestack()
[all …]
H A Dlua.c37 static lua_State *globalL = NULL;
65 static void lstop (lua_State *L, lua_Debug *ar) { in lstop()
123 static int report (lua_State *L, int status) { in report()
136 static int msghandler (lua_State *L) { in msghandler()
155 static int docall (lua_State *L, int narg, int nres) { in docall()
185 static void createargtable (lua_State *L, char **argv, int argc, int script) { in createargtable()
197 static int dochunk (lua_State *L, int status) { in dochunk()
203 static int dofile (lua_State *L, const char *name) { in dofile()
208 static int dostring (lua_State *L, const char *s, const char *name) { in dostring()
216 static int dolibrary (lua_State *L, char *globname) { in dolibrary()
[all …]
H A Dlfunc.h52 LUAI_FUNC Proto *luaF_newproto (lua_State *L);
53 LUAI_FUNC CClosure *luaF_newCclosure (lua_State *L, int nupvals);
54 LUAI_FUNC LClosure *luaF_newLclosure (lua_State *L, int nupvals);
55 LUAI_FUNC void luaF_initupvals (lua_State *L, LClosure *cl);
56 LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level);
57 LUAI_FUNC void luaF_newtbcupval (lua_State *L, StkId level);
58 LUAI_FUNC void luaF_closeupval (lua_State *L, StkId level);
59 LUAI_FUNC StkId luaF_close (lua_State *L, StkId level, int status, int yy);
61 LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f);
H A Dloslib.c144 static int os_execute (lua_State *L) { in os_execute()
158 static int os_remove (lua_State *L) { in os_remove()
164 static int os_rename (lua_State *L) { in os_rename()
171 static int os_tmpname (lua_State *L) { in os_tmpname()
182 static int os_getenv (lua_State *L) { in os_getenv()
188 static int os_clock (lua_State *L) { in os_clock()
211 static void setfield (lua_State *L, const char *key, int value, int delta) { in setfield()
221 static void setboolfield (lua_State *L, const char *key, int value) { in setboolfield()
232 static void setallfields (lua_State *L, struct tm *stm) { in setallfields()
245 static int getboolfield (lua_State *L, const char *key) { in getboolfield()
[all …]
H A Dlvm.h126 LUAI_FUNC int luaV_equalobj (lua_State *L, const TValue *t1, const TValue *t2);
127 LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r);
128 LUAI_FUNC int luaV_lessequal (lua_State *L, const TValue *l, const TValue *r);
134 LUAI_FUNC void luaV_finishget (lua_State *L, const TValue *t, TValue *key,
136 LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
138 LUAI_FUNC void luaV_finishOp (lua_State *L);
139 LUAI_FUNC void luaV_execute (lua_State *L, CallInfo *ci);
140 LUAI_FUNC void luaV_concat (lua_State *L, int total);
141 LUAI_FUNC lua_Integer luaV_idiv (lua_State *L, lua_Integer x, lua_Integer y);
142 LUAI_FUNC lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y);
[all …]
H A Dlstate.h296 struct lua_State *twups; /* list of threads with open upvalues */
298 struct lua_State *mainthread;
311 struct lua_State { struct
324 struct lua_State *twups; /* list of threads with open upvalues */ argument
362 struct lua_State th; /* thread */
399 LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1);
400 LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L);
401 LUAI_FUNC void luaE_freeCI (lua_State *L);
402 LUAI_FUNC void luaE_shrinkCI (lua_State *L);
403 LUAI_FUNC void luaE_checkcstack (lua_State *L);
[all …]
H A Dltable.h41 LUAI_FUNC void luaH_setint (lua_State *L, Table *t, lua_Integer key,
46 LUAI_FUNC void luaH_newkey (lua_State *L, Table *t, const TValue *key,
48 LUAI_FUNC void luaH_set (lua_State *L, Table *t, const TValue *key,
50 LUAI_FUNC void luaH_finishset (lua_State *L, Table *t, const TValue *key,
52 LUAI_FUNC Table *luaH_new (lua_State *L);
53 LUAI_FUNC void luaH_resize (lua_State *L, Table *t, unsigned int nasize,
55 LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, unsigned int nasize);
56 LUAI_FUNC void luaH_free (lua_State *L, Table *t);
57 LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key);
/netbsd-src/lib/lua/sqlite/
H A Dsqlite.c43 int luaopen_sqlite(lua_State*);
46 sqlite_error(lua_State *L, const char *fmt, ...) in sqlite_error()
65 sqlite_initialize(lua_State *L) in sqlite_initialize()
72 sqlite_shutdown(lua_State *L) in sqlite_shutdown()
79 sqlite_open(lua_State *L) in sqlite_open()
97 sqlite_libversion(lua_State *L) in sqlite_libversion()
104 sqlite_libversion_number(lua_State *L) in sqlite_libversion_number()
111 sqlite_sourceid(lua_State *L) in sqlite_sourceid()
118 db_close(lua_State *L) in db_close()
133 db_prepare(lua_State *L) in db_prepare()
[all …]
/netbsd-src/libexec/httpd/lua/
H A Dglue.c49 int luaopen_bozohttpd(lua_State *);
53 l_new(lua_State *L) in l_new()
64 l_init_httpd(lua_State *L) in l_init_httpd()
75 l_init_prefs(lua_State *L) in l_init_prefs()
89 l_bozo_set_pref(lua_State *L) in l_bozo_set_pref()
106 l_bozo_get_pref(lua_State *L) in l_bozo_get_pref()
119 l_bozo_setup(lua_State *L) in l_bozo_setup()
139 l_bozo_read_request(lua_State *L) in l_bozo_read_request()
152 l_bozo_process_request(lua_State *L) in l_bozo_process_request()
167 l_bozo_clean_request(lua_State *L) in l_bozo_clean_request()
[all …]
/netbsd-src/sys/modules/luasystm/
H A Dluasystm.c50 print(lua_State *L) in print()
61 print_nolog(lua_State *L) in print_nolog()
72 uprint(lua_State *L) in uprint()
83 systm_aprint_normal(lua_State *L) in systm_aprint_normal()
94 systm_aprint_naive(lua_State *L) in systm_aprint_naive()
105 systm_aprint_verbose(lua_State *L) in systm_aprint_verbose()
116 systm_aprint_debug(lua_State *L) in systm_aprint_debug()
127 systm_aprint_error(lua_State *L) in systm_aprint_error()
138 systm_aprint_get_error_count(lua_State *L) in systm_aprint_get_error_count()
147 systm_panic(lua_State *L) in systm_panic()
[all …]
/netbsd-src/lib/lua/gpio/
H A Dgpio.c49 gpio_error(lua_State *L, const char *fmt, ...) in gpio_error()
68 gpio_open(lua_State *L) in gpio_open()
85 gpio_close(lua_State *L) in gpio_close()
98 gpio_info(lua_State *L) in gpio_info()
111 gpio_get_pin(lua_State *L, int n, struct gpio_req *req) in gpio_get_pin()
127 gpio_set(lua_State *L) in gpio_set()
142 gpio_unset(lua_State *L) in gpio_unset()
156 gpio_read(lua_State *L) in gpio_read()
172 gpio_write(lua_State *L) in gpio_write()
191 gpio_toggle(lua_State *L) in gpio_toggle()
[all …]

123