ThePhD
ff7326ed96
We now have the ability to get a userdata that has been created C++ style 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!
2014-05-09 10:48:55 -04:00
Rapptz
cd092d3bfb
Add new_userdata to create internally memory managed userdata from sol::state
2014-04-27 05:09:28 -04:00
Rapptz
a2c26a042c
Rename set_class to set_userdata
2014-04-27 04:11:30 -04:00
Rapptz
2f76b96061
Switch member function pointer and string pair in initialisation
2014-04-27 02:35:11 -04:00
Rapptz
8cd3b18f7b
Fix test failure
2014-04-27 01:29:37 -04:00
Rapptz
b6c2f1c6d5
Fix formatting on tests file
2014-04-27 01:18:54 -04:00
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
Rapptz
d65f6f1291
Format changes on tests
2014-04-25 21:23:57 -04:00
ThePhD
2243bec052
userdata<T> now works and compiles on MSVC.
...
It's going to take serious work to make it happen in GCC, plus the fact that 4.9 is still giving me
so many errors I can't even read it...
I'll let Rapptz figure it out, but later.
Sexy class bindings, yes!
2014-04-25 20:08:07 -04:00
Rapptz
2782fed879
Fix typo in tests
2014-01-18 23:10:49 -05:00
ThePhD
750d110a92
Fixing formatting to make sure everything's nice and pretty.
2013-12-21 22:11:20 -05:00
ThePhD
3d44c6500e
And a last fix for the test we had to block while fixing implicit conversions, and we're good!
2013-12-21 22:05:19 -05:00
ThePhD
94c287810f
It took a lott of work, but we finally have the right rankings for operator[] to work as intended with as minimal room for screwups as possible.
...
This should enable operator[] to work in all cases that it is to be expected, thanks to a lot of explicit conversions and some basic overload resolution ranking tricks (e.g., making some conversions a template).
We also need to remember that GCC expects `. template (function name)` in generic code, as it can parse things in a really dumb and silly manner.
2013-12-21 22:00:28 -05:00
ThePhD
b90f789986
operator[] support~
...
And all is as it should be in the world~
2013-12-21 19:30:30 -05:00
Rapptz
ac975872ad
Remove support for operator[] on tables
2013-12-16 11:07:10 -05:00
ThePhD
cb492e7c29
Squashing those GCC warnings.
2013-12-15 22:14:56 -05:00
ThePhD
f8cfb80a45
Fixed a bug with the return order and added tests to make sure it works.
...
Added the ability to get mutiple values when doing `table.get` or `state.get`.
Lua is hard. :c
2013-12-15 22:09:06 -05: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
ThePhD
913611c042
Forgot to make sure this test was running!
2013-12-14 22:21:06 -05:00
ThePhD
84f367ca23
Somehow, run_script got deelted on this file. Strange.
2013-12-14 00:32:45 -05:00
ThePhD
0079593966
Strangely enough, it's impossible for the API to know if the returned value is wrong, so this test will always fail (unless we do some crazy nonsense).
2013-12-14 00:19:02 -05:00
ThePhD
25f42b4bd3
A hefty slice of changes for functions on the proxy. Not necessary, but was fun to get around MSVC's ICE errors.
2013-12-14 00:15:14 -05:00
ThePhD
6c06bddd6e
Some extra-strength "nothrow" requirements.
2013-12-13 23:33:06 -05:00
ThePhD
9624dd93e7
VC++ Compat again.
2013-12-13 20:09:51 -05:00
ThePhD
4dab754b86
VC++ Compatibility and some changes to function I'll need to test.
2013-12-13 17:50:24 -05:00
Rapptz
ebbceeb9e2
Add support for const table operator[] retrieval
2013-12-13 15:40:20 -05:00
ThePhD
2192e98eec
MSVC needs explicit overloads and explicit =default operators on sol::function
. It's quite whacky, really. Anyway, it compiles, so let's just make sure this works for GCC too.
2013-12-13 14:16:59 -05:00
Rapptz
8db67834b2
Add test cases for operator[]
2013-12-12 20:20:46 -05:00
Rapptz
ffb32f45ad
Renamed sol.scratch.cpp to tests.cpp
2013-12-12 05:40:05 -05:00