diff options
author | David Robillard <d@drobilla.net> | 2011-01-26 03:33:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-26 03:33:24 +0000 |
commit | 706bda4d4759f83a5ba2c532dc9b6a98bfde71f1 (patch) | |
tree | 11c10f1e67cd90b9fc41a33587b639cab75a5e3f | |
parent | b0d5a7b4a2c8fae72af553804a33bf11471c458a (diff) | |
download | serd-706bda4d4759f83a5ba2c532dc9b6a98bfde71f1.tar.gz serd-706bda4d4759f83a5ba2c532dc9b6a98bfde71f1.tar.bz2 serd-706bda4d4759f83a5ba2c532dc9b6a98bfde71f1.zip |
Tolerate NULL base URI.
git-svn-id: http://svn.drobilla.net/serd/trunk@83 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r-- | src/serdi.c | 3 | ||||
-rw-r--r-- | src/writer.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/serdi.c b/src/serdi.c index 496531b5..7a275e36 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -251,7 +251,8 @@ main(int argc, char** argv) }; SerdReader reader = serd_reader_new( - SERD_TURTLE, &state, event_base, event_prefix, event_statement, event_end); + SERD_TURTLE, &state, + event_base, event_prefix, event_statement, event_end); const bool success = (from_file) ? serd_reader_read_file(reader, in_fd, input) diff --git a/src/writer.c b/src/writer.c index 8010dba3..9ba02489 100644 --- a/src/writer.c +++ b/src/writer.c @@ -368,7 +368,7 @@ serd_writer_new(SerdSyntax syntax, writer->syntax = syntax; writer->style = style; writer->env = env; - writer->base_uri = *base_uri; + writer->base_uri = base_uri ? *base_uri : SERD_URI_NULL; writer->anon_stack = serd_stack_new(sizeof(WriteContext)); writer->sink = sink; writer->stream = stream; |