Commit Graph

506 Commits

Author SHA1 Message Date
ThePhD
63b9f748f7 Nice segmentation fault, GCC 2016-06-19 19:13:01 -04:00
ThePhD
2706f19976 Having a using statement that references the deprecation mechanism triggers... deprecation.
Thanks, clan/g++
2016-06-19 19:06:35 -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
556be8da98 Documentation updates -- require function and add function and size function needed documentation
New `add` function as requested by @EliasD
2016-06-19 17:59:40 -04:00
ThePhD
d626eb0461 Well, that was a nasty hidden bug. But it's all clean now! 2016-06-18 04:10:47 -04:00
ThePhD
48ba47b059 The long road to correctness. 2016-06-18 03:56:44 -04:00
ThePhD
f45ecdcff4 Always unqualify / decay arguments 2016-06-18 03:45:03 -04:00
ThePhD
02428921af SIGH name shadowing 2016-06-18 03:36:26 -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
cf5919b705 Proper workings for multiple inheritance work. 2016-06-16 20:15:56 -04:00
ThePhD
ba2dd387eb Herp the derp.
Really fixes #119
2016-06-15 12:18:30 -04:00
ThePhD
3bece97a40 Statikk trampolines and new tests for the newly opened issue
Closes #119
2016-06-15 12:00:25 -04:00
ThePhD
d76b7ebe09 Things're gonna get silly... 2016-06-13 22:31:19 -04:00
ThePhD
9352473d59 Oopsies with index / new_index. Should fix @billw2012 's problem from #71 2016-06-12 05:21:45 -04:00
ThePhD
69b45e4d66 Fixed documentation SNAFUs and typos. Praying for stack_get speed... 2016-06-11 13:10:38 -04:00
ThePhD
412718badb Test speed thought... 2016-06-11 11:51:56 -04:00
ThePhD
8eb10388c1 directly insert lua_cfunctions 2016-06-10 23:05:25 -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
58fc314e6f Fiiixes! Thanks to @CatPlusPlus and @melak47 for helping me fix this one.
Closes #112 .
2016-06-09 15:49:53 -04:00
ThePhD
b762de5c76 Ensure call works properly 2016-06-08 11:55:05 -04:00
ThePhD
606f8275a0 A small oopsie. 2016-06-08 11:29:30 -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
53bed40bc5 Merge remote-tracking branch 'feature/boost-optional/boost-optional' into develop 2016-06-06 15:48:32 -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
e35fe6be85 This mega-commit implements the new usertype_metatable while keeping everything else still intact. Blurgh, managing API versions suck... 2016-06-03 21:40:23 -04:00
Georg Sauthoff
250661b780 Use Boost Optional if SOL_USE_BOOST is defined
Usecase: Project already uses Boost as dependency, your compiler doesn't
come with <optional> yet and you want to minimize further dependencies.
2016-05-28 20:19:31 +02:00
ThePhD
9b65fb9f93 gotta have it on both sides yo 2016-05-20 05:39:34 -04:00
ThePhD
f70edf5686 Q_Q 2016-05-20 05:33:29 -04:00
ThePhD
8fa48627c6 awhdwjakdahwd clang++ internal linkage qqqqqqq 2016-05-20 05:25:56 -04:00
ThePhD
35d4eb3989 S I G H KEPLERPROJECT 2016-05-20 04:56:35 -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
ThePhD
e244a2bb67 SIGH g++ 2016-05-19 17:31:57 -04:00
ThePhD
9f019ae536 Adds requires feature - Closes #90
Function name for getting the status was actually changed to status in all places... being consistent, yay
2016-05-19 17:27:12 -04:00
ThePhD
54551af736 tempfile soemhow got here... 2016-05-19 02:18:01 -04:00
ThePhD
3b81a7c85f VC++ is a butt, but this Closes #91
It prepares for #97 as well, and blocks out #95 until I can be assed
Now, it's either performance or handling sol::property ...
2016-05-19 02:15:42 -04:00
ThePhD
96f231a183 We do have a cheap char type now, but figuring out that codecvt is super busted makes me sad
Safety macros are now in place. Usertype ones turned on by default
Closes #93
Closes #94
2016-05-18 21:29:17 -04:00
ThePhD
f8873064a5 And glibc is a fuccboi too. 2016-05-13 13:50:15 -04:00
ThePhD
938538b491 VC++ is a fuccboi 2016-05-13 13:42:31 -04:00
ThePhD
44cd259960 base_t templated 2016-05-13 03:13:23 -04:00
ThePhD
033c61ff1a Constructors for many of the types updated. sol::object now makes many more styles of types. Tests updated to match. Update documentation as per #87. Close #88. Close #86 2016-05-13 02:48:22 -04:00
ThePhD
a4e3caee15 TOPKEK initializers. 2016-05-11 22:09:17 -04:00
ThePhD
f1cedcb922 error on bad usertypes 2016-05-11 15:55:07 -04:00
ThePhD
45956d1637 the lua API is a nightmare 2016-05-05 16:59:17 -04:00
ThePhD
2cfce0d8ce I can spell the goodest, I swear 2016-05-05 16:40:14 -04:00
ThePhD
9f189df874 Undocumented macro for turning of compat (for the time being)
adding of luaL_loadbufferx as part of the 5.1 compat layer
2016-05-05 16:36:15 -04:00
ThePhD
309947d704 flesh out load buffer a little bit 2016-05-05 16:14:13 -04:00
MisterKH
c44f577d19 add load_buffer function 2016-05-05 15:12:25 +02:00
ThePhD
1c61773354 Use absolute indices in the places where it's necessary. 2016-05-03 16:49:53 -04:00
ThePhD
2aa5ab77a8 Ordering issues make me sad. 2016-05-03 15:17:14 -04:00
ThePhD
9e31119f16 This commit adds some QoI constructor keys / types, as well as implements make_object. The documentation has been updated as well.
Closes #78
Closes #77
Closes #76
Closes #75
2016-05-03 14:19:30 -04:00
ThePhD
06fecfb4ca Fix optional usages and edge cases. Closes #74 2016-05-02 01:52:51 -04:00
ThePhD
706ca803c8 push_reference and specific notes in the documentation for it 2016-05-01 17:10:41 -04:00
ThePhD
2531f2f851 muh tabz 2016-04-24 17:40:01 -04:00
ThePhD
ea0104475c gdi g++ 2016-04-24 17:38:55 -04:00
ThePhD
f15f8dd5a7 const-correctness since nobody is going to let me be fuckin' lazy .-. 2016-04-24 17:31:32 -04:00
ThePhD
b19d1a0854 Update version numbers, fix tests, and change bond -> tie, since nobody understands what bond means 2016-04-24 10:09:05 -04:00
ThePhD
38d21827b1 :l Stop finding bugs in my code -- unique_usertype_traits implemented, sol::overloaded work for static functions 2016-04-24 01:39:44 -04:00
ThePhD
a2eced863f shiny new load_result type, and thusly we're ready for 2.5. 2016-04-23 18:18:02 -04:00
ThePhD
2497567897 Inclusion argument order sorting 2016-04-23 17:40:22 -04:00
ThePhD
fdefa46ddc missing important include 2016-04-23 17:22:14 -04:00
ThePhD
673fc3a6fa loadfilex doesn't exist... nice. 2016-04-23 17:16:56 -04:00
ThePhD
f37eedd6c2 reverse_iterator 2016-04-23 17:13:49 -04:00
ThePhD
006357430b Shiny quick 'n' dirty tutorial -- variadic_args now is iterable -- fixed bug with transparent args in overload resolution -- added load functions 2016-04-23 17:07:51 -04:00
ThePhD
69ad2b4c71 better static assert 2016-04-22 17:59:44 -04:00
ThePhD
1b6062404b Demangling will kill us one day. 2016-04-22 17:39:54 -04:00
ThePhD
2cfe74cc7f Better demangling
Userdata pushed before the usertype is pushed will not latch onto the new metatable if its added
Updated tests
2016-04-22 17:06:56 -04:00
ThePhD
96da27d565 Ensure argument transparency. 2016-04-18 08:27:30 -04:00
ThePhD
062d2281d5 bit32 was deprecated, apparently. Lovely. 2016-04-17 21:14:33 -04:00
ThePhD
9872c67b4f jit lib and all 2016-04-17 21:00:24 -04:00
ThePhD
4123830e6c Should probably introduce a is_push_pop_transparent trait for things like is_this_state ... 2016-04-17 03:13:46 -04:00
ThePhD
4e029b7a00 -.- Macros. 2016-04-17 02:32:51 -04:00
ThePhD
90ea495d4c "constexpr" my ass. 2016-04-17 02:26:18 -04:00
ThePhD
88155d44e0 sol::property is implemented for usertypes now
sol::this_state is  a transparent argument that gets the current state at any position in any callback
sol::variadic_args allows a person to get something that can reference the "rest of the arguments", though it doesn't enforce that it has to be the last argument

