mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 10:49:40 +08:00
lua: clean up host patch fuzz
Refresh host patches to match target changes from the commit 4e800716ac97 ("lua: clean up patch fuzz"). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
parent
ef5b7aa6c3
commit
c0c5c63514
@ -1020,6 +1020,7 @@
|
||||
-#define PI (3.14159265358979323846)
|
||||
-#define RADIANS_PER_DEGREE (PI/180.0)
|
||||
-
|
||||
-
|
||||
+#ifdef LNUM_FLOAT
|
||||
+# define PI (3.14159265358979323846F)
|
||||
+#elif defined(M_PI)
|
||||
@ -1028,7 +1029,7 @@
|
||||
+# define PI (3.14159265358979323846264338327950288)
|
||||
+#endif
|
||||
+#define RADIANS_PER_DEGREE (PI/180)
|
||||
|
||||
+
|
||||
+#undef HUGE
|
||||
+#ifdef LNUM_FLOAT
|
||||
+# define HUGE HUGE_VALF
|
||||
@ -3432,10 +3433,10 @@
|
||||
+ case TM_POW: if (try_powint( ri, ib, ic)) return; break;
|
||||
+ case TM_UNM: if (try_unmint( ri, ib)) return; break;
|
||||
+ default: lua_assert(0);
|
||||
+ }
|
||||
}
|
||||
+ }
|
||||
+ /* Fallback to floating point, when leaving range. */
|
||||
+
|
||||
|
||||
+#ifdef LNUM_COMPLEX
|
||||
+ if ((nvalue_img(b)!=0) || (nvalue_img(c)!=0)) {
|
||||
+ lua_Complex r;
|
||||
@ -3455,7 +3456,7 @@
|
||||
+ default: lua_assert(0); r=0;
|
||||
+ }
|
||||
+ setnvalue_complex( ra, r );
|
||||
}
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
@ -3476,7 +3477,7 @@
|
||||
+ if (!call_binTM(L, rb, rc, ra, op))
|
||||
+ luaG_aritherror(L, rb, rc);
|
||||
+}
|
||||
|
||||
+
|
||||
+/* Helper macro to sort arithmetic operations into four categories:
|
||||
+ * TK_INT: integer - integer operands
|
||||
+ * TK_NUMBER: number - number (non complex, either may be integer)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/src/lvm.c
|
||||
+++ b/src/lvm.c
|
||||
@@ -284,7 +284,8 @@ int luaV_lessthan (lua_State *L, const T
|
||||
@@ -281,7 +281,8 @@ int luaV_lessthan (lua_State *L, const T
|
||||
else
|
||||
return luai_numlt( nvalue_fast(l), cast_num(ivalue(r)) );
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
return res;
|
||||
|
||||
return luaG_ordererror(L, l, r);
|
||||
@@ -322,7 +323,8 @@ static int lessequal (lua_State *L, cons
|
||||
@@ -319,7 +320,8 @@ static int lessequal (lua_State *L, cons
|
||||
else
|
||||
return luai_numle( nvalue_fast(l), cast_num(ivalue(r)) );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user