[luau] C struct interdependency problem

Jimen Ching jching at flex.com
Mon Jun 24 10:24:01 PDT 2002


On Fri, 21 Jun 2002, Ray Strode wrote:
>I have a question about getting the compiler to grok some files with
>interdependent structs.
>
>Any idea how I can get this setup arranged so the compiler
>believes everything is alright (e.g. where should the #includes
>go and things)?

The only notable thing about this structure dependency is that when
ObjectError is instantiated, Object must be defined.  This is because the
LinkedList structure definition uses an Object value instead of an Object
pointer.

Aside from this, the header location can use any style you want.  You just
need to include object.h when you create an ObjectError instance, i.e. via
automatic instantiation or dynamic allocation.

Hope this helps.

--jc
-- 
Jimen Ching (WH6BRR)      jching at flex.com     wh6brr at uhm.ampr.org






More information about the LUAU mailing list