aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-09 20:46:13 +0000
committerDavid Robillard <d@drobilla.net>2011-05-09 20:46:13 +0000
commit64f006162ddf79bced1ec401e577589cf146af1f (patch)
tree6731bc939204775e67ada64da0c2400f322c9946
parent00433beb65e513283dbd1b05d4232fa2c8e0de69 (diff)
downloadserd-64f006162ddf79bced1ec401e577589cf146af1f.tar.gz
serd-64f006162ddf79bced1ec401e577589cf146af1f.tar.bz2
serd-64f006162ddf79bced1ec401e577589cf146af1f.zip
Improve documentation and const-correctness.
git-svn-id: http://svn.drobilla.net/serd/trunk@165 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r--serd/serd.h17
-rw-r--r--src/env.c6
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) {