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) --- lauxlib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 5d122ed3..5c9014f5 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -1,5 +1,5 @@ /* -** $Id: lauxlib.c,v 1.42 2000/10/30 12:38:50 roberto Exp roberto $ +** $Id: lauxlib.c,v 1.43 2000/10/30 13:07:48 roberto Exp roberto $ ** Auxiliary functions for building Lua libraries ** See Copyright Notice in lua.h */ @@ -84,15 +84,15 @@ LUALIB_API const char *luaL_opt_lstr (lua_State *L, int narg, const char *def, s } -LUALIB_API double luaL_check_number (lua_State *L, int narg) { - double d = lua_tonumber(L, narg); +LUALIB_API lua_Number luaL_check_number (lua_State *L, int narg) { + lua_Number d = lua_tonumber(L, narg); if (d == 0 && !lua_isnumber(L, narg)) /* avoid extra test when d is not 0 */ type_error(L, narg, LUA_TNUMBER); return d; } -LUALIB_API double luaL_opt_number (lua_State *L, int narg, double def) { +LUALIB_API lua_Number luaL_opt_number (lua_State *L, int narg, lua_Number def) { if (lua_isnull(L, narg)) return def; else return luaL_check_number(L, narg); } -- cgit v1.2.3-55-g6feb