Commit Graph

54 Commits

Author SHA1 Message Date
ThePhD
6c40c559e3 prepare for new usertype
change how type T is gleaned from destructors and constructors in case of new syntax
add a hell of a lot more examples, update and clean documentation
2018-03-15 17:16:28 -04:00
ThePhD
623a38e80e add exception trampoline support to sol2 and add an example on how to use it 2018-03-09 22:27:49 -05:00
ThePhD
94a63902a7 fix order of is_specialization_of, since mpark and arthur and friends convinced me of The One True Way
add workaround for VC++ /std:c++17 and /std:c++latest bugs
try to add MD/MDd flags, pray it works...
update single
2018-03-01 22:08:27 -05:00
ThePhD
c377ecebcb more travis stuff, add missing license notice, update license year 2018-02-19 21:15:26 -05:00
ThePhD
57681ab4cd This attempts to be more thorough with the validations of the test, avoiding throws wherever possible to help reduce the error surface for debugging x86 builds (which, strangely enough, are not erroring in the same places that appveyor is erroring in...)
Need to begin wrok to fix wstring_convert and replace it with some decent UTF conversion algos. It's surprisingly difficult tof ind such...
Fixes #572
Fixes #569
Fixes #567
2018-01-28 22:21:13 -05:00
ThePhD
0e19156d52 update everything for the new cmake build, prepare for new .travis.yml and new appveyor.yml
Add name of project at top of license
fix container_traits with respect to boost::property_tree: Fixes #554
fix as_table with a vector of tuples (forward_get ignored constness): Fixes #552
2017-12-20 04:58:50 -05:00
ThePhD
399300fa6e add all safety and feature test macros, and improve feature safety definitions and configuration defines 2017-12-07 21:46:43 -05:00
ThePhD
73484bf8e9 add smaller environment example that's easier to process
vet entire framework for aligned reads/writes of memory for userdata
update documentation, links and tutorials accordingly
2017-10-02 17:32:58 -04:00
ThePhD
5816c6c34b .clang-format the crap out of everything, I guess...! 2017-09-13 02:46:56 -04:00
ThePhD
761641202f initial __type implementation, need to bikeshed over what goes in it and how to query information (sol::lib::extensions time?)
fixed `sol::string_view` not pushing a string based on return type
2017-09-05 13:58:17 -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
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
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
b811e73b90 who knew noexcept proofing would be so hard...? And there's so many places it could be activated in...! 2017-06-17 00:43:26 -04:00
ThePhD
85620df63c new checker for unique_usertype to ensure type safety, when SOL_CHECK_ARGUMENTS or a protected tag is used to protect a function 2017-06-13 16:34:18 -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
5ff394ae0d use the copy assignable trait, even if that's not exactly what we're going for... 2017-05-16 20:20:59 -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
58003669fb this_environment is now live 2017-05-09 13:24:56 -04:00
ThePhD
fc3e7c40f3 static properties work as intended, I guess 2017-04-25 19:44:53 -04:00
ThePhD
21f59a997a The new constructor syntax was very easy to implement... 2017-03-16 03:07:20 -04:00
ThePhD
b7b63668c8 Ensure construction of special types in simple_usertype is working, and for regular usertype as well. 2017-02-20 03:44:41 -05:00
ThePhD
66ad189797 add functionality to have functions properly detected and the amount shifted over properly based on being a call constructor or not 2017-01-09 23:25:28 -05:00
ThePhD
490194f767 allow va_args to work with overloading, albeit things can get... bad, with it. Need to observe this more to make sure things don't go poorly. 2017-01-09 16:38:23 -05:00
ThePhD
d0a36c9657 objc define to keep code clean on that platform 2016-12-03 07:33:18 -05:00
ThePhD
289ded358c -Wshadow and -Wconversion are kind've dumb 2016-11-25 20:47:15 -05:00
ThePhD
57c933cc9b bitfield example and link in docs 2016-11-15 22:45:34 -05:00
ThePhD
f8705202e2 Update single and update safe usertype checking 2016-11-06 16:34:05 -05:00
ThePhD
85329ca183 Mmn. Always making lots and lots of small changes. 2016-10-23 19:17:33 -04:00
ThePhD
2ac711b7f8 fix static initializer bugs from crap -- and remember to hunt down and get rid of all non-constexpr things like it in the future... 2016-10-21 17:32:27 -04:00
ThePhD
c2d219ea7d Reworked the architecture of usertype functions to include a shim table between it and the actual metatables.
This means that usertype tables visible in the code and bound to the name specified with `new_usertype` and friends will be normal tables, and those tables delegate their responsibilities to the 3 backend tables of `sol.unique_usertype<T>`, `sol.T`, and `sol.T*`. This separation allows for a few caveats for updating and overriding members of `new_simple_usertype` tables to 'just work' without any serious hassle, and to have a single point that lets up decide how to perform updates properly. It also restores an optimization we had to turn off by ham-fisting whether ot not indexing was turned on the usertype metatables themselves.

