Commit Graph

235 Commits (f3143c7a9c592ce7fdc735b8e39631718f3df276)

Author SHA1 Message Date
bruvzg adc9def046
[iOS] Fix initialisation/termination of multiple statically linked extensions. 2023-11-23 13:38:20 +02:00
David Snopek f426b12b5b Fix comparison of `Callable`s from callable_mp() of the same method 2023-11-17 12:49:53 -06:00
David Snopek 4439a4a569
Merge pull request #1280 from dsnopek/callable-custom
Add `CallableCustom` that devs can use in their GDExtensions
2023-11-17 12:48:39 -06:00
David Snopek c4b7b08c91
Merge pull request #1298 from Repiteo/int-to-variant-fix
Add missing int→Variant conversions
2023-11-15 09:07:48 -06:00
bruvzg 29b34d92bb
[iOS] Fix building as static library or xcframework, add iOS config and xcframework build script to the test project. 2023-11-09 20:01:59 +02:00
Thaddeus Crews bcac96c8c2
Add missing int→Variant conversions 2023-11-08 09:45:53 -06:00
David Snopek d33bd47219 Add `CallableCustom` that devs can use in their GDExtensions 2023-11-06 00:09:06 -06:00
Thaddeus Crews 6eb5d450bd
GDCLASS synced by ending with "private:"
• Matches implementation used by modules and godot itself
• Apply same to GDEXTENSION_CLASS, setup with same diff-friendly spacers as GDCLASS
2023-11-01 12:44:14 -05:00
David Snopek a61cdc8860 Add protections against registering classes that didn't use GDCLASS() 2023-10-22 08:44:09 -05:00
Martin Capitanio a926b96103 clang: Add CallableCustomMethodPointerBase virtual destructor
Fixes #1272
+ clang++ (debian v16/v17) warning:
	destructor called on
	'godot::CallableCustomMethodPointerBase' that is abstract but has non-virtual destructor
	[-Wdelete-abstract-non-virtual-dtor]
