From ef5d171cc89b19ac1fea905b99d819b5f97cba00 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Thu, 27 Mar 2025 12:38:29 -0300
Subject: New macro 'l_numbits'

---
 lfunc.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

(limited to 'lfunc.c')

diff --git a/lfunc.c b/lfunc.c
index c62a5d23..da7c6239 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -162,13 +162,8 @@ static void prepcallclosemth (lua_State *L, StkId level, TStatus status,
 }
 
 
-/*
-** Maximum value for deltas in 'tbclist', dependent on the type
-** of delta. (This macro assumes that an 'L' is in scope where it
-** is used.)
-*/
-#define MAXDELTA  \
-	((256ul << ((sizeof(L->stack.p->tbclist.delta) - 1) * 8)) - 1)
+/* Maximum value for deltas in 'tbclist' */
+#define MAXDELTA       USHRT_MAX
 
 
 /*
-- 
cgit v1.2.3-55-g6feb