summaryrefslogtreecommitdiffstats
path: root/sord
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-28 04:45:59 +0000
committerDavid Robillard <d@drobilla.net>2011-04-28 04:45:59 +0000
commit86e095df809f8d15b54ee62801f3deb829adfae9 (patch)
treea514dd90d72621c315d78ecda973ee7500989d85 /sord
parent688537cf5ccb709c23359eb855946bedd5b65fcf (diff)
downloadsord-86e095df809f8d15b54ee62801f3deb829adfae9.tar.gz
sord-86e095df809f8d15b54ee62801f3deb829adfae9.tar.bz2
sord-86e095df809f8d15b54ee62801f3deb829adfae9.zip
Const-correct node API.
git-svn-id: http://svn.drobilla.net/sord/trunk@98 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'sord')
-rw-r--r--sord/sord.h4
-rw-r--r--sord/sordmm.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/sord/sord.h b/sord/sord.h
index 587456b..8d31085 100644
--- a/sord/sord.h
+++ b/sord/sord.h
@@ -91,7 +91,7 @@ typedef struct SordNodeImpl SordNode;
Nodes are ordered (S P O G). The ID of the default graph is 0.
*/
-typedef SordNode* SordQuad[4];
+typedef const SordNode* SordQuad[4];
/**
Index into a SordQuad.
@@ -220,7 +220,7 @@ sord_new_literal_counted(SordWorld* world,
*/
SORD_API
SordNode*
-sord_node_copy(SordNode* node);
+sord_node_copy(const SordNode* node);
/**
Free a node (i.e. drop a reference).
diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp
index 294f38f..dc80cb3 100644
--- a/sord/sordmm.hpp
+++ b/sord/sordmm.hpp
@@ -149,7 +149,7 @@ public:
inline Node(World& world, Type t, const std::string& s);
inline Node(World& world);
- inline Node(World& world, SordNode* node);
+ inline Node(World& world, const SordNode* node);
inline Node(const Node& other);
inline ~Node();
@@ -269,7 +269,7 @@ Node::Node(World& world)
}
inline
-Node::Node(World& world, SordNode* node)
+Node::Node(World& world, const SordNode* node)
: _world(&world)
{
_c_obj = node ? sord_node_copy(node) : NULL;