summaryrefslogtreecommitdiffstats
path: root/core/variant/callable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotSpartan3222024-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) 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>
* fix callable not clearing freed pointerrune-scape2024-06-021-0/+2
|
* Merge pull request #87680 from AThousandShips/the_angry_countRémi Verschelde2024-03-131-0/+19
|\ | | | | | | Add methods to get argument count of methods
| * Add methods to get argument count of methodsA Thousand Ships2024-03-101-0/+19
| | | | | | | | | | | | | | | | Added to: * `Callable`s * `Object`s * `ClassDB` * `Script(Instance)`s
* | Fix `rpc` call from name based `Callable`sA Thousand Ships2024-03-101-4/+25
|/
* Core: Add `Callable.create` static method for `Variant` callablesDanil Alexeev2024-02-291-9/+23
|
* Update deferred calls to use Callableskobewi2024-01-091-2/+1
|
* Fixes to allow object-less callables throughout GodotMai Lavelle2023-10-061-0/+7
| | | | This fixes #81887
* [Core] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-111-4/+4
|
* Complete support of callables of static methodsPedro J. Estébanez2023-04-121-1/+10
|
* Fix Callable call error reporting.Juan Linietsky2023-01-101-0/+27
| | | | | | * Fix potential crash when using bind in `Variant::get_callable_error_text()` * Properly compute bound arguments so they can be properly shown. * Add a function to obtain the actual bound arguments.
* Merge pull request #70996 from reduz/properly-report-callable-bound-argumentsRémi Verschelde2023-01-091-0/+12
|\ | | | | | | Properly report Callable bound arguments
| * Properly report Callable bound argumentsJuan Linietsky2023-01-081-0/+12
| | | | | | | | | | Fixes #63213 Adds a function: Callable::get_amount_of_arguments_bound() to query this in callables. Exposed to the engine API.
* | Allow binding Callable arguments from an arrayJuan Linietsky2023-01-061-0/+14
|/ | | | | | | | | | | | | | | Restores 3.x functionality that was removed in the Signal/Callable refactor of 4.0. Fixes #64668. Implements https://github.com/godotengine/godot-proposals/issues/6034 Usage: ```GDScript callable.bindv([arg1,arg2,arg3]) ```
* 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 MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg2022-10-071-12/+12
| | | | change warnings=all to use /W4.
* Callable: add callv methodRicardo Buring2022-09-211-0/+15
| | | | This method can be called from GDExtension.
* Remove Signal connect bindsJuan Linietsky2022-07-291-6/+6
| | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* [Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli2022-07-261-3/+6
| | | | | | | | | - RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
* Fix the argcount when generating error message for CallableComparatorcdemirer2022-07-181-1/+1
|
* Clean up Hash Functionsreduz2022-06-201-1/+2
| | | | | | | Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better)
* Const Ref Callable for custom sort/searchmashumafi2022-03-271-0/+10
|
* Remove VARIANT_ARG* macrosreduz2022-03-091-3/+3
| | | | | | | | * Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
* Fix script editor errors with CustomCallableskobewi2022-02-071-2/+7
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Remove binds from Signal.connectkobewi2021-09-241-2/+2
|
* Use const references where possible for List range iteratorsRémi Verschelde2021-07-251-1/+1
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-2/+2
|
* Add Callable.is_valid() analogous to FuncRef.is_valid() from 3.xLyuma2021-07-011-0/+4
|
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-1/+1
|
* Make Callable not crash on call when the object has been freedGeorge Marques2021-05-241-0/+9
| | | | Also add a GDScript test for this case.
* Add RPC to Callablereduz2021-05-031-0/+20
| | | | | -Up to each scripting language to implement this -If not supported for the function, it will just error when you try to call
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-2/+2
|
* 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 🎆
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-0/+393
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code