Commit Graph

134 Commits (cc89bd21324c3820d1823456563bcc30855b5c5e)

Author SHA1 Message Date
Joël Lamotte (Klaim) 5134c82573 Fixes crash in ClassDB::deinitialize due to usage of invalid iterator.
After the removed call to `std::vector::erase` all iterators,
`i` included, are invalidated and therefore this code has undefined
behavior (which can or not lead to a crash).
This change delays the removal of class names from
`class_register_order` to after having gone through it's content,
removing the undefined behavior.
2023-10-05 16:58:49 +02:00
David Snopek df849651d9 Changes necessary for hot reload to work 2023-09-25 22:13:33 -05:00
David Snopek db15731e4d
Merge pull request #1165 from dsnopek/missing-classes
Handle missing instance binding callbacks by finding the closest parent
2023-09-21 15:06:51 -05:00
David Snopek 52ca3ef547 Handle missing instance binding callbacks by finding the closest parent 2023-09-19 10:54:07 -05:00
A Thousand Ships 1e5767693e Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-13 14:34:04 +02:00
Mikael Hermansson 7d8cb7c155 Add support for indexed properties 2023-07-26 00:31:53 +02: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 431e30bc32 Ensure GDExtension class is the correct type for the Godot engine class 2023-05-16 15:18:48 -05:00
David Snopek a5c6ca5920 Update to load function pointers for GDExtension interface 2023-05-09 21:45:48 -05:00
bruvzg ba4b50118d
Fix incorrect memory allocation in release builds.
Co-authored-by: lightyears <lightyears1998@hotmail.com>
2023-02-21 15:32:26 +02:00
Mikael Hermansson d174b47e51 Update error macros to match core 2023-01-22 14:24:57 +01:00
Andy Maloney 1ae0147aad Fix sign comparison warnings in class_db.cpp
Part of #999
2023-01-19 08:30:08 -05:00
Rémi Verschelde 931f1a3f34
Sync license copyright with upstream GH-70885 2023-01-10 16:15:31 +01:00
Jan Haller fce753c05d Extension header: amend const correctness of `p_args` parameters 2022-12-14 15:47:42 +01:00
Gilles Roudière c02e644679 Rename GDNative to GDExtension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension -> Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION -> EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:06:38 +01:00
Emmanuel Leblond fe86a94dcf
Fix const qualifier for parameters in GDExtension api functions 2022-12-03 00:27:07 +01:00
Rémi Verschelde d9c72c6773
Fixup after 243ec87918 2022-11-16 10:33:39 +01:00
Emmanuel Leblond b6ba0dca13
StringName is working fine with demo \o/ 2022-11-08 21:44:33 +01:00
Emmanuel Leblond e24b6b0e51
Use StringName in the whole GDExtension API instead of const char * 2022-11-08 21:44:31 +01:00
Emmanuel Leblond b21931c4a3
Type `GDNativePropertyInfo.type` field as `GDNativeVariantType` 2022-10-13 14:04:54 +02:00
Rémi Verschelde 0eba81ef79 Merge pull request #876 from Daylily-Zeleen/Daylily-Zeleen/master
Add detail infos for binding error message.
2022-10-07 22:25:49 +02:00
daylilyzeleen 3e91ec1729 Add detail infos for binding error message. 2022-09-30 15:16:43 +08:00
Marc Gilleron 5de2c059d1 Fix deriving a custom class with virtual methods 2022-09-21 19:31:30 +01:00
bruvzg 36273baa7e
Change PropertyInfo members to String. 2022-09-14 08:41:09 +03:00
bruvzg 713b122b84
Add support for BitField hint, sync API files. 2022-07-11 15:00:17 +03:00
bruvzg 031a83b0ea
[Method Bind] Add support for default argument values and static method binding. Sync headers. 2022-05-06 10:17:51 +03:00
Rémi Verschelde 1632322ce0 Update copyright year 2022-03-15 10:17:53 +01:00
bruvzg e36180f377
Port a bunch of Godot container templates to GDExtension. 2022-02-18 21:07:53 +02:00
bruvzg 65dc3e89c7
Add ERR_ macros variants using `String` messages. 2022-02-17 10:18:04 +02:00
bruvzg bf8fc4c53d
Add `ptr()` / `ptrw()` to the arrays, add missing `String` methods, add missing `CharString` method implementations. 2022-02-14 23:17:21 +02:00
Bastiaan Olij ef528d3a86 Rename interface to gdn_interface because it's a defined keyword under windows 2021-10-28 19:44:20 +11:00
Bastiaan Olij 0e3bc393d5 Fully register class on register_class call 2021-09-27 23:08:12 +10:00
Bastiaan Olij b21069c573 _err_print_error only output p_message so swapped parameters around 2021-09-27 23:08:11 +10:00
Bastiaan Olij e839199848 Add support for property groups 2021-09-27 23:08:11 +10:00
George Marques aef0f1e248 Change initialization to allow custom level callbacks
Now it needs a callback for each level so custom logic (like loading
singletons) can be performed.
2021-09-27 23:08:10 +10:00
Bastiaan Olij b07559882c Silence delete compile warning in memory.h/cpp on Windows 2021-09-27 23:08:09 +10:00
George Marques 8bcf32a619 Fix issues with method calls 2021-09-27 23:08:08 +10:00
George Marques e4ed48976a Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00
Rémi Verschelde 4e8508ad53
Fixup style after #563 2021-09-27 12:26:32 +02:00
Rémi Verschelde 3de367920f
Merge pull request #563 from LinwoodCloud/master 2021-09-27 11:41:41 +02:00
Rémi Verschelde 7a693df988
Merge pull request #601 from colugomusic/fix-string-args-constness 2021-09-27 11:31:56 +02:00
Rémi Verschelde 0fba89df67
Merge pull request #595 from Calinou/add-license-headers 2021-09-27 11:31:31 +02:00
Sam 6b31e67dd3 Fix Clang 11 build failure over -Wabsolute-value 2021-09-01 23:08:30 +01:00
Colugo bba8393af7 Fix argument constness in String::begins_with, String::ends_with 2021-08-22 16:02:14 +01:00
Hugo Locurcio cf5428e103
Add license headers to all source and header files
This is consistent with the core Godot source code, and ensures the
license isn't detached from its original code when individual files
are distributed.
2021-08-02 18:34:58 +02:00
DhruvMaroo 7a1890345b edited according to clang-format 2021-06-01 23:16:09 +05:30
DhruvMaroo 67e2c6145c used godot_string_new_copy to copy 2021-05-31 09:31:11 +05:30
DhruvMaroo b44b98a94c removed _deleted class member 2021-05-31 09:10:59 +05:30
DhruvMaroo cd05371ce8 added class member, safety check in the destructor 2021-05-31 00:52:36 +05:30