summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/lua.h b/lua.h
index 710e0c4d..6277b98c 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.133 2002/05/16 18:39:46 roberto Exp roberto $ 2** $Id: lua.h,v 1.134 2002/05/23 20:29:05 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: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil
5** e-mail: info@lua.org 5** e-mail: info@lua.org
@@ -51,6 +51,11 @@ typedef struct lua_State lua_State;
51typedef int (*lua_CFunction) (lua_State *L); 51typedef int (*lua_CFunction) (lua_State *L);
52 52
53 53
54/*
55** function for loading Lua code
56*/
57typedef const char * (*lua_Getblock) (void *ud, size_t *size);
58
54 59
55/* 60/*
56** basic types 61** basic types
@@ -176,9 +181,8 @@ LUA_API void lua_setmetatable (lua_State *L, int objindex);
176*/ 181*/
177LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults); 182LUA_API void lua_rawcall (lua_State *L, int nargs, int nresults);
178LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf); 183LUA_API int lua_pcall (lua_State *L, int nargs, int nresults, int errf);
179LUA_API int lua_loadfile (lua_State *L, const char *filename); 184LUA_API int lua_load (lua_State *L, lua_Getblock getblock, void *ud,
180LUA_API int lua_loadbuffer (lua_State *L, const char *buff, size_t size, 185 int binary, const char *chunkname);
181 const char *name);
182 186
183 187
184/* 188/*
@@ -249,11 +253,6 @@ LUA_API void *lua_newuserdata (lua_State *L, size_t size);
249** compatibility macros and functions 253** compatibility macros and functions
250*/ 254*/
251 255
252LUA_API int lua_call (lua_State *L, int nargs, int nresults);
253LUA_API int lua_dofile (lua_State *L, const char *filename);
254LUA_API int lua_dostring (lua_State *L, const char *str);
255LUA_API int lua_dobuffer (lua_State *L, const char *buff, size_t size,
256 const char *name);
257 256
258LUA_API int lua_pushupvalues (lua_State *L); 257LUA_API int lua_pushupvalues (lua_State *L);
259 258
@@ -292,6 +291,9 @@ LUA_API int lua_pushupvalues (lua_State *L);
292** ======================================================================= 291** =======================================================================
293*/ 292*/
294 293
294/* binary files start with <esc>Lua */
295#define LUA_SIGNATURE "\033Lua"
296
295/* formats for Lua numbers */ 297/* formats for Lua numbers */
296#ifndef LUA_NUMBER_SCAN 298#ifndef LUA_NUMBER_SCAN
297#define LUA_NUMBER_SCAN "%lf" 299#define LUA_NUMBER_SCAN "%lf"