Commit graph

140 commits

Author SHA1 Message Date
d3ad818b8e Fix installation 2022-05-14 19:49:29 +02:00
036dd57524 Allow chaining calls to add_class_maker() 2022-05-14 18:06:35 +02:00
258237cbf3 Implement ClassManager
Very similar to CallbackManager in its functioning.
2022-05-14 17:06:25 +02:00
74670f4683 Extract consecutive strings logic into a separate class
This is going to be also used in the upcoming ClassManager class.
It also makes FullSignatureOwning less cluttered.
2022-05-14 16:20:50 +02:00
d985ebc417 Fix assert due to typo 2022-05-12 23:53:15 +02:00
c2089568f3 Bugfixes and improvements, simplify examples 2022-04-29 18:35:46 +02:00
fa0183a3bf Implement CallbackManager
With it users don't have to provide a foreign_method_fn()
function anymore, it's become optional.
2022-04-29 18:16:57 +02:00
7fcb89e459 Move more stuff to wren_types.hpp 2022-04-29 18:15:02 +02:00
edd5f27ab2 Build fix 2022-04-29 12:43:06 +02:00
5d6575f328 Add make_foreign_object() overload
It's only available when users define WRENPP_WITH_NAME_GUESSING
and it automatically retrieves the class name of T using
new code in guess_class_name.hpp. Only tested on gcc so far.
Microsoft compiler doesn't seem to understand consteval keyword.
2022-04-29 12:34:01 +02:00
10e3c9adac Correctly manage the case of string=nil if wreng_string_t is string_view 2022-04-29 12:34:01 +02:00
a63a8c33d8 Add make_foreign_object() function.
It creates an instance of the given foreign class and
returns a pointer to it. The wren object is stored in
slot 0.
2022-04-29 12:34:01 +02:00
31ba3af348 Update copyright year 2022-04-28 22:56:11 +02:00
6f4b0ce094 Pass string_view instead of const char* to callback functions 2022-04-28 22:55:22 +02:00
f84234cede Remove redundant const 2022-04-25 01:30:22 +02:00
30746aec19 Revert "Add ret to avoid data being "executed""
This reverts commit 1713a22ef4.
2022-04-25 00:41:02 +02:00
1713a22ef4 Add ret to avoid data being "executed" 2022-04-24 22:07:39 +02:00
e157607df6 Update copyright year on recently modified files 2022-04-24 03:43:19 +02:00
7a821fcd2c Add support for aarch64 2022-04-24 03:41:14 +02:00
1a01a016f2 Remove unnecessary function 2022-04-22 22:38:19 +02:00
f749b7fb18 call() will fail earlier when object for call doesn't exist 2022-04-22 22:04:09 +02:00
0255edb8be Update wren to latest and fix build 2022-04-22 22:02:59 +02:00
b4383e9449 Set slot in case caller didn't, or else why we get the object parameter? 2022-04-22 10:36:41 +02:00
839dbccfb1 Assert that there is at least one slot allocated 2022-04-22 10:36:35 +02:00
dfb3514ffc Fix variable names and split long line 2022-04-22 10:36:25 +02:00
b2d1b92c36 Update to wren 0.4.0 2021-06-23 17:37:01 +02:00
f985abca61 Version bump to 0.1.2 2021-02-12 14:43:25 +01:00
68df4d3371 Extend test program a bit to try the new reset() method. 2021-02-12 14:43:25 +01:00
cfc8bb89f8 Add convenience variable_ensure_slot 2021-02-12 14:43:25 +01:00
52d9210400 Include vector size in mem usage count 2021-02-12 14:43:25 +01:00
dc10c38a3f Add reset() method 2021-02-12 14:43:25 +01:00
719a57d3e8 Add lib name to config header 2021-02-10 23:14:13 +01:00
4c65807d93 This option was removed from the subproject 2021-02-10 12:48:21 +01:00
3c318d6771 Add a very simple test program
Not quite a unit test, it looks more like an example
but still something.
2021-02-02 14:04:27 +01:00
12c01f6f3e Fix some unit test failures that were my fault 2021-01-22 13:45:29 +01:00
aac87d85c0 Update wren to 0.3.0
Upstream repo got wren-cli split out into a separate
git repo so it can't be built as part of the wren
repo anymore. Unit tests have also changed, meson
script now relies on a python find script to get all
the *.wren files that should be passed to the unit
test executable.
2021-01-22 11:52:20 +01:00
4360ad03cf Version bump to 0.1.1 2020-05-04 00:41:39 +02:00
18e28bd5b6 Add initial README 2020-05-03 15:17:35 +02:00
6a30725a62 Add arbitrary method to foreign_method_t conversion helper
It might not work in every case, you still are restricted
to types that set() and get() understand.
2020-05-03 12:23:06 +02:00
34d2317f11 Add support for foreign types to get()
wren::get() can now be used to get foreign types by pointer.
Invoking get<A>() will return an A*. With this change it's
now possible to use variables() to get mixed foreign
and core types.
2020-05-03 11:32:43 +02:00
90d93d2583 Add calendar example and supporting functions 2020-05-03 01:54:07 +02:00
cad9f96739 Add a reallocate_fn() to DefConfiguration implemented around new/delete 2020-05-02 23:28:48 +02:00
65189a5575 Move files around
Sample main.cpp is now into examples/greet
2020-05-02 22:55:10 +02:00
a3c1199da9 Add a small dice rolling example game 2020-05-02 22:41:58 +02:00
3a8285a518 Fix crash when user's foreign_method_fn() returns nil. 2020-05-02 00:05:36 +02:00
482410356d More trying... 2020-05-01 21:14:01 +02:00
32c4f5e5b5 Still trying to propagate options down...
https://mesonbuild.com/Build-options.html#yielding-to-superproject-option
2020-05-01 20:45:33 +02:00
b5c4182a19 Trying to figure out how I should pass those options down to wren 2020-05-01 20:15:45 +02:00
58da9e761d Add macro definitions to optionally compile random and meta in. 2020-05-01 19:57:03 +02:00
51c69e6343 __func__ is just the function name, ie "type_id", I need the whole signature to capture U as well 2020-05-01 18:34:36 +02:00