Last active
January 2, 2016 21:39
-
-
Save jeremyong/8365304 to your computer and use it in GitHub Desktop.
Improved call to a lua function using Luab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <cassert> | |
#include "selene.h" | |
int main() { | |
sel::State state; | |
l.Load("example.lua") | |
int difference; | |
std::string greeting; | |
std::tie(difference, greeting) = state.Call<int, std::string>("subtract_and_hello", 1, 3); | |
assert(difference == -2 && greeting == "hello"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment