Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/external/mit/lua/dist/src Pull up following revision(s) (...
details: https://anonhg.NetBSD.org/src/rev/1f16459c6ae0
branches: netbsd-7
changeset: 799864:1f16459c6ae0
user: martin <martin%NetBSD.org@localhost>
date: Sun Mar 13 12:08:24 2016 +0000
description:
Pull up following revision(s) (requested by roy in ticket #1139):
external/mit/lua/dist/src/lvm.c: revision 1.8
No floating point in the kernel, also make sure we always return an int
diffstat:
external/mit/lua/dist/src/lvm.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (51 lines):
diff -r 20936414d285 -r 1f16459c6ae0 external/mit/lua/dist/src/lvm.c
--- a/external/mit/lua/dist/src/lvm.c Sun Mar 13 12:02:48 2016 +0000
+++ b/external/mit/lua/dist/src/lvm.c Sun Mar 13 12:08:24 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lvm.c,v 1.3.2.3 2015/11/16 11:14:48 msaitoh Exp $ */
+/* $NetBSD: lvm.c,v 1.3.2.4 2016/03/13 12:08:24 martin Exp $ */
/*
** Id: lvm.c,v 2.245 2015/06/09 15:53:35 roberto Exp
@@ -315,16 +315,17 @@
** Return 'l < r', for numbers.
*/
static int LTnum (const TValue *l, const TValue *r) {
+#ifdef _KERNEL
+ lua_Integer li = ivalue(l);
+ return li < ivalue(r); /* both must be integers */
+#else
if (ttisinteger(l)) {
lua_Integer li = ivalue(l);
if (ttisinteger(r))
return li < ivalue(r); /* both are integers */
-#ifndef _KERNEL
else /* 'l' is int and 'r' is float */
return LTintfloat(li, fltvalue(r)); /* l < r ? */
-#endif
}
-#ifndef _KERNEL
else {
lua_Number lf = fltvalue(l); /* 'l' must be float */
if (ttisfloat(r))
@@ -342,16 +343,17 @@
** Return 'l <= r', for numbers.
*/
static int LEnum (const TValue *l, const TValue *r) {
+#ifdef _KERNEL
+ lua_Integer li = ivalue(l);
+ return li <= ivalue(r); /* both must be integers */
+#else
if (ttisinteger(l)) {
lua_Integer li = ivalue(l);
if (ttisinteger(r))
return li <= ivalue(r); /* both are integers */
-#ifndef _KERNEL
else /* 'l' is int and 'r' is float */
return LEintfloat(li, fltvalue(r)); /* l <= r ? */
-#endif
}
-#ifndef _KERNEL
else {
lua_Number lf = fltvalue(l); /* 'l' must be float */
if (ttisfloat(r))
Home |
Main Index |
Thread Index |
Old Index