Commit Graph

91 Commits

Author SHA1 Message Date
ThePhD
5816c6c34b .clang-format the crap out of everything, I guess...! 2017-09-13 02:46:56 -04:00
ThePhD
074b9ae655 add xmove constructors for function, (light )userdata, table, reference and object
add additional coroutine example
improve traits
add tests for thread transfers
update single
2017-09-11 16:12:23 -04:00
ThePhD
92a6fb8c11 update all the examples
fix implicitly convertible function pointers from classes using `call_detail`'s `lua_call_wrapper`
specificaly add documentation for working with `std::function`
2017-08-24 14:39:02 -04:00
ThePhD
e4c3ded4b2 update table documentation and force traits not to use a deleted destructor -- rather, default it according to what it inherits 2017-08-22 10:53:46 -04:00
ThePhD
0c9d567d0a "automatic usertypes" are now applied everywhere, regardless of what happens
new sol::filters (currently undocumented)
new gc tests, new plain_type tests
core abstractions over usertypes streamlined
SOL_STRINGS_ARE_NUMBERS triggers added
update single
2017-08-21 15:25:43 -04:00
ThePhD
eb1560d12a add as_container documentation
improve exception documentation
improve state_view default handlers
add SAFE_PROPAGATION defines for compiling C++ as Lua
add examples for automatic operator registrations and as_container
fix tutorial code
change tests to not throw unless absolutely necessary
provide synchronization for file writing in tests
provide thread safety around thread tests for REQUIRE
add ostream automatic support
change 5.1 compat to only kick in luaL_loadbufferx and luaL_loadfilex when LuaJIT is version 2.0.1 and lower
2017-08-11 03:24:17 -04:00
ThePhD
092fec7afb improve traits 2017-08-07 08:47:17 -04:00
ThePhD
104485bebd this mega commit prepares to fix all of the issues listed in the repository for the past 3 weeks 2017-08-05 19:20:28 -04:00
ThePhD
e69e7c79fa C++17 additions: std::variant, string_views of all types, checker for if we have the right version
added variadic_results, to return a variable number of arguments to Lua
added variadic_results and as_results
added improved function examples (for multiple results and split overloading out)
added tests for variadics
added tests for C++17 utilities
added a forwarding header
added a specific `unsafe_function` header
added and improved documetation pages
2017-07-09 12:54:52 -04:00
ThePhD
17271c84cb BREAKING CHANGE: std::pair for regular containers that are not marked as as_table_t or as_nested will now behave like regular containers and not force themselves to be key-value pairs. table-style serialization is still unaffected. 2017-06-23 18:07:24 -04:00
ThePhD
661386c384 revert codecvt fix for MinGW v7 and greater
add docs about compiler support
add notes about compilation issues
update single
2017-06-07 12:33:59 -04:00
ThePhD
fd8e2df92e fix some semantics for container usertypes, their iterators, and how they push their value types (to cope with crappy input iterator "containers")
add better handling for `readonly` to prevent bugs from `const`-ifying the return value of a member variable (e.g., unexpected copy semantics)
add more tests and add a few more handlers for new readonly type
fix simple_usertype_metatable's handling of newindex and index when not at the top level
2017-05-29 10:32:37 -04:00
ThePhD
34b81bef6b Handle qualified name failures of VC++, where using templates do not match the fully qualified names of what they alias to (Thanks, VC++) 2017-05-15 10:41:50 -04:00
ThePhD
23e3f2c26d make sure member functions for simple usertypes propogate their desired type. 2017-02-17 05:46:39 -05:00
ThePhD
4116db8c89 Add heavy support for all things array and list and stuff 2016-11-09 07:42:45 -05:00
ThePhD
5093f61615 Attempt to fix #119 by using less-powerful C++11 features and praying for the best
Fix #205
Partially address #204 (will need to do more -- perhaps add an automatic-conversion shim?)
2016-08-30 18:09:42 -04:00
ThePhD
354c26772a 2.12.1 version includes automatic operator binding for basic comparators
it'll only be a matter of time before people ask me to auto-bind `operator+` and shit, but the answer for that will be no...
2016-08-25 12:50:50 -04:00
ThePhD
cf76f6baa0 V E T T E D
Slight breaking change, but at the source level almost nothing changes (ipairs is the only thing that changes because for some reason it checks if what is passed is a table and that really doesn't make any fucking sense)
Closes #195
Closes #196
2016-08-23 21:42:27 -04:00
ThePhD
14ced4af69 Add more tests and fix smaller errors with overloading and such. 2016-07-09 01:12:33 -04:00
ThePhD
09ee4db1ed More templated fixes.
Closes #131
Closes #126, for the time being -- we can't make it go any faster without fundamentally breaking the system, and I can't do that to users rn
2016-06-29 14:08:26 -04:00
ThePhD
556be8da98 Documentation updates -- require function and add function and size function needed documentation
New `add` function as requested by @EliasD
2016-06-19 17:59:40 -04:00
ThePhD
29e4b82b4a Formally introduce c_call to the API with overloading ability
More documentation on how things work.
Once more at a 'feature-complete' state. Continue to work on #116.
Add testcase to ensure #108 is fixed. Then, prep release.
2016-06-18 03:32:54 -04:00
ThePhD
c458849d29 Many of the tests are still busted, but we're getting closer.
Closes #96
Closes #79
Fixes #105 - but we still need to double-check and add a test to prove it
2016-06-06 15:46:53 -04:00
ThePhD
e35fe6be85 This mega-commit implements the new usertype_metatable while keeping everything else still intact. Blurgh, managing API versions suck... 2016-06-03 21:40:23 -04:00
ThePhD
3b81a7c85f VC++ is a butt, but this Closes #91
It prepares for #97 as well, and blocks out #95 until I can be assed
Now, it's either performance or handling sol::property ...
2016-05-19 02:15:42 -04:00
ThePhD
38d21827b1 :l Stop finding bugs in my code -- unique_usertype_traits implemented, sol::overloaded work for static functions 2016-04-24 01:39:44 -04:00
ThePhD
006357430b Shiny quick 'n' dirty tutorial -- variadic_args now is iterable -- fixed bug with transparent args in overload resolution -- added load functions 2016-04-23 17:07:51 -04:00
ThePhD
96da27d565 Ensure argument transparency. 2016-04-18 08:27:30 -04:00
ThePhD
88155d44e0 sol::property is implemented for usertypes now
sol::this_state is  a transparent argument that gets the current state at any position in any callback
sol::variadic_args allows a person to get something that can reference the "rest of the arguments", though it doesn't enforce that it has to be the last argument

Closes #57
Closes #59
Closes #60
2016-04-17 02:18:34 -04:00
ThePhD
42f4455383 Allow for "static functions" to be registered on userdata like other parts of the framework, as well as self-contained structs and lambas.
sol::readonly for the ability to make a variable set on a userdata readonly.
No support for property yet: put on issues list for later
2016-04-11 01:02:43 -04:00
ThePhD
9734577fdb stack implementation, plus reference semantics within lua for usertypes/data now.
I hate my life.
I hate the projects I'm working on.
Closes #53
Closes #56
Closes #52
2016-04-07 05:21:49 -04:00
ThePhD
2d14cedc17 Eat shit, std::tuple 2016-03-31 12:12:04 -04:00
ThePhD
5acb33e2bc full-on optional support. so much support it's coming through my eyeballs. Goodness.
Support for c_call wrapper to be a thing.
2016-03-30 00:31:18 -04:00
ThePhD
09a0a5051a Documentation updates and new stack::check_get API. 2016-03-24 15:45:44 -04:00
ThePhD
97e36f70c5 Alright, NOW everything's kosher. Bwuh, byte order marks... 2016-03-14 09:53:24 -04:00
ThePhD
c42c1bafe5 Documentation fixes, new tests, unique/shared_ptr support.
Closes #32
2016-03-13 08:30:14 -04:00
ThePhD
1a9c7484b1 Fix up the API; prepare for release. 2016-03-11 11:34:44 -05:00
ThePhD
251e350539 coroutines \o/ 2016-02-27 02:43:53 -05:00
ThePhD
9c21d11b8c Proper defaults for bootstrap.py
Checks in g++ to make sure things compile
clang++ is a major asshole...
2016-02-24 13:59:17 -05:00
ThePhD
3d7a93ae1c Put detail classes not part of the interface into deeper namespaces to clear up the to level. 2016-02-23 23:39:46 -05:00
ThePhD
019c7b037b Huge improvements to the library and fixes to compile in g++.
usertype now respects factory functions and does not make default constructors/destructors unless the compiler says its okay
new and __gc functions can be overridden for usertypes to provide handle-like creation and deletion functions
Overloading match fixes
RAII improvements for all usertypes
Added tests to make sure these features stay
2016-02-21 19:26:58 -05:00
ThePhD
b2b73db5cb overloading searching improvements and general refactoring for cleaner implementation. 2016-02-18 22:17:52 -05:00
ThePhD
1293213775 Several improvements to tunnneling for the library, with included tests
Some stack size tests are also included to prevent stack overflow as well.
2016-02-13 20:14:31 -05:00
ThePhD
228609ee17 Addresses derp from refactoring and #12 2016-02-12 12:47:05 -05:00
ThePhD
2788abb34e Overloading now works and there are tests to back it up. The codebase now relies on some C++14 features explicitly. 2016-02-10 11:36:00 -05:00
ThePhD
9372b54b02 Preparing for overload support
Preparing to benchmarking of several different lua frameworks
2016-02-09 03:38:11 -05:00
ThePhD
5034bd7980 Benchmarking will be done in a separate repository, alongside other frameworks. 2016-02-04 20:16:53 -05:00
ThePhD
bb29127785 Proper semantics for set/get
`set_function`/`set_usertype` now properly use `set`
For the time being, we are going to avoid implementing `traverse`; aside from performance of nested table access (e.g. `int x = lua["a"]["b"]["c"]`), it's a pain. ;~;
2016-02-02 16:18:44 -05:00
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
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