diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-04-27 13:11:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 13:11:24 +0200 |
commit | f626e8ef91d9f0c97c29ca04f2b240c4eae5214e (patch) | |
tree | 5feac7724f750feec7a673828ed943b580a5fd28 /modules/gdscript/gdscript_byte_codegen.cpp | |
parent | add51632246946f341c87e10c3ed3e8d660a6d94 (diff) | |
parent | 01d13ab2c16aa69a6f81c10dfe4845a50c3e0c63 (diff) | |
download | redot-engine-f626e8ef91d9f0c97c29ca04f2b240c4eae5214e.tar.gz |
Merge pull request #60396 from vnen/gdscript-self-lambda
Diffstat (limited to 'modules/gdscript/gdscript_byte_codegen.cpp')
-rw-r--r-- | modules/gdscript/gdscript_byte_codegen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_byte_codegen.cpp b/modules/gdscript/gdscript_byte_codegen.cpp index a7e25f5aab..e72069bcd5 100644 --- a/modules/gdscript/gdscript_byte_codegen.cpp +++ b/modules/gdscript/gdscript_byte_codegen.cpp @@ -1211,8 +1211,8 @@ void GDScriptByteCodeGenerator::write_call_script_function(const Address &p_targ append(p_function_name); } -void GDScriptByteCodeGenerator::write_lambda(const Address &p_target, GDScriptFunction *p_function, const Vector<Address> &p_captures) { - append(GDScriptFunction::OPCODE_CREATE_LAMBDA, 1 + p_captures.size()); +void GDScriptByteCodeGenerator::write_lambda(const Address &p_target, GDScriptFunction *p_function, const Vector<Address> &p_captures, bool p_use_self) { + append(p_use_self ? GDScriptFunction::OPCODE_CREATE_SELF_LAMBDA : GDScriptFunction::OPCODE_CREATE_LAMBDA, 1 + p_captures.size()); for (int i = 0; i < p_captures.size(); i++) { append(p_captures[i]); } |