diff options
-rw-r--r-- | serd/serd.h | 7 | ||||
-rw-r--r-- | src/serdi.c | 4 | ||||
-rw-r--r-- | src/writer.c | 2 | ||||
-rw-r--r-- | tests/serd_test.c | 4 |
4 files changed, 11 insertions, 6 deletions
diff --git a/serd/serd.h b/serd/serd.h index 4a1ccd0d..cf079842 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -312,6 +312,11 @@ typedef enum { } SerdStyle; /** + Bitwise OR of SerdStyle values. +*/ +typedef uint32_t SerdStyleFlags; + +/** Free memory allocated by Serd. This function exists because some systems require memory allocated by a @@ -1167,7 +1172,7 @@ SERD_API SerdWriter* serd_writer_new(SerdWorld* world, SerdSyntax syntax, - SerdStyle style, + SerdStyleFlags style, SerdEnv* env, SerdWriteFunc ssink, void* stream); diff --git a/src/serdi.c b/src/serdi.c index 1e562ff0..0b9f46d5 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -193,7 +193,7 @@ main(int argc, char** argv) SerdWorld* world = serd_world_new(); SerdEnv* env = serd_env_new(base); - int output_style = 0; + SerdStyleFlags output_style = 0; if (output_syntax == SERD_NTRIPLES || ascii) { output_style |= SERD_STYLE_ASCII; } else if (output_syntax == SERD_TURTLE) { @@ -215,7 +215,7 @@ main(int argc, char** argv) SerdWriter* writer = serd_writer_new(world, output_syntax, - (SerdStyle)output_style, + output_style, env, (SerdWriteFunc)fwrite, out_fd); diff --git a/src/writer.c b/src/writer.c index eb574a97..2a886718 100644 --- a/src/writer.c +++ b/src/writer.c @@ -863,7 +863,7 @@ serd_writer_finish(SerdWriter* writer) SerdWriter* serd_writer_new(SerdWorld* world, SerdSyntax syntax, - SerdStyle style, + SerdStyleFlags style, SerdEnv* env, SerdWriteFunc ssink, void* stream) diff --git a/tests/serd_test.c b/tests/serd_test.c index 569b16a6..7b4924d8 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -570,7 +570,7 @@ main(void) SerdWriter* writer = serd_writer_new(world, SERD_TURTLE, - (SerdStyle)0, + 0, env, (SerdWriteFunc)fwrite, fd); @@ -668,7 +668,7 @@ main(void) // Test buffer sink SerdBuffer buffer = { NULL, 0 }; writer = serd_writer_new( - world, SERD_TURTLE, (SerdStyle)0, env, serd_buffer_sink, &buffer); + world, SERD_TURTLE, 0, env, serd_buffer_sink, &buffer); o = serd_new_uri("http://example.org/base"); if (serd_writer_set_base_uri(writer, o)) { |