mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
GDScript: Add support for variadic functions
This commit is contained in:
parent
3b963ab8b6
commit
ee121ef80e
33 changed files with 416 additions and 65 deletions
|
@ -248,8 +248,9 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) {
|
|||
void GDScriptFunctionState::_clear_stack() {
|
||||
if (state.stack_size) {
|
||||
Variant *stack = (Variant *)state.stack.ptr();
|
||||
// The first 3 are special addresses and not copied to the state, so we skip them here.
|
||||
for (int i = 3; i < state.stack_size; i++) {
|
||||
// First `GDScriptFunction::FIXED_ADDRESSES_MAX` stack addresses are special
|
||||
// and not copied to the state, so we skip them here.
|
||||
for (int i = GDScriptFunction::FIXED_ADDRESSES_MAX; i < state.stack_size; i++) {
|
||||
stack[i].~Variant();
|
||||
}
|
||||
state.stack_size = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue