summaryrefslogtreecommitdiff
path: root/core/script_language.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/script_language.h')
-rw-r--r--core/script_language.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/script_language.h b/core/script_language.h
index 478ebd88ed..de725d8d08 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -59,6 +59,9 @@ public:
static void set_reload_scripts_on_save(bool p_enable);
static bool is_reload_scripts_on_save_enabled();
+ static void thread_enter();
+ static void thread_exit();
+
static void init_languages();
};
@@ -128,6 +131,12 @@ public:
virtual void call_multilevel_reversed(const StringName& p_method,const Variant** p_args,int p_argcount);
virtual void notification(int p_notification)=0;
+ //this is used by script languages that keep a reference counter of their own
+ //you can make make Ref<> not die when it reaches zero, so deleting the reference
+ //depends entirely from the script
+
+ virtual void refcount_incremented() {}
+ virtual bool refcount_decremented() { return true; } //return true if it can die
virtual Ref<Script> get_script() const=0;
@@ -176,6 +185,12 @@ public:
virtual void auto_indent_code(String& p_code,int p_from_line,int p_to_line) const=0;
virtual void add_global_constant(const StringName& p_variable,const Variant& p_value)=0;
+ /* MULTITHREAD FUNCTIONS */
+
+ //some VMs need to be notified of thread creation/exiting to allocate a stack
+ virtual void thread_enter() {}
+ virtual void thread_exit() {}
+
/* DEBUGGER FUNCTIONS */
virtual String debug_get_error() const=0;