Commit Graph

425 Commits

Author SHA1 Message Date
Ivan Šachov e744959de5 avoiding an incorrect ERR_FILE_NOT_FOUND report when the DLL exists but fails to load for another reason
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2026-05-16 21:55:33 +02:00
Lukas Tenbrink 7c8df516ba Deprecate object_cast_to and classdb_get_class_tag, in favour of is_class. 2026-05-05 21:44:22 +02:00
Thaddeus Crews 0e25644655 Merge pull request #118796 from deralmas/gotta-go-wrap
Buildsystem: Simplify `format_buffer` utility method
2026-04-22 09:58:29 -05:00
Dery Almas e4dcf1d852 Buildsystem: Simplify format_buffer utility method
This method is used to generate headers for embedding files into the binary
(think about the new `#embed` feature in C23 and C++26).

While the stringification step itself was plenty fast, it then proceeded
to wrap everything using the `textwrap` module. `textwrap` is *very*
slow, as it's apparently optimized for human text.

This patch reimplements the wrapping logic using a simple regex,
resulting in a tremendous speed improvement (~6x), and switches to `map`
for the stringification itself (thanks Rémi!)

It also removes a (practically) unused argument, `initial_indent`.

The generated files are pretty much the same, with a tiny difference in
line length (for some reason the old logic overshot the requested line
length)
2026-04-21 23:18:42 +02:00
Mister Ky 9eb3a04edf Finish mapping missing deprecated types for GDExtension 2026-04-21 00:45:59 +03:00
David Snopek 7375ee7736 GDExtension: Clean up types for new classdb_register_extension_class6 2026-04-19 08:19:14 -05:00
dillyo09 f313fa9a06 Build: Remove redundant SCons environment clones 2026-04-15 01:30:23 -07:00
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
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
Thaddeus Crews e8b9abba7c Merge pull request #117160 from Naros/gdextension-expose-get-type-by-name
Add `Variant::get_type_by_name` to GDExtension Interface
2026-04-10 10:32:14 -05:00
StarryWorm d610492fef Separate ResourceFormat* methods from main classes 2026-03-27 07:16:20 -04:00
Rémi Verschelde 98868393cc Style: Enforce #include validation hook 2026-03-18 10:41:59 +01:00
Chris Cranford 31fb4d4286 Add Variant::get_type_by_name to GDExtension Interface 2026-03-18 05:09:48 -04:00
Rémi Verschelde e33e98a26f Style: Apply clang-format grouping rules 2026-03-17 20:11:01 +01:00
Rémi Verschelde 7795057e4b Misc includes or modernize fixes found via clangd-tidy 2026-03-16 21:38:26 +01:00
Rémi Verschelde e015e8bde4 Remove unused includes in core with clangd-tidy 2026-03-11 06:41:36 +01:00
StarryWorm 3cb2d376f8 Get rid of all unnecessary class_db.h includers 2026-03-04 17:40:05 -05:00
Rémi Verschelde eabb9a63d4 Rename callable_method_pointer.h to callable_mp.h and include it explicitly
This allows removing it from `class_db.h`, significantly reducing the amount of files
that include it transitively.

