You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing some code where I'd like to check the __dtype from a Lua object's metatable to check if it was made from a D type before I attempt to!() conversions. But given that class objects are (and in the future, hopefully struct references will be) Lua Userdata objects, this only works part of the time.
I've done some quick checking in my local source tree, and it seems like just moving the getMetaTable() method wholesale from LuaTable to LuaObject, and adding a quick .type() check does the trick.
Would you consider accepting a pull request to this effect?
The text was updated successfully, but these errors were encountered:
I'm writing some code where I'd like to check the __dtype from a Lua object's metatable to check if it was made from a D type before I attempt to!() conversions. But given that class objects are (and in the future, hopefully struct references will be) Lua Userdata objects, this only works part of the time.
I've done some quick checking in my local source tree, and it seems like just moving the getMetaTable() method wholesale from LuaTable to LuaObject, and adding a quick .type() check does the trick.
Would you consider accepting a pull request to this effect?
The text was updated successfully, but these errors were encountered: