aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-04-01 10:41:25 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-04-01 10:41:25 -0300
commit93e347b51923a3f0b993aac37c74e1489c02f3b5 (patch)
treeda8550df942466aee490300ad68f5692b74f068e
parentf4123b2fc2a662c08e3d7edc721241c251a22c4b (diff)
downloadlua-93e347b51923a3f0b993aac37c74e1489c02f3b5.tar.gz
lua-93e347b51923a3f0b993aac37c74e1489c02f3b5.tar.bz2
lua-93e347b51923a3f0b993aac37c74e1489c02f3b5.zip
Corrections of stack addresses back to strict mode
It can be a little slower, but only for quite large stacks and moreover stack reallocation is not a common operation. With no strong contrary reason, it is better to follow the standard.
-rw-r--r--ldo.c2
-rw-r--r--ltests.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/ldo.c b/ldo.c
index 6824a21f..3e5c7504 100644
--- a/ldo.c
+++ b/ldo.c
@@ -199,7 +199,7 @@ l_noret luaD_errerr (lua_State *L) {
199** The following macro chooses how strict is the code. 199** The following macro chooses how strict is the code.
200*/ 200*/
201#if !defined(LUAI_STRICT_ADDRESS) 201#if !defined(LUAI_STRICT_ADDRESS)
202#define LUAI_STRICT_ADDRESS 0 202#define LUAI_STRICT_ADDRESS 1
203#endif 203#endif
204 204
205#if LUAI_STRICT_ADDRESS 205#if LUAI_STRICT_ADDRESS
diff --git a/ltests.h b/ltests.h
index 34205167..7f0ce404 100644
--- a/ltests.h
+++ b/ltests.h
@@ -44,8 +44,8 @@
44#define LUA_RAND32 44#define LUA_RAND32
45 45
46 46
47/* test stack reallocation with strict address use */ 47/* test stack reallocation without strict address use */
48#define LUAI_STRICT_ADDRESS 1 48#define LUAI_STRICT_ADDRESS 0
49 49
50 50
51/* memory-allocator control variables */ 51/* memory-allocator control variables */