Also includes some include cleanup in `control.h` and `rich_text_label.h` done while
ensure they don't depend on `callable_mp`.
2026-03-04 16:23:23 +01:00
Rémi Verschelde 765362b033 Explicitly include core/config/engine.h where used 2026-03-04 10:17:10 +01:00
Rémi Verschelde f332faf46b Explicitly include core/os/os.h where used 2026-03-04 09:54:10 +01:00
Thaddeus Crews e380a41752 Style: Add class_db.h includes explicitly 2026-02-26 15:50:28 -06:00
Thaddeus Crews 1e12317895 Merge pull request #115646 from Ivorforce/list-explicit-copy
Change `List` copy constructor from implicit to explicit.
2026-02-16 15:02:34 -06:00
Thaddeus Crews 7dae5da198 Style: Convert *.gen.inc to *.gen.h 2026-02-05 19:47:56 -06:00
Lukas Tenbrink c5df0cb82b Don't right-align escaped newlines, e.g. for #define. This has previously led to long diffs in the commit history. 2026-02-04 19:31:28 +01:00
Rémi Verschelde 6f3132b6ba Merge pull request #115708 from quadrimus/fix-string_to_utf8_chars-documentation
GDExtension: Fix `string_to_*_chars` documentation
2026-02-02 10:10:46 +01:00
Quadrimus 96c09dccfa Fix string_to_*_chars documentation
Co-authored-by: David Snopek <dsnopek@gmail.com>
2026-02-01 14:50:55 +01:00
Lukas Tenbrink 7072a9a874 Change List copy constructor from implicit to explicit. 2026-01-30 18:58:42 +01:00
kobewi f7b9703cbd Use actual class names in resource type hints 2026-01-29 21:07:56 +01:00
Raul Santos 46436c1278 Hide signals prefixed by underscore 2026-01-21 02:56:28 +01:00
David Snopek 74336ffcea Omit return_value in gdextension_interface.json for void functions 2026-01-07 08:39:38 -06:00
Thaddeus Crews a5c42f1ddf GDExtension: Ensure LIBGODOT_API always defined 2026-01-05 12:35:31 -06:00
Rémi Verschelde ee8b979d85 Merge pull request #113754 from dsnopek/gdextension-interface-json-tweaks
Tweaks to `gdextension_interface.json` format
2025-12-09 17:17:38 +01:00
Rémi Verschelde 0cb60c82fb Merge pull request #113697 from dsnopek/gdextension-interface-deprecated-pattern
Use structed data for "deprecated" in `gdextension_interface.json`
2025-12-09 17:17:13 +01:00
David Snopek b15f9deffb Use structed data for "deprecated" in gdextension_interface.json 2025-12-09 09:40:11 -06:00
David Snopek 6e6558c04b Tweaks to gdextension_interface.json format 2025-12-08 09:17:42 -06:00
Rémi Verschelde 957094a1aa Merge pull request #113524 from Bromeon/bugfix/filedialog-compat-breakage
Add special compat methods for EditorFileDialog enum functions
2025-12-04 13:21:47 +01:00
Jan Haller f31aa20562 Add special compat methods for EditorFileDialog enum fns
Fixes broken binary compatibility in GDExtension, introduced
by moving methods from EditorFileDialog to its base class
FileDialog.

While the general derived-to-base compat mechanism works,
the function hashes are changed when enum types are also moved
between classes.

An earlier attempt restored original enums in EditorFileDialog
and added regular compatibility methods, however this caused
shadowed symbols in C# bindings. Instead, hash mappings are
now directly hardcoded as "special compat hashes".
2025-12-04 11:40:53 +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
Thaddeus Crews 369afc7b46 Merge pull request #86079 from dsnopek/required-args
Add `RequiredParam<T>` and `RequiredResult<T>` to mark `Object *` arguments and return values as required
2025-11-24 16:00:13 -06:00
David Snopek 0820f32699 Update libgodot.h to use gdextension_interface.gen.h 2025-11-24 14:39:21 -06:00
David Snopek d95d49ee12 Add RequiredParam<T> and RequiredValue<T> to mark Object * arguments and return values as required
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2025-11-24 12:12:09 -06:00
Thaddeus Crews 02335fa126 Merge pull request #107845 from dsnopek/gdextension-interface-json
GDExtension: Store source of `gdextension_interface.h` in JSON
2025-11-24 10:21:36 -06:00
Thaddeus Crews eafc21fb05 Merge pull request #112784 from migueldeicaza/fix_dynamic_xcframework_loading
iOS: Fix loading of xcframework dynamic libraries.
2025-11-18 08:25:45 -06:00
kobewi e14263f917 Remove empty constructors and destructors from core/ 2025-11-17 20:09:05 +01:00
Miguel de Icaza b1465d6af0 iOS: Fix loading of xcframework dynamic libraries.
The logic used to determine whether to invoke the in-memory registration or to
delegate the loading of a library is incorrect for xcframework packages - as
these can contain either static or dynamic libraries.

This change instead lets the operating system handle the library request, and if
it fails, it attempts to load from the internal registry.

With this change, xcframeworks containing dynamic libraries work without
workarounds on iOS.

With an additional fallback case courtesy of @bruvzg

This fixes https://github.com/godotengine/godot/issues/112783
2025-11-14 16:31:09 -05:00
David Snopek 2c681794cd GDExtension: Store source of gdextension_interface.h in JSON 2025-11-11 14:58:45 -06:00
David Snopek fc58be9bfc GDExtension: Add system for builtin method compatibility 2025-11-04 17:12:31 -06:00
Thaddeus Crews d845f0960d Merge pull request #112351 from charjr/fix-array-remove-at
GDExtension: Add missing method flag
2025-11-04 16:32:51 -06:00
John Charman c342ce423c GDExtension: Add missing method flag
Add GDEXTENSION_METHOD_FLAG_VIRTUAL_REQUIRED
2025-11-04 18:44:11 +00:00
Thaddeus Crews ae9732139a Merge pull request #109433 from KoBeWi/hastension
Add `has_extension()` method to String
2025-10-31 09:23:30 -05:00