aboutsummaryrefslogtreecommitdiff
path: root/ltests.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-04-30 17:29:27 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-04-30 17:29:27 -0300
commit948fb628d9d7242acfe1c3fe1f099ef228e38ead (patch)
tree390472bf45cda5258800537914aa48dee2bf1d69 /ltests.h
parenta901c505abffd13e96a7d304393bb759aad87e59 (diff)
downloadlua-948fb628d9d7242acfe1c3fe1f099ef228e38ead.tar.gz
lua-948fb628d9d7242acfe1c3fe1f099ef228e38ead.tar.bz2
lua-948fb628d9d7242acfe1c3fe1f099ef228e38ead.zip
Details
When in test mode (#include "tests.h"), force Lua to use its own implementation of 'lua_strx2number' and 'lua_number2strx' to test them.
Diffstat (limited to 'ltests.h')
-rw-r--r--ltests.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/ltests.h b/ltests.h
index db0a2a0d..02331ebc 100644
--- a/ltests.h
+++ b/ltests.h
@@ -118,18 +118,22 @@ LUA_API void *debug_realloc (void *ud, void *block,
118#define MINSTRTABSIZE 2 118#define MINSTRTABSIZE 2
119#define MAXIWTHABS 3 119#define MAXIWTHABS 3
120 120
121#define STRCACHE_N 23
122#define STRCACHE_M 5
123
124#undef LUAI_USER_ALIGNMENT_T
125#define LUAI_USER_ALIGNMENT_T union { char b[sizeof(void*) * 8]; }
126
121 127
122/* make stack-overflow tests run faster */ 128/* make stack-overflow tests run faster */
123#undef LUAI_MAXSTACK 129#undef LUAI_MAXSTACK
124#define LUAI_MAXSTACK 50000 130#define LUAI_MAXSTACK 50000
125 131
126 132
127#undef LUAI_USER_ALIGNMENT_T 133/* force Lua to use its own implementations */
128#define LUAI_USER_ALIGNMENT_T union { char b[sizeof(void*) * 8]; } 134#undef lua_strx2number
129 135#undef lua_number2strx
130 136
131#define STRCACHE_N 23
132#define STRCACHE_M 5
133 137
134#endif 138#endif
135 139