浏览代码

fix auto-generated GDN API header for C compilers (#12891)

* fix auto-generated GDN API header for C compilers
Evrey 7 年之前
父节点
当前提交
af6f096427
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      modules/gdnative/SCsub

+ 4 - 2
modules/gdnative/SCsub

@@ -40,11 +40,13 @@ def _build_gdnative_api_struct_header(api):
         '\tunsigned int minor;',
         '} godot_gdnative_api_version;',
         '',
-        'typedef struct godot_gdnative_api_struct {',
+        'typedef struct godot_gdnative_api_struct godot_gdnative_api_struct;',
+        '',
+        'struct godot_gdnative_api_struct {',
         '\tunsigned int type;',
         '\tgodot_gdnative_api_version version;',
         '\tconst godot_gdnative_api_struct *next;',
-        '} godot_gdnative_api_struct;',
+        '};',
         '',
         'enum GDNATIVE_API_TYPES {',
         '\tGDNATIVE_' + api['core']['type'] + ','