Skip to content

Commit be3ab6a

Browse files
authored
Merge pull request #1006 from Spartan322/4.4-add/gdext-godot-compat
[4.4] Add godot compatibility header to GDExtension API dump
2 parents 1a17b61 + c47d6af commit be3ab6a

1 file changed

Lines changed: 28 additions & 11 deletions

File tree

core/extension/extension_api_dump.cpp

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,21 +107,38 @@ Dictionary GDExtensionAPIDump::generate_extension_api(bool p_include_docs) {
107107
Dictionary api_dump;
108108

109109
{
110-
//header
111-
Dictionary header;
112-
header["version_major"] = VERSION_MAJOR;
113-
header["version_minor"] = VERSION_MINOR;
110+
//redot header
111+
Dictionary redot_header;
112+
redot_header["version_major"] = VERSION_MAJOR;
113+
redot_header["version_minor"] = VERSION_MINOR;
114114
#if VERSION_PATCH
115-
header["version_patch"] = VERSION_PATCH;
115+
redot_header["version_patch"] = VERSION_PATCH;
116116
#else
117-
header["version_patch"] = 0;
117+
redot_header["version_patch"] = 0;
118118
#endif
119-
header["version_status"] = VERSION_STATUS;
120-
header["version_status_version"] = VERSION_STATUS_VERSION;
121-
header["version_build"] = VERSION_BUILD;
122-
header["version_full_name"] = VERSION_FULL_NAME;
119+
redot_header["version_status"] = VERSION_STATUS;
120+
redot_header["version_status_version"] = VERSION_STATUS_VERSION;
121+
redot_header["version_build"] = VERSION_BUILD;
122+
redot_header["version_full_name"] = VERSION_FULL_NAME;
123123

124-
api_dump["header"] = header;
124+
api_dump["redot_header"] = redot_header;
125+
}
126+
127+
{
128+
//godot compatible header
129+
Dictionary godot_compat_header;
130+
godot_compat_header["version_major"] = GODOT_VERSION_MAJOR;
131+
godot_compat_header["version_minor"] = GODOT_VERSION_MINOR;
132+
#if GODOT_VERSION_PATCH
133+
godot_compat_header["version_patch"] = GODOT_VERSION_PATCH;
134+
#else
135+
godot_compat_header["version_patch"] = 0;
136+
#endif
137+
godot_compat_header["version_status"] = GODOT_VERSION_STATUS;
138+
godot_compat_header["version_build"] = GODOT_VERSION_BUILD;
139+
godot_compat_header["version_full_name"] = GODOT_VERSION_FULL_NAME;
140+
141+
api_dump["header"] = godot_compat_header;
125142
}
126143

127144
const uint32_t vec3_elems = 3;

0 commit comments

Comments
 (0)