summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Moulder <peter.moulder@monash.edu>2007-10-11 13:50:31 +0000
committerpjrm <pjrm@users.sourceforge.net>2007-10-11 13:50:31 +0000
commit889296fca5a294fcf7cb9b5dc930cd870152fbe3 (patch)
tree99f4eecdfeba9719780952f68c68d08d1f787f47
parentProvide Node const* versions of existing sp_repr_children and sp_repr_next fu... (diff)
downloadinkscape-889296fca5a294fcf7cb9b5dc930cd870152fbe3.tar.gz
inkscape-889296fca5a294fcf7cb9b5dc930cd870152fbe3.zip
noop: dialogs/rdf.cpp: Mark a few pointers as not being written through. Make rdf_match_license have static (file-local) linkage.
(bzr r3876)
-rw-r--r--src/dialogs/rdf.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dialogs/rdf.cpp b/src/dialogs/rdf.cpp
index 1e26a79c4..320608e9a 100644
--- a/src/dialogs/rdf.cpp
+++ b/src/dialogs/rdf.cpp
@@ -825,8 +825,8 @@ rdf_set_work_entity(SPDocument * doc, struct rdf_work_entity_t * entity,
#undef DEBUG_MATCH
-bool
-rdf_match_license ( Inkscape::XML::Node * repr, struct rdf_license_t * license )
+static bool
+rdf_match_license(Inkscape::XML::Node const *repr, struct rdf_license_t const *license)
{
g_assert ( repr != NULL );
g_assert ( license != NULL );
@@ -837,13 +837,13 @@ rdf_match_license ( Inkscape::XML::Node * repr, struct rdf_license_t * license )
#endif
int count = 0;
- for (struct rdf_double_t * details = license->details;
+ for (struct rdf_double_t const *details = license->details;
details->name; details++ ) {
count++;
}
bool * matched = (bool*)calloc(count,sizeof(bool));
- for (Inkscape::XML::Node * current = sp_repr_children ( repr );
+ for (Inkscape::XML::Node const *current = sp_repr_children(repr);
current;
current = sp_repr_next ( current ) ) {
@@ -919,7 +919,7 @@ rdf_match_license ( Inkscape::XML::Node * repr, struct rdf_license_t * license )
struct rdf_license_t *
rdf_get_license(SPDocument * document)
{
- Inkscape::XML::Node * repr = rdf_get_xml_repr ( document, XML_TAG_NAME_LICENSE, FALSE );
+ Inkscape::XML::Node const *repr = rdf_get_xml_repr ( document, XML_TAG_NAME_LICENSE, FALSE );
if (repr) {
for (struct rdf_license_t * license = rdf_licenses;
license->name; license++ ) {
@@ -958,7 +958,7 @@ rdf_set_license(SPDocument * doc, struct rdf_license_t const * license)
Inkscape::XML::Document * xmldoc = sp_document_repr_doc(doc);
g_return_if_fail (xmldoc != NULL);
- for (struct rdf_double_t * detail = license->details;
+ for (struct rdf_double_t const * detail = license->details;
detail->name; detail++) {
Inkscape::XML::Node * child = xmldoc->createElement( detail->name );
g_assert ( child != NULL );