summaryrefslogtreecommitdiffstats
path: root/core/object/method_bind.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@8004c7524fb9f43425c4d6f614410a76678e0f7cSpartan3222024-10-301-1/+1
|\
| * Set clang-format `RemoveSemicolon` rule to `true`Adam Scott2024-10-251-1/+1
| | | | | | | | - Set clang-format `Standard` rule to `c++20`
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-4/+5
| | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* Enforce template syntax `typename` over `class`Thaddeus Crews2024-03-071-21/+21
|
* GDExtension: Fix calling ancestor methods on runtime classesDavid Snopek2024-02-261-14/+14
|
* Allow registering "runtime classes" in modules (not just GDExtension)David Snopek2024-02-221-0/+42
|
* Implement reloading of GDExtensionsDavid Snopek2023-09-251-0/+4
|
* Add ValidatedCall to MethodBindJuan Linietsky2023-04-301-1/+48
| | | | | | | * This should optimize GDScript function calling _enormously_. * It also should simplify the GDScript VM considerably. NOTE: GDExtension calling performance has most likely been affected until going via ptrcall is fixed.
* Avoid losing references to objects in the native-scripting boundaryPedro J. Estébanez2023-02-031-0/+4
|
* Use BitField<> in core type masksJuan Linietsky2023-01-081-1/+1
| | | | | | | | * All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix const qualifier for parameters in GDExtension api functionsEmmanuel Leblond2022-12-021-17/+17
|
* SCons: Cleanup GCC warnings configurationRémi Verschelde2022-10-101-48/+0
| | | | | | | | | | | | | | - Outright disable spammy warnings due to past or present GCC bugs: * `-Wno-strict-overflow` for GCC 7. * `-Wno-type-limits` for GCC before 11 (regressed in 9/10, might work in earlier releases but at this stage we don't care). * `-Wno-return-type` for GCC 12/13 (regression, still not fixed). - Enable extra warnings conditionally when broken on earlier GCC: * `-Wnoexcept` was removed due to an upstream regression in GCC 9, could be re-enabled (but commented out for now as we actually have `-Wnoexcept` warnings to fix. * `-Wlogical-op` was broken on our variadic templates before GCC 11, now seems fine.
* MethodBind: Silence GCC `-Wmaybe-uninitialized` caused by UBSANRémi Verschelde2022-09-261-0/+8
| | | | | | | | A priori this doesn't appear to be an actual bug, but a known consequence of using UBSAN. We silence this one to still have the possibility to get more warnings raised by UBSAN, in case they are useful. Works around and closes #66343.
* Implement varargs in Methodinforeduz2022-06-231-14/+0
| | | | Variadic templates are an awful thing. Implements #62233 using them in MethodInfo so less changes are required.
* Fix more issues found by cppcheck.bruvzg2022-04-201-45/+45
|
* Fix some issues found by clang sanitizers.bruvzg2022-03-311-3/+3
|
* Make vararg method bind no return and returnPierre-Thomas Meisels2022-03-301-35/+86
| | | | | | | | | | | | | | Type emit_signal exposed method return type set UndoRedo add_do_method and add_undo_method exposed return void Set TreeItem::_call_recursive_bind returns void Set _rpc_bind and _rpc_id_bind returns void in Node Set _call_group and _call_group_flags method returns void in SceneTree Set godot-cpp-test CI flag to false
* Add static method support to ClassDBreduz2022-03-221-2/+140
| | | | | | | | | * Based on the work done for Variant in the past. * Added `ClassDB::bind_static_method` * Cleaned up ClassDB::bind_method to use variadic templates. This adds support for having static methods in Object derived classes. Note that this does not make it work yet in GDScript or Mono and, while it works for GDExtension, GodotCPP needs to be updated.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Enable method type information on release buildsGeorge Marques2021-10-071-29/+9
| | | | | This is needed to ensure GDScript compilation works properly on release builds and make use of optimized typed instructions.
* Replace BIND_VMETHOD by new GDVIRTUAL syntaxreduz2021-08-221-0/+1
| | | | | | | | | | | * New syntax is type safe. * New syntax allows for type safe virtuals in native extensions. * New syntax permits extremely fast calling. Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`. These will require API rework on a separate PR as they work different than the rest of the functions. Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
* Implement native extension systemreduz2021-06-251-0/+2
| | | | | | * Deprecates GDNative in favor of a simpler, lower level interface. * New extension system allows registering core engine classes. * Simple header interface in gdnative_interace.h
* Add static method support to core Variant typesreduz2021-03-161-0/+1
| | | | | | * Properly exposed, including validated and variant call * Bound static functions in String and Color * Did not add support for scripting languages, will have to be added manually.
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Core: Always enable ptrcall, remove PTRCALL_ENABLED defineRémi Verschelde2020-11-251-15/+2
| | | | | | | ptrcall is now also used to optimize calls in GDScript, on top of the existing use by the GDNative and Mono modules. It no longer makes sense to make it optional.
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-0/+591
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code