o wow wow wow it's such a nice commit message look at how organized it is
PFFFFFFFFFF.
2016-10-11 05:58:49 -04:00
ThePhD
0e56783de9 Bark. I always forget things. 2016-09-14 00:02:15 -04:00
ThePhD
0de30f3b3a Upgrading simple_usertype implementation with BREAKING changes. Docs now include that information too. as_function now works with usertypes for limited cases. 2016-09-13 12:37:08 -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
7903e1ec05 New initializer type called sol::factories, and the documentation to go with it 2016-08-17 01:16:44 -04:00
ThePhD
49cc3bddf0 Make everything super robust, thanks to @eevee pointing out some derps in how things were handled 2016-08-07 20:56:05 -04:00
ThePhD
dc05552e81 sol::var is now in business 2016-08-06 17:29:07 -04:00
ThePhD
045d9371df customization points are now live 2016-07-29 00:57:47 -04:00
ThePhD
de359acb3e Let's do iiiit. 2016-07-28 13:33:08 -04:00
ThePhD
ac5f13ce2f Now protect should work in multiple places, albeit we still need to do some optimizations to kick it in
Address #137 and improve implementation to not have to pop arguments
2016-07-09 13:38:55 -04:00
ThePhD
14ced4af69 Add more tests and fix smaller errors with overloading and such. 2016-07-09 01:12:33 -04:00
ThePhD
27174aba9c This mega-commit produces simple_usertype to allow for faster compile times by avoiding the use of __index internally. It sacrifices some speed and some storage optimizations and also does not allow variable syntax, but the produced table is directly modifiable.
Adds a `protect()` function to trigger safety for an item.
This commit also optimizes away all instances of virtual function calls for function calls and storage. Will need to test speed to see how it works out.
Closes #133
Closes #134
Closes #135
Closes #136
2016-07-07 16:52:39 -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
97c132d91d Preserve internal type of member function calls / pointers, even if they're base types linked to derived types 2016-06-22 13:26:27 -04:00
ThePhD
83ba698aba More documentation, fix for signed/unsigned conversion issues. 2016-06-22 01:20:38 -04:00
ThePhD
b6928b4b4e Herpin' that derp.
SOL_NO_COMPAT is now in the proper place and documented in the compatibility part of the API.
Basic test for `table::add`
2016-06-19 19:02:40 -04:00
ThePhD
72fcc1e6a5 nil checks. Nil checks as far as the eye can see. 2016-06-10 21:14:43 -04:00
ThePhD
e1241c110a SPEED AND FIXES, HOOOOOOOOO! 2016-06-10 21:04:48 -04:00
ThePhD
295b7b1a08 The performance went to shit and I need all the perf tools I can get to find out why. 2016-06-09 21:14:12 -04:00
ThePhD
b762de5c76 Ensure call works properly 2016-06-08 11:55:05 -04:00