forked from BigfootDev/flatbuffers
The parser and flatc now allow include directories to be specified.
Bug: 17139854 Change-Id: I0eac65d054951e00a8811ad1d80ba8c37012dbf0 Tested: on Linux.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user