summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.cpp49
-rw-r--r--modules/gdnative/pluginscript/pluginscript_instance.h14
-rw-r--r--modules/gdscript/gdscript_function.cpp4
3 files changed, 11 insertions, 56 deletions
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp
index 97897870ba..c64a00a4d9 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.cpp
+++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp
@@ -28,11 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "pluginscript_instance.h"
+
// Godot imports
#include "core/os/os.h"
#include "core/variant.h"
+
// PluginScript imports
-#include "pluginscript_instance.h"
#include "pluginscript_language.h"
#include "pluginscript_script.h"
@@ -89,51 +91,6 @@ Variant PluginScriptInstance::call(const StringName &p_method, const Variant **p
return var_ret;
}
-#if 0 // TODO: Don't rely on default implementations provided by ScriptInstance ?
-void PluginScriptInstance::call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount) {
-
-#if 0
- PluginScript *sptr=script.ptr();
- Variant::CallError ce;
-
- while(sptr) {
- Map<StringName,GDFunction*>::Element *E = sptr->member_functions.find(p_method);
- if (E) {
- E->get()->call(this,p_args,p_argcount,ce);
- }
- sptr = sptr->_base;
- }
-#endif
-
-}
-
-#if 0
-void PluginScriptInstance::_ml_call_reversed(PluginScript *sptr,const StringName& p_method,const Variant** p_args,int p_argcount) {
-
- if (sptr->_base)
- _ml_call_reversed(sptr->_base,p_method,p_args,p_argcount);
-
- Variant::CallError ce;
-
- Map<StringName,GDFunction*>::Element *E = sptr->member_functions.find(p_method);
- if (E) {
- E->get()->call(this,p_args,p_argcount,ce);
- }
-
-}
-#endif
-
-
-void PluginScriptInstance::call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount) {
-
-#if 0
- if (script.ptr()) {
- _ml_call_reversed(script.ptr(),p_method,p_args,p_argcount);
- }
-#endif
-}
-#endif // Multilevel stuff
-
void PluginScriptInstance::notification(int p_notification) {
_desc->notification(_data, p_notification);
}
diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h
index d92d3ace77..dc1229a44d 100644
--- a/modules/gdnative/pluginscript/pluginscript_instance.h
+++ b/modules/gdnative/pluginscript/pluginscript_instance.h
@@ -33,6 +33,7 @@
// Godot imports
#include "core/script_language.h"
+
// PluginScript imports
#include <pluginscript/godot_pluginscript.h>
@@ -60,13 +61,12 @@ public:
virtual bool has_method(const StringName &p_method) const;
virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error);
-#if 0
- // Rely on default implementations provided by ScriptInstance for the moment.
- // Note that multilevel call could be removed in 3.0 release, so stay tuned
- // (see https://godotengine.org/qa/9244/can-override-the-_ready-and-_process-functions-child-classes)
- virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount);
- virtual void call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount);
-#endif
+
+ // Rely on default implementations provided by ScriptInstance for the moment.
+ // Note that multilevel call could be removed in 3.0 release, so stay tuned
+ // (see https://godotengine.org/qa/9244/can-override-the-_ready-and-_process-functions-child-classes)
+ //virtual void call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount);
+ //virtual void call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount);
virtual void notification(int p_notification);
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
index 524be480d7..452b1933eb 100644
--- a/modules/gdscript/gdscript_function.cpp
+++ b/modules/gdscript/gdscript_function.cpp
@@ -1550,10 +1550,8 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
OPCODE_BREAK;
}
-// Enable for debugging
-#if 0
+#if 0 // Enable for debugging.
default: {
-
err_text = "Illegal opcode " + itos(_code_ptr[ip]) + " at address " + itos(ip);
OPCODE_BREAK;
}