Re: Bug report: Header dependency issue in 5.4.6
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Bug report: Header dependency issue in 5.4.6
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2023年5月23日 16:10:51 -0300
> In lua 5.4.6 a #include "lstate.h" was added to ltm.h. This causes a header
> dependency issue since if, in a C file, ltm.h is imported before lstate.h
> compilation will fail since the 'TM_N' enum value will be used in the
> included lstate.h code before being defined.
>
> This can be resolved by removing the lstate.h include from ltm.h and
> replacing StkId with StackValue* in the luaT_getvarargs function prototype.
Just a detail: Note that 'lstate.h' is being included because of
'CallInfo'. 'StkId' is defined in 'lobject.h', not in 'lstate.h'.
-- Roberto