ThePhD
cfda1d34ba
Trying to guess what GCC wants in this case is baffling...
2013-12-21 19:51:48 -05:00
ThePhD
4f279c5033
Strangely enough, GCC can't handle having T_
as a typdef.
2013-12-21 19:44:31 -05:00
ThePhD
7ca6ce8d55
Forgot a dot.
2013-12-21 19:42:50 -05:00
ThePhD
ef223ecaeb
I wish C++ didn't demand that functions have to appear before each other in lexographic order. =/
2013-12-21 19:39:51 -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
e0bcf5a11e
Ordering things more nicely for GCC and fixing calls to always used extra types
parameters when they can for early-out decltype deduction, rather than recursive template reliance (compiles better for VC++ and resolves earlier for g++).
2013-12-15 17:09:23 -05:00
ThePhD
c8417d65de
decltype
with types
. It seems unfair.
2013-12-15 16:56:01 -05:00
ThePhD
63536dd8d0
Why not cheat with an extra types
? Who needs type deduction when you can just pass the right types directly?
2013-12-15 16:52:01 -05:00
ThePhD
b9b32baf1a
declval is in the std namespace, derp.
2013-12-15 16:46:57 -05:00
ThePhD
94405d0346
Fixing lua function, attempting another fix for rtl_pop
2013-12-15 16:45:40 -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
6101865c1e
GCC warnings can go suck a duck.
2013-12-14 23:31:23 -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
4f197dbb91
operator!= for nil_t
2013-12-14 20:16:28 -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
Rapptz
f061e0040d
Add operator== and operator!= support for sol::object and nil
2013-12-14 00:28:14 -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
a6306d7012
Cast result of floating point retrieval before receiving it
2013-12-14 00:07:41 -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
c6f6203ab2
We can avoid unused variable issues entirely and keep MSVC from borking out by explicitly declaring the size of the swallow
declaration. This should make all compilers happy.
2013-12-13 23:26:59 -05:00
ThePhD
009a79606a
It has to be a reference, not a value. I mistakenly thought typename Table
was taken by reference... oh well. It's fixed now. I wish VC++ didn't choke so badly on decltype.
2013-12-13 22:34:56 -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
856d28ab70
EnableIf and DisableIf back in place, type trait fixed for MSVC. Bleh, this is a lot of work. Removed functional
header, because nobody's using it.
2013-12-13 14:59:46 -05:00
ThePhD
dc6935553b
Forgot a private on table.
2013-12-13 14:19:04 -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
af0097fb7f
Add support for setting functions with operator[]
2013-12-12 19:48:26 -05:00
Rapptz
7cc8c93289
Move type traits to its own header and clean up code using the traits
2013-12-12 18:43:36 -05:00
Rapptz
5eeaedec2f
Basic operator[] support for tables
2013-12-12 18:12:07 -05:00
Rapptz
d44a215216
Remove trivial destructors from lua_func types
2013-12-12 14:36:09 -05:00
Rapptz
9f36db8148
Rename script_file to open_file
2013-12-12 05:31:35 -05:00
Rapptz
c241a3df92
Remove redundant check for narr and nrec variables in create_table
2013-12-12 05:12:45 -05:00
Rapptz
fdf145ecd8
Minor stylistic changes to be consistent
2013-12-12 05:11:09 -05:00
ThePhD
2b4f9cc24c
Meh, who needs "eval". It's technically right, but I think evaluate might be for shorter lines and stuff... who knows.
2013-12-11 18:16:52 -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
bcf4b9b08f
Have I mentioned I hate GCC? I hate GCC.
2013-12-11 11:56:34 -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
dd63621453
Added some catch tests and a basic nil getter.
2013-12-11 08:32:27 -05:00
ThePhD
fc19896815
Some changes to make sure builds go through on 64-bit.
2013-12-11 06:10:30 -05:00
Rapptz
9e47ec6b06
Merge branch 'master' of https://github.com/ThePhD/sol into ThePhD
2013-12-09 17:20:21 -05:00
ThePhD
e53c47f7b1
Okay, so now it compiles without errors or warnings and works pretty well. This should be the last piece necessary for full working conformance. Yey~
2013-12-09 17:01:52 -05:00
Rapptz
404dc641a9
Merge branch 'master' of https://github.com/ThePhD/sol into ThePhD
2013-12-09 14:27:39 -05:00
ThePhD
19d01ecd1d
Okay, cleaned up includes and now the newest feature:
...
STATEFUL FUNCTIONS!
Any stateful function now works and is properly cleaned up, thanks to some additional metatables that are associated with the function values.
This lays the ground work for class bindings, but that's a far off dream. For now, table retrieval and `operator[]` is what's for dinner.
2013-12-09 14:12:38 -05:00