diff options
author | Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com> | 2022-10-31 04:21:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 04:21:13 +0100 |
commit | 256c0079b0b209669e90a40ebc4cb89453875c5c (patch) | |
tree | 37153a1f5a19d7952b54baa432a6a0aa70f156fe /modules/mono/managed_callable.h | |
parent | aaa931659e734953f649e229ca587b5b64703a02 (diff) | |
parent | f66a352c0fc03758e3ac54443a70ded6afe22d92 (diff) |
Merge pull request #67987 from neikeq/dotnet-more-static-marshaling
C#: Reflection-less delegate callables and nested generic Godot collections
Diffstat (limited to 'modules/mono/managed_callable.h')
-rw-r--r-- | modules/mono/managed_callable.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/mono/managed_callable.h b/modules/mono/managed_callable.h index 26cd164fb6..b3a137dedf 100644 --- a/modules/mono/managed_callable.h +++ b/modules/mono/managed_callable.h @@ -40,6 +40,7 @@ class ManagedCallable : public CallableCustom { friend class CSharpLanguage; GCHandleIntPtr delegate_handle; + void *trampoline = nullptr; ObjectID object_id; #ifdef GD_MONO_HOT_RELOAD @@ -58,6 +59,7 @@ public: void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override; _FORCE_INLINE_ GCHandleIntPtr get_delegate() const { return delegate_handle; } + _FORCE_INLINE_ void *get_trampoline() const { return trampoline; } static bool compare_equal(const CallableCustom *p_a, const CallableCustom *p_b); static bool compare_less(const CallableCustom *p_a, const CallableCustom *p_b); @@ -67,7 +69,7 @@ public: void release_delegate_handle(); - ManagedCallable(GCHandleIntPtr p_delegate_handle, ObjectID p_object_id); + ManagedCallable(GCHandleIntPtr p_delegate_handle, void *p_trampoline, ObjectID p_object_id); ~ManagedCallable(); }; |