2023-10-19 09:37:11 +02:00
David Snopek 64eac01d04
Merge pull request #1266 from dsnopek/automatic-engine-class-registration
Automatically register only engine classes whose header has been included
2023-10-16 10:47:06 -05:00
David Snopek b507b3e591 Automatically register only engine classes whose header has been included 2023-10-16 10:19:11 -05:00
Rémi Verschelde 4f0eb2f520
Merge pull request #1263 from dsnopek/string-name-new
Use the new `string_name_new_with_latin1_chars` function to improve StringName construction performance
2023-10-12 18:08:09 +02:00
Mikael Hermansson 6e05b978b8 Declare explicit specializations for `CharStringT` 2023-10-12 16:00:48 +02:00
David Snopek 3d814f9e4a Use the new `string_name_new_with_latin1_chars` function to improve StringName construction performance 2023-10-09 16:59:29 -05:00
David Snopek df849651d9 Changes necessary for hot reload to work 2023-09-25 22:13:33 -05:00
David Snopek c18c1916c3 Implement `callable_mp()` and `callable_mp_static()` 2023-09-21 15:17:50 -05:00
David Snopek 4314f91b7d
Merge pull request #1238 from dsnopek/variant-call-callp
Fix variant call compiler error (alternate)
2023-09-21 15:07:05 -05:00
David Snopek 3a02feddc3 Update for addition of `get_virtual_call_data_func` and `call_virtual_func` to `GDExtensionClassCreationInfo2` 2023-09-20 12:15:31 -05:00
David Snopek a3dfbbde85
Merge pull request #1245 from AThousandShips/alloc_fix
Fix allocation size overflow check in `CowData`
2023-09-20 07:39:27 -05:00
David Snopek b1fd1b65fd
Merge pull request #1242 from AThousandShips/null_check
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
2023-09-20 07:32:14 -05:00
David Snopek 0d6de7a80e
Merge pull request #1164 from dsnopek/classdb-singleton-alternate
Add static methods to `ClassDB` for the methods bound to the `ClassDB` singleton
2023-09-19 10:33:15 -05:00
A Thousand Ships 06ffc7e952 Fix allocation size overflow check in `CowData` 2023-09-19 16:14:00 +02:00
A Thousand Ships 1e5767693e Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-13 14:34:04 +02:00
David Snopek aa6867e6c9 Support `_validate_property()` 2023-09-12 13:21:16 -05:00
David Snopek 16ffb2795a
Merge pull request #970 from Daylily-Zeleen/daylily-zeleen/register_unexposed_class
Implement register unexposed classes
2023-09-11 09:35:32 -05:00
Matthew Murphy ca3e25de04 Fix variant call compiler error
Co-authored-by: David Snopek <dsnopek@gmail.com>
2023-09-09 11:30:29 -05:00
David Snopek 5cdc2fc099
Merge pull request #1214 from dsnopek/ptrtoarg-native-struct
Ensure that PtrToArg specializations for native structs are used
2023-09-08 10:12:23 -05:00
A Thousand Ships f651df5e7a Ensure `const` correctness for wrappers 2023-09-06 19:33:03 +02:00
Daylily-Zeleen 2d1f852baf Implement register unexposed class. 2023-09-04 00:59:10 +08:00
David Snopek 0db95a92a6
Merge pull request #1228 from Bromeon/bugfix/yet-another-bool
GDExtension: fix `bool` unknown in C
2023-09-02 16:13:51 -05:00
David Snopek 8990d5a40e
Merge pull request #1091 from Daylily-Zeleen/daylily-zeleen/implement_builtin_classes_vararg_methods
Implement vararg methods of builtin classes.
2023-09-02 08:04:29 -05:00
Jan Haller 54092861f1 GDExtension: fix `bool` unknown in C 2023-09-02 13:19:14 +02:00
Markus Sauermann c2d99fd519 Fix `Object::notification` order
For the notification-order to work correctly, it is necessary to
allow the `p_reversed` argument to be used within cpp.
This PR changes the necessary bindings.
2023-08-30 00:07:28 +02:00
David Snopek f0405f18a3 Add support for placeholder_script_instance_create/update 2023-08-28 17:02:13 -05:00
A Thousand Ships 52eb77efd4 Add remaining component-wise `min/max` functions to `Vector*` 2023-08-16 13:52:51 +02:00
Adam Scott f5c8e5190f
Fix forgotten not operator 2023-08-16 05:30:40 -04:00
David Snopek 3cd3f24150 Ensure that PtrToArg specializations for native structs are used 2023-08-15 17:54:11 -05:00
Adam Scott 5c262844ad
Fix Clang deprecated builtins
It seems that Clang and GCC have different interpretations of certain
builtins. So this PR uses std <type_traits> functions just as cowdata.h
does in the godot project.
2023-08-15 18:50:47 -04:00
David Snopek 6f913563d8 Add static methods to `ClassDB` for the methods bound to the `ClassDB` singleton 2023-07-31 16:04:27 -05:00
David Snopek 8bc1c1dbeb Implement `String::resize()` 2023-07-31 15:14:10 -05:00
David Snopek 1d49bef096
Merge pull request #1184 from Zylann/fix_get_property_list_calling_parent
Don't call parent _get_property_list when a class doesn't define it (for internal binding).
2023-07-26 15:31:15 -05:00
David Snopek d15550fdee
Merge pull request #1186 from mihe/indexed-properties
Add support for indexed properties
2023-07-26 14:22:34 -05:00
Marc Gilleron baf0b9e0f7 Don't call parent _get_property_list when a class doesn't define it.
Godot is already supposed to call _get_property_list of parent classes,
so this binding function must really only return procedural properties of
the class it belongs to, and not parent or child classes.
2023-07-26 20:12:25 +01:00
Mikael Hermansson 7d8cb7c155 Add support for indexed properties 2023-07-26 00:31:53 +02:00
Daylily-Zeleen 3536803e9e Implement vararg methods of builtin classes. 2023-07-03 17:30:42 +08:00
David Snopek 4df112cd95 Attempt to fully implement CharString 2023-06-22 21:03:30 -05:00
Kehom 20be441026 Unregister custom classes in reverse registration order 2023-06-19 11:04:11 -03:00
Andy Maloney db2394dbe7 Identifiers containing double underscore are reserved according to the C++ standard
Rename __* to _gde_*

https://timsong-cpp.github.io/cppwp/n3337/global.names

https://en.cppreference.com/w/cpp/language/identifiers

Identifiers appearing as a token or preprocessing token (i.e., not in user-defined-string-literal like operator ""id) (since C++11) of one of the following forms are reserved:
 - identifiers with a double underscore anywhere;
 - identifiers that begin with an underscore followed by an uppercase letter;
 - in the global namespace, identifiers that begin with an underscore.
2023-06-15 20:45:01 -04:00
David Snopek ad726015e7 Revert the changes from PR #1044 and #1045 and standardize on `Object **` encoding in ptrcall 2023-06-07 08:30:33 -05:00