Commit Graph

207 Commits

Author SHA1 Message Date
ThePhD
839f2a1dce
🛠 Fix up example to use cpp_object properly as the name, and other checks.
— Addresses #1454
— Remove zero-based check for certain versioning macros for Lua (need others?)
2023-07-18 13:45:11 -04:00
ShepherdSoasis
64e3823bd2 🛠 Address lifetime issues through Lua references in iterators.
📝 Fixes #1315, #1374, and #1400.
— 📝 Lifetime in iterators was referencing the wrong stack (the main thread) rather than the coroutine's stack at time of creation.
— 📝 Using main_reference/main_* objects was a suitable enough fix for most of these problems.
— 🛠 Prevent performance and usability issues from changing containers by storing the being/end iterator separately, rather than continually invoking `deferred_uc::end(…)` every time.
— 🛠 Improve sizes for stored iterators in select cases.
— 🛠 Allow for sentinel-style C++20-and-beyond ranges.
— 🔧 Improve single file generation CMake.
— 👷‍♀️ Fix up internal Lua build system issues.
2023-07-18 13:12:11 -04:00
C3pa
97806f2a7c Fix get_max_hp mehod in property example 2023-07-18 13:09:58 -04:00
ShepherdSoasis
f81643aa0c 🛠 Fix exhaustive checking compilation 2022-11-09 18:33:16 -05:00
ShepherdSoasis
3592851a2a New exhaustive check feature for vectors & similar 2022-11-09 18:33:16 -05:00
ThePhD
ce40e894d0
✍ Update Copyright Year 2022-06-25 04:00:53 -04:00
ThePhD
d20cca5261
💚 Just for fixing Windows, hopefully!
- Remove ~syncthing
2021-05-07 09:14:05 -04:00
ThePhD
80ede904d6
💚 Some stuff to make the CI builds a bit better
- Thanks, blobthing & zasz!
2021-05-07 01:56:32 -04:00
ThePhD
7aae1aaaaa
🔨 asdhjsahd DO NOT BUILD
- Add a flag to allow size_t(-1) and similar shenanigans (SOL_ALL_INTEGER_VALUES_FIT)
- Half-fix, but not fully, for #1183, #1072, #1038, #965
- Fix #1126
- Prepare for #1061
2021-05-06 18:44:25 -04:00
ThePhD
e4658e3545
⚠ BROKEN: No more single inside!!!
- Generate it if you want it!!
2021-03-06 10:48:25 -05:00
ThePhD
57d9a05f88
🎨 Refactor tutorial examples
- 🛠 Make sure the tutorials compile across platforms!
- ✍ Redo quite a bit of the documentation
2021-03-06 10:14:48 -05:00
ThePhD
8618e39486
🛠 Prepare for the a sol4 release...
- 🎨 Refactor the CMake a whle bunch
2021-03-06 01:03:23 -05:00
ThePhD
6fde9c3f14
B R E A K I N G C H A N G E
- This is going to start the mark of v4
- pairs() implemented on tables for pairs-like iteration
- .error_handler variable is now hidden from view on protected function! Use set_error_handler/get_error_handler
- packaged_coroutine skeleton, but code is blacked out
- tests rearranged a little bit
- auxiliary keys lookup, search, and storage improved
- overhead of stored tables improved
- usertype registration and un-registration improved
2021-01-20 13:55:44 -05:00
ThePhD
bf75afa250
Some changes for Shadowing Errors
- Not all were done, though; gave up at enumerations in an enum class being marked as shadowers.
- Which is just the dumbestt hing I've ever had to deal with. At least Clang is smarter!
2020-12-19 00:47:55 -05:00
ThePhD
561c90abf4
Fix a lot of errors
- Add a new feature for SOL_FUNCTION_CALL_VALUE_SEMANTICS. Fixes #1059
- Detect deprecated/removed bit32 library. Fixes #1086
- Format the entire repository. Close #1073
- SOL_LUAJIT was not being properly defined. Close #1082
- Fix alignment issue. #1071
2020-12-16 15:25:35 -05:00
John Goben
76065527f7 Fixed typos in quick n' dirty tutorial. 2020-11-28 08:56:42 -05:00
ThePhD
d0eba0a754
New example for constructor usage! 2020-11-19 17:10:58 -05:00
ThePhD
ef33531df4
Fix most of the most pressing warnings
- Fixes #1000
- Fixes #1060
- Fixes #1062
- Fixes #1067
2020-11-19 16:42:02 -05:00
ThePhD
62804667ee
Fix various issues
- readonly(...) should no longer issue errors in bogus manners
- binding for member function pointers and normal pointers should behave better now
- coroutines should now properly transfer the state/identity of their error handlers
- Fix empty base class optimization type
- Improve bind traits metaprogramming
- Add new define to catch-all for exception propagation
- Improve natvis
- Move test defines to build system, as we should
- Add a new example for multiple thread/states in Coroutines
- Add proper direct to mangling in Clang for Windows
- Exceptions are still busted on some platforms (Clang being quite funky)
2020-11-19 15:12:56 -05:00
Violin Yanev
ca3d30d8e9 Add CMake option to disable installation
Rationale: since sol2 is a header-only library, some projects might
use it as a private dependency instead of exposing it through their API.
Thus, it is useful to have an option to not install sol2, in order to
reduce the installation size as well as to avoid accidentally exposing
internal dependencies in the top-level project.

