Created
May 20, 2012 23:02
-
-
Save sansajn/2759854 to your computer and use it in GitHub Desktop.
luatools: reading complex lua stack
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
| int a, b, c; | |
| std::string s; | |
| std::vector<int> v; | |
| lua::istack_stream(L) >> s >> lua::tab("a", a) >> lua::tab("b", b) | |
| >> lua::tab("c", c) >> lua::next >> v; |
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
| function get_complex_stack() | |
| return {9, 8, 7}, {a=101, b=202, c=303}, 'hello!' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment