Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move getMetaTable() from LuaTable to LuaObject? #85

Open
aubade opened this issue Jan 16, 2015 · 0 comments
Open

Move getMetaTable() from LuaTable to LuaObject? #85

aubade opened this issue Jan 16, 2015 · 0 comments

Comments

@aubade
Copy link
Contributor

aubade commented Jan 16, 2015

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant