Commit Graph

38 Commits

Author SHA1 Message Date
ThePhD
21f59a997a The new constructor syntax was very easy to implement... 2017-03-16 03:07:20 -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
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
dde4aa64fc simple_usertype now responds with nil on bad lookups and sets items into place properly when new_index'd 2017-02-19 05:00:11 -05:00
RaptorFactor
cee7d16412 Fix building tests with Catch v1.7.2.
From the Catch docs:
Please note that the THROW family of assertions expects to be passed a single
expression, not a statement or series of statements. If you want to check a
more complicated sequence of operations, you can use a C++11 lambda function.

https://github.com/philsquared/Catch/blob/master/docs/assertions.md

In current versions of Catch violating this causes a build error.
2017-02-17 18:40:51 -08:00
ThePhD
85194e0135 Fix leak issues and some ordering in state(view) move operations. Closes #336. 2017-02-15 05:42:44 -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
57c933cc9b bitfield example and link in docs 2016-11-15 22:45:34 -05:00
ThePhD
72a445ff6a Some minor fixes and updates 2016-09-29 03:29:48 -04:00
ThePhD
86664b4c60 extraneous variables 2016-09-28 19:07:54 -04:00
ThePhD
89107d3b90 Fix crashing of simple usertypes from a previous herpderp. 2016-09-19 00:36:50 -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
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
5dface25fb fix problem with instantiations of abstract classes in optional reference 2016-09-10 20:59:12 -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
Kevin Brightwell
b79498cb40 Replace std::cout with INFO() from catch
* Removes unecessary verbosity.

I tried to wrap the `INFO` calls in a lua function to remove some of the
`print()` statements, but it turns out Catch relies on the macros heavily,
so that fails.
2016-08-22 13:36:27 -04:00
ThePhD
2640f670b6 better tests, wee 2016-08-21 22:17:19 -04:00
ThePhD
8095c73428 Test per section 2016-08-17 15:50:19 -04:00
Kevin Brightwell
366937830c Fix #180 2016-08-17 14:29:21 -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
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
9c67e9310e One more test 2016-08-07 12:58:05 -04:00
ThePhD
dc79e72c59 sol::vars support in most places, and updated documentation 2016-08-06 18:41:54 -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
f1965a4364 const qq 2016-07-15 10:13:38 -04:00
ThePhD
87eb901b01 Fix #139 2016-07-12 20:55:26 -04:00
ThePhD
6b85ed2936 At least I have users who can help me catch my dumbness. One day, I'll find someone who wants to work on something and isn't somehow insufferable. 2016-07-11 12:41:17 -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
5704317449 good ol' printf debugging 2016-06-18 03:43:02 -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
430e67a693 Luajit and llvm-apt. way2break da wurld 2016-06-09 17:27:01 -04:00
ThePhD
89bf8d5cbb Making sure everything is fixed on all compilers + g++ too now 2016-06-08 11:23:17 -04:00
ThePhD
220ff5a475 Fixes the key value being left on the stack when using iterators (the other case that's not "and we're not actually using this for iteration", asides from the empty table case).
Closes #111 - fixed
Closes #110 - need to test exactly how much extra speed was gained
Closes #108 - seems to be fixed, albeit std::mutex is a butt on VC++
2016-06-07 20:32:10 -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
7be09d0781 Who would have thought Lua's API between versions would be so... inconsistent. 2016-05-20 04:20:22 -04:00