Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/mit/lua/dist/src kernel mode lua has no floating po...
details: https://anonhg.NetBSD.org/src/rev/12768035cccd
branches: trunk
changeset: 353266:12768035cccd
user: mbalmer <mbalmer%NetBSD.org@localhost>
date: Wed Apr 26 13:53:18 2017 +0000
description:
kernel mode lua has no floating point available
diffstat:
external/mit/lua/dist/src/lauxlib.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (35 lines):
diff -r 523f1242d5be -r 12768035cccd external/mit/lua/dist/src/lauxlib.c
--- a/external/mit/lua/dist/src/lauxlib.c Wed Apr 26 13:09:12 2017 +0000
+++ b/external/mit/lua/dist/src/lauxlib.c Wed Apr 26 13:53:18 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lauxlib.c,v 1.9 2017/04/26 13:17:33 mbalmer Exp $ */
+/* $NetBSD: lauxlib.c,v 1.10 2017/04/26 13:53:18 mbalmer Exp $ */
/*
** Id: lauxlib.c,v 1.289 2016/12/20 18:37:00 roberto Exp
@@ -829,10 +829,14 @@
else {
switch (lua_type(L, idx)) {
case LUA_TNUMBER: {
+#ifndef _KERNEL
if (lua_isinteger(L, idx))
+#endif
lua_pushfstring(L, "%I", (LUAI_UACINT)lua_tointeger(L, idx));
+#ifndef _KERNEL
else
lua_pushfstring(L, "%f", (LUAI_UACNUMBER)lua_tonumber(L, idx));
+#endif
break;
}
case LUA_TSTRING:
@@ -1052,8 +1056,10 @@
luaL_error(L, "core and library have incompatible numeric types");
if (v != lua_version(NULL))
luaL_error(L, "multiple Lua VMs detected");
+#ifndef _KERNEL
else if (*v != ver)
luaL_error(L, "version mismatch: app. needs %f, Lua core provides %f",
(LUAI_UACNUMBER)ver, (LUAI_UACNUMBER)*v);
+#endif
}
Home |
Main Index |
Thread Index |
Old Index