From 9e3db70482e927e5992cccdb5a40424b33ad0a29 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 9 Mar 2018 16:24:45 -0300 Subject: details (casts between 'lua_Number' and 'double') --- ltests.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ltests.c b/ltests.c index a5781fb6..bc8b6b43 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.241 2018/02/20 16:52:50 roberto Exp roberto $ +** $Id: ltests.c,v 2.242 2018/02/23 13:13:31 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -957,13 +957,13 @@ static int doonnewstack (lua_State *L) { static int s2d (lua_State *L) { - lua_pushnumber(L, *cast(const double *, luaL_checkstring(L, 1))); + lua_pushnumber(L, cast_num(*cast(const double *, luaL_checkstring(L, 1)))); return 1; } static int d2s (lua_State *L) { - double d = luaL_checknumber(L, 1); + double d = cast(double, luaL_checknumber(L, 1)); lua_pushlstring(L, cast_charp(&d), sizeof(d)); return 1; } -- cgit v1.2.3-55-g6feb