diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-04-30 17:29:27 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-04-30 17:29:27 -0300 |
| commit | 948fb628d9d7242acfe1c3fe1f099ef228e38ead (patch) | |
| tree | 390472bf45cda5258800537914aa48dee2bf1d69 | |
| parent | a901c505abffd13e96a7d304393bb759aad87e59 (diff) | |
| download | lua-github-948fb628d9d7242acfe1c3fe1f099ef228e38ead.tar.gz | |
Details
When in test mode (#include "tests.h"), force Lua to use its own
implementation of 'lua_strx2number' and 'lua_number2strx' to test them.
| -rw-r--r-- | ltests.h | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -118,18 +118,22 @@ LUA_API void *debug_realloc (void *ud, void *block, #define MINSTRTABSIZE 2 #define MAXIWTHABS 3 +#define STRCACHE_N 23 +#define STRCACHE_M 5 + +#undef LUAI_USER_ALIGNMENT_T +#define LUAI_USER_ALIGNMENT_T union { char b[sizeof(void*) * 8]; } + /* make stack-overflow tests run faster */ #undef LUAI_MAXSTACK #define LUAI_MAXSTACK 50000 -#undef LUAI_USER_ALIGNMENT_T -#define LUAI_USER_ALIGNMENT_T union { char b[sizeof(void*) * 8]; } - +/* force Lua to use its own implementations */ +#undef lua_strx2number +#undef lua_number2strx -#define STRCACHE_N 23 -#define STRCACHE_M 5 #endif |
