[GDnative] add api version field to godot_gdnative_api_struct

This commit is contained in:
Emmanuel Leblond 2017-10-03 18:08:34 +02:00
parent 545103bfed
commit 0d41be3790
No known key found for this signature in database
GPG Key ID: C360860E645EFFC0
1 changed files with 5 additions and 2 deletions

View File

@ -29,7 +29,8 @@ def _build_gdnative_api_struct_header(api):
'extern "C" {', 'extern "C" {',
'#endif', '#endif',
'', '',
'typedef struct godot_gdnative_api_struct {' 'typedef struct godot_gdnative_api_struct {',
'\tconst char *version;',
] ]
for funcname, funcdef in api['api'].items(): for funcname, funcdef in api['api'].items():
@ -54,7 +55,9 @@ def _build_gdnative_api_struct_source(api):
'', '',
'#include <gdnative_api_struct.gen.h>', '#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(): for funcname in api['api'].keys():