mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-03 18:57:51 +00:00
The parser and flatc now allow include directories to be specified.
Bug: 17139854 Change-Id: I0eac65d054951e00a8811ad1d80ba8c37012dbf0 Tested: on Linux.
This commit is contained in:
parent
cb58fc6fa1
commit
e57b86bb9f
10 changed files with 77 additions and 35 deletions
|
|
@ -37,8 +37,9 @@ int main(int /*argc*/, const char * /*argv*/[]) {
|
|||
|
||||
// parse schema first, so we can use it to parse the data after
|
||||
flatbuffers::Parser parser;
|
||||
ok = parser.Parse(schemafile.c_str(), "samples/") &&
|
||||
parser.Parse(jsonfile.c_str(), "samples/");
|
||||
const char *include_directories[] = { "samples", nullptr };
|
||||
ok = parser.Parse(schemafile.c_str(), include_directories) &&
|
||||
parser.Parse(jsonfile.c_str(), include_directories);
|
||||
assert(ok);
|
||||
|
||||
// here, parser.builder_ contains a binary buffer that is the parsed data.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue