lua-users home
lua-l archive

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


Hello Waldemar:

Thanks very much for your quick and very helpful reply concerning tolua and
typedef's.  I have started using the .pkg with your suggested changes, and
everything compiles just fine - congratulations; very nice work!
Unfortunately, without sounding too much like a newbie, I didn't understand
your comment about "fi" being a lua variable.  How do you get a lua variable
that holds an object of the kind "file_info"?  Does my C code have to allocate
the space and return a pointer to it?  I must have missed the one or two
beginner lessons on this.  Sorry...

Thanks,

David


>typedef struct {
>         short vRefNum;
>         short refNum;
>         const unsigned char* filename;
>         const unsigned char* path;
>}file_info;

>Assuming "fi" is a lua variable holding an object
>of that kind, the code:

>print(fi.filename)

>would work fine,...