Commit Graph

8 Commits

Author SHA1 Message Date
ThePhD
0088002abf Class binding now works with multiple functions
Refactoring on function_types.hpp performed to slim down some of the calls: could use more refactoring
Drastically simplified userdata's binding capabilities: constructor supports both `:` and `.` syntax (but member functions DO NOT).
All tests are passing
2014-04-26 18:24:54 -04:00
ThePhD
c0b565fa3d Renamed many parts of lua_function.hpp to make more sense.
Added pop() function to `reference`
`stack.hpp` now has many more functions to properly handle user data
`types.hpp` now has `userdata_t` and `lightuserdata_t` to faciliate `stack`'s `pop` and `push` operations
Class binding functionality built into `table` and `state`, as well as placed in `userdata` class in `userdata.hpp`
demangling detail now present for clang, gcc, and MSVC (somewhat for MSVC)
Constructor arity still needs to be handled for `userdata<T>`
tests updated and passing
2014-04-25 20:20:35 -04:00
ThePhD
8ef3ceb8a0 New test cases for the order of returns. Apparently, its screwing up between both lua and C++. Have to test thoroughly. Changes currently are half-working. 2013-12-15 16:27:20 -05:00
ThePhD
ed0b83f8b0 Several changes. I took away operator() for the proxy type, because it'd interfere with the Callable type and all. Alas, good things do die I suppose. =[
But! I left it on the `sol::function` type, because it's necessary to discard returns. The .call is still there, though, just incase you need it. <3
reverse_indices_builder is also there, to make sure we can push and pop without the lua api taking our types and breaking them for the std::tuple returns.
All is at it should be~
2013-12-14 23:25:44 -05:00
Rapptz
6ff859ba29 Stylistic changes to match the rest of the code 2013-12-02 23:33:23 -05:00
ThePhD
be98a4fdd4 Reformatted to look like Rapptz's style. The following code sample work without error in VS 2013: http://pastebin.com/s4Jbjnht
It'll be up to @Rapptz's to make further changes to make sure GCC compiles, but the core of the functionality is there and my work is essentially done.
Class bindings are up next, but really I don't want to even touch those. :c
2013-12-02 15:42:03 -05:00
ThePhD
f67b21b525 The solution technically works, but there's some stack corruption going on somewhere that I can quite track down, even when calling a void function with no parameters. I'll have to look into it... 2013-12-02 14:22:51 -05:00
Rapptz
f49e35a105 Add call function to transform a tuple into function arguments 2013-11-28 06:50:26 -05:00