[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: LUA_USERSTATE
- From: Nick Trout <Nick.Trout@...>
- Date: Thu, 31 Jan 2002 16:17:42 -0000
> 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