'onelua' can use the test library

Just add -DLUA_USER_H='"ltests.h"' when compiling it.
This commit is contained in:
Roberto Ierusalimschy
2025-07-29 14:35:04 -03:00
parent c33bb08ffe
commit 8fddca81e7
4 changed files with 34 additions and 13 deletions

View File

@@ -122,14 +122,14 @@ LUA_API int luaB_opentests (lua_State *L);
LUA_API void *debug_realloc (void *ud, void *block,
size_t osize, size_t nsize);
#if defined(lua_c)
#define luaL_newstate() \
lua_newstate(debug_realloc, &l_memcontrol, luaL_makeseed(NULL))
#define luai_openlibs(L) \
{ luaL_openlibs(L); \
luaL_requiref(L, "T", luaB_opentests, 1); \
lua_pop(L, 1); }
#endif