ThePhD
b1504ad1b3
Missing inline on several functions; causes compilations when sol
is included in multiple Translation Units.
...
`function.hpp` needed cstdint to be defined to use unit32_t properly.
2014-04-24 16:46:11 -04: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
b655c07258
Merge remote-tracking branch 'root/master'
2013-12-14 20:07:35 -05:00
Rapptz
5341682503
Change tabs to spaces
2013-12-14 04:42:53 -05:00
ThePhD
20ff49cd66
Merge remote-tracking branch 'root/master'
...
* root/master:
Cast result of floating point retrieval before receiving it
Fix bug with sol::object not being copyable
2013-12-14 00:15:25 -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
Rapptz
c59fc9e536
Fix bug with sol::object not being copyable
2013-12-14 00:05:14 -05:00
ThePhD
49ad128493
If you want to have return types, use .call
instead of operator()
.
2013-12-13 23:30:16 -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
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
ThePhD
459bbcaba0
GCC is lame. But at least it's building now. Fixed up the build.ninja and made all tests pass (exceptions weren't being thrown because of lua_pcall
: use lua_call
to let exceptions propogate naturally).
2013-12-11 12:42:00 -05:00
ThePhD
350f430d74
Improved tests, added a build.ninja for TeamCity, and fixed formatting again to work with Rapptz's style.
2013-12-11 11:18:13 -05:00
ThePhD
fc19896815
Some changes to make sure builds go through on 64-bit.
2013-12-11 06:10:30 -05:00
ThePhD
854cbeef71
Fixing style to fit @Rapptz's usual no-tabs, four-space-indents, template<> no-spaces stuff.
2013-12-08 23:09:07 -05:00
Rapptz
6ff859ba29
Stylistic changes to match the rest of the code
2013-12-02 23:33:23 -05:00
ThePhD
45000177c3
Alright, this should fix the GCC build errors! Everything should work as advertised. A Sol for the Mun: go, go!
2013-12-02 21:39:21 -05:00
ThePhD
86b16dc61b
GCC is still not compiling, complaining about detail::ltr_pop and not being able to find a proper overload. I'm not sure why it's complaining, I'll have to look in more detail soon.
2013-12-02 20:12:25 -05:00
ThePhD
bf2404bdfd
More style fixes and more attempts to make sure this compiles between GCC and MSVC.
2013-12-02 19:15: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
ThePhD
ebf4908c27
Formatting corrections
2013-12-01 18:57:28 -05:00
ThePhD
9f79e8c573
function header with addition to sol.hpp so that a person can do function invocations on lua functions without explicitly adding sol/functions.hpp
2013-12-01 18:15:26 -05:00