aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-27 18:41:58 +0000
committerDavid Robillard <d@drobilla.net>2011-04-27 18:41:58 +0000
commit68aa3540cb71c5e0473cc4568431a0e5f5ae29f0 (patch)
tree33939eafb4bd864059fd31b17dc28d15532c9508 /src/writer.c
parent0b04f70d827a850ca5e779819095766194cd0e94 (diff)
downloadserd-68aa3540cb71c5e0473cc4568431a0e5f5ae29f0.tar.gz
serd-68aa3540cb71c5e0473cc4568431a0e5f5ae29f0.tar.bz2
serd-68aa3540cb71c5e0473cc4568431a0e5f5ae29f0.zip
Don't hide pointers in typedefs.
git-svn-id: http://svn.drobilla.net/serd/trunk@150 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/writer.c b/src/writer.c
index b87ad1b0..f6077773 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -37,7 +37,7 @@ static const WriteContext WRITE_CONTEXT_NULL = {
struct SerdWriterImpl {
SerdSyntax syntax;
SerdStyle style;
- SerdEnv env;
+ SerdEnv* env;
SerdURI base_uri;
SerdStack anon_stack;
SerdSink sink;
@@ -53,7 +53,7 @@ typedef enum {
} TextContext;
static inline WriteContext*
-anon_stack_top(SerdWriter writer)
+anon_stack_top(SerdWriter* writer)
{
assert(!serd_stack_is_empty(&writer->anon_stack));
return (WriteContext*)(writer->anon_stack.buf
@@ -61,7 +61,7 @@ anon_stack_top(SerdWriter writer)
}
static bool
-write_text(SerdWriter writer, TextContext ctx,
+write_text(SerdWriter* writer, TextContext ctx,
const uint8_t* utf8, size_t n_bytes, uint8_t terminator)
{
char escape[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
@@ -142,7 +142,7 @@ write_text(SerdWriter writer, TextContext ctx,
}
static void
-serd_writer_write_delim(SerdWriter writer, const uint8_t delim)
+serd_writer_write_delim(SerdWriter* writer, const uint8_t delim)
{
switch (delim) {
case '\n':
@@ -159,7 +159,7 @@ serd_writer_write_delim(SerdWriter writer, const uint8_t delim)
}
static void
-reset_context(SerdWriter writer)
+reset_context(SerdWriter* writer)
{
if (writer->context.graph.buf)
serd_node_free(&writer->context.graph);
@@ -171,7 +171,7 @@ reset_context(SerdWriter writer)
}
static bool
-write_node(SerdWriter writer,
+write_node(SerdWriter* writer,
const SerdNode* node,
const SerdNode* datatype,
const SerdNode* lang)
@@ -276,7 +276,7 @@ write_node(SerdWriter writer,
SERD_API
bool
-serd_writer_write_statement(SerdWriter writer,
+serd_writer_write_statement(SerdWriter* writer,
const SerdNode* graph,
const SerdNode* subject,
const SerdNode* predicate,
@@ -367,7 +367,7 @@ serd_writer_write_statement(SerdWriter writer,
SERD_API
bool
-serd_writer_end_anon(SerdWriter writer,
+serd_writer_end_anon(SerdWriter* writer,
const SerdNode* node)
{
if (writer->syntax == SERD_NTRIPLES) {
@@ -392,7 +392,7 @@ serd_writer_end_anon(SerdWriter writer,
SERD_API
void
-serd_writer_finish(SerdWriter writer)
+serd_writer_finish(SerdWriter* writer)
{
if (writer->context.subject.buf) {
writer->sink(" .\n", 3, writer->stream);
@@ -401,16 +401,16 @@ serd_writer_finish(SerdWriter writer)
}
SERD_API
-SerdWriter
+SerdWriter*
serd_writer_new(SerdSyntax syntax,
SerdStyle style,
- SerdEnv env,
+ SerdEnv* env,
const SerdURI* base_uri,
SerdSink sink,
void* stream)
{
const WriteContext context = WRITE_CONTEXT_NULL;
- SerdWriter writer = malloc(sizeof(struct SerdWriterImpl));
+ SerdWriter* writer = malloc(sizeof(struct SerdWriterImpl));
writer->syntax = syntax;
writer->style = style;
writer->env = env;
@@ -425,7 +425,7 @@ serd_writer_new(SerdSyntax syntax,
SERD_API
void
-serd_writer_set_base_uri(SerdWriter writer,
+serd_writer_set_base_uri(SerdWriter* writer,
const SerdURI* uri)
{
writer->base_uri = *uri;
@@ -443,7 +443,7 @@ serd_writer_set_base_uri(SerdWriter writer,
SERD_API
bool
-serd_writer_set_prefix(SerdWriter writer,
+serd_writer_set_prefix(SerdWriter* writer,
const SerdNode* name,
const SerdNode* uri)
{
@@ -464,9 +464,9 @@ serd_writer_set_prefix(SerdWriter writer,
SERD_API
void
-serd_writer_free(SerdWriter writer)
+serd_writer_free(SerdWriter* writer)
{
- SerdWriter const me = (SerdWriter)writer;
+ SerdWriter* const me = (SerdWriter*)writer;
serd_writer_finish(me);
serd_stack_free(&writer->anon_stack);
free(me);