native Lua  0.5.0-devel
Lua on the platform you use with the compiler you choose
lua.h
Go to the documentation of this file.
1 /*
2 ** $Id: lua.h $
3 ** Lua - A Scripting Language
4 ** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
5 ** See Copyright Notice at the end of this file
6 */
7 
8 
9 #ifndef lua_h
10 #define lua_h
11 
12 #include <stdarg.h>
13 #include <stddef.h>
14 
15 
16 #include "luaconf.h"
17 
18 #include "_native_lua_config.h" /* native Lua */
19 
20 
21 #define LUA_VERSION_MAJOR "5"
22 #define LUA_VERSION_MINOR "4"
23 #define LUA_VERSION_RELEASE "0"
24 
25 #define LUA_VERSION_NUM 504
26 #define LUA_VERSION_RELEASE_NUM (LUA_VERSION_NUM * 100 + 0)
27 
28 #define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
29 #define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE
30 #define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2020 Lua.org, PUC-Rio"
31 #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"
32 
33 
34 /* mark for precompiled code ('<esc>Lua') */
35 #define LUA_SIGNATURE "\x1bLua"
36 
37 /* option for multiple returns in 'lua_pcall' and 'lua_call' */
38 #define LUA_MULTRET (-1)
39 
40 
41 /*
42 ** Pseudo-indices
43 ** (-LUAI_MAXSTACK is the minimum valid index; we keep some free empty
44 ** space after that to help overflow detection)
45 */
46 #define LUA_REGISTRYINDEX (-LUAI_MAXSTACK - 1000)
47 #define lua_upvalueindex(i) (LUA_REGISTRYINDEX - (i))
48 
49 
50 /* thread status */
51 #define LUA_OK 0
52 #define LUA_YIELD 1
53 #define LUA_ERRRUN 2
54 #define LUA_ERRSYNTAX 3
55 #define LUA_ERRMEM 4
56 #define LUA_ERRERR 5
57 
58 
59 typedef struct lua_State lua_State;
60 
61 
62 /*
63 ** basic types
64 */
65 #define LUA_TNONE (-1)
66 
67 #define LUA_TNIL 0
68 #define LUA_TBOOLEAN 1
69 #define LUA_TLIGHTUSERDATA 2
70 #define LUA_TNUMBER 3
71 #define LUA_TSTRING 4
72 #define LUA_TTABLE 5
73 #define LUA_TFUNCTION 6
74 #define LUA_TUSERDATA 7
75 #define LUA_TTHREAD 8
76 
77 #define LUA_NUMTYPES 9
78 
79 
80 
81 /* minimum Lua stack available to a C function */
82 #define LUA_MINSTACK 20
83 
84 
85 /* predefined values in the registry */
86 #define LUA_RIDX_MAINTHREAD 1
87 #define LUA_RIDX_GLOBALS 2
88 #define LUA_RIDX_LAST LUA_RIDX_GLOBALS
89 
90 
91 /* type of numbers in Lua */
93 
94 
95 /* type for integer functions */
96 typedef LUA_INTEGER lua_Integer;
97 
98 /* unsigned integer type */
100 
101 /* type for continuation-function contexts */
103 
104 
105 /*
106 ** Type for C functions registered with Lua
107 */
108 typedef int (*lua_CFunction) (lua_State *L);
109 
110 /*
111 ** Type for continuation functions
112 */
113 typedef int (*lua_KFunction) (lua_State *L, int status, lua_KContext ctx);
114 
115 
116 /*
117 ** Type for functions that read/write blocks when loading/dumping Lua chunks
118 */
119 typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz);
120 
121 typedef int (*lua_Writer) (lua_State *L, const void *p, size_t sz, void *ud);
122 
123 
124 /*
125 ** Type for memory-allocation functions
126 */
127 typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
128 
129 
130 /*
131 ** Type for warning functions
132 */
133 typedef void (*lua_WarnFunction) (void *ud, const char *msg, int tocont);
134 
135 
136 
137 
138 /*
139 ** generic extra include file
140 */
141 #if defined(LUA_USER_H)
142 #include LUA_USER_H
143 #endif
144 
145 
146 /*
147 ** RCS ident string
148 */
149 extern const char lua_ident[];
150 
151 
152 /*
153 ** state manipulation
154 */
155 LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud);
156 LUA_API void (lua_close) (lua_State *L);
159 
161 
162 
164 
165 
166 /*
167 ** basic stack manipulation
168 */
169 LUA_API int (lua_absindex) (lua_State *L, int idx);
170 LUA_API int (lua_gettop) (lua_State *L);
171 LUA_API void (lua_settop) (lua_State *L, int idx);
172 LUA_API void (lua_pushvalue) (lua_State *L, int idx);
173 LUA_API void (lua_rotate) (lua_State *L, int idx, int n);
174 LUA_API void (lua_copy) (lua_State *L, int fromidx, int toidx);
175 LUA_API int (lua_checkstack) (lua_State *L, int n);
176 
177 LUA_API void (lua_xmove) (lua_State *from, lua_State *to, int n);
178 
179 
180 /*
181 ** access functions (stack -> C)
182 */
183 
184 LUA_API int (lua_isnumber) (lua_State *L, int idx);
185 LUA_API int (lua_isstring) (lua_State *L, int idx);
186 LUA_API int (lua_iscfunction) (lua_State *L, int idx);
187 LUA_API int (lua_isinteger) (lua_State *L, int idx);
188 LUA_API int (lua_isuserdata) (lua_State *L, int idx);
189 LUA_API int (lua_type) (lua_State *L, int idx);
190 LUA_API const char *(lua_typename) (lua_State *L, int tp);
191 
192 LUA_API lua_Number (lua_tonumberx) (lua_State *L, int idx, int *isnum);
193 LUA_API lua_Integer (lua_tointegerx) (lua_State *L, int idx, int *isnum);
194 LUA_API int (lua_toboolean) (lua_State *L, int idx);
195 LUA_API const char *(lua_tolstring) (lua_State *L, int idx, size_t *len);
196 LUA_API lua_Unsigned (lua_rawlen) (lua_State *L, int idx);
198 LUA_API void *(lua_touserdata) (lua_State *L, int idx);
199 LUA_API lua_State *(lua_tothread) (lua_State *L, int idx);
200 LUA_API const void *(lua_topointer) (lua_State *L, int idx);
201 
202 
203 /*
204 ** Comparison and arithmetic functions
205 */
206 
207 #define LUA_OPADD 0 /* ORDER TM, ORDER OP */
208 #define LUA_OPSUB 1
209 #define LUA_OPMUL 2
210 #define LUA_OPMOD 3
211 #define LUA_OPPOW 4
212 #define LUA_OPDIV 5
213 #define LUA_OPIDIV 6
214 #define LUA_OPBAND 7
215 #define LUA_OPBOR 8
216 #define LUA_OPBXOR 9
217 #define LUA_OPSHL 10
218 #define LUA_OPSHR 11
219 #define LUA_OPUNM 12
220 #define LUA_OPBNOT 13
221 
222 LUA_API void (lua_arith) (lua_State *L, int op);
223 
224 #define LUA_OPEQ 0
225 #define LUA_OPLT 1
226 #define LUA_OPLE 2
227 
228 LUA_API int (lua_rawequal) (lua_State *L, int idx1, int idx2);
229 LUA_API int (lua_compare) (lua_State *L, int idx1, int idx2, int op);
230 
231 
232 /*
233 ** push functions (C -> stack)
234 */
235 LUA_API void (lua_pushnil) (lua_State *L);
238 LUA_API const char *(lua_pushlstring) (lua_State *L, const char *s, size_t len);
239 LUA_API const char *(lua_pushstring) (lua_State *L, const char *s);
240 LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,
241  va_list argp);
242 LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...);
243 LUA_API void (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n);
244 LUA_API void (lua_pushboolean) (lua_State *L, int b);
245 LUA_API void (lua_pushlightuserdata) (lua_State *L, void *p);
246 LUA_API int (lua_pushthread) (lua_State *L);
247 
248 
249 /*
250 ** get functions (Lua -> stack)
251 */
252 LUA_API int (lua_getglobal) (lua_State *L, const char *name);
253 LUA_API int (lua_gettable) (lua_State *L, int idx);
254 LUA_API int (lua_getfield) (lua_State *L, int idx, const char *k);
255 LUA_API int (lua_geti) (lua_State *L, int idx, lua_Integer n);
256 LUA_API int (lua_rawget) (lua_State *L, int idx);
257 LUA_API int (lua_rawgeti) (lua_State *L, int idx, lua_Integer n);
258 LUA_API int (lua_rawgetp) (lua_State *L, int idx, const void *p);
259 
260 LUA_API void (lua_createtable) (lua_State *L, int narr, int nrec);
261 LUA_API void *(lua_newuserdatauv) (lua_State *L, size_t sz, int nuvalue);
262 LUA_API int (lua_getmetatable) (lua_State *L, int objindex);
263 LUA_API int (lua_getiuservalue) (lua_State *L, int idx, int n);
264 
265 
266 /*
267 ** set functions (stack -> Lua)
268 */
269 LUA_API void (lua_setglobal) (lua_State *L, const char *name);
270 LUA_API void (lua_settable) (lua_State *L, int idx);
271 LUA_API void (lua_setfield) (lua_State *L, int idx, const char *k);
272 LUA_API void (lua_seti) (lua_State *L, int idx, lua_Integer n);
273 LUA_API void (lua_rawset) (lua_State *L, int idx);
274 LUA_API void (lua_rawseti) (lua_State *L, int idx, lua_Integer n);
275 LUA_API void (lua_rawsetp) (lua_State *L, int idx, const void *p);
276 LUA_API int (lua_setmetatable) (lua_State *L, int objindex);
277 LUA_API int (lua_setiuservalue) (lua_State *L, int idx, int n);
278 
279 
280 /*
281 ** 'load' and 'call' functions (load and run Lua code)
282 */
283 LUA_API void (lua_callk) (lua_State *L, int nargs, int nresults,
284  lua_KContext ctx, lua_KFunction k);
285 #define lua_call(L,n,r) lua_callk(L, (n), (r), 0, NULL)
286 
287 LUA_API int (lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc,
288  lua_KContext ctx, lua_KFunction k);
289 #define lua_pcall(L,n,r,f) lua_pcallk(L, (n), (r), (f), 0, NULL)
290 
291 LUA_API int (lua_load) (lua_State *L, lua_Reader reader, void *dt,
292  const char *chunkname, const char *mode);
293 
294 LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data, int strip);
295 
296 
297 /*
298 ** coroutine functions
299 */
300 LUA_API int (lua_yieldk) (lua_State *L, int nresults, lua_KContext ctx,
301  lua_KFunction k);
302 LUA_API int (lua_resume) (lua_State *L, lua_State *from, int narg,
303  int *nres);
304 LUA_API int (lua_status) (lua_State *L);
306 
307 #define lua_yield(L,n) lua_yieldk(L, (n), 0, NULL)
308 
309 
310 /*
311 ** Warning-related functions
312 */
313 LUA_API void (lua_setwarnf) (lua_State *L, lua_WarnFunction f, void *ud);
314 LUA_API void (lua_warning) (lua_State *L, const char *msg, int tocont);
315 
316 
317 /*
318 ** garbage-collection function and options
319 */
320 
321 #define LUA_GCSTOP 0
322 #define LUA_GCRESTART 1
323 #define LUA_GCCOLLECT 2
324 #define LUA_GCCOUNT 3
325 #define LUA_GCCOUNTB 4
326 #define LUA_GCSTEP 5
327 #define LUA_GCSETPAUSE 6
328 #define LUA_GCSETSTEPMUL 7
329 #define LUA_GCISRUNNING 9
330 #define LUA_GCGEN 10
331 #define LUA_GCINC 11
332 
333 LUA_API int (lua_gc) (lua_State *L, int what, ...);
334 
335 
336 /*
337 ** miscellaneous functions
338 */
339 
340 LUA_API int (lua_error) (lua_State *L);
341 
342 LUA_API int (lua_next) (lua_State *L, int idx);
343 
344 LUA_API void (lua_concat) (lua_State *L, int n);
345 LUA_API void (lua_len) (lua_State *L, int idx);
346 
347 LUA_API size_t (lua_stringtonumber) (lua_State *L, const char *s);
348 
349 LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
350 LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
351 
352 LUA_API void (lua_toclose) (lua_State *L, int idx);
353 
354 
355 /*
356 ** {==============================================================
357 ** some useful macros
358 ** ===============================================================
359 */
360 
361 #define lua_getextraspace(L) ((void *)((char *)(L) - LUA_EXTRASPACE))
362 
363 #define lua_tonumber(L,i) lua_tonumberx(L,(i),NULL)
364 #define lua_tointeger(L,i) lua_tointegerx(L,(i),NULL)
365 
366 #define lua_pop(L,n) lua_settop(L, -(n)-1)
367 
368 #define lua_newtable(L) lua_createtable(L, 0, 0)
369 
370 #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))
371 
372 #define lua_pushcfunction(L,f) lua_pushcclosure(L, (f), 0)
373 
374 #define lua_isfunction(L,n) (lua_type(L, (n)) == LUA_TFUNCTION)
375 #define lua_istable(L,n) (lua_type(L, (n)) == LUA_TTABLE)
376 #define lua_islightuserdata(L,n) (lua_type(L, (n)) == LUA_TLIGHTUSERDATA)
377 #define lua_isnil(L,n) (lua_type(L, (n)) == LUA_TNIL)
378 #define lua_isboolean(L,n) (lua_type(L, (n)) == LUA_TBOOLEAN)
379 #define lua_isthread(L,n) (lua_type(L, (n)) == LUA_TTHREAD)
380 #define lua_isnone(L,n) (lua_type(L, (n)) == LUA_TNONE)
381 #define lua_isnoneornil(L, n) (lua_type(L, (n)) <= 0)
382 
383 #define lua_pushliteral(L, s) lua_pushstring(L, "" s)
384 
385 #define lua_pushglobaltable(L) \
386  ((void)lua_rawgeti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS))
387 
388 #define lua_tostring(L,i) lua_tolstring(L, (i), NULL)
389 
390 
391 #define lua_insert(L,idx) lua_rotate(L, (idx), 1)
392 
393 #define lua_remove(L,idx) (lua_rotate(L, (idx), -1), lua_pop(L, 1))
394 
395 #define lua_replace(L,idx) (lua_copy(L, -1, (idx)), lua_pop(L, 1))
396 
397 /* }============================================================== */
398 
399 
400 /*
401 ** {==============================================================
402 ** compatibility macros
403 ** ===============================================================
404 */
405 #if defined(LUA_COMPAT_APIINTCASTS)
406 
407 #define lua_pushunsigned(L,n) lua_pushinteger(L, (lua_Integer)(n))
408 #define lua_tounsignedx(L,i,is) ((lua_Unsigned)lua_tointegerx(L,i,is))
409 #define lua_tounsigned(L,i) lua_tounsignedx(L,(i),NULL)
410 
411 #endif
412 
413 #define lua_newuserdata(L,s) lua_newuserdatauv(L,s,1)
414 #define lua_getuservalue(L,idx) lua_getiuservalue(L,idx,1)
415 #define lua_setuservalue(L,idx) lua_setiuservalue(L,idx,1)
416 
417 #define LUA_NUMTAGS LUA_NUMTYPES
418 
419 /* }============================================================== */
420 
421 /*
422 ** {======================================================================
423 ** Debug API
424 ** =======================================================================
425 */
426 
427 
428 /*
429 ** Event codes
430 */
431 #define LUA_HOOKCALL 0
432 #define LUA_HOOKRET 1
433 #define LUA_HOOKLINE 2
434 #define LUA_HOOKCOUNT 3
435 #define LUA_HOOKTAILCALL 4
436 
437 
438 /*
439 ** Event masks
440 */
441 #define LUA_MASKCALL (1 << LUA_HOOKCALL)
442 #define LUA_MASKRET (1 << LUA_HOOKRET)
443 #define LUA_MASKLINE (1 << LUA_HOOKLINE)
444 #define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT)
445 
446 typedef struct lua_Debug lua_Debug; /* activation record */
447 
448 
449 /* Functions to be called by the debugger in specific events */
450 typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
451 
452 
453 LUA_API int (lua_getstack) (lua_State *L, int level, lua_Debug *ar);
454 LUA_API int (lua_getinfo) (lua_State *L, const char *what, lua_Debug *ar);
455 LUA_API const char *(lua_getlocal) (lua_State *L, const lua_Debug *ar, int n);
456 LUA_API const char *(lua_setlocal) (lua_State *L, const lua_Debug *ar, int n);
457 LUA_API const char *(lua_getupvalue) (lua_State *L, int funcindex, int n);
458 LUA_API const char *(lua_setupvalue) (lua_State *L, int funcindex, int n);
459 
460 LUA_API void *(lua_upvalueid) (lua_State *L, int fidx, int n);
461 LUA_API void (lua_upvaluejoin) (lua_State *L, int fidx1, int n1,
462  int fidx2, int n2);
463 
464 LUA_API void (lua_sethook) (lua_State *L, lua_Hook func, int mask, int count);
468 
469 LUA_API int (lua_setcstacklimit) (lua_State *L, unsigned int limit);
470 
471 struct lua_Debug {
472  int event;
473  const char *name; /* (n) */
474  const char *namewhat; /* (n) 'global', 'local', 'field', 'method' */
475  const char *what; /* (S) 'Lua', 'C', 'main', 'tail' */
476  const char *source; /* (S) */
477  size_t srclen; /* (S) */
478  int currentline; /* (l) */
479  int linedefined; /* (S) */
480  int lastlinedefined; /* (S) */
481  unsigned char nups; /* (u) number of upvalues */
482  unsigned char nparams;/* (u) number of parameters */
483  char isvararg; /* (u) */
484  char istailcall; /* (t) */
485  unsigned short ftransfer; /* (r) index of first value transferred */
486  unsigned short ntransfer; /* (r) number of transferred values */
487  char short_src[LUA_IDSIZE]; /* (S) */
488  /* private part */
489  struct CallInfo *i_ci; /* active function */
490 };
491 
492 /* }====================================================================== */
493 
494 
495 /******************************************************************************
496 * Copyright (C) 1994-2020 Lua.org, PUC-Rio.
497 *
498 * Permission is hereby granted, free of charge, to any person obtaining
499 * a copy of this software and associated documentation files (the
500 * "Software"), to deal in the Software without restriction, including
501 * without limitation the rights to use, copy, modify, merge, publish,
502 * distribute, sublicense, and/or sell copies of the Software, and to
503 * permit persons to whom the Software is furnished to do so, subject to
504 * the following conditions:
505 *
506 * The above copyright notice and this permission notice shall be
507 * included in all copies or substantial portions of the Software.
508 *
509 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
510 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
511 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
512 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
513 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
514 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
515 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
516 ******************************************************************************/
517 
518 
519 #endif
lua_settable
LUA_API void() lua_settable(lua_State *L, int idx)
Definition: lapi.c:813
LUA_IDSIZE
#define LUA_IDSIZE
Definition: luaconf.h:745
lua_upvaluejoin
LUA_API void() lua_upvaluejoin(lua_State *L, int fidx1, int n1, int fidx2, int n2)
Definition: lapi.c:1402
lua_compare
LUA_API int() lua_compare(lua_State *L, int idx1, int idx2, int op)
Definition: lapi.c:324
lua_toclose
LUA_API void() lua_toclose(lua_State *L, int idx)
Definition: lapi.c:1222
lua_isstring
LUA_API int() lua_isstring(lua_State *L, int idx)
Definition: lapi.c:289
lua_xmove
LUA_API void() lua_xmove(lua_State *from, lua_State *to, int n)
Definition: lapi.c:119
lua_Unsigned
LUA_UNSIGNED lua_Unsigned
Definition: lua.h:99
lua_Debug::nups
unsigned char nups
Definition: lua.h:481
lua_getiuservalue
LUA_API int() lua_getiuservalue(lua_State *L, int idx, int n)
Definition: lapi.c:761
LUA_KCONTEXT
#define LUA_KCONTEXT
Definition: luaconf.h:658
lua_getglobal
LUA_API int() lua_getglobal(lua_State *L, const char *name)
Definition: lapi.c:626
luaconf.h
lua_tocfunction
LUA_API lua_CFunction() lua_tocfunction(lua_State *L, int idx)
Definition: lapi.c:409
lua_absindex
LUA_API int() lua_absindex(lua_State *L, int idx)
Definition: lapi.c:160
lua_isuserdata
LUA_API int() lua_isuserdata(lua_State *L, int idx)
Definition: lapi.c:295
lua_newthread
LUA_API lua_State *() lua_newthread(lua_State *L)
Definition: lstate.c:320
lua_rawgeti
LUA_API int() lua_rawgeti(lua_State *L, int idx, lua_Integer n)
Definition: lapi.c:703
lua_State::status
lu_byte status
Definition: lstate.h:285
lua_yieldk
LUA_API int() lua_yieldk(lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k)
Definition: ldo.c:707
_native_lua_config.h
native Lua configuration file
lua_pcallk
LUA_API int() lua_pcallk(lua_State *L, int nargs, int nresults, int errfunc, lua_KContext ctx, lua_KFunction k)
Definition: lapi.c:1002
lua_Writer
int(* lua_Writer)(lua_State *L, const void *p, size_t sz, void *ud)
Definition: lua.h:121
lua_arith
LUA_API void() lua_arith(lua_State *L, int op)
Definition: lapi.c:308
lua_Debug::what
const char * what
Definition: lua.h:475
lua_Debug::ntransfer
unsigned short ntransfer
Definition: lua.h:486
lua_pushlstring
LUA_API const char *() lua_pushlstring(lua_State *L, const char *s, size_t len)
Definition: lapi.c:497
lua_type
LUA_API int() lua_type(lua_State *L, int idx)
Definition: lapi.c:257
lua_newstate
LUA_API lua_State *() lua_newstate(lua_Alloc f, void *ud)
Definition: lstate.c:383
lua_atpanic
LUA_API lua_CFunction() lua_atpanic(lua_State *L, lua_CFunction panicf)
Definition: lapi.c:135
LUA_NUMBER
#define LUA_NUMBER
Definition: luaconf.h:471
lua_Debug::name
const char * name
Definition: lua.h:473
lua_pushnumber
LUA_API void() lua_pushnumber(lua_State *L, lua_Number n)
Definition: lapi.c:476
lua_tonumberx
LUA_API lua_Number() lua_tonumberx(lua_State *L, int idx, int *isnum)
Definition: lapi.c:352
lua_getupvalue
LUA_API const char *() lua_getupvalue(lua_State *L, int funcindex, int n)
Definition: lapi.c:1339
lua_rawequal
LUA_API int() lua_rawequal(lua_State *L, int idx1, int idx2)
Definition: lapi.c:301
lua_Number
LUA_NUMBER lua_Number
Definition: lua.h:92
lua_Debug::nparams
unsigned char nparams
Definition: lua.h:482
lua_Debug::currentline
int currentline
Definition: lua.h:478
lua_rawgetp
LUA_API int() lua_rawgetp(lua_State *L, int idx, const void *p)
Definition: lapi.c:711
lua_resume
LUA_API int() lua_resume(lua_State *L, lua_State *from, int narg, int *nres)
Definition: ldo.c:662
lua_sethook
LUA_API void() lua_sethook(lua_State *L, lua_Hook func, int mask, int count)
Definition: ldebug.c:137
lua_State::errfunc
ptrdiff_t errfunc
Definition: lstate.h:300
lua_copy
LUA_API void() lua_copy(lua_State *L, int fromidx, int toidx)
Definition: lapi.c:228
lua_Debug::isvararg
char isvararg
Definition: lua.h:483
lua_pushvalue
LUA_API void() lua_pushvalue(lua_State *L, int idx)
Definition: lapi.c:243
lua_seti
LUA_API void() lua_seti(lua_State *L, int idx, lua_Integer n)
Definition: lapi.c:835
lua_iscfunction
LUA_API int() lua_iscfunction(lua_State *L, int idx)
Definition: lapi.c:270
lua_Debug
Definition: lua.h:471
lua_gettop
LUA_API int() lua_gettop(lua_State *L)
Definition: lapi.c:167
lua_newuserdatauv
LUA_API void *() lua_newuserdatauv(lua_State *L, size_t sz, int nuvalue)
Definition: lapi.c:1298
lua_pushvfstring
LUA_API const char *() lua_pushvfstring(lua_State *L, const char *fmt, va_list argp)
Definition: lapi.c:526
lua_checkstack
LUA_API int() lua_checkstack(lua_State *L, int n)
Definition: lapi.c:98
lua_load
LUA_API int() lua_load(lua_State *L, lua_Reader reader, void *dt, const char *chunkname, const char *mode)
Definition: lapi.c:1046
lua_Alloc
void *(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize)
Definition: lua.h:127
lua_Debug::lastlinedefined
int lastlinedefined
Definition: lua.h:480
lua_tolstring
LUA_API const char *() lua_tolstring(lua_State *L, int idx, size_t *len)
Definition: lapi.c:378
lua_getmetatable
LUA_API int() lua_getmetatable(lua_State *L, int objindex)
Definition: lapi.c:734
lua_getallocf
LUA_API lua_Alloc() lua_getallocf(lua_State *L, void **ud)
Definition: lapi.c:1264
lua_setupvalue
LUA_API const char *() lua_setupvalue(lua_State *L, int funcindex, int n)
Definition: lapi.c:1353
lua_gethookmask
LUA_API int() lua_gethookmask(lua_State *L)
Definition: ldebug.c:158
lua_settop
LUA_API void() lua_settop(lua_State *L, int idx)
Definition: lapi.c:172
lua_pushboolean
LUA_API void() lua_pushboolean(lua_State *L, int b)
Definition: lapi.c:575
lua_KContext
LUA_KCONTEXT lua_KContext
Definition: lua.h:102
lua_geti
LUA_API int() lua_geti(lua_State *L, int idx, lua_Integer n)
Definition: lapi.c:654
lua_upvalueid
LUA_API void *() lua_upvalueid(lua_State *L, int fidx, int n)
Definition: lapi.c:1383
lua_setglobal
LUA_API void() lua_setglobal(lua_State *L, const char *name)
Definition: lapi.c:806
lua_next
LUA_API int() lua_next(lua_State *L, int idx)
Definition: lapi.c:1205
lua_Debug::srclen
size_t srclen
Definition: lua.h:477
lua_len
LUA_API void() lua_len(lua_State *L, int idx)
Definition: lapi.c:1254
lua_ident
const char lua_ident[]
Definition: lapi.c:35
LUA_API
#define LUA_API
Definition: luaconf.h:294
lua_Hook
void(* lua_Hook)(lua_State *L, lua_Debug *ar)
Definition: lua.h:450
lua_Debug::linedefined
int linedefined
Definition: lua.h:479
LUA_UNSIGNED
#define LUA_UNSIGNED
Definition: luaconf.h:522
lua_typename
LUA_API const char *() lua_typename(lua_State *L, int tp)
Definition: lapi.c:263
lua_error
LUA_API int() lua_error(lua_State *L)
Definition: lapi.c:1196
CallInfo
Definition: lstate.h:171
lua_Debug::namewhat
const char * namewhat
Definition: lua.h:474
lua_gethookcount
LUA_API int() lua_gethookcount(lua_State *L)
Definition: ldebug.c:163
lua_State
Definition: lstate.h:283
lua_rawset
LUA_API void() lua_rawset(lua_State *L, int idx)
Definition: lapi.c:869
lua_pushthread
LUA_API int() lua_pushthread(lua_State *L)
Definition: lapi.c:594
lua_Integer
LUA_INTEGER lua_Integer
Definition: lua.h:96
lua_rawseti
LUA_API void() lua_rawseti(lua_State *L, int idx, lua_Integer n)
Definition: lapi.c:881
lua_dump
LUA_API int() lua_dump(lua_State *L, lua_Writer writer, void *data, int strip)
Definition: lapi.c:1070
lua_Debug::i_ci
struct CallInfo * i_ci
Definition: lua.h:489
lua_gethook
LUA_API lua_Hook() lua_gethook(lua_State *L)
Definition: ldebug.c:153
lua_setmetatable
LUA_API int() lua_setmetatable(lua_State *L, int objindex)
Definition: lapi.c:893
lua_Debug::event
int event
Definition: lua.h:472
lua_toboolean
LUA_API int() lua_toboolean(lua_State *L, int idx)
Definition: lapi.c:372
lua_isinteger
LUA_API int() lua_isinteger(lua_State *L, int idx)
Definition: lapi.c:276
lua_createtable
LUA_API void() lua_createtable(lua_State *L, int narr, int nrec)
Definition: lapi.c:721
lua_getlocal
LUA_API const char *() lua_getlocal(lua_State *L, const lua_Debug *ar, int n)
Definition: ldebug.c:228
lua_Debug::ftransfer
unsigned short ftransfer
Definition: lua.h:485
lua_isnumber
LUA_API int() lua_isnumber(lua_State *L, int idx)
Definition: lapi.c:282
lua_Debug::short_src
char short_src[LUA_IDSIZE]
Definition: lua.h:487
lua_rawlen
LUA_API lua_Unsigned() lua_rawlen(lua_State *L, int idx)
Definition: lapi.c:397
lua_touserdata
LUA_API void *() lua_touserdata(lua_State *L, int idx)
Definition: lapi.c:427
lua_setcstacklimit
LUA_API int() lua_setcstacklimit(lua_State *L, unsigned int limit)
Definition: lstate.c:99
lua_Debug::source
const char * source
Definition: lua.h:476
lua_getstack
LUA_API int() lua_getstack(lua_State *L, int level, lua_Debug *ar)
Definition: ldebug.c:168
lua_version
LUA_API lua_Number() lua_version(lua_State *L)
Definition: lapi.c:145
lua_status
LUA_API int() lua_status(lua_State *L)
Definition: lapi.c:1085
lua_isyieldable
LUA_API int() lua_isyieldable(lua_State *L)
Definition: ldo.c:702
lua_rawget
LUA_API int() lua_rawget(lua_State *L, int idx)
Definition: lapi.c:691
lua_close
LUA_API void() lua_close(lua_State *L)
Definition: lstate.c:438
lua_setallocf
LUA_API void() lua_setallocf(lua_State *L, lua_Alloc f, void *ud)
Definition: lapi.c:1274
lua_setlocal
LUA_API const char *() lua_setlocal(lua_State *L, const lua_Debug *ar, int n)
Definition: ldebug.c:250
lua_setiuservalue
LUA_API int() lua_setiuservalue(lua_State *L, int idx, int n)
Definition: lapi.c:933
lua_concat
LUA_API void() lua_concat(lua_State *L, int n)
Definition: lapi.c:1238
lua_resetthread
LUA_API int() lua_resetthread(lua_State *L)
Definition: lstate.c:361
lua_pushnil
LUA_API void() lua_pushnil(lua_State *L)
Definition: lapi.c:468
lua_setwarnf
LUA_API void() lua_setwarnf(lua_State *L, lua_WarnFunction f, void *ud)
Definition: lapi.c:1282
lua_CFunction
int(* lua_CFunction)(lua_State *L)
Definition: lua.h:108
lua_pushinteger
LUA_API void() lua_pushinteger(lua_State *L, lua_Integer n)
Definition: lapi.c:484
lua_tothread
LUA_API lua_State *() lua_tothread(lua_State *L, int idx)
Definition: lapi.c:433
lua_KFunction
int(* lua_KFunction)(lua_State *L, int status, lua_KContext ctx)
Definition: lua.h:113
lua_pushstring
LUA_API const char *() lua_pushstring(lua_State *L, const char *s)
Definition: lapi.c:509
lua_topointer
LUA_API const void *() lua_topointer(lua_State *L, int idx)
Definition: lapi.c:446
lua_pushlightuserdata
LUA_API void() lua_pushlightuserdata(lua_State *L, void *p)
Definition: lapi.c:586
lua_Reader
const char *(* lua_Reader)(lua_State *L, void *ud, size_t *sz)
Definition: lua.h:119
lua_WarnFunction
void(* lua_WarnFunction)(void *ud, const char *msg, int tocont)
Definition: lua.h:133
lua_gc
LUA_API int() lua_gc(lua_State *L, int what,...)
Definition: lapi.c:1093
lua_getfield
LUA_API int() lua_getfield(lua_State *L, int idx, const char *k)
Definition: lapi.c:648
lua_pushcclosure
LUA_API void() lua_pushcclosure(lua_State *L, lua_CFunction fn, int n)
Definition: lapi.c:550
lua_callk
LUA_API void() lua_callk(lua_State *L, int nargs, int nresults, lua_KContext ctx, lua_KFunction k)
Definition: lapi.c:963
lua_setfield
LUA_API void() lua_setfield(lua_State *L, int idx, const char *k)
Definition: lapi.c:829
lua_rawsetp
LUA_API void() lua_rawsetp(lua_State *L, int idx, const void *p)
Definition: lapi.c:874
lua_pushfstring
LUA_API const char *() lua_pushfstring(lua_State *L, const char *fmt,...)
Definition: lapi.c:537
lua_Debug::istailcall
char istailcall
Definition: lua.h:484
lua_gettable
LUA_API int() lua_gettable(lua_State *L, int idx)
Definition: lapi.c:633
lua_stringtonumber
LUA_API size_t() lua_stringtonumber(lua_State *L, const char *s)
Definition: lapi.c:344
lua_warning
LUA_API void() lua_warning(lua_State *L, const char *msg, int tocont)
Definition: lapi.c:1290
lua_tointegerx
LUA_API lua_Integer() lua_tointegerx(lua_State *L, int idx, int *isnum)
Definition: lapi.c:362
lua_rotate
LUA_API void() lua_rotate(lua_State *L, int idx, int n)
Definition: lapi.c:214
lua_getinfo
LUA_API int() lua_getinfo(lua_State *L, const char *what, lua_Debug *ar)
Definition: ldebug.c:390