aboutsummaryrefslogtreecommitdiff
path: root/modules/gdnative/godot/array.h
diff options
context:
space:
mode:
authorKarroffel2017-07-14 01:44:14 +0200
committerKarroffel2017-07-24 04:23:37 +0200
commit534d62d2f4ea1ff4be11b50bc79684b5780e4615 (patch)
tree0d299c22cbffc2a353c126372a44f067914b71d0 /modules/gdnative/godot/array.h
parent85aa0adeef6ab89e98105fdaa49f441e5763d970 (diff)
downloadgodot-534d62d2f4ea1ff4be11b50bc79684b5780e4615.tar.gz
godot-534d62d2f4ea1ff4be11b50bc79684b5780e4615.tar.zst
godot-534d62d2f4ea1ff4be11b50bc79684b5780e4615.zip
[GDNative] new GDNative API
This adds GDNative as a separate class type. It can be used to interface with native libraries by using "native calls", which can be registered by modules (and in future other GDNative libraries?). It also reworks the currently called "GDNativeScript" into a "NativeScript" that just makes use of the new GDNative instead of it being the component that implements that functionality.
Diffstat (limited to '')
-rw-r--r--modules/gdnative/godot/array.h (renamed from modules/gdnative/godot/godot_array.h)15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/gdnative/godot/godot_array.h b/modules/gdnative/godot/array.h
index bf8bc6197..cbdbfbdde 100644
--- a/modules/gdnative/godot/godot_array.h
+++ b/modules/gdnative/godot/array.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* godot_array.h */
+/* array.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -37,16 +37,19 @@ extern "C" {
#include <stdint.h>
+#define GODOT_ARRAY_SIZE 8
+
#ifndef GODOT_CORE_API_GODOT_ARRAY_TYPE_DEFINED
-typedef struct godot_array {
- uint8_t _dont_touch_that[8];
+#define GODOT_CORE_API_GODOT_ARRAY_TYPE_DEFINED
+typedef struct {
+ uint8_t _dont_touch_that[GODOT_ARRAY_SIZE];
} godot_array;
#endif
-#include "godot_pool_arrays.h"
-#include "godot_variant.h"
+#include "pool_arrays.h"
+#include "variant.h"
-#include "../godot.h"
+#include "gdnative.h"
void GDAPI godot_array_new(godot_array *r_dest);
void GDAPI godot_array_new_copy(godot_array *r_dest, const godot_array *p_src);