diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-12-06 09:41:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-06 09:41:03 +0100 |
| commit | d834789f475d431b10dcaef8804cd75dcd8b47dd (patch) | |
| tree | 2d6561ce32b45bcb57aec90ccd715bb91f0486b7 /modules/mono/mono_gd/gd_mono_method.h | |
| parent | 286ad957490642b3aaa70829efbfdc28904513df (diff) | |
| parent | a946f84e3d115ed313dbe511ba33390fc204fd11 (diff) | |
| download | redot-engine-d834789f475d431b10dcaef8804cd75dcd8b47dd.tar.gz | |
Merge pull request #44106 from neikeq/mono-invoke-no-params-boxing
Don't box params on Native->C# calls with Variant params
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_method.h')
| -rw-r--r-- | modules/mono/mono_gd/gd_mono_method.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/mono/mono_gd/gd_mono_method.h b/modules/mono/mono_gd/gd_mono_method.h index f78f57dca0..115bd998fa 100644 --- a/modules/mono/mono_gd/gd_mono_method.h +++ b/modules/mono/mono_gd/gd_mono_method.h @@ -38,15 +38,16 @@ class GDMonoMethod : public IMonoClassMember { StringName name; - int params_count; + uint16_t params_count; + unsigned int params_buffer_size = 0; ManagedType return_type; Vector<ManagedType> param_types; - bool method_info_fetched; + bool method_info_fetched = false; MethodInfo method_info; - bool attrs_fetched; - MonoCustomAttrInfo *attributes; + bool attrs_fetched = false; + MonoCustomAttrInfo *attributes = nullptr; void _update_signature(); void _update_signature(MonoMethodSignature *p_method_sig); @@ -72,7 +73,7 @@ public: _FORCE_INLINE_ MonoMethod *get_mono_ptr() const { return mono_method; } - _FORCE_INLINE_ int get_parameters_count() const { return params_count; } + _FORCE_INLINE_ uint16_t get_parameters_count() const { return params_count; } _FORCE_INLINE_ ManagedType get_return_type() const { return return_type; } MonoObject *invoke(MonoObject *p_object, const Variant **p_params, MonoException **r_exc = nullptr) const; |