Closes #57
Closes #59
Closes #60
2016-04-17 02:18:34 -04:00
ThePhD
f10988363c implicit conversion operator to make using the framework easier. 2016-04-11 18:07:25 -04:00
ThePhD
42f4455383 Allow for "static functions" to be registered on userdata like other parts of the framework, as well as self-contained structs and lambas.
sol::readonly for the ability to make a variable set on a userdata readonly.
No support for property yet: put on issues list for later
2016-04-11 01:02:43 -04:00
ThePhD
16007fa792 Documentation update, get_or for proxies, and other goodies. 2016-04-09 00:55:12 -04:00
ThePhD
4cdcac2001 Ensure compilation for 2 more function types 2016-04-07 05:43:44 -04:00
ThePhD
9734577fdb stack implementation, plus reference semantics within lua for usertypes/data now.
I hate my life.
I hate the projects I'm working on.
Closes #53
Closes #56
Closes #52
2016-04-07 05:21:49 -04:00
ThePhD
204bd5d5ed This adds the additional safety features. stack_guard should probably be migrated into the tests too, since a lesser form is already used there.
Closes #54 #55
2016-04-04 02:28:39 -04:00
ThePhD
5efbae5798 Is pedantic safe to turn on? TIME TO FIND OUT. 2016-04-02 09:11:44 -04:00
ThePhD
c087ca30bf .-. good thing we have travis CI 2016-03-31 16:33:21 -04:00
ThePhD
8862c65f0a NOW we're truly feature complete. Sheesh, the work that this requires.... 2016-03-31 16:16:07 -04:00
ThePhD
2d14cedc17 Eat shit, std::tuple 2016-03-31 12:12:04 -04:00
ThePhD
7af3fc4ffa Added nullopt pushing, optional pushing, improved tests 2016-03-30 16:52:51 -04:00
ThePhD
a683d615a5 compat for g fucking libgarbage 2016-03-30 03:33:44 -04:00
ThePhD
623f83547d Enumeraatiions... 2016-03-30 03:25:22 -04:00
ThePhD
3f753b55b9 Enumeration warnings 2016-03-30 03:24:07 -04:00
ThePhD
3abcf7f086 Fuck you, clang: http://stackoverflow.com/a/8629943/5280922 2016-03-30 03:08:53 -04:00
ThePhD
2826a1f8c0 unused q_q 2016-03-30 02:21:52 -04:00
ThePhD
2ee9967cdd More unused parameters. .-. 2016-03-30 02:16:08 -04:00
ThePhD
20c4fee60e unused parameter derp 2016-03-30 02:07:09 -04:00
ThePhD
92c388e30a And nooow we're set for optional. Totally. With the get_or implementation as well. Hopefully this will be all we need. 2016-03-30 01:40:40 -04:00
ThePhD
9804d7dd63 Merge remote-tracking branch 'zwparchman/develop' into develop 2016-03-30 00:34:05 -04:00
ThePhD
5acb33e2bc full-on optional support. so much support it's coming through my eyeballs. Goodness.
Support for c_call wrapper to be a thing.
2016-03-30 00:31:18 -04:00
Zachary
6637f2e1b7 Added table::get_with_default method
There is now a sol::table::get_with_default method that takes 2
arguments, one being the key to search on, the other being the default.
If the key does not have a value in the table the default value is
returned.
2016-03-29 13:03:19 -05:00
ThePhD
a0fdaaaa7d Full-on optional support. 2016-03-25 10:39:54 -04:00
ThePhD
7efc577eea Meow. 2016-03-25 05:43:37 -04:00
ThePhD
9aabf71896 Off by one errors .-. 2016-03-25 05:38:09 -04:00
ThePhD
68660a1bed Allow for checking whether or not a given proxy is valid. 2016-03-25 05:27:19 -04:00
ThePhD
4f99b99ee9 Properly directly include optional and reference it in C++17 and beyond. 2016-03-24 15:51:04 -04:00
ThePhD
09a0a5051a Documentation updates and new stack::check_get API. 2016-03-24 15:45:44 -04:00
ThePhD
f43adf9a3d Additional function creation tables and tests to keep them there. 2016-03-15 07:32:59 -04:00
ThePhD
c3bf2e04f8 I really don't like clang. 2016-03-15 06:45:49 -04:00
ThePhD
d52bc23f53 Mooooar tests. And better support for proxy and tuples. 2016-03-15 06:36:25 -04:00
ThePhD
3534bc222c proxy is now pushable, making it usable with functions 2016-03-15 05:20:56 -04:00
ThePhD
20d85850ea Ha ha haaa I forgot std::pair is a tuple-like type .-. 2016-03-14 18:33:10 -04:00
ThePhD
83ec159da1 Bwuh. 2016-03-14 17:19:43 -04:00
ThePhD
0c42c203c9 I program well, I swear. .-. 2016-03-14 17:12:03 -04:00
ThePhD
3de38f8da1 Easier access to specific functions. 2016-03-14 16:10:08 -04:00
ThePhD
97e36f70c5 Alright, NOW everything's kosher. Bwuh, byte order marks... 2016-03-14 09:53:24 -04:00
ThePhD
53c8961a20 Merge remote-tracking branch 'origin/develop' into develop 2016-03-14 02:34:28 -04:00
ThePhD
62f082d999 documentation fixes from feedback and fixes! 2016-03-14 02:34:02 -04:00
Patrik Huber
540926d9f4 Removed stray <feff> byte order mark
This fixes compiling with clang on msys2. I believe you saved these files as UTF16 once or something and these byte order marks were added by an editor.
The PR leads to the line "// The MIT License (MIT)" to no longer be present in the single-header sol.hpp at 3 occasions, but I think they were there by mistake anyway and should've been stripped by the python script, but didn't, because of the BOM. So this actually fixes that as well.
2016-03-14 00:54:23 +00:00
ThePhD
d3ccfa7426 Primetime 2016-03-13 10:03:05 -04:00
ThePhD
7f40c4edb6 Clang errors because 2 phase lookup is stupid between compilers. 2016-03-13 08:41:29 -04:00
ThePhD
c42c1bafe5 Documentation fixes, new tests, unique/shared_ptr support.
Closes #32
2016-03-13 08:30:14 -04:00
ThePhD
d8bc6c8612 Unfortunately have to use tag dispatched types because Clang's a piece of shit. 2016-03-11 18:41:44 -05:00
ThePhD
338278edf7 The docs are here. 2016-03-11 17:47:15 -05:00
ThePhD
7f7c51ae33 Forgot userdata and table_iterator files. 2016-03-11 11:36:13 -05:00
ThePhD
1a9c7484b1 Fix up the API; prepare for release. 2016-03-11 11:34:44 -05:00
ThePhD
5d722af1b0 Because bwuh. 2016-03-05 02:42:19 -05:00
ThePhD
e417d5ce87 forgot inheritance file 2016-03-05 01:50:17 -05:00
ThePhD
19578538e7 Inheritance 2016-03-05 01:43:45 -05:00
ThePhD
22f74a31a2 Catch EVERYTHING, even the shit we don't know about. 2016-03-03 03:16:59 -05:00
ThePhD
e06b939d73 pre-empty luajit exception handlers (turns out we really need it) 2016-03-02 21:14:58 -05:00
ThePhD
29dacd819e new files for protected functions and its results. Allows for better doc writing. 2016-03-02 21:02:12 -05:00
ThePhD
923c774d5e ability for functions that throw not bound by sol to catch and return lua errors that can be used by a handler function (for protected function). 2016-03-02 20:45:52 -05:00
The Phantom Derpstorm
3534be0641 Merge pull request #25 from Nava2/fix-multisymbol-luajit51
For some reason, on luajit5.1 these needed to be inline
2016-03-02 10:08:47 -05:00
ThePhD
ba36b1a410 Type names 2016-03-02 10:03:00 -05:00
ThePhD
c01f15ca95 g++ makes me sad 2016-03-02 09:51:40 -05:00
ThePhD
17c1dde68e Do exceptions better 2016-03-02 09:36:42 -05:00
ThePhD
b24d17df31 Allow for exceptions to not be used. 2016-03-02 08:44:07 -05:00
Kevin Brightwell
b361780900 For some reason, on luajit5.1 these needed to be inline 2016-03-02 01:11:53 -05:00
ThePhD
4ed197f065 formatting 2016-02-27 08:04:02 -05:00
ThePhD
0113fb86b4 fix parse error with g++ 2016-02-27 08:01:48 -05:00
ThePhD
d42efd7fdf Proper trampolines to allow luajit to play nice with all the other kids in sol. 2016-02-27 07:56:28 -05:00
ThePhD
e57ac87868 Unused parameters and all that jazz.... 2016-02-27 02:59:47 -05:00
ThePhD
c07bbd248c Formatting and a few new constants. 2016-02-27 02:49:40 -05:00
ThePhD
251e350539 coroutines \o/ 2016-02-27 02:43:53 -05:00
ThePhD
1341aafa27 Unfortunately, exceptions require some overhead in luajit... overhead we can't always accept on behalf of the user. 2016-02-25 13:04:04 -05:00
ThePhD
7402b1bc95 Clearer names for some of the exposed classes. 2016-02-25 11:07:39 -05:00
ThePhD
9c21d11b8c Proper defaults for bootstrap.py
Checks in g++ to make sure things compile
clang++ is a major asshole...
2016-02-24 13:59:17 -05:00
ThePhD
3d7a93ae1c Put detail classes not part of the interface into deeper namespaces to clear up the to level. 2016-02-23 23:39:46 -05:00
ThePhD
16c6f62fe3 Remove strerror deprecation remark 2016-02-22 02:44:27 -05:00
ThePhD
166771ae8d Proper support for mixed types of overloads. 2016-02-21 21:27:05 -05:00
ThePhD
a6a2e67dc6 Git had a sneeze and couldn't properly remove this file... 2016-02-21 19:28:30 -05:00
ThePhD
019c7b037b Huge improvements to the library and fixes to compile in g++.
usertype now respects factory functions and does not make default constructors/destructors unless the compiler says its okay
new and __gc functions can be overridden for usertypes to provide handle-like creation and deletion functions
Overloading match fixes
RAII improvements for all usertypes
Added tests to make sure these features stay
2016-02-21 19:26:58 -05:00