aboutsummaryrefslogtreecommitdiff
path: root/ltests.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-29 14:35:04 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-29 14:35:04 -0300
commit8fddca81e7d4137512e92f398ca638d61b935dbd (patch)
treeaa778d040c923285979df29e7fb29763ff5c9e81 /ltests.h
parentc33bb08ffe04f24e09571b59eed3c9b59b622d91 (diff)
downloadlua-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.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltests.h b/ltests.h
index d34e9d42..c825bdcf 100644
--- a/ltests.h
+++ b/ltests.h
@@ -122,14 +122,14 @@ LUA_API int luaB_opentests (lua_State *L);
122LUA_API void *debug_realloc (void *ud, void *block, 122LUA_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