You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/12/10 21:52:27 UTC
cvs commit: xml-xerces/c/src/xercesc/validators/datatype ListDatatypeValidator.cpp
neilg 2003/12/10 12:52:27
Modified: c/src/xercesc/validators/datatype ListDatatypeValidator.cpp
Log:
fixes for canonical value production; memory management was not implemented correctly
Revision Changes Path
1.14 +8 -5 xml-xerces/c/src/xercesc/validators/datatype/ListDatatypeValidator.cpp
Index: ListDatatypeValidator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/datatype/ListDatatypeValidator.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ListDatatypeValidator.cpp 28 Nov 2003 18:53:07 -0000 1.13
+++ ListDatatypeValidator.cpp 10 Dec 2003 20:52:27 -0000 1.14
@@ -57,6 +57,9 @@
/*
* $Id$
* $Log$
+ * Revision 1.14 2003/12/10 20:52:27 neilg
+ * fixes for canonical value production; memory management was not implemented correctly
+ *
* Revision 1.13 2003/11/28 18:53:07 peiyongz
* Support for getCanonicalRepresentation
*
@@ -507,14 +510,14 @@
temp->checkContent(tokenVector, rawData, 0, false);
MemoryManager* toUse = memMgr? memMgr : getMemoryManager();
- int retBufSize = 2 * XMLString::stringLen(rawData);
+ unsigned int retBufSize = 2 * XMLString::stringLen(rawData);
XMLCh* retBuf = (XMLCh*) toUse->allocate(retBufSize * sizeof(XMLCh));
XMLCh* retBufPtr = retBuf;
DatatypeValidator* itemDv = this->getItemTypeDTV();
for (unsigned int i = 0; i < tokenVector->size(); i++)
{
- XMLCh* itemCanRep = (XMLCh*) itemDv->getCanonicalRepresentation(tokenVector->elementAt(i), memMgr);
+ XMLCh* itemCanRep = (XMLCh*) itemDv->getCanonicalRepresentation(tokenVector->elementAt(i), toUse);
XMLString::catString(retBufPtr, itemCanRep);
retBufPtr = retBufPtr + XMLString::stringLen(itemCanRep) + 1;
*(retBufPtr++) = chSpace;
@@ -522,7 +525,7 @@
toUse->deallocate(itemCanRep);
}
- return 0;
+ return retBuf;
}
/***
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org