summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h4
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp1
-rw-r--r--modules/gdnative/nativescript/nativescript.cpp10
-rw-r--r--modules/gdnative/nativescript/nativescript.h23
4 files changed, 24 insertions, 14 deletions
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index 616c305f25..796ced84f4 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -35,7 +35,7 @@
extern "C" {
#endif
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__ANDROID__)
#define GDCALLINGCONV
#define GDAPI GDCALLINGCONV
#elif defined(__APPLE__)
@@ -47,7 +47,7 @@ extern "C" {
#define GDCALLINGCONV __attribute__((sysv_abi))
#define GDAPI GDCALLINGCONV
#endif
-#else
+#else // !_WIN32 && !__APPLE__
#define GDCALLINGCONV __attribute__((sysv_abi))
#define GDAPI GDCALLINGCONV
#endif
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp
index 0983c12619..8c6dace847 100644
--- a/modules/gdnative/nativescript/api_generator.cpp
+++ b/modules/gdnative/nativescript/api_generator.cpp
@@ -292,6 +292,7 @@ List<ClassAPI> generate_c_api_classes() {
method_api.has_varargs = method_bind && method_bind->is_vararg();
// Method flags
+ method_api.is_virtual = false;
if (method_info.flags) {
const uint32_t flags = method_info.flags;
method_api.is_editor = flags & METHOD_FLAG_EDITOR;
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp
index 641e4021d8..37e72bf9f8 100644
--- a/modules/gdnative/nativescript/nativescript.cpp
+++ b/modules/gdnative/nativescript/nativescript.cpp
@@ -1016,6 +1016,16 @@ NativeScriptLanguage::NativeScriptLanguage() {
#ifdef DEBUG_ENABLED
profiling = false;
#endif
+
+ _init_call_type = "nativescript_init";
+ _init_call_name = "nativescript_init";
+ _terminate_call_name = "nativescript_terminate";
+ _noarg_call_type = "nativescript_no_arg";
+ _frame_call_name = "nativescript_frame";
+#ifndef NO_THREADS
+ _thread_enter_call_name = "nativescript_thread_enter";
+ _thread_exit_call_name = "nativescript_thread_exit";
+#endif
}
NativeScriptLanguage::~NativeScriptLanguage() {
diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h
index ade8ffd280..51370f5fbf 100644
--- a/modules/gdnative/nativescript/nativescript.h
+++ b/modules/gdnative/nativescript/nativescript.h
@@ -277,18 +277,14 @@ public:
Map<String, Set<NativeScript *> > library_script_users;
- const StringName _init_call_type = "nativescript_init";
- const StringName _init_call_name = "nativescript_init";
-
- const StringName _terminate_call_name = "nativescript_terminate";
-
- const StringName _noarg_call_type = "nativescript_no_arg";
-
- const StringName _frame_call_name = "nativescript_frame";
-
+ StringName _init_call_type;
+ StringName _init_call_name;
+ StringName _terminate_call_name;
+ StringName _noarg_call_type;
+ StringName _frame_call_name;
#ifndef NO_THREADS
- const StringName _thread_enter_call_name = "nativescript_thread_enter";
- const StringName _thread_exit_call_name = "nativescript_thread_exit";
+ StringName _thread_enter_call_name;
+ StringName _thread_exit_call_name;
#endif
NativeScriptLanguage();
@@ -372,11 +368,14 @@ inline NativeScriptDesc *NativeScript::get_script_desc() const {
class NativeReloadNode : public Node {
GDCLASS(NativeReloadNode, Node)
- bool unloaded = false;
+ bool unloaded;
public:
static void _bind_methods();
void _notification(int p_what);
+
+ NativeReloadNode() :
+ unloaded(false) {}
};
class ResourceFormatLoaderNativeScript : public ResourceFormatLoader {