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

Getting userdata out of lua into C++ (after coming from C++ originally) #19

Merged
merged 2 commits into from
May 9, 2014
Merged

Conversation

ThePhD
Copy link
Contributor

@ThePhD ThePhD commented May 9, 2014

When you know a type is supposed to be a userdata with C++ information on it, there should be a way to get it out of the Lua VM and mess with it in C++ directly (since it is, indeed, a C++ object). This PR provides the ability to do that.

There are also several refactorings to reduce the amount of code written for get requests and friends.

ThePhD added 2 commits May 8, 2014 13:08
Makes more sense, as the return does not always have to be multiple types.
(Indeed, it is specialized for 1 and 0 cases).
…tyle out of lua

Using `auto` and `decltype` in more places that MSVC can handle it -- using type traits in other places to avoid VC++'s chokes
More flexibility, woo!
@Rapptz
Copy link
Owner

Rapptz commented May 9, 2014

Looks good to me.

Rapptz added a commit that referenced this pull request May 9, 2014
Getting userdata out of lua into C++ (after coming from C++ originally)
@Rapptz Rapptz merged commit f842de2 into Rapptz:master May 9, 2014
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