Skip to content
Snippets Groups Projects
Commit b1d02864 authored by Jason Edward Stewart's avatar Jason Edward Stewart
Browse files

64 bit compile issues: unsigned int -> XMLSize_t

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@636526 13f79535-47bb-0310-9956-ffa450edef68
parent 832e5906
No related branches found
No related tags found
No related merge requests found
...@@ -69,18 +69,18 @@ Transcoder::XMLString2Local(const XMLCh* input) { ...@@ -69,18 +69,18 @@ Transcoder::XMLString2Local(const XMLCh* input) {
} }
SV *output; SV *output;
unsigned int charsEaten = 0; XMLSize_t charsEaten = 0;
int length = XMLString::stringLen(input); // string length int length = XMLString::stringLen(input); // string length
// use +1 to make room for the '\0' at the end of the string // use +1 to make room for the '\0' at the end of the string
// in the pathological case when each character of the string // in the pathological case when each character of the string
// is UTF8_MAXLEN bytes long // is UTF8_MAXLEN bytes long
XMLByte* res = new XMLByte[(length * UTF8_MAXLEN) + 1]; // output string XMLByte* res = new XMLByte[(length * UTF8_MAXLEN) + 1]; // output string
unsigned int total_chars = XMLSize_t total_chars =
UTF8_TRANSCODER->transcodeTo((const XMLCh*) input, UTF8_TRANSCODER->transcodeTo((const XMLCh*) input,
(unsigned int) length, (XMLSize_t) length,
(XMLByte*) res, (XMLByte*) res,
(unsigned int) (length*UTF8_MAXLEN), (XMLSize_t) (length*UTF8_MAXLEN),
charsEaten, charsEaten,
XMLTranscoder::UnRep_Throw XMLTranscoder::UnRep_Throw
); );
...@@ -126,14 +126,14 @@ Transcoder::Local2XMLString(SV* input){ ...@@ -126,14 +126,14 @@ Transcoder::Local2XMLString(SV* input){
#endif #endif
if (SvUTF8(input)) { if (SvUTF8(input)) {
unsigned int charsEaten = 0; XMLSize_t charsEaten = 0;
unsigned char* sizes = new unsigned char[length+1]; unsigned char* sizes = new unsigned char[length+1];
output = new XMLCh[length+1]; output = new XMLCh[length+1];
unsigned int chars_stored = XMLSize_t chars_stored =
UTF8_TRANSCODER->transcodeFrom((const XMLByte*) ptr, UTF8_TRANSCODER->transcodeFrom((const XMLByte*) ptr,
(unsigned int) length, (XMLSize_t) length,
(XMLCh*) output, (XMLCh*) output,
(unsigned int) length, (XMLSize_t) length,
charsEaten, charsEaten,
(unsigned char*)sizes (unsigned char*)sizes
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment