Support building ltests.c in MODE=dbg

Fixes #1226
This commit is contained in:
Justine Tunney 2024-12-13 08:09:17 -08:00
parent 838b54f906
commit 69402f4d78
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
2 changed files with 38 additions and 16 deletions

View file

@ -28,25 +28,39 @@
#define ltests_c
#define LUA_CORE
#include "third_party/lua/lapi.h"
#include "third_party/lua/lauxlib.h"
#include "third_party/lua/lcode.h"
#include "third_party/lua/lctype.h"
#include "third_party/lua/ldebug.h"
#include "third_party/lua/ldo.h"
#include "third_party/lua/lfunc.h"
#include "third_party/lua/lmem.h"
#include "third_party/lua/lopcodes.h"
#include "third_party/lua/lopnames.inc"
#include "third_party/lua/lprefix.h"
#include "third_party/lua/lstate.h"
#include "third_party/lua/lstring.h"
#include "third_party/lua/ltable.h"
#include "third_party/lua/lua.h"
#include "third_party/lua/lualib.h"
#include "lprefix.h"
#include <limits.h>
#include <setjmp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libc/mem/gc.h"
#include "libc/log/log.h"
#include "lua.h"
#include "lapi.h"
#include "lauxlib.h"
#include "lcode.h"
#include "lctype.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lmem.h"
#include "lopcodes.h"
#include "lopnames.inc"
#include "lprefix.h"
#include "lstate.h"
#include "lstring.h"
#include "ltable.h"
#include "lualib.h"
#include "ltm.h"
__static_yoink("lua_notice");
/*
** The whole module only makes sense with LUA_DEBUG on
*/

View file

@ -133,6 +133,14 @@ typedef struct lua_Debug lua_Debug;
typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
/*
** [jart] support ltests.h without unsafe LUA_USER_H kludge
** use `make MODE=dbg` to get this functionality
*/
#ifdef MODE_DBG
#include "ltests.h"
#endif
/*
** generic extra include file
*/