diff options
author | Karroffel <therzog@mail.de> | 2017-10-03 23:07:29 +0200 |
---|---|---|
committer | Karroffel <therzog@mail.de> | 2017-10-03 23:26:39 +0200 |
commit | 2a4e2b53787fc13b8c34887ac18b0c5ee0e75d87 (patch) | |
tree | ef61ab708e79060462827032a55f154e34435857 /modules/gdnative/include/nativescript | |
parent | a848fa6cdeb00f0c40f259cde2d59112272e3c51 (diff) |
[GDNative] added API struct wrapper generator
Previously functions of the GDNative API were accessed by letting
the loader at load-time resolve the symbols. This causes troubles on
Windows (...sigh...), so now the GDNative API isn't exported anymore.
This means, that a library that wants to call a GDNative function
needs to access it via a struct of pointers that's passed to it at
right after the library was loaded. To make the usage easier, those
function pointers in the struct can be wrapped in actual function in
the global scope. This commit adds a generator for that wrapper code.
Diffstat (limited to 'modules/gdnative/include/nativescript')
-rw-r--r-- | modules/gdnative/include/nativescript/godot_nativescript.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h index 5095b7a83e..8baff0fff9 100644 --- a/modules/gdnative/include/nativescript/godot_nativescript.h +++ b/modules/gdnative/include/nativescript/godot_nativescript.h @@ -36,42 +36,6 @@ extern "C" { #endif -#ifdef GDAPI_BUILT_IN -#define GDAPI_EXPORT -#endif - -#ifdef _WIN32 -#if defined(GDAPI_EXPORT) -#define GDCALLINGCONV -#define GDAPI __declspec(dllexport) GDCALLINGCONV -#else -#define GDCALLINGCONV -#define GDAPI __declspec(dllimport) GDCALLINGCONV -#endif -#elif defined(__APPLE__) -#include "TargetConditionals.h" -#if TARGET_OS_IPHONE -#define GDCALLINGCONV __attribute__((visibility("default"))) -#define GDAPI GDCALLINGCONV -#elif TARGET_OS_MAC -#define GDCALLINGCONV __attribute__((sysv_abi)) -#define GDAPI GDCALLINGCONV -#endif -#else -#define GDCALLINGCONV __attribute__((sysv_abi, visibility("default"))) -#define GDAPI GDCALLINGCONV -#endif - -// This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!! -#ifdef _WIN32 -#define GDN_EXPORT __declspec(dllexport) -#else -#define GDN_EXPORT -#endif - -#include <stdbool.h> -#include <stdint.h> - typedef enum { GODOT_METHOD_RPC_MODE_DISABLED, GODOT_METHOD_RPC_MODE_REMOTE, |