summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorEmmanuel Leblond <emmanuel.leblond@gmail.com>2017-10-03 18:08:34 +0200
committerEmmanuel Leblond <emmanuel.leblond@gmail.com>2017-10-03 18:08:34 +0200
commit0d41be3790b2f221621ec8bbd7f365508683cb18 (patch)
tree4d5baf8ee1446d914591684b3b3ca99fc2714d23 /modules
parent545103bfed7fc51123e123952f328a74cfd214df (diff)
[GDnative] add api version field to godot_gdnative_api_struct
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/SCsub7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index 31178be973..22e3cbc784 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -29,7 +29,8 @@ def _build_gdnative_api_struct_header(api):
'extern "C" {',
'#endif',
'',
- 'typedef struct godot_gdnative_api_struct {'
+ 'typedef struct godot_gdnative_api_struct {',
+ '\tconst char *version;',
]
for funcname, funcdef in api['api'].items():
@@ -54,7 +55,9 @@ def _build_gdnative_api_struct_source(api):
'',
'#include <gdnative_api_struct.gen.h>',
'',
- 'extern const godot_gdnative_api_struct api_struct = {'
+ 'const char *_gdnative_api_version = "%s";' % api['version'],
+ 'extern const godot_gdnative_api_struct api_struct = {',
+ '\t_gdnative_api_version,',
]
for funcname in api['api'].keys():