Thaddeus Crews
8f7bdc1722
Merge pull request #118214 from Ivorforce/gdext-init-refcount
...
Add `classdb_construct_object3` and `classdb_register_extension_class6` (refcount-aware inits)
2026-04-14 15:44:29 -05:00
kobewi
f8cd68f283
Improve missing type error in ClassDB
2026-04-14 16:24:49 +02:00
David Snopek
4e79ddb81c
GDExtension: Use real GDType in placeholder
2026-04-13 17:13:26 -05:00
Lukas Tenbrink
c9279c1e53
Add classdb_construct_object3 and classdb_register_extension_class6, which are refcount-aware initialization functions (establishing RefCounted objects with a refcount of 1).
2026-04-12 12:29:04 +02:00
kobewi
d62f1c8900
Add type filters to create dialog
2026-03-31 17:17:23 +02:00
Lukas Tenbrink
7a73d3f16b
Move signal ownership from ClassDB to GDType.
2026-03-17 11:58:10 +01:00
Lukas Tenbrink
67f63addc1
De-duplicate name and inherits StringName properties from ClassDB::ClassInfo, in favour of GDType.
2026-03-15 16:57:10 +01:00
Lukas Tenbrink
efcc97ee8a
Move enum registration from ClassDB / ClassInfo to GDType.
...
Create caches across supertypes for faster lookup.
2026-03-13 19:20:30 +01:00
HolonProduction
5c7c79da52
Autocompletion: Don't hide certain setters and getters
...
Co-authored-by: Will Thompson <wjt@endlessaccess.org >
2026-03-01 09:36:48 +01:00
Thaddeus Crews
c729962899
Merge pull request #115923 from GusatuDamianAlexandru/fix-classdb-sorted-class-list
...
Core: Fix ClassDB class list sorting regression
2026-02-06 08:17:51 -06:00
GusatuDamianAlexandru
02a3ada502
Core: Fix ClassDB class list sorting regression
2026-02-06 13:07:20 +01:00
Lukas Tenbrink
63272b23ef
Make LocalVector copy constructor explicit.
2026-01-23 20:52:03 +01:00
Lukas Tenbrink
17ef5afa6c
Auto-release static GDTypes at exit.
...
This fixes "unclaimed StringName" warnings and improves engine shutdown correctness.
2026-01-09 14:19:29 +01:00
Lukas Tenbrink
aa33b53e67
Use GDType for GDExtension types as well.
...
Co-authored-by: David Snopek <dsnopek@gmail.com >
2025-12-03 21:32:46 +01:00
kobewi
e14263f917
Remove empty constructors and destructors from core/
2025-11-17 20:09:05 +01:00
Thaddeus Crews
f44aa13a9f
Merge pull request #111090 from dsnopek/gdextension-compat-unexposed-classes-redo
...
GDExtension: Prevent breaking compatibility for unexposed classes that can only be created once
2025-10-02 15:12:00 -05:00
David Snopek
2c707a911f
GDExtension: Prevent breaking compatibility for unexposed classes that can only be created once
2025-09-30 14:48:06 -05:00
Thaddeus Crews
fdf32d1b2a
Merge pull request #108577 from YYF233333/global_class_list
...
Simplify `ScriptServer::get_global_class_list`
2025-09-30 11:19:10 -05:00
Yufeng Ying
a50fc5acd8
Change ClassDB::get_class_list and related stuff.
2025-09-16 15:00:33 +08:00
Mike Precup
047edb8933
Avoid unnecessary copy in get_property_list
2025-07-10 17:06:13 -07:00
Michael Alexsander
454e4f817c
Make build profile project detection also set build options
2025-06-03 11:11:33 -03:00
Thaddeus Crews
d237e31a89
Style: Remove redundant DEBUG_METHODS_ENABLED
...
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Lukas Tenbrink
91fe434a86
Always use String as StringName backing internally.
2025-04-23 14:57:03 +02:00
Thaddeus Crews
4b36c0491e
Merge pull request #105020 from YYF233333/opt_get_inheriters
...
Optimize `ClassDB::get_inheriters_from_class`
2025-04-04 17:40:59 -05:00
Thaddeus Crews
78922d756a
Core: Decouple GDCLASS from ClassDB
2025-04-04 16:21:30 -05:00
Yufeng Ying
4029051bb1
Change ClassDB::get_inheriters_from_class.
2025-04-04 23:47:19 +08:00
Daylily-Zeleen
1cc879afc0
Allow instantiate unexposed EditorPlugin form GDExtension.
2025-04-02 23:52:14 +08:00
Rémi Verschelde
666edb3f76
Merge pull request #102440 from dsnopek/classdb-cannot-instantiate-unexposed-classes
...
Prevent instantiating classes that aren't exposed
2025-03-28 14:31:46 +01:00
Pedro J. Estébanez
2d885a3163
Sanitize ClassDB locking
2025-03-25 16:50:46 +01:00
Yufeng Ying
c37c92b450
Optimize ClassDB::get_direct_inheriters_from_class.
...
Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com >
2025-03-19 23:26:46 +08:00
Thaddeus Crews
b377562b52
Merge pull request #91660 from AThousandShips/methodinfo_vec
...
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-14 10:06:13 -05:00
Aaron Franke
97ee05e9b7
Rename version defines to GODOT_VERSION_* to match GDExtension godot-cpp
2025-03-12 11:11:38 -07:00
A Thousand Ships
d9721954e6
[Core] Use Vector for MethodInfo::arguments
2025-03-10 13:57:53 +01:00
David Snopek
be81b0685f
Prevent instantiating classes that aren't exposed
2025-02-04 17:09:37 -06:00
David Snopek
e904c0c014
Fix memory leak when ClassDB::bind_method_custom() fails
2025-01-28 11:10:35 -06:00
David Snopek
696285f23a
Use MethodInfo::get_compatibility_hash() to generate the hash for MethodBind::get_hash() and other GDExtension hash clean up
2025-01-11 15:57:42 -06:00
David Snopek
39f16e70f8
GDExtension: Add compatibility system for virtual methods
2025-01-10 16:00:05 -06:00
Thaddeus Crews
bf9ef5f8a5
Merge pull request #100564 from YYF233333/iwyu
...
Remove unused headers in core
2024-12-19 19:59:55 -06:00
Yufeng Ying
be86ce3103
Apply iwyu suggestion in core.
2024-12-19 00:43:47 +08:00
HP van Braam
240f510fa7
Core ubsan fixes
...
This fixes UBSAN errors reported by running our testsuite, importing the
TPS demo, and running the TPS demo. I have tried, wherever possible, to
fix issues related to reported issues but not directly reported by UBSAN
because thse code paths just happened to not have been exercised in
these cases.
These fixes apply only to errors reported, and caused by, core/
The following things have been changed:
* Make sure there are no implicit sign changing casts in core.
* Explicitly type enums that are part of a public API such that users of
the API cannot pass in wrongly-sized values leading to potential stack
corruption.
* Ensure that memcpy is never called with invalid or null pointers as
this is undefined behavior, and when the engine is built with
optimizations turned on leads to memory corruption and hard to debug
crashes.
* Replace enum values only used as static values with constexpr static
const values instead. This has no runtime overhead. This makes it so
that the size of the enums is explicit.
* Make sure that nan and inf is handled consistently in String.
* Implement a _to_int template to ensure that all of the paths use the
same algorhithm, and correct the negative integer case.
* Changed the way the json serializer precision work, and added tests to
verify the new behavior. The behavior doesn't quite match master in
particulary for negative doubles as the original code tried to cast -inf
to an int. This then led to negative doubles losing all but one of
their decimal points when serializing. Behavior in GDScript remains
unchanged.
2024-12-18 14:31:12 +01:00
Lukas Tenbrink
b5c31ebb41
Add contains_char() for single-character 'contains' calls.
2024-12-06 20:23:35 +01:00
Pedro J. Estébanez
56bdef9f6f
Fix deadlocks related to ClassDB queries about global classes
...
`ClassDB::can_instantiate()` and other reflection methods deadlock if the type is an script global class, when such script indirectly uses a not-yet-registered class. The reason is the `ClassDB` read lock is still held when invoking the `ResourceLoader` to load the class script, which may in turn need to lock for writing (for the class registration).
In particular, this happens with some types related to animation tree, that aren't registered at engine startup, but can happen with others, especially ones from the user. Registration statements are also added for the animation-related types that were lacking them.
2024-11-08 18:15:58 +01:00
A Thousand Ships
38f9769bc6
[Core] Improve error messages with vformat
2024-10-30 15:55:51 +01:00
Rémi Verschelde
23e51c3cb5
Merge pull request #92888 from Hilderin/fix-unable-to-use-resourceLoader-in-c#-after-threaded-load
...
Fix inability to use ResourceLoader in C# after threaded load in GDScript
2024-09-12 09:25:05 +02:00
Rémi Verschelde
cd9da3344f
Merge pull request #95292 from aaronp64/is_parent_class_perf
...
Improve `ClassDB::_is_parent_class` performance
2024-09-12 09:17:39 +02:00
Hilderin
27d1fb63e1
Fix Unable to use ResourceLoader in C# after threaded load in GDScript #92798
2024-09-11 19:03:55 -04:00
Jan Haller
82b2a58f4c
Fix bool type appearing in GDExtension header
2024-08-31 22:40:48 +02:00
Danil Alexeev
49bcdf78a7
Core: Сheck r_error after calling callp()
2024-08-30 21:09:30 +03:00
Hilderin
ef6f873938
Fix editor needs restart after adding GDExtensions
2024-08-29 06:15:32 -04:00
Rémi Verschelde
b4f268fae8
Merge pull request #91018 from Daylily-Zeleen/daylily-zeleen/optionally_postinitialization_for_extension_owner
...
Allow ClassDB to create a Object without postinitialization for GDExtension.
2024-08-26 10:51:17 +02:00