mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-02 18:27:46 +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:
parent
0b60686e3d
commit
a1e125af11
34 changed files with 207 additions and 210 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue