Merge pull request #68373 from akien-mga/extension-api-json-newline-eof
GDExtension: Ensure newline at EOF
This commit is contained in:
commit
40ed34f6dc
@ -29,6 +29,7 @@
|
|||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#include "extension_api_dump.h"
|
#include "extension_api_dump.h"
|
||||||
|
|
||||||
#include "core/config/engine.h"
|
#include "core/config/engine.h"
|
||||||
#include "core/core_constants.h"
|
#include "core/core_constants.h"
|
||||||
#include "core/io/file_access.h"
|
#include "core/io/file_access.h"
|
||||||
@ -938,9 +939,9 @@ void NativeExtensionAPIDump::generate_extension_json_file(const String &p_path)
|
|||||||
Ref<JSON> json;
|
Ref<JSON> json;
|
||||||
json.instantiate();
|
json.instantiate();
|
||||||
|
|
||||||
String text = json->stringify(api, "\t", false);
|
String text = json->stringify(api, "\t", false) + "\n";
|
||||||
Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::WRITE);
|
Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::WRITE);
|
||||||
CharString cs = text.ascii();
|
fa->store_string(text);
|
||||||
fa->store_buffer((const uint8_t *)cs.ptr(), cs.length());
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif // TOOLS_ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user