aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/lua.h b/lua.h
index 38888730..2b2082a4 100644
--- a/lua.h
+++ b/lua.h
@@ -1,9 +1,8 @@
1/* 1/*
2** $Id: lua.h,v 1.136 2002/06/03 20:11:07 roberto Exp roberto $ 2** $Id: lua.h,v 1.137 2002/06/05 12:34:19 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** Tecgraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil 4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5** e-mail: info@lua.org 5** http://www.lua.org mailto:info@lua.org
6** www: http://www.lua.org
7** See Copyright Notice at the end of this file 6** See Copyright Notice at the end of this file
8*/ 7*/
9 8
@@ -26,7 +25,7 @@
26 25
27 26
28 27
29/* option for multiple returns in `lua_call' */ 28/* option for multiple returns in `lua_pcall' and `lua_rawcall' */
30#define LUA_MULTRET (-1) 29#define LUA_MULTRET (-1)
31 30
32 31
@@ -38,7 +37,7 @@
38#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i)) 37#define lua_upvalueindex(i) (LUA_GLOBALSINDEX-(i))
39 38
40 39
41/* error codes for `lua_load*' and `lua_pcall' */ 40/* error codes for `lua_load' and `lua_pcall' */
42#define LUA_ERRRUN 1 41#define LUA_ERRRUN 1
43#define LUA_ERRFILE 2 42#define LUA_ERRFILE 2
44#define LUA_ERRSYNTAX 3 43#define LUA_ERRSYNTAX 3
@@ -52,9 +51,9 @@ typedef int (*lua_CFunction) (lua_State *L);
52 51
53 52
54/* 53/*
55** function for loading Lua code 54** functions that read blocks when loading Lua chunk
56*/ 55*/
57typedef const char * (*lua_Getblock) (void *ud, size_t *size); 56typedef const char * (*lua_Chunkreader) (void *ud, size_t *size);
58 57
59 58
60/* 59/*
@@ -84,7 +83,7 @@ typedef const char * (*lua_Getblock) (void *ud, size_t *size);
84#endif 83#endif
85 84
86 85
87/* Lua numerical type */ 86/* type of Numbers in Lua */
88#ifndef LUA_NUMBER 87#ifndef LUA_NUMBER
89#define LUA_NUMBER double 88#define LUA_NUMBER double
90#endif 89#endif
@@ -105,7 +104,7 @@ LUA_API void lua_close (lua_State *L);
105LUA_API lua_State *lua_newthread (lua_State *L); 104LUA_API lua_State *lua_newthread (lua_State *L);
106LUA_API void lua_closethread (lua_State *L, lua_State *thread); 105LUA_API void lua_closethread (lua_State *L, lua_State *thread);
107 106
108LUA_API lua_CFunction lua_setpanicf (lua_State *L, lua_CFunction panicf); 107LUA_API lua_CFunction lua_atpanic (lua_State *L, lua_CFunction panicf);
109 108
110 109
111/* 110/*
@@ -181,7 +180,7 @@ LUA_API void lua_setmetatable (lua_State *L, int objindex);
181*/ 180*/
182LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults); 181LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults);
183LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf); 182LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf);
184LUA_API int lua_load (lua_State *L, lua_Getblock getblock, void *ud, 183LUA_API int lua_load (lua_State *L, lua_Chunkreader reader, void *data,
185 const char *chunkname); 184 const char *chunkname);
186 185
187 186
@@ -244,8 +243,8 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size);
244#define lua_isnone(L,n) (lua_type(L,n) == LUA_TNONE) 243#define lua_isnone(L,n) (lua_type(L,n) == LUA_TNONE)
245#define lua_isnoneornil(L, n) (lua_type(L,n) <= 0) 244#define lua_isnoneornil(L, n) (lua_type(L,n) <= 0)
246 245
247#define lua_pushliteral(L, s) lua_pushlstring(L, "" s, \ 246#define lua_pushliteral(L, s) \
248 (sizeof(s)/sizeof(char))-1) 247 lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1)
249 248
250 249
251 250