mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 04:21:13 +00:00
Implement --file-names-only (#8788)
* flatc builds and seems to work, some of the extra targets are having linker errors * fix build system * pipeline failures * un-rename files * refactor to use unique_ptr * typo * rm make_unique, add comments * fix cmake --------- Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
@@ -120,7 +120,7 @@ class PythonStubGenerator {
|
||||
ss << content.str() << '\n';
|
||||
|
||||
EnsureDirExists(StripFileName(filename));
|
||||
return flatbuffers::SaveFile(filename.c_str(), ss.str(), false);
|
||||
return parser_.opts.file_saver->SaveFile(filename.c_str(), ss.str(), false);
|
||||
}
|
||||
|
||||
static void DeclareUOffset(std::stringstream& stub, Imports* imports) {
|
||||
@@ -2889,11 +2889,11 @@ class PythonGenerator : public BaseGenerator {
|
||||
i = directories.find(kPathSeparator, i + 1)) {
|
||||
const std::string init_py =
|
||||
directories.substr(0, i) + kPathSeparator + "__init__.py";
|
||||
SaveFile(init_py.c_str(), "", false);
|
||||
parser_.opts.file_saver->SaveFile(init_py.c_str(), "", false);
|
||||
}
|
||||
|
||||
const std::string filename = directories + defname;
|
||||
return SaveFile(filename.c_str(), code, false);
|
||||
return parser_.opts.file_saver->SaveFile(filename.c_str(), code, false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user