diff options
Diffstat (limited to 'lua.h')
| -rw-r--r-- | lua.h | 9 |
1 files changed, 6 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.h,v 1.78 2000/10/30 12:38:50 roberto Exp roberto $ | 2 | ** $Id: lua.h,v 1.79 2000/10/31 12:44:07 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: lua@tecgraf.puc-rio.br | 5 | ** e-mail: lua@tecgraf.puc-rio.br |
| @@ -57,6 +57,9 @@ | |||
| 57 | #define LUA_ERRERR 5 | 57 | #define LUA_ERRERR 5 |
| 58 | 58 | ||
| 59 | 59 | ||
| 60 | /* Lua numerical type */ | ||
| 61 | typedef double lua_Number; | ||
| 62 | |||
| 60 | typedef struct lua_State lua_State; | 63 | typedef struct lua_State lua_State; |
| 61 | 64 | ||
| 62 | typedef int (*lua_CFunction) (lua_State *L); | 65 | typedef int (*lua_CFunction) (lua_State *L); |
| @@ -107,7 +110,7 @@ LUA_API int lua_tag (lua_State *L, int index); | |||
| 107 | LUA_API int lua_equal (lua_State *L, int index1, int index2); | 110 | LUA_API int lua_equal (lua_State *L, int index1, int index2); |
| 108 | LUA_API int lua_lessthan (lua_State *L, int index1, int index2); | 111 | LUA_API int lua_lessthan (lua_State *L, int index1, int index2); |
| 109 | 112 | ||
| 110 | LUA_API double lua_tonumber (lua_State *L, int index); | 113 | LUA_API lua_Number lua_tonumber (lua_State *L, int index); |
| 111 | LUA_API const char *lua_tostring (lua_State *L, int index); | 114 | LUA_API const char *lua_tostring (lua_State *L, int index); |
| 112 | LUA_API size_t lua_strlen (lua_State *L, int index); | 115 | LUA_API size_t lua_strlen (lua_State *L, int index); |
| 113 | LUA_API lua_CFunction lua_tocfunction (lua_State *L, int index); | 116 | LUA_API lua_CFunction lua_tocfunction (lua_State *L, int index); |
| @@ -119,7 +122,7 @@ LUA_API const void *lua_topointer (lua_State *L, int index); | |||
| 119 | ** push functions (C -> stack) | 122 | ** push functions (C -> stack) |
| 120 | */ | 123 | */ |
| 121 | LUA_API void lua_pushnil (lua_State *L); | 124 | LUA_API void lua_pushnil (lua_State *L); |
| 122 | LUA_API void lua_pushnumber (lua_State *L, double n); | 125 | LUA_API void lua_pushnumber (lua_State *L, lua_Number n); |
| 123 | LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len); | 126 | LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len); |
| 124 | LUA_API void lua_pushstring (lua_State *L, const char *s); | 127 | LUA_API void lua_pushstring (lua_State *L, const char *s); |
| 125 | LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); | 128 | LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); |
