make it possible to bootstrap an .ngf from a cookie

This commit is contained in:
Krasimir Angelov committed 2023-09-07 10:07:49 +02:00
1 parent d110140107
commit f1af1c8be4
5 files changed
+196 -3

No files matched your search

+14
View File
@@ -261,6 +261,20 @@ PgfDB *pgf_boot_ngf(const char* pgf_path, const char* ngf_path,
PgfProbsCallback *probs_callback,
PgfExn* err);
#if defined(__linux__) || defined(__APPLE__)
PGF_API_DECL
PgfDB *pgf_boot_ngf_cookie(void *cookie,
#if defined(__linux__)
ssize_t (*readfn)(void *, char *, size_t),
#else
int (*readfn)(void *, const char *, int),
#endif
const char* ngf_path,
PgfRevision *revision,
PgfProbsCallback *probs_callback,
PgfExn* err);
#endif
/* Tries to read the grammar from an already booted NGF file.
* The function fails if the file does not exist. The default grammar
* revision is stored in *revision. */