From 64f006162ddf79bced1ec401e577589cf146af1f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 May 2011 20:46:13 +0000 Subject: Improve documentation and const-correctness. git-svn-id: http://svn.drobilla.net/serd/trunk@165 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- serd/serd.h | 17 ++++++++--------- src/env.c | 6 +++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/serd/serd.h b/serd/serd.h index d1f19cd3..351b8b8b 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -57,15 +57,14 @@ extern "C" { Environment. Represents the state required to resolve a CURIE or relative URI, e.g. the - base URI and set of namespace prefixes at a particular point in a - serialisation. + base URI and set of namespace prefixes at a particular point. */ typedef struct SerdEnvImpl SerdEnv; /** RDF reader. - parses RDF by calling user-provided sink functions as input is consumed + Parses RDF by calling user-provided sink functions as input is consumed (much like an XML SAX parser). */ typedef struct SerdReaderImpl SerdReader; @@ -76,7 +75,7 @@ typedef struct SerdReaderImpl SerdReader; Provides a number of functions to allow writing RDF syntax out to some stream. These functions are deliberately compatible with the sink functions used by SerdReader, so a reader can be directly connected to a writer to - re-serialise a document. + re-serialise a document with minimal overhead. */ typedef struct SerdWriterImpl SerdWriter; @@ -420,16 +419,16 @@ serd_env_free(SerdEnv* env); */ SERD_API const SerdNode* -serd_env_get_base_uri(SerdEnv* state, - SerdURI* out); +serd_env_get_base_uri(const SerdEnv* env, + SerdURI* out); /** Set the current base URI. */ SERD_API SerdStatus -serd_env_set_base_uri(SerdEnv* state, - const SerdNode* uri_node); +serd_env_set_base_uri(SerdEnv* env, + const SerdNode* uri); /** Set a namespace prefix. @@ -465,7 +464,7 @@ serd_env_expand(const SerdEnv* env, */ SERD_API SerdNode -serd_env_expand_node(SerdEnv* env, +serd_env_expand_node(const SerdEnv* env, const SerdNode* node); /** diff --git a/src/env.c b/src/env.c index 499aa706..6671d683 100644 --- a/src/env.c +++ b/src/env.c @@ -60,8 +60,8 @@ serd_env_free(SerdEnv* env) SERD_API const SerdNode* -serd_env_get_base_uri(SerdEnv* env, - SerdURI* out) +serd_env_get_base_uri(const SerdEnv* env, + SerdURI* out) { *out = env->base_uri; return &env->base_uri_node; @@ -196,7 +196,7 @@ serd_env_expand(const SerdEnv* env, SERD_API SerdNode -serd_env_expand_node(SerdEnv* env, +serd_env_expand_node(const SerdEnv* env, const SerdNode* node) { if (node->type == SERD_CURIE) { -- cgit v1.2.1