Browse Source

Merge pull request #103137 from dsnopek/extension-api-precision

GDExtension: Include precision in `extension_api.json`
Thaddeus Crews 5 months ago
parent
commit
f8ca861e25
1 changed files with 6 additions and 0 deletions
  1. 6 0
      core/extension/extension_api_dump.cpp

+ 6 - 0
core/extension/extension_api_dump.cpp

@@ -118,6 +118,12 @@ Dictionary GDExtensionAPIDump::generate_extension_api(bool p_include_docs) {
 		header["version_build"] = VERSION_BUILD;
 		header["version_full_name"] = VERSION_FULL_NAME;
 
+#if REAL_T_IS_DOUBLE
+		header["precision"] = "double";
+#else
+		header["precision"] = "single";
+#endif
+
 		api_dump["header"] = header;
 	}