|
@@ -30,7 +30,9 @@ 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 {',
|
|
|
|
+ '\tvoid *next;',
|
|
|
|
+ '\tconst char *version;',
|
|
]
|
|
]
|
|
|
|
|
|
for funcname, funcdef in api['api'].items():
|
|
for funcname, funcdef in api['api'].items():
|
|
@@ -55,7 +57,10 @@ 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 = {',
|
|
|
|
+ '\tNULL,',
|
|
|
|
+ '\t_gdnative_api_version,',
|
|
]
|
|
]
|
|
|
|
|
|
for funcname in api['api'].keys():
|
|
for funcname in api['api'].keys():
|