You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2004/11/01 23:21:26 UTC
cvs commit: xml-xalan/c/src/xalanc/XMLSupport FormatterToXML_UTF16.cpp
dbertoni 2004/11/01 14:21:26
Modified: c/src/xalanc/XMLSupport FormatterToXML_UTF16.cpp
Log:
Patch for Jira XALANC-438.
Revision Changes Path
1.11 +9 -3 xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp
Index: FormatterToXML_UTF16.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- FormatterToXML_UTF16.cpp 20 Apr 2004 01:19:58 -0000 1.10
+++ FormatterToXML_UTF16.cpp 1 Nov 2004 22:21:26 -0000 1.11
@@ -84,7 +84,10 @@
inline void
FormatterToXML_UTF16::flushBuffer()
{
- m_writer->write((const char*)m_buffer, 0, (m_bufferPosition - m_buffer) * sizeof m_buffer[0]);
+ m_writer->write(
+ reinterpret_cast<const char*>(m_buffer),
+ 0,
+ (m_bufferPosition - m_buffer) * sizeof m_buffer[0]);
m_bufferPosition = m_buffer;
m_bufferRemaining = kBufferSize;
@@ -97,11 +100,14 @@
const XalanDOMChar* theChars,
XalanDOMString::size_type theLength)
{
- if (theLength > sizeof(m_buffer))
+ if (theLength > XalanDOMString::size_type(kBufferSize))
{
flushBuffer();
- m_writer->write(theChars, 0, theLength);
+ m_writer->write(
+ reinterpret_cast<const char*>(theChars),
+ 0,
+ theLength * sizeof(theChars[0]));
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org