diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-29 14:35:04 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-29 14:35:04 -0300 |
| commit | 8fddca81e7d4137512e92f398ca638d61b935dbd (patch) | |
| tree | aa778d040c923285979df29e7fb29763ff5c9e81 /ltests.h | |
| parent | c33bb08ffe04f24e09571b59eed3c9b59b622d91 (diff) | |
| download | lua-8fddca81e7d4137512e92f398ca638d61b935dbd.tar.gz lua-8fddca81e7d4137512e92f398ca638d61b935dbd.tar.bz2 lua-8fddca81e7d4137512e92f398ca638d61b935dbd.zip | |
'onelua' can use the test library
Just add -DLUA_USER_H='"ltests.h"' when compiling it.
Diffstat (limited to 'ltests.h')
| -rw-r--r-- | ltests.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -122,14 +122,14 @@ LUA_API int luaB_opentests (lua_State *L); | |||
| 122 | LUA_API void *debug_realloc (void *ud, void *block, | 122 | LUA_API void *debug_realloc (void *ud, void *block, |
| 123 | size_t osize, size_t nsize); | 123 | size_t osize, size_t nsize); |
| 124 | 124 | ||
| 125 | #if defined(lua_c) | 125 | |
| 126 | #define luaL_newstate() \ | 126 | #define luaL_newstate() \ |
| 127 | lua_newstate(debug_realloc, &l_memcontrol, luaL_makeseed(NULL)) | 127 | lua_newstate(debug_realloc, &l_memcontrol, luaL_makeseed(NULL)) |
| 128 | #define luai_openlibs(L) \ | 128 | #define luai_openlibs(L) \ |
| 129 | { luaL_openlibs(L); \ | 129 | { luaL_openlibs(L); \ |
| 130 | luaL_requiref(L, "T", luaB_opentests, 1); \ | 130 | luaL_requiref(L, "T", luaB_opentests, 1); \ |
| 131 | lua_pop(L, 1); } | 131 | lua_pop(L, 1); } |
| 132 | #endif | 132 | |
| 133 | 133 | ||
| 134 | 134 | ||
| 135 | 135 | ||
