aboutsummaryrefslogtreecommitdiffstats
path: root/src/serdi.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-12 05:10:49 +0000
committerDavid Robillard <d@drobilla.net>2011-12-12 05:10:49 +0000
commit22ac239266b01f067ece83eb6addcdc9f825780e (patch)
tree918516d71f7303d6e05699f8b60d20a6f6372409 /src/serdi.c
parente731c88e809459ef4adb4988e433d6be7b043aa6 (diff)
downloadserd-22ac239266b01f067ece83eb6addcdc9f825780e.tar.gz
serd-22ac239266b01f067ece83eb6addcdc9f825780e.tar.bz2
serd-22ac239266b01f067ece83eb6addcdc9f825780e.zip
Make bulk writer internal and inlinable to avoid function call overhead in the writer.
git-svn-id: http://svn.drobilla.net/serd/trunk@254 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/serdi.c')
-rw-r--r--src/serdi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/serdi.c b/src/serdi.c
index c5183008..989821fb 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -197,17 +197,12 @@ main(int argc, char** argv)
output_style |= SERD_STYLE_RESOLVED;
}
- SerdSink sink = file_sink;
- void* stream = out_fd;
- SerdBulkSink* bulk_sink = NULL;
if (bulk_write) {
- bulk_sink = serd_bulk_sink_new(sink, stream, SERD_PAGE_SIZE);
- sink = (SerdSink)serd_bulk_sink_write;
- stream = bulk_sink;
+ output_style |= SERD_STYLE_BULK;
}
SerdWriter* writer = serd_writer_new(
- output_syntax, output_style, env, &base_uri, sink, stream);
+ output_syntax, output_style, env, &base_uri, file_sink, out_fd);
if (chop_prefix) {
serd_writer_chop_blank_prefix(writer, chop_prefix);
@@ -238,7 +233,6 @@ main(int argc, char** argv)
serd_writer_finish(state.writer);
serd_writer_free(state.writer);
- serd_bulk_sink_free(bulk_sink);
serd_env_free(state.env);
serd_node_free(&base_uri_node);