Commit Graph

481 Commits

Author SHA1 Message Date
ThePhD
b66c7f015a Significant change to how userdata is stored to make access consistent across values/references/pointers. 2016-02-01 11:56:44 -05:00
ThePhD
c97b3f2b81 Some spiffier table access syntax (and a stupid VC++ bug discovered along with it) 2016-02-01 03:53:51 -05:00
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
ThePhD
27f09fbb35 variadic set - introduction of state_view type to allow for all of the benefits of state without destructing lua instance. 2016-01-30 04:21:33 -05:00
ThePhD
f21f9c9959 Ensures value semantics and proper destructor calls.
Fixes for tabs/spaces
2016-01-28 19:57:02 -05:00
ThePhD
f389c7fe36 True luajit compatibility 2016-01-27 01:07:16 -05:00
ThePhD
31e7857870 Merge remote-tracking branch 'root/develop' into develop
# Conflicts:
#	examples/usertype.cpp
#	sol.hpp
#	sol/debug.hpp
#	sol/default_construct.hpp
#	sol/demangle.hpp
#	sol/deprecate.hpp
#	sol/error.hpp
#	sol/function.hpp
#	sol/function_types.hpp
#	sol/object.hpp
#	sol/proxy.hpp
#	sol/reference.hpp
#	sol/resolve.hpp
#	sol/stack.hpp
#	sol/state.hpp
#	sol/table.hpp
#	sol/traits.hpp
#	sol/tuple.hpp
#	sol/types.hpp
#	sol/usertype.hpp
#	sol/usertype_traits.hpp
2016-01-24 12:16:38 -05:00
ThePhD
7c7f862cb4 fixed proxy (perhaps I broke it recently?) 2016-01-24 09:19:36 -05:00
ThePhD
8c9f8c3341 improved benchmarking 2016-01-16 02:30:49 -05:00
ThePhD
60b91b4c83 More hot, steamy benchmarks. 2016-01-11 09:26:58 -05:00
ThePhD
48e2c82203 benchmarking is... way too hard, truly. 2016-01-10 20:36:37 -05:00
ThePhD
cb9b463167 Do not track. 2016-01-08 16:17:12 -05:00
ThePhD
9ff968a09b Heavily improved benchmark and first set of optimizations to sol/table.hpp, providing much lower access times for calling a function. 2016-01-08 16:16:06 -05:00
ThePhD
f4b31c951c Preparing for E6156 and sating a long-time curiosity on how to write extensive micro-benchmarks and creating documentation. 2016-01-06 22:11:21 -05:00
ThePhD
cc0caf365a Version less than 5.2, (5.1 an below) not less than 5.3 (thanks Aezriel!) 2015-12-01 15:00:16 -05:00
ThePhD
7515b8c4ad make sure examples compile 2015-12-01 13:46:32 -05:00
ThePhD
a69c599f99 Ensure proper semantics for default error handler 2015-11-02 08:10:29 -05:00
ThePhD
3e17b24065 static members are hard to deal with in regular memory...
Also, make sure tuple returns don't get shafted by the tuple_types machinery!
2015-10-25 07:44:17 -04:00
ThePhD
4b545aa6a2 Fix tuple returns (they don't need to be explicitly expanded in many cases). 2015-10-25 07:17:48 -04:00
ThePhD
e84cf66683 decay to std::string instead of char*, as its both safer (protects against early stack pops) and is handled better by g++'s new std::string conversion constructors
Make sure we're only using C++11 features (no decltype(auto))
2015-10-25 06:48:19 -04:00
ThePhD
34af96214b tests for the lua call error handling functions... 2015-10-23 02:54:26 -04:00
ThePhD
8f59cf2eee Set the ability to give your own panic function 2015-10-22 21:53:12 -04:00
ThePhD
42a03a2618 proper default error handler 2015-10-22 21:46:40 -04:00
ThePhD
ad039c8cc2 Allow for usage of function error handlers with lua
TODO: make this the default mode, with a short-cutting mode (sol::no_fail_function?)
2015-10-22 11:20:32 -04:00
ThePhD
7f4d8d8f89 Allow for failed function calls from lua. 2015-10-22 06:49:53 -04:00
ThePhD
93fe7443f0 Solve's @starwing's problem with not having the ability to check if a function call succeeded or not. 2015-10-22 06:10:30 -04:00
ThePhD
93d532094e object is now more flexible while still supporting the same semantics
indentation an spacing fixes for everything
2015-10-20 21:38:28 -04:00
ThePhD
8e0cc99215 Seems like there's no more optimizations that can be made to sol/function...
Only other thing to optimize is `usertype`, maybe.
2015-09-29 18:19:07 -04:00
ThePhD
895030c69e Remove whorish return_forward. 2015-09-07 10:43:39 -04:00
ThePhD
dbeb8b5fcb tests for the new decaying functionality
need to test with clang++/g++ to see if it still works
2015-07-22 02:54:43 -04:00
ThePhD
d4fe51725c Update catch 2015-07-21 20:55:46 -04:00
Rapptz
38d03eef6e Update copyright year. 2015-07-21 19:51:17 -04:00
Rapptz
eae5c6f259 Add single.py script to create single headers. 2015-07-21 19:49:06 -04:00
ThePhD
0460b33d6c properly use decltype and throw out the get_return "type trait". It wasn't very useful anyhow. 2015-07-21 19:34:48 -04:00
Rapptz
a5e24b4fa2 Fix userdata -> usertype in examples. 2015-07-21 19:26:35 -04:00
ThePhD
946d01d228 Always reuse functions, avoid duplicate code... 2015-07-20 20:28:10 -04:00
ThePhD
219d10b0b4 Thanks to LUA_MULTRET, we can have normal function call syntax with sol::function that doesn't require the user to pass the arguments in directly with .call<Return1, Return2, Return3>( ... )
function result is meant to be transient, and therefore should not be regularly storeable by the user... but there is no way to make a "and you can't have anything but a temporary to this" type, as far as I can tell.
2015-07-19 10:26:11 -04:00
ThePhD
1b8bc7c1e9 cxxabi include should not be used on VC++ 2015-07-11 05:28:06 -04:00
ThePhD
9a0dda1f3d Fix VC++ warning 2015-07-09 18:18:34 -04:00
ThePhD
feefb4859f Oh, tabs. Oh, you... 2015-07-07 01:41:36 -04:00
ThePhD
6a16a5a482 Some quick fixes and harmless polishes for the compat layer in state.hpp 2015-07-07 00:31:50 -04:00
ThePhD
069a209a4e Fixes for the g++/clang builds 2015-06-18 10:53:21 -04:00
ThePhD
ffcd1f557b Some derps on the compatibility arguments
checkargs is now properly propogated through the "call" functions
tests now define SOL_CHECK_ARGUMENTS to make sure
the tests will always check arguments now as well (caught one minor implementation detail missing from that!)
2015-06-17 18:33:58 -04:00
ThePhD
8ff921a247 A messed up space. 2015-06-17 16:53:46 -04:00
ThePhD
e70a3c945e Macro activates the library's default argument checking. Useful to verify during tests and the like. 2015-05-27 02:48:07 -04:00
ThePhD
74677a9125 RIP tabs. 2015-05-27 02:28:31 -04:00
ThePhD
712afc924f Conversions from nil to nullptr and vice-versa now properly work
Fix for really bad derp in metamethod registration
2015-05-27 02:23:37 -04:00
ThePhD
b8d81cb927 partial implementation of lua_version...
It's a bit more reliable than before, but... not really that much better!
2015-05-24 23:31:18 -04:00
ThePhD
8b13e6df6f Fix tab derps. 2015-05-24 21:38:39 -04:00
ThePhD
184f16d7fa Updated copyright headers and added compatibility with lua 5.1.5 and luajit!
This means sol can now run on the fastest dynamic language implementation ever!
Wooo!~
2015-05-24 21:29:21 -04:00