lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



Message: 2
Date: Tue, 22 May 2018 08:08:16 -0300
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Subject: Re: Circular #include between lstate.h and ltm.h
To: Lua mailing list <lua-l@lists.lua.org>
Message-ID: <20180522110816.GI16216@arraial.inf.puc-rio.br">20180522110816.GI16216@arraial.inf.puc-rio.br>
Content-Type: text/plain; charset=us-ascii

> I was directed here from github https://github.com/lua/lua/pull/18
>
> Deleting #include "lstate.h" from ltm.h looks like the right fix to me.

The problem in that link is stated like this:

  lstate.h uses TM_N from ltm.h and lstate.h uses nothing from ltm.h

Maybe I am missing something, but that statement seems slightly
contradictory.

-- Roberto

Hi Roberto,

Good point, well made. ltm.h uses nothing from lstate.h. 

What I actually did after seeing the circular include was delete one, notice the build break, then delete the other and see that the build & test was fine. Then actually check the contents of the headers and the order in which they're included in various files.

Cheers!

Jon