[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bug report: Luac -l incompatible with LUAI_ASSERT
- From: Alex Light <allight@...>
- Date: Wed, 8 Sep 2021 14:42:56 -0700
I mean the bug is I want to compile lua with -DLUAI_ASSERT and use luac with the same CFLAGS. Since the fix for this is rather straightforward (you can just use pragma puish_macro to redefine the check_exp for those lines or turn them into #defines) and it's something others might also want to do I figured I'd file a report. I can do it myself but that's just another patch on lua to maintain.
> > If you compile luac with -DLUAI_ASSERT then `luac -l <file>` will no longer work.
> Thanks for the report.
> For the time being, add this line at the top of luac.c:
> #undef LUAI_ASSERT
Better yet, you can fix the bug by removing the option -DLUAI_ASSERT.
The LUAI_ASSERT has the following comment:
Internal assertions for in-house debugging
(The prefix LUAI_, instead of LUA_, also hints that it is not intended
for regular use.)
So, if you use this macro, you are on your own.