Annotation of parser3/src/lib/patches/gdome2.patch, revision 1.1.6.2
1.1.6.2 ! paf 1: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdome.h ./libgdome/gdome.h
! 2: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdome.h Thu May 23 19:46:18 2002
! 3: +++ ./libgdome/gdome.h Fri Apr 11 11:22:45 2003
! 4: @@ -254,6 +254,8 @@
! 5: GdomeDOMString *gdome_str_mkref (const gchar *str);
! 6: GdomeDOMString *gdome_str_mkref_own (gchar *str);
! 7: GdomeDOMString *gdome_str_mkref_dup (const gchar *str);
! 8: +typedef unsigned char xmlChar;/* from libxml/tree.h */
! 9: +GdomeDOMString *gdome_str_mkref_xml (xmlChar *str);
! 10: void gdome_str_ref (GdomeDOMString *self);
! 11: void gdome_str_unref (GdomeDOMString *self);
! 12: GdomeBoolean gdome_str_equal (GdomeDOMString *self,
! 13: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-attribute.c ./libgdome/gdomecore/gdome-xml-attribute.c
! 14: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-attribute.c Wed Apr 3 11:05:00 2002
! 15: +++ ./libgdome/gdomecore/gdome-xml-attribute.c Fri Apr 11 11:02:08 2003
! 16: @@ -247,9 +247,9 @@
! 17: value = xmlNodeGetContent ((xmlNode *)priv->n);
! 18:
! 19: if (value != NULL)
! 20: - return gdome_xml_str_mkref_own (value);
! 21: + return gdome_xml_str_mkref_xml (value);
! 22: else
! 23: - return gdome_xml_str_mkref_dup("");
! 24: + return gdome_xml_str_mkref ("");
! 25: }
! 26:
! 27: /**
! 28: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-cdata.c ./libgdome/gdomecore/gdome-xml-cdata.c
! 29: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-cdata.c Mon Apr 1 21:08:24 2002
! 30: +++ ./libgdome/gdomecore/gdome-xml-cdata.c Fri Apr 11 11:01:11 2003
! 31: @@ -184,7 +184,7 @@
! 32: g_return_val_if_fail (GDOME_XML_IS_CD (priv), NULL);
! 33: g_return_val_if_fail (exc != NULL, NULL);
! 34:
! 35: - return gdome_xml_str_mkref_own (xmlNodeGetContent (priv->n));
! 36: + return gdome_xml_str_mkref_xml (xmlNodeGetContent (priv->n));
! 37: }
! 38:
! 39: /**
! 40: @@ -310,7 +310,7 @@
! 41: ret[stop - start] = '\0';
! 42:
! 43: xmlFree (str);
! 44: - return gdome_xml_str_mkref_own (ret);
! 45: + return gdome_xml_str_mkref_xml (ret);
! 46: }
! 47:
! 48: /**
! 49: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-document.c ./libgdome/gdomecore/gdome-xml-document.c
! 50: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-document.c Wed May 29 04:24:48 2002
! 51: +++ ./libgdome/gdomecore/gdome-xml-document.c Mon Mar 31 11:15:40 2003
! 52: @@ -657,7 +657,7 @@
! 53: idsIterator *priv = (idsIterator *)data;
! 54:
! 55: if (priv->element == NULL && xmlStrEqual (name, priv->elementId))
! 56: - priv->element = (xmlNode *)gdome_xmlGetParent ((xmlNode *)((xmlID *)payload)->attr);
! 57: + priv->element = (xmlNode *)gdome_xmlGetParent ((xmlNode *)((xmlID *)payload)->attr);
! 58: }
! 59:
! 60: /**
! 61: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-element.c ./libgdome/gdomecore/gdome-xml-element.c
! 62: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-element.c Mon Apr 1 21:08:24 2002
! 63: +++ ./libgdome/gdomecore/gdome-xml-element.c Fri Apr 11 11:03:09 2003
! 64: @@ -144,7 +144,7 @@
! 65: (gchar *) gdome_xmlGetNsPrefix(priv->n),
! 66: (gchar *) gdome_xmlGetName(priv->n)));
! 67: else
! 68: - ret = gdome_xml_str_mkref_dup((gchar *)gdome_xmlGetName (priv->n));
! 69: + ret = gdome_xml_str_mkref_dup((gchar *)gdome_xmlGetName (priv->n));//@tocheck paf
! 70:
! 71: return ret;
! 72: }
! 73: @@ -196,16 +196,16 @@
! 74: value = xmlGetProp (priv->n, name->str);
! 75:
! 76: if (value != NULL)
! 77: - return gdome_xml_str_mkref_own (value);
! 78: + return gdome_xml_str_mkref_xml (value);
! 79: else {
! 80: strs = g_strsplit((gchar *)name->str, ":", 0);
! 81: if (xmlStrEqual(strs[0], "xmlns"))
! 82: ns = gdome_xmlGetNsDecl(priv->n, strs[1]);
! 83: g_strfreev(strs);
! 84: if (ns != NULL)
! 85: - return gdome_xml_str_mkref_dup ((gchar *)ns->href);
! 86: + return gdome_xml_str_mkref_xml (ns->href);
! 87: else
! 88: - return gdome_xml_str_mkref_dup ("");
! 89: + return gdome_xml_str_mkref ("");
! 90: }
! 91: }
! 92:
! 93: @@ -247,7 +247,7 @@
! 94: return;
! 95: }
! 96:
! 97: - prevValue = gdome_xml_str_mkref_own (xmlGetProp (priv->n, name->str));
! 98: + prevValue = gdome_xml_str_mkref_xml (xmlGetProp (priv->n, name->str));
! 99: attr = gdome_xml_n_mkref ((xmlNode *)xmlSetProp (priv->n, name->str, value->str));
! 100:
! 101: if (attr != NULL) {
! 102: @@ -534,15 +534,15 @@
! 103: value = xmlGetNsProp (priv->n, localName->str, namespaceURI->str);
! 104:
! 105: if (value != NULL)
! 106: - return gdome_xml_str_mkref_own (value);
! 107: + return gdome_xml_str_mkref_xml (value);
! 108: else if (xmlStrEqual(namespaceURI->str, GDOME_XMLNS_NAMESPACE)) {
! 109: ns = gdome_xmlGetNsDecl(priv->n, localName->str);
! 110: if (ns != NULL)
! 111: - return gdome_xml_str_mkref_dup ((gchar *)ns->href);
! 112: + return gdome_xml_str_mkref_xml (ns->href);
! 113: else
! 114: - return gdome_xml_str_mkref_dup ("");
! 115: + return gdome_xml_str_mkref ("");
! 116: } else {
! 117: - return gdome_xml_str_mkref_dup ("");
! 118: + return gdome_xml_str_mkref ("");
! 119: }
! 120: }
! 121:
! 122: @@ -637,7 +637,7 @@
! 123: g_free(localName);
! 124: }
! 125: else {
! 126: - prevValue = gdome_xml_str_mkref_own (xmlGetProp (priv->n,
! 127: + prevValue = gdome_xml_str_mkref_xml (xmlGetProp (priv->n,
! 128: (xmlChar *)qualifiedName->str));
! 129: attr = gdome_xml_n_mkref ((xmlNode *)xmlSetProp (priv->n,
! 130: (xmlChar *)qualifiedName->str,
! 131: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-node.c ./libgdome/gdomecore/gdome-xml-node.c
! 132: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-node.c Wed Jan 22 00:29:16 2003
! 133: +++ ./libgdome/gdomecore/gdome-xml-node.c Fri Apr 11 11:08:33 2003
! 134: @@ -24,8 +24,8 @@
! 135: #ifdef HAVE_CONFIG_H
! 136: # include <config.h>
! 137: #endif
! 138: -#include <sys/time.h>
! 139: -#include <unistd.h>
! 140: +//paf #include <sys/time.h>
! 141: +//paf #include <unistd.h>
! 142: #include <stdlib.h>
! 143: #include <string.h>
! 144: #include "gdome.h"
! 145: @@ -250,10 +250,12 @@
! 146: type = gdome_xmlGetType (priv->n);
! 147: switch (type) {
! 148: case XML_DOCUMENT_TYPE_NODE:
! 149: - case XML_DTD_NODE:
! 150: - return gdome_xml_dt_unref (self, exc);
! 151: - case XML_DOCUMENT_NODE:
! 152: - return gdome_xml_doc_unref (self, exc);
! 153: + case XML_DTD_NODE:
! 154: + gdome_xml_dt_unref (self, exc);
! 155: + return;
! 156: + case XML_DOCUMENT_NODE:
! 157: + gdome_xml_doc_unref (self, exc);
! 158: + return;
! 159: default:
! 160: if (priv->refcnt > 0)
! 161: priv->refcnt--;
! 162: @@ -634,7 +636,7 @@
! 163: case XML_CDATA_SECTION_NODE:
! 164: case XML_COMMENT_NODE:
! 165: case XML_TEXT_NODE:
! 166: - ret = gdome_xml_str_mkref_own (xmlNodeGetContent (priv->n));
! 167: + ret = gdome_xml_str_mkref_xml (xmlNodeGetContent (priv->n));
! 168: break;
! 169: case XML_ELEMENT_NODE:
! 170: case XML_ENTITY_NODE:
! 171: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-pi.c ./libgdome/gdomecore/gdome-xml-pi.c
! 172: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-pi.c Mon Apr 1 21:08:24 2002
! 173: +++ ./libgdome/gdomecore/gdome-xml-pi.c Fri Apr 11 11:01:11 2003
! 174: @@ -144,7 +144,7 @@
! 175: g_return_val_if_fail (GDOME_XML_IS_PI (priv), NULL);
! 176: g_return_val_if_fail (exc != NULL, NULL);
! 177:
! 178: - return gdome_xml_str_mkref_own (xmlNodeGetContent (priv->n));
! 179: + return gdome_xml_str_mkref_xml (xmlNodeGetContent (priv->n));
! 180: }
! 181:
! 182: /**
! 183: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-str.c ./libgdome/gdomecore/gdome-xml-str.c
! 184: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-str.c Mon Apr 1 21:08:24 2002
! 185: +++ ./libgdome/gdomecore/gdome-xml-str.c Fri Apr 11 11:07:28 2003
! 186: @@ -51,7 +51,7 @@
! 187:
! 188: void
! 189: gdome_xml_str_unref_xml (GdomeDOMString *self) {
! 190: - xmlFree (self->str);
! 191: + xmlFree ((xmlChar*)self->str);
! 192: #ifdef DEBUG_REFCNT
! 193: gdome_refdbg_delRef ((void *)self, GDOME_REFDBG_STR);
! 194: #endif
! 195: @@ -115,7 +115,7 @@
! 196: * Returns: the new DOMString object.
! 197: */
! 198: GdomeDOMString *
! 199: -gdome_xml_str_mkref_xml (xmlChar *str) {
! 200: +gdome_xml_str_mkref_xml (const xmlChar *str) {
! 201: GdomeDOMString *ds;
! 202:
! 203: if (str == NULL)
! 204: @@ -127,7 +127,7 @@
! 205: #endif
! 206: ds->refcnt = 1;
! 207: ds->unref = gdome_xml_str_unref_xml;
! 208: - ds->str = str;
! 209: + ds->str = (gchar*)str;
! 210: return ds;
! 211: }
! 212:
! 213: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-str.h ./libgdome/gdomecore/gdome-xml-str.h
! 214: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/gdomecore/gdome-xml-str.h Tue Aug 7 01:56:08 2001
! 215: +++ ./libgdome/gdomecore/gdome-xml-str.h Fri Apr 11 11:06:39 2003
! 216: @@ -26,7 +26,7 @@
! 217:
! 218: GdomeDOMString *gdome_xml_str_mkref (const gchar *str);
! 219: GdomeDOMString *gdome_xml_str_mkref_own (gchar *str);
! 220: -GdomeDOMString *gdome_xml_str_mkref_xml (xmlChar *str);
! 221: +GdomeDOMString *gdome_xml_str_mkref_xml (const xmlChar *str);
! 222: GdomeDOMString *gdome_xml_str_mkref_dup (const gchar *str);
! 223:
! 224: void gdome_xml_str_ref (GdomeDOMString *self);
! 225: diff -r -u C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/xpath/gdome-xpath-xpnsresolv.c ./libgdome/xpath/gdome-xpath-xpnsresolv.c
! 226: --- C:\Documents and Settings\paf\My Documents\gdome2-0.7.4/libgdome/xpath/gdome-xpath-xpnsresolv.c Fri Mar 1 06:33:47 2002
! 227: +++ ./libgdome/xpath/gdome-xpath-xpnsresolv.c Fri Apr 11 10:54:03 2003
! 228: @@ -114,7 +114,7 @@
! 229:
! 230: ns = xmlSearchNs(priv->n->doc, priv->n, prefix->str);
! 231: if (ns != NULL) {
! 232: - return gdome_str_mkref_own ((gchar *)ns->href);
! 233: + return gdome_str_mkref_xml (ns->href);
! 234: } else {
! 235: return NULL;
! 236: }
E-mail: