lua-users home
lua-l archive

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



why not add a switch to tolua that will provide con-struct-ors, even
without a "fake" constructor in the pkg? Or some token in the pkg that
sets the option? This will make stuff for the C folks easier and not
disrupt anyone else's work.

I don't think it would be so useful. There is no way to implement a general constructor. It would be possible to export a kind of "malloc" function, returning the appropriate pointer to Lua.
I think it would be too low level...


By the way, I have still gripes about missing handling for C union
types. It is causing Event handling in luaSDL to be very debug
intensive for me. Which is sad, because luaSDL lets me throw together a
small game in an afternoon (including gfx). Definetly cool.

tolua 5.0 should handle union just fine.
is it buggy or are you using a older version?

-- waldemar