The project I work on is a demonstration of how the feature might be
used:
f4a20ec39e/external/CMakeLists.txt (L84)
(mind the different name of the CMake variable, I renamed it to fit the rest
of the sol options convention)

We have an install-check script script which verifies that only expected
headers, libs, targets and docs are exported (the one which are interesting
from users PoV). I wouldn't mind contributing the script as github workflows
if you want to use it as well - please provide feedback if that's desired.
Here is a link to our script for preview:
https://github.com/GENIVI/ramses-logic/blob/master/ci/scripts/installation-check/check-installation.py

While modifying the CMake code, I noticed a 4-space instead of TAB in one
place and fixed it to be consistent with the rest of the CMake code.
2020-11-01 12:32:18 -05:00
ThePhD
48e5fc9e44
Fix unorded_map derp 2020-10-03 17:34:34 -04:00
ThePhD
000fa31809
Heavily improve usage of Preprocessor checks
- Weed out bugs in the numeric checking implementation
- Solve the problem with load_result/protected_function_result/unsafe_function_result being copyable and thus amenable to explosions. Fixes #995.
- Resolve the warning in sol::readonly. Fixes #1000.
- Looke into #1014. Not sure I can help there, honestly; looks like a mix up of multiply-loaded libraries and mixing the two.
2020-09-26 06:47:32 -04:00
ThePhD
de87bec171
Even better Regression Testing™ 2020-08-13 10:42:37 -04:00
ThePhD
5bbc095396
Improve configuration macros and other things while trying to track down ways to make MSVC stop being a butt on its latest iterations. 2020-08-09 17:17:47 -04:00
Peter Brady
62a831cda7 correct dot product in example 2020-06-11 06:37:56 -04:00
ThePhD
053a7fdcb1
Fix #949, #935, #948, #945, and #933.
We will need a new feature to fix #941, which is related to #872.
2020-03-31 00:24:23 -04:00
voidProc
e7559e91d8 fix coroutine example: use thread state 2020-03-31 00:24:11 -04:00
ThePhD
5d7d1329fa
New example. 2020-01-28 14:01:34 -05:00
ThePhD
903f4db02b
Fix up the tutorial. 2020-01-27 14:13:22 -05:00
ThePhD
0c38fd1a57
Lua stream example! 2020-01-25 13:09:16 -05:00
ThePhD
2beb13b9b2
Found the problem. 2020-01-25 00:13:08 -05:00
ThePhD
c5863c8c31
Improve comments and example code. 2020-01-24 20:24:50 -05:00
ThePhD
5301bc1d4c
New base object customization point management example, derived directly form @NullCascade. Thanks! 2020-01-24 19:58:12 -05:00
ThePhD
c77b5b432e
Update catch, move yielding check up one level to avoid problems with trampoline and exception handling, and add a new test/example from an issue. Closes #906. Closes #917. 2020-01-17 05:22:52 -05:00
ThePhD
1c89390356
Explicitly unsafe. 2020-01-08 10:46:22 -05:00
ThePhD
83a656ae61
Break all the behaviors. _All_ of them. 2019-11-29 13:08:41 -05:00
ThePhD
bc1106cdea
Tackle bug in indexing on Lua Version < 5.3
Figure out LuaJIT bug for allocations on x64 on Version < 2.1.x
2019-11-13 05:18:02 +01:00
ThePhD
bafac3abbd
Change how proxies are done for the sake of efficiency. 2019-09-15 00:43:44 -04:00
ThePhD
29c03ea5cf
appease the clang beasts 2019-09-01 09:06:49 -04:00
ThePhD
9294afc082
memory tracker and separate-definition ADL customization points, inspired by Olek and Aurailus 2019-09-01 02:27:58 -04:00
ThePhD
242990a706
don't forget to use the shitty variable 2019-08-16 00:34:25 -04:00
ThePhD
c3c08df787
threads is now reqiured for examples 2019-08-15 02:35:49 -04:00
ThePhD
cb3acaa97b
add more documentation, add clear() to bytecode, include additional examples and better data 2019-08-15 01:26:52 -04:00
Marco Melorio
ea4176601d Fix typo in exception documentation 2019-07-08 13:52:06 -04:00
ThePhD
56c71502b3
I am not very smart. 2019-07-04 14:48:10 -04:00
ThePhD
0e9bb67576
more stuff 2019-07-04 14:20:48 -04:00
ThePhD
367edd1a87
nyohoho unused variables 2019-07-04 14:09:37 -04:00
ThePhD
d83e1a5637
improve docs a tiny bit more and prepare for release 3.0.3 2019-07-04 11:29:11 -04:00
ThePhD
fd6feec382
heavily improve examples and docs 2019-07-04 11:16:03 -04:00
ThePhD
3d479a7342
[skip ci] more silly formatting things 2019-05-29 07:58:27 -04:00