You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Stefan Slapeta <st...@slapeta.com> on 2005/01/20 18:31:24 UTC
wchar_t support for VC
Hi,
I would like to post/discuss some patches that enable wchar_t support
for VC and Intel Compiler for Windows in XercesLib:
***************
VCPPDefs.hpp:
***************
//
---------------------------------------------------------------------------
// Define our version of the XML character
//
---------------------------------------------------------------------------
#ifdef _NATIVE_WCHAR_T_DEFINED
typedef wchar_t XMLCh;
#define XERCES_NATIVE_WCHAR_T
#else
typedef unsigned short XMLCh;
#endif
*******************************
internal/XSerializeEngine.hpp
*******************************
Add this operator>> :
#ifdef XERCES_NATIVE_WCHAR_T
XSerializeEngine& operator>>(unsigned short&);
#endif
*******************************
internal/XSerializeEngine.cpp
*******************************
Add this operator>> definition:
#ifdef XERCES_NATIVE_WCHAR_T
XSerializeEngine& XSerializeEngine::operator>>(unsigned short& xch)
{
checkAndFillBuffer(sizeof(unsigned short));
xch = *(unsigned short*)fBufCur;
fBufCur += sizeof(unsigned short);
return *this;
}
#endif
br,
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org