You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2005/12/03 17:44:41 UTC
svn commit: r351988 - in /xerces/xerces-p/trunk: Xerces-extra.pm Xerces.cpp
Xerces.pm
Author: jasons
Date: Sat Dec 3 08:44:30 2005
New Revision: 351988
URL: http://svn.apache.org/viewcvs?rev=351988&view=rev
Log:
updated
Modified:
xerces/xerces-p/trunk/Xerces-extra.pm
xerces/xerces-p/trunk/Xerces.cpp
xerces/xerces-p/trunk/Xerces.pm
Modified: xerces/xerces-p/trunk/Xerces-extra.pm
URL: http://svn.apache.org/viewcvs/xerces/xerces-p/trunk/Xerces-extra.pm?rev=351988&r1=351987&r2=351988&view=diff
==============================================================================
--- xerces/xerces-p/trunk/Xerces-extra.pm (original)
+++ xerces/xerces-p/trunk/Xerces-extra.pm Sat Dec 3 08:44:30 2005
@@ -4,7 +4,7 @@
use Carp;
use vars qw(@EXPORT_OK $VERSION %REMEMBER);
@EXPORT_OK = qw(error);
-$VERSION = 260.1;
+$VERSION = 260.2;
#
# Cleanup removes all objects being remembered by an object
Modified: xerces/xerces-p/trunk/Xerces.cpp
URL: http://svn.apache.org/viewcvs/xerces/xerces-p/trunk/Xerces.cpp?rev=351988&r1=351987&r2=351988&view=diff
==============================================================================
--- xerces/xerces-p/trunk/Xerces.cpp (original)
+++ xerces/xerces-p/trunk/Xerces.cpp Sat Dec 3 08:44:30 2005
@@ -1436,13 +1436,17 @@
XMLString2Perl(const XMLCh* input) {
SV *output;
unsigned int charsEaten = 0;
- int length = XMLString::stringLen(input); // string length
- XMLByte* res = new XMLByte[length * UTF8_MAXLEN]; // output string
+ int length = XMLString::stringLen(input); // string length
+ // use +1 to make room for the '\0' at the end of the string
+ // in the pathological case when each character of the string
+ // is UTF8_MAXLEN bytes long
+ XMLByte* res = new XMLByte[(length * UTF8_MAXLEN) + 1]; // output string
+
unsigned int total_chars =
UTF8_TRANSCODER->transcodeTo((const XMLCh*) input,
(unsigned int) length,
(XMLByte*) res,
- (unsigned int) (length*UTF8_MAXLEN)+1,
+ (unsigned int) (length*UTF8_MAXLEN),
charsEaten,
XMLTranscoder::UnRep_Throw
);
@@ -1622,25 +1626,25 @@
void
makeXMLException(const XMLException& e){
SV *error = ERRSV;
- SWIG_MakePtr(error, (void *) copyXMLException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__XMLException, SWIG_SHADOW|SWIG_OWNER);
+ SWIG_MakePtr(error, (void *) copyXMLException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__XMLException, SWIG_SHADOW|0);
}
void
makeDOMException(const DOMException& e){
SV *error = ERRSV;
- SWIG_MakePtr(error, (void *) new DOMException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_SHADOW|SWIG_OWNER);
+ SWIG_MakePtr(error, (void *) new DOMException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__DOMException, SWIG_SHADOW|0);
}
void
makeSAXNotRecognizedException(const SAXNotRecognizedException& e){
SV *error = ERRSV;
- SWIG_MakePtr(error, (void *) new SAXNotRecognizedException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__SAXNotRecognizedException, SWIG_SHADOW|SWIG_OWNER);
+ SWIG_MakePtr(error, (void *) new SAXNotRecognizedException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__SAXNotRecognizedException, SWIG_SHADOW|0);
}
void
makeSAXNotSupportedException(const SAXNotSupportedException& e){
SV *error = ERRSV;
- SWIG_MakePtr(error, (void *) new SAXNotSupportedException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__SAXNotSupportedException, SWIG_SHADOW|SWIG_OWNER);
+ SWIG_MakePtr(error, (void *) new SAXNotSupportedException(e), SWIGTYPE_p_XERCES_CPP_NAMESPACE__SAXNotSupportedException, SWIG_SHADOW|0);
}
Modified: xerces/xerces-p/trunk/Xerces.pm
URL: http://svn.apache.org/viewcvs/xerces/xerces-p/trunk/Xerces.pm?rev=351988&r1=351987&r2=351988&view=diff
==============================================================================
--- xerces/xerces-p/trunk/Xerces.pm (original)
+++ xerces/xerces-p/trunk/Xerces.pm Sat Dec 3 08:44:30 2005
@@ -29,7 +29,7 @@
use Carp;
use vars qw(@EXPORT_OK $VERSION %REMEMBER);
@EXPORT_OK = qw(error);
-$VERSION = 260.1;
+$VERSION = 260.2;
#
# Cleanup removes all objects being remembered by an object
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org