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

[lua52-sys] add ref/unref functions and helper constants #162

Merged
merged 1 commit into from
Aug 29, 2017

Conversation

sunshowers
Copy link
Contributor

These are useful when adding things to the Lua registry. From the
documentation at http://pgl.yoyo.org/luai/i/luaL_ref:

As long as you do not manually add integer keys into table t, luaL_ref
ensures the uniqueness of the key it returns.

This can be done by hand with (say) an AtomicIsize, but it's just
easier to use these functions.

These are useful when adding things to the Lua registry. From the
documentation at http://pgl.yoyo.org/luai/i/luaL_ref:

> As long as you do not manually add integer keys into table t, luaL_ref
> ensures the uniqueness of the key it returns.

This can be done by hand with (say) an `AtomicIsize`, but it's just
easier to use these functions.
@tomaka tomaka merged commit 8467b97 into tomaka:master Aug 29, 2017
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

Successfully merging this pull request may close these issues.

2 participants