Commit Graph

75 Commits

Author SHA1 Message Date
ThePhD
0c20d066b9 LuaBridge and luwra interop examples as well, to give people a good idea 2017-09-24 03:12:50 -04:00
ThePhD
469be6670f should probably not include all of kaguya with sol2's examples, aha. 2017-09-23 20:40:37 -04:00
ThePhD
6d879f571a add code to steal guts and grab stuff from other frameworks. 2017-09-23 20:26:03 -04:00
ThePhD
7ff3a390b1 final lua_xmove fixes 2017-09-13 11:29:32 -04:00
ThePhD
8643dec9e5 with the xmove constructors, we finally are forced to do safety checks. 2017-09-11 16:44:02 -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
b2f9822632 Mmmn, still can't type conditionals 2017-08-24 17:49:08 -04:00
ThePhD
78fd95d456 I'm also a dumby sometimes 2017-08-24 17:37:13 -04:00
ThePhD
2b2a6d2ab1 One day, Lua 5.1 will be phased out of existence and everyone will have the latest and greatest...
... One day.
2017-08-24 17:12:13 -04:00
ThePhD
d98155cd22 update examples and documentation, proof typing for user 2017-08-24 14:57:28 -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
a163ae7b33 add dynamic_object example
add note to functions about lambda return types
2017-08-23 15:48:09 -04:00
ThePhD
7af8b4e80a make sure tests don't throw where possible
edit stack checks
update container_usertype_as_container examples
2017-08-11 18:12:13 -04:00
ThePhD
e0f6b636f1 now we start making a half-dozen commits trying to appease the various forms of clang++ and g++ 2017-08-11 09:40:56 -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
ca685e01c9 gcc plagues me , and will continue to, for a while to come
BUT IT WOOORKS!
2017-08-07 02:07:21 -04:00
ThePhD
03c229b25b overhaul examples and add 2 new ones in preparation for the coming hell
fix how `stack_aligned_protected_function` and its friends behave
add new internal handler details to allow for stack-based handlers with maximum performance
update `string_shim` typedef to simply be called `string_view` and use `string_view` in all public-facing APIs.
2017-08-06 12:20:32 -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
038ae3b99b minor fixes 2017-07-09 13:52:02 -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
c6d11a2bac fix index and newindex semantics on simple_usertypes
we do not have to hit the metatable by-name since we go to special lengths to ensure we have a simple usertype table we can use
2017-05-28 19:14:18 -04:00
ThePhD
51d6f6fa54 You would think that we'd have accounted for this earlier...
Fixes #405
2017-05-16 06:12:28 -04:00
ThePhD
58003669fb this_environment is now live 2017-05-09 13:24:56 -04:00
ThePhD
c7237806ef add a new example, add a note, adjust for LuaJIT Beta3 and beyond (hopefully it doesn't flip its crap: will have to warn suers....) 2017-05-07 10:16:47 -04:00
ThePhD
0db6d99d4b add new examples 2017-04-20 22:31:59 -04:00
sjaustirni
eebda40507 made "error" accessible in the Lua state
We need to expose `error()` in Lua in order to let it call the error handler function. However, for that the base library needs to be available in the Lua state.
 
Without this fix the output of the program is
`call failed, sol::error::what() is Handled this message: [string "..."]:7: attempt to call a nil value (global 'error')`
while it's supposed to be
`call failed, sol::error::what() is Handled this message: [string "..."]:7: negative number detected`
2017-04-20 20:17:06 -04:00
ThePhD
2acc8bee14 get_environment, documentation updates, and tests 2017-04-18 20:23:20 -04:00
ThePhD
32feb7ab7b unused variable warnings 2017-04-03 08:19:16 -04:00
ThePhD
36071801d6 script error handling example 2017-04-03 02:45:06 -04:00
ThePhD
185f5ecc05 new travis environments to be tested out for osx stuff, plus new_table docs and environments on function calls 2017-04-02 22:37:01 -04:00
ThePhD
309325d0f5 New feature: environment plus documentation about the environment table and its usage with scripts. 2017-04-02 16:10:00 -04:00
ThePhD
fb06c8a754 Fix slight error when error handler was called and the result wasn't properly moved. 2017-03-31 22:39:16 -04:00
ThePhD
59b196a1db add a new kind of error handling script call, updating docs and examples 2017-03-31 17:38:04 -04:00
ThePhD
4094ba3e7a New feature: nested getter for complex nested tables, plus docs and example 2017-03-30 14:11:43 -04:00
ThePhD
4f72880cd5 sigh, Lua 5.1 2017-03-30 04:20:09 -04:00
ThePhD
791aecbcd0 New documentation for as_table and some container examples 2017-03-30 01:31:55 -04:00
ThePhD
4a851699d9 This would work better, actually...! 2017-03-19 19:16:20 -04:00
ThePhD
6520f1bc8e This references thing is really going to hurt me from VC++ one day in production 2017-03-19 19:13:50 -04:00
ThePhD
c2b8a9cc57 unused variable warnings turned errors killing all the tests 2017-03-19 18:41:52 -04:00
ThePhD
44b4045343 change expression code so that it evalautes to a reference properly when throwing, otherwise VC++ will return a reference to a value it creates (thanks, VC++ extensions...) 2017-03-19 18:06:46 -04:00
ThePhD
21bc3ef789 update all the examples 2017-03-16 08:51:19 -04:00
ThePhD
31b4dd820c silence some crap warnings and fix the inversion of the branches in the usertype metatable because I'm a dumb 2017-03-16 03:36:15 -04:00
ThePhD
dce8053248 Time to break everything.
Added the ability to extend all usertypes at runtime. The performance implications need to be examined closely.
variadic_args documentation was updated with the desired example demonstrating proper usage
usertype examples were updated demonstrating Lua runtime and C++ runtime updating of a usertype table
SOL_SAFE_FUNCTIONS is now part of the definitions and defined (thanks @eliasdaler)
2017-03-12 21:35:19 -04:00
ThePhD
ab9126d892 update customization points and track un-specialized structs to trigger some safe-guards as a back-compatible safety net 2017-02-20 18:07:02 -05:00
ThePhD
969615fb86 coroutine example 2017-01-07 15:44:50 -05:00
ThePhD
57c933cc9b bitfield example and link in docs 2016-11-15 22:45:34 -05:00
ThePhD
b0612a5b68 special function used wrong resolve example 2016-11-14 20:49:59 -05:00
ThePhD
1be01b716b fix example assert 2016-10-05 21:26:06 -04:00
ThePhD
0ba4650c64 Another example, constness derp fix 2016-10-05 20:39:49 -04:00
ThePhD
312a368240 includes aren't right, headers aren't right... buh 2016-09-22 12:36:33 -04:00