diff options
author | Thomas Herzog <thomas.herzog@mail.com> | 2017-10-04 11:57:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-04 11:57:53 +0200 |
commit | 454dec2f2f13e078719a2338c6f07316e93f37d0 (patch) | |
tree | 233064debeef2674a23fc9d0773f6ebc4aa70b46 /modules/gdnative/SCsub | |
parent | f4ddbc024c68fff747b057a0aeaad69e033b9f0f (diff) | |
parent | 3e29cb806cc64a2700e341faa919ace4f1dbe2a8 (diff) |
Merge pull request #11806 from touilleMan/gdnative-version-field
[GDnative] add api version field to godot_gdnative_api_struct
Diffstat (limited to 'modules/gdnative/SCsub')
-rw-r--r-- | modules/gdnative/SCsub | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub index 4e5f155f45..be0975b53c 100644 --- a/modules/gdnative/SCsub +++ b/modules/gdnative/SCsub @@ -30,7 +30,9 @@ def _build_gdnative_api_struct_header(api): 'extern "C" {', '#endif', '', - 'typedef struct godot_gdnative_api_struct {' + 'typedef struct godot_gdnative_api_struct {', + '\tvoid *next;', + '\tconst char *version;', ] for funcname, funcdef in api['api'].items(): @@ -55,7 +57,10 @@ 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 = {', + '\tNULL,', + '\t_gdnative_api_version,', ] for funcname in api['api'].keys(): |