Commit Graph

166 Commits

Author SHA1 Message Date
ThePhD
e8119ec9a3 Fix semantics of check_get for objects obtained by proxy 2018-03-04 10:56:05 -05:00
ThePhD
e8e5ddc890 fix overpop from stack_check_get tracking 2018-03-04 05:40:57 -05:00
ThePhD
cd13f2dc0d Hammer down function behavior and provide an example to show how it works 2018-03-03 13:42:13 -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
b46b106114 update docs and examples 2018-02-28 01:56:11 -05:00
ThePhD
22c41d9482 Update documentation, refactor examples out of docs, fix warning about static entry path
Still need help refactoring out more code from docs...
2018-02-24 17:19:16 -05:00
ThePhD
b78d900d05 One day, everything will build proper.
One day.
2018-02-17 11:00:27 -05:00
ThePhD
258acff99b fix coroutine handler, change examples compilation, try to handle m32 compilation issues 2018-02-17 10:45:08 -05:00
ThePhD
67116a67f9 Fixes #588
Tentatively supports (?) #589 with sol::yielding and sol::yielding_t
Added Catch as a cmake module
2018-02-17 00:18:26 -05:00
ThePhD
eca9ec46fd Beef up testing suite significantly and make sure that the interop examples compile, at least on Linux
These damn libraries definitely don't compile clean on Windows... but then again, most people don't give a damn about Windows :<
2018-02-12 17:01:30 -05:00
ThePhD
8d2a25988c Maybe this will finally fix all the example errors 2018-02-12 03:55:14 -05:00
ThePhD
6f80e271d7 these cmake details are starting to get unruly... 2018-02-11 00:53:53 -05:00
ThePhD
7056156273 Case sensitivity, but it doesn't show on VirtualBox because VirtualBox's file system for shared folders emulates Window's case insensitivity, lel! 2018-02-10 21:24:21 -05:00
ThePhD
1d0683a53e add all examples for all interop types
Implements #578
2018-02-10 16:24:17 -05:00
ThePhD
2e648638ef Fixes #580
Adds some code for #579 to warn of bad errors
Update documentation and examples, as well as fix fPIC with static builds on Linux
2018-02-08 23:19:45 -05:00
ThePhD
88ba80bb61 add additional CMake presentation
Update container documentation
Fix ISSUE_TEMPLATE
Fix up documentation for quick and dirty, pulling example source directly from bundled code
addresses #578
2018-02-08 00:40:34 -05:00
ThePhD
1a64ba0fe5 Improve the docs, set up LuaJIT, and try to figure out why we can't build a DLL as an external projcet target with LuaJIT... 2018-01-19 15:03:22 -05:00
ThePhD
71963f9678 Try to always use the dedicated library built for the docker image by the LLVM team, otherwise everything goes to hell.... 2018-01-10 08:40:37 -05:00
ThePhD
a98e0633ce update travis usage and build description, and change inclusion matrix to allow for more failures 2018-01-08 09:06:03 -05:00
ThePhD
732b4bd700 add new tests for unqualified returns through as_nested/as_table 2017-12-28 12:11:12 -05:00
ThePhD
0051548dfa big sigh; one day we'll get this all right... 2017-12-27 07:42:37 -05:00
ThePhD
70b2fa0b41 unless the LLVM and MINGW builds once again 2017-12-26 20:42:40 -05:00
ThePhD
d05769b80e fix up examples and use build log to get neat messages 2017-12-26 08:04:54 -05:00
ThePhD
6000dcd490 update assert implementation 2017-12-26 01:11:09 -05:00
ThePhD
002303d52b update tests and single again
add assert.hpp for better code understanding
prepare to rewrite all the damn docs, and update the tutorials...
2017-12-25 23:27:22 -05:00
ThePhD
6d2100e814 Prepare for full appveyor build.
Add abort_clean so that CI does not get stuck on a message box that can never be answered
alignment rules do not apply to stack variables, so the tests cannot have the alignment check in the destructor: only for memory pushed into and coming straight out of Lua
2017-12-25 11:44:04 -05:00
ThePhD
83013333d7 Let it rip! 2017-12-24 12:32:23 -05:00
ThePhD
453a0daaaf fix VC++ build of examples and try to get appveyor to compile and run... 2017-12-24 01:30:55 -05:00
ThePhD
ed3de48cce make sure bogus deprecation warnings and killed 2017-12-23 22:26:27 -05:00
ThePhD
9a009e5cf1 gate features behind check 2017-12-23 21:29:29 -05:00
ThePhD
9524fd061e All these platforms are so hard to deal with... 2017-12-23 20:34:34 -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
e06d2fb581 add single, add examples 2017-12-10 15:56:49 -05:00
ThePhD
a86e9ee62d update examples and fix error_result returns 2017-12-07 09:04:19 -05:00
ThePhD
2203c1f64f Overhaul examples
Overhaul docs for examples
Overhaul function_result and protected_function_result proxies
2017-11-09 17:41:46 -05:00
ThePhD
10b1bb04a9 formalize unsafe_function_result
add index-based getter to function_result
add safety checks for double deleters and other things of that nature
2017-11-07 20:19:36 -05:00
ThePhD
a67974250e add singleton example 2017-10-12 10:20:57 -04:00
ThePhD
22d9905f39 another state example 2017-10-02 20:03:26 -04: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
f9c93fc2bc update examples and documentation 2017-09-24 16:36:45 -04:00
ThePhD
0027ce6c84 make sure default userdata_getter does not error everything horribly
update single
2017-09-24 16:04:10 -04:00
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
ThePhD
508d21c842 Why oh why... 2016-09-22 12:16:52 -04:00
ThePhD
dc000fb435 SIGH Lua SIIGH. 2016-09-22 12:05:25 -04:00
ThePhD
d88db0faff Buh. Capturing the right semantics is always hard. 2016-09-22 11:49:29 -04:00
ThePhD
3a00ce0adf Some minor fixes and DOCS AND EXAMPLES WOOoOooOOooOoo 2016-09-22 07:13:04 -04:00
ThePhD
330df79ab9 OoOoOooh and the world exploooodes.
Added new examples to illustrate a few things people were wondering about
HEAVILY fixed up usertypes and inheritance. Again. Sigh. One day it'll all be correct.
2016-09-17 22:15:46 -04:00
ThePhD
edb8eacac7 Add additional namespacing example and tutorial 2016-09-09 07:48:45 -04:00
ThePhD
5b65ea1460 O-O-O-OVERHAAAAAUL no not really just bug fixes.... 2016-08-22 22:45:06 -04:00
ThePhD
7a53305a48 [ci-skip] better docs 2016-08-11 09:34:03 -04:00
ThePhD
5460f7e626 update examples, support inherited usertype metatables, and beef up wording and fix other crap in docs
Addresses #157 temporarily
2016-08-10 20:39:30 -04:00