Commit Graph

7 Commits

Author SHA1 Message Date
ThePhD
1d93f560f2 more luajit compatibility fixes - works with Lua 5.1, 5.2, 5.3
additional tests to make sure pass-by-value and copy semantics work as intended
new proxy_base class to reduce code duplication
update function / protected_function usage (to solve starwing's issue while keeping code as clean as possible)
2016-02-01 03:27:06 -05:00
Rapptz
38d03eef6e Update copyright year. 2015-07-21 19:51:17 -04:00
ThePhD
bd4492b85b This mega-commit introduces Visual Studio 2015 CTP 6 support.
sol::object had a few reference leaks in the way it retrieved values: it now does it properly without leaving the stack at +1 item
sol::stack was drastically cleaned up, with the following key change:
    * sol::stack::push now returns an integer of the number of things its pushed (usually 1, but can be more) (Thanks, @PrincessNyanara!)
    * sol::stack::call now calls functions flexibly, and getting is done more reliably
    * due to the innovation of stack::call and using absolute indices, we no longer have to use reverse_call style programming to deal with lua
    * sol::reference::get_type is now const-correct
    * sol::state and sol::table now have a cleaned up `get` implementation since it is no longer held back by the ugliness of VC++'s incapability to handle templates
    * the name `sol::userdata` now belongs to a type that actually encapsualtes a void* with a pusher/getter than gets a userdata void* value (TODO: give it a template to make it static_cast to that type on get?)
    * lightuserdata_t -> light_userdata, upvalue_t -> upvalue as type names (mostly details)
    * pushers for various types were updated to return integers
2015-03-01 21:14:42 -05:00
Rapptz
da76793c30 Formatting changes. 2014-08-10 20:49:34 -04:00
ThePhD
37c3883eb6 Free functions and lambdas whos first arguments match the userdata type (unqualified)
now are usable as functions for userdata.
allows free functions and lambdas to provide useful operations, like operator+*-/
and other things which may not be implemented as class members.
2014-08-09 04:54:58 -07:00
ThePhD
d548fdaee8 Fix spacing issues 2014-06-27 01:36:09 -07:00
ThePhD
d35de4a8fa Fix for Issue #35
Userdata now properly forwards arguments to constructor
get_call now properly has extra parameters to allow for forwarding items from the first call that are not popped
Added tests to cover new cases
2014-06-27 01:25:57 -07:00