lua-users home
lua-l archive

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


Thank you for your quick feedback.

> Arg pet hate! C++ does not have a "Standard Template Library" this is
> a fallacy, the STL was the original implementation written by SGI. What you
> are referring to is the C++ Standard Library.

I knew that, but thought it is best known under its older name.
Still, I updated the documentation...

> From a quick look I notice two bugs both to do with lua::Lua and lua::Array,
> they do not prevent the copy constructor or assignment operator and
> therefore will give a segmentation fault when two instances own the state.

Corrected. There is now a reference counter in a registry field inside
lua_State,
so that only the last lua::Lua object will destroy a shared state.

> Input makes illegal casts from a void pointer to a function pointer and vice
> versa,

I didn't know this was illegal. Are there any generic type to which
one can legally cast
a pointer to a function? Anyway, in this case, I added lua_CFunction
to the union.

> in addition I would also call into question the functions marked
> const in (Input::get*) which change the state of union fields.

I don't understand this last remark. In lua::Input, there are only
Put* members, and
none modify the union field (or which one?). In lua::Output, there are
"Get*() const"
members, which all modify the values pointed to by the PointerValue member,
but the object itself is not modified.