From c386a02654eae581183da0dfd138603a0667639e Mon Sep 17 00:00:00 2001 From: Konstantin Zaitsev Date: Mon, 18 Sep 2017 11:28:25 +0700 Subject: [PATCH 1/2] Fix MSVC compilation errors --- core/os/file_access.h | 2 +- modules/gdnative/gdnative.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/os/file_access.h b/core/os/file_access.h index 151c41c2632..63692cb290a 100644 --- a/core/os/file_access.h +++ b/core/os/file_access.h @@ -140,7 +140,7 @@ public: virtual Error reopen(const String &p_path, int p_mode_flags); ///< does not change the AccessType - virtual Error _chmod(const String &p_path, int p_mod) {} + virtual Error _chmod(const String &p_path, int p_mod) { return FAILED; } static FileAccess *create(AccessType p_access); /// Create a file access (for the current platform) this is the only portable way of accessing files. static FileAccess *create_for_path(const String &p_path); diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 8cc8b0bec8c..93a9bac11c1 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -40,8 +40,8 @@ const String init_symbol = "godot_gdnative_init"; const String terminate_symbol = "godot_gdnative_terminate"; -#define GDAPI_FUNC(name, ret_type, ...) .name = name, -#define GDAPI_FUNC_VOID(name, ...) .name = name, +#define GDAPI_FUNC(name, ret_type, ...) name, +#define GDAPI_FUNC_VOID(name, ...) name, const godot_gdnative_api_struct api_struct = { GODOT_GDNATIVE_API_FUNCTIONS From 28dc30cd594efbea667fd9a5e507f3ecf8d25450 Mon Sep 17 00:00:00 2001 From: Konstantin Zaitsev Date: Tue, 19 Sep 2017 11:35:51 +0700 Subject: [PATCH 2/2] Change structure order for godot nim compatibility --- modules/gdnative/include/gdnative/gdnative.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h index 04dca6f56d6..1c5e91d733f 100644 --- a/modules/gdnative/include/gdnative/gdnative.h +++ b/modules/gdnative/include/gdnative/gdnative.h @@ -237,12 +237,12 @@ godot_variant GDAPI godot_method_bind_call(godot_method_bind *p_method_bind, god struct godot_gdnative_api_struct; // Forward declaration typedef struct { - const struct godot_gdnative_api_struct *api_struct; godot_bool in_editor; uint64_t core_api_hash; uint64_t editor_api_hash; uint64_t no_api_hash; godot_object *gd_native_library; // pointer to GDNativeLibrary that is being initialized + const struct godot_gdnative_api_struct *api_struct; } godot_gdnative_init_options; typedef struct {