Userdata destructors, missing Lua state argument? #509
Unanswered
petrihakkinen
asked this question in
Q&A
Replies: 1 comment
-
|
I added the missing argument locally and I'm not seeing any negative effects. Here's a pull request which adds the missing argument: #510 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it deliberate that destructors registered with lua_newuserdatadtor does not receive lua_State as argument?
lua_newuserdatadtor(lua_State* L, size_t sz, void (*dtor)(void*));Note that the tagged API lua_setuserdatadtor() has that argument:
lua_setuserdatadtor(lua_State* L, int tag, void (*dtor)(lua_State*, void*))This is causing me problems because in the destructor I'd need to clean up data I've stashed in the registry. I eventually want to refactor everything to use tagged userdata, but that is a bigger task.
Beta Was this translation helpful? Give feedback.
All reactions