Rapptz
b323a62b2a
Fix compiler error with cv-qualifiers on member function pointers
2014-04-27 02:26:06 -04:00
Rapptz
8cd3b18f7b
Fix test failure
2014-04-27 01:29:37 -04:00
Rapptz
63bc2b06cb
Fix compiler errors, tests failing however
2014-04-27 00:53:57 -04:00
ThePhD
a525760178
Fixed some bad spacing.
2014-04-26 21:38:37 -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
ThePhD
4d6d39be88
Merge remote-tracking branch 'root/classes'
2014-04-26 00:19:45 -04:00
ThePhD
4c102605e8
Custom constructors, but apparently there's something on the stack and we can't get at its type?
2014-04-26 00:19:36 -04:00
Rapptz
077f5fd258
Massive renaming of lua_function.hpp
2014-04-25 22:05:58 -04:00
Rapptz
5229cace49
Moved pop from reference to table
2014-04-25 21:40:52 -04:00
Rapptz
c9bf032d36
Fix all compile errors on GCC
2014-04-25 20:53:36 -04:00
Rapptz
6b54f99e50
Do some renaming of lua_function.hpp and fix some compiler errors
2014-04-25 20:42:38 -04:00
Rapptz
44eab5a164
Refactor demangle.hpp to look a bit nicer
2014-04-25 20:19:31 -04:00
Rapptz
23ed27df89
Renamed DEPRECATE to SOL_DEPRECATED
2014-04-25 20:11:00 -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
ThePhD
359848f371
Demangler is alive, it seems. But honestly, MSVC is kind of crappy about it: perhaps, later, we'll just take a string indicating the name of the class.
...
main.cpp contains the test implementation for the lua classes -- woo!
2014-04-25 20:08:07 -04:00
ThePhD
c145759da8
Deprecation mechanism, improvements to lua_function's classes, and demangling for MSVC and gcc/clang
2014-04-25 20:08:07 -04:00
ThePhD
9328271d06
Renames for lua_function's internal types and some early-caught fixes for using the right type for the member of the function
...
Preparation for dumping whole classes into lua... it's going to be fairly tough making this one work.
2014-04-25 20:08:07 -04:00
ThePhD
63a4dafce5
Better names for the functors in preparation for working with whole classes of them. This is going to be tough...
2014-04-24 16:46:31 -04:00
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
Rapptz
faa14f3d35
Merge branch 'master' of https://github.com/Rapptz/sol
2014-01-26 17:06:05 -05:00
Rapptz
44bbdcc4c3
Add lua_state function to retrieve the lua_State pointer
2014-01-26 00:25:46 -05:00
Rapptz
02f8248d0f
Fix compiler error from using sol::sol_error in get_nil
2014-01-22 12:51:09 -05:00
ThePhD
750d110a92
Fixing formatting to make sure everything's nice and pretty.
2013-12-21 22:11:20 -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
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