lua-users home
lua-l archive

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


In C++ you can have a struct declared like this:

struct foo {
  int member1;
  struct

    int submember1;
    int submember2;
  } substruct1;

  struct {
    int sub2member1;
    int sub2member2;
  } substruct2;
};

You can access members of this struct like this:

foo bar;
int a = bar.substruct1.submember1;

etc. toLua does not seemt to support this syntax. So I have two questions:
is this correct, or is there some way to write this declaration in such a
way that toLua will understand? Second, how hard would it be to modify toLua
to handle this case?

Any help is appreciated.

Eric