andyh 00/02/03 21:46:32
Modified: c/src/dom DOMStringImpl.hpp DOM_DOMException.hpp
c/tests/DOM/DOMTest DTest.cpp
Log:
Change offsets and lengths form signed to unsigned
Revision Changes Path
1.4 +10 -4 xml-xerces/c/src/dom/DOMStringImpl.hpp
Index: DOMStringImpl.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/dom/DOMStringImpl.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DOMStringImpl.hpp 2000/01/29 00:39:08 1.3
+++ DOMStringImpl.hpp 2000/02/04 05:46:31 1.4
@@ -59,6 +59,9 @@
/**
* $Log: DOMStringImpl.hpp,v $
+ * Revision 1.4 2000/02/04 05:46:31 andyh
+ * Change offsets and lengths form signed to unsigned
+ *
* Revision 1.3 2000/01/29 00:39:08 andyh
* Redo synchronization in DOMStringHandle allocator. There
* was a bug in the use of Compare and Swap. Switched to mutexes.
@@ -92,11 +95,11 @@
class DOMStringData
{
public:
- int fBufferLength;
+ unsigned int fBufferLength;
int fRefCount;
XMLCh fData[1];
- static DOMStringData *allocateBuffer(int length);
+ static DOMStringData *allocateBuffer(unsigned int length);
inline void addRef();
inline void removeRef();
};
@@ -104,7 +107,7 @@
class DOMStringHandle
{
public:
- int fLength;
+ unsigned int fLength;
int fRefCount;
DOMStringData *fDSData;
@@ -113,7 +116,7 @@
private:
static void *freeListPtr;
public:
- static DOMStringHandle *createNewStringHandle(int bufLength);
+ static DOMStringHandle *createNewStringHandle(unsigned int bufLength);
DOMStringHandle *cloneStringHandle();
inline void addRef();
inline void removeRef();
1.3 +8 -5 xml-xerces/c/src/dom/DOM_DOMException.hpp
Index: DOM_DOMException.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/dom/DOM_DOMException.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DOM_DOMException.hpp 2000/01/05 01:16:06 1.2
+++ DOM_DOMException.hpp 2000/02/04 05:46:31 1.3
@@ -56,6 +56,9 @@
/**
* $Log: DOM_DOMException.hpp,v $
+ * Revision 1.3 2000/02/04 05:46:31 andyh
+ * Change offsets and lengths form signed to unsigned
+ *
* Revision 1.2 2000/01/05 01:16:06 andyh
* DOM Level 2 core, namespace support added.
*
@@ -104,11 +107,11 @@
NOT_FOUND_ERR = 8,
NOT_SUPPORTED_ERR = 9,
INUSE_ATTRIBUTE_ERR = 10,
- INVALID_STATE_ERR = 11,
- SYNTAX_ERR = 12,
- INVALID_MODIFICATION_ERR = 13,
- NAMESPACE_ERR = 14,
- INVALID_ACCESS_ERR = 15
+ INVALID_STATE_ERR = 11,
+ SYNTAX_ERR = 12,
+ INVALID_MODIFICATION_ERR = 13,
+ NAMESPACE_ERR = 14,
+ INVALID_ACCESS_ERR = 15
};
public:
/** @name Constructors and assignment operator */
1.6 +10 -2 xml-xerces/c/tests/DOM/DOMTest/DTest.cpp
Index: DTest.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/DOM/DOMTest/DTest.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DTest.cpp 2000/02/04 01:50:13 1.5
+++ DTest.cpp 2000/02/04 05:46:31 1.6
@@ -56,6 +56,9 @@
/**
* $Log: DTest.cpp,v $
+ * Revision 1.6 2000/02/04 05:46:31 andyh
+ * Change offsets and lengths form signed to unsigned
+ *
* Revision 1.5 2000/02/04 01:50:13 aruna1
* TreeWalker and NodeIterator changes
*
@@ -93,6 +96,9 @@
/**
* $Log: DTest.cpp,v $
+ * Revision 1.6 2000/02/04 05:46:31 andyh
+ * Change offsets and lengths form signed to unsigned
+ *
* Revision 1.5 2000/02/04 01:50:13 aruna1
* TreeWalker and NodeIterator changes
*
@@ -917,7 +923,9 @@
//!! Throws INDEX_SIZE_ERR ********************
EXCEPTIONSTEST(charData.deleteData(-1, 5), DOM_DOMException::INDEX_SIZE_ERR, OK, 101
);
- EXCEPTIONSTEST(charData.deleteData(2, -1), DOM_DOMException::INDEX_SIZE_ERR, OK, 102
);
+ // Test 102 is not an error because the -1 parameter is an unsigned value, and counts
+ // that exceed the length of the string are allowed.
+// EXCEPTIONSTEST(charData.deleteData(2, -1), DOM_DOMException::INDEX_SIZE_ERR, OK,
102 );
EXCEPTIONSTEST(charData.deleteData(100, 5), DOM_DOMException::INDEX_SIZE_ERR, OK,103
);
EXCEPTIONSTEST(charData.insertData(-1, "Stuff inserted"), DOM_DOMException::INDEX_SIZE_ERR,
OK, 104 );
@@ -953,7 +961,7 @@
-/**
+/**
* This method tests ChildNodeList methods for the XML DOM implementation
* version 2.0 10/12/98
* @param document org.w3c.dom.DOM_Document
|