Skip to content

lifetimes hell (with UserData-s) #123

Answered by khvzak
ildar asked this question in Q&A
Discussion options

You must be logged in to vote

I would suggest to try to store LuaValue<'a> as an associated value to a UserData (see set_user_value and get_user_value)

Also you could try to store LuaValue in Lua Registry and refer to it via RegistryKey.
It would significantly simplity the "lifetimes hell".

Also I'm working on alternative implementation that will not require lifetimes for values but it's mostly a concept now.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ildar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants