diff options
author | Thomas Herzog <thomas.herzog@mail.com> | 2017-07-24 17:25:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 17:25:57 +0200 |
commit | 008b20bd8f19ca109f707ad1e566c86c2eccfb45 (patch) | |
tree | 8100c2329bbd797d2b3a4756083f32b5d3b7302f /modules | |
parent | d0f1940534de29cd49a79be8ef6054b8dad13d29 (diff) | |
parent | 41eb8a0279538b368c6d19436eb5ff1232ece8aa (diff) |
Merge pull request #9814 from karroffel/nativescript-doublefree
[NativeScript] forgot to uncomment userdata return
Diffstat (limited to 'modules')
-rw-r--r-- | modules/nativescript/godot_nativescript.cpp | 2 | ||||
-rw-r--r-- | modules/nativescript/nativescript.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/nativescript/godot_nativescript.cpp b/modules/nativescript/godot_nativescript.cpp index 7da6d14d18..453cee3a18 100644 --- a/modules/nativescript/godot_nativescript.cpp +++ b/modules/nativescript/godot_nativescript.cpp @@ -195,7 +195,7 @@ void GDAPI *godot_nativescript_get_userdata(godot_object *p_instance) { if (!instance) return NULL; if (instance->get_script_instance() && instance->get_script_instance()->get_language() == NativeScriptLanguage::get_singleton()) { - // return ((NativeScriptInstance *)instance->get_script_instance())->get_userdata(); + return ((NativeScriptInstance *)instance->get_script_instance())->userdata; } return NULL; } diff --git a/modules/nativescript/nativescript.h b/modules/nativescript/nativescript.h index 0578ffb680..5702ba2e8d 100644 --- a/modules/nativescript/nativescript.h +++ b/modules/nativescript/nativescript.h @@ -160,11 +160,11 @@ class NativeScriptInstance : public ScriptInstance { Object *owner; Ref<NativeScript> script; - void *userdata; - void _ml_call_reversed(NativeScriptDesc *script_data, const StringName &p_method, const Variant **p_args, int p_argcount); public: + void *userdata; + virtual bool set(const StringName &p_name, const Variant &p_value); virtual bool get(const StringName &p_name, Variant &r_ret) const; virtual void get_property_list(List<PropertyInfo> *p_properties) const; |