From 4894c2796277b47b0ffc8983e8231d2cc95ee09b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 4 Dec 2000 16:33:40 -0200 Subject: lua_Number defined in lua.h (1st version) --- lua.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lua.h') diff --git a/lua.h b/lua.h index 6fc3c2db..5f3b9af9 100644 --- a/lua.h +++ b/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.78 2000/10/30 12:38:50 roberto Exp roberto $ +** $Id: lua.h,v 1.79 2000/10/31 12:44:07 roberto Exp roberto $ ** Lua - An Extensible Extension Language ** TeCGraf: Grupo de Tecnologia em Computacao Grafica, PUC-Rio, Brazil ** e-mail: lua@tecgraf.puc-rio.br @@ -57,6 +57,9 @@ #define LUA_ERRERR 5 +/* Lua numerical type */ +typedef double lua_Number; + typedef struct lua_State lua_State; typedef int (*lua_CFunction) (lua_State *L); @@ -107,7 +110,7 @@ LUA_API int lua_tag (lua_State *L, int index); LUA_API int lua_equal (lua_State *L, int index1, int index2); LUA_API int lua_lessthan (lua_State *L, int index1, int index2); -LUA_API double lua_tonumber (lua_State *L, int index); +LUA_API lua_Number lua_tonumber (lua_State *L, int index); LUA_API const char *lua_tostring (lua_State *L, int index); LUA_API size_t lua_strlen (lua_State *L, int index); 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); ** push functions (C -> stack) */ LUA_API void lua_pushnil (lua_State *L); -LUA_API void lua_pushnumber (lua_State *L, double n); +LUA_API void lua_pushnumber (lua_State *L, lua_Number n); LUA_API void lua_pushlstring (lua_State *L, const char *s, size_t len); LUA_API void lua_pushstring (lua_State *L, const char *s); LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); -- cgit v1.2.3-55-g6feb