lua-users home
lua-l archive

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


> What's wrong with:
> 
>     class MyData
>     {
>     public:
>         SomeType GetData(SomeType id);
>         void SetData(SomeType id, SomeType data);
>     Private:
>         SomeDataStructure allthedata;
>     };
> 
>     #define LUA_USERSTATE MyData mydata;
>     
>     ...
>     
>     L.mydata.SetData(id, data);
>     
>     ...
>     
>     Data = L.GetData(id);
>     
> ? 
> 
> Or of course a struct instead of a class for C users. I like the
> ultimate flexibility the way it is.


You're just wrapping whats there. How do you add more per library state data
at runtime?

N