aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-04-24 21:41:46 +0200
committerDavid Robillard <d@drobilla.net>2017-04-24 21:41:46 +0200
commit52d36530ef5bfd1b2be810a1ade6e034b76aa097 (patch)
treecf1a34d1f1c51508b1fd0a253609eebc428efbd3 /src/serd_internal.h
parent1c9b402f041067a321a5f59ff0bcd7238e0ab9fe (diff)
downloadserd-52d36530ef5bfd1b2be810a1ade6e034b76aa097.tar.gz
serd-52d36530ef5bfd1b2be810a1ade6e034b76aa097.tar.bz2
serd-52d36530ef5bfd1b2be810a1ade6e034b76aa097.zip
Allow arbitrary page size to be passed for custom sources
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r--src/serd_internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h
index 3ccc7f09..affdd31f 100644
--- a/src/serd_internal.h
+++ b/src/serd_internal.h
@@ -72,12 +72,12 @@ typedef struct {
SerdSource read_func; ///< Read function (e.g. fread)
SerdStreamErrorFunc error_func; ///< Error function (e.g. ferror)
void* stream; ///< Stream (e.g. FILE)
+ size_t page_size; ///< Number of bytes to read at a time
uint8_t* file_buf; ///< Buffer iff reading pages from a file
const uint8_t* read_buf; ///< Pointer to file_buf or read_byte
size_t read_head; ///< Offset into read_buf
uint8_t read_byte; ///< 1-byte 'buffer' used when not paging
bool from_stream; ///< True iff reading from `stream`
- bool paging; ///< True iff reading a page at a time
bool prepared; ///< True iff prepared for reading
} SerdByteSource;
@@ -94,7 +94,7 @@ serd_byte_source_open_source(SerdByteSource* source,
SerdSource read_func,
SerdStreamErrorFunc error_func,
void* stream,
- bool bulk);
+ size_t page_size);
SerdStatus
serd_byte_source_close(SerdByteSource* source);