fix linking problems due to MSVC implicitly considering template classes specializations used as base classes DLL-exported even though it doesn't actually export them when building the DLL (with or without explicit declspec(dllexport)); also replace wxCharTypeBuffer::NullData with a static function to allow not DLL-exporting this class

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-10-30 23:04:29 +00:00
parent 10d256d6c8
commit 6b583d40a8
4 changed files with 55 additions and 85 deletions

View File

@@ -2096,48 +2096,3 @@ int wxString::Freq(wxUniChar ch) const
}
return count;
}
// ----------------------------------------------------------------------------
// wxUTF8StringBuffer
// ----------------------------------------------------------------------------
#if wxUSE_UNICODE_WCHAR
wxUTF8StringBuffer::~wxUTF8StringBuffer()
{
wxMBConvStrictUTF8 conv;
size_t wlen = conv.ToWChar(NULL, 0, m_buf);
wxCHECK_RET( wlen != wxCONV_FAILED, "invalid UTF-8 data in string buffer?" );
wxStringInternalBuffer wbuf(m_str, wlen);
conv.ToWChar(wbuf, wlen, m_buf);
}
wxUTF8StringBufferLength::~wxUTF8StringBufferLength()
{
wxCHECK_RET(m_lenSet, "length not set");
wxMBConvStrictUTF8 conv;
size_t wlen = conv.ToWChar(NULL, 0, m_buf, m_len);
wxCHECK_RET( wlen != wxCONV_FAILED, "invalid UTF-8 data in string buffer?" );
wxStringInternalBufferLength wbuf(m_str, wlen);
conv.ToWChar(wbuf, wlen, m_buf, m_len);
wbuf.SetLength(wlen);
}
#endif // wxUSE_UNICODE_WCHAR
// ----------------------------------------------------------------------------
// wxCharBufferType<T>
// ----------------------------------------------------------------------------
#ifndef __VMS_BROKEN_TEMPLATES
template<>
#endif
wxCharTypeBuffer<char>::Data
wxCharTypeBuffer<char>::NullData(NULL);
#ifndef __VMS_BROKEN_TEMPLATES
template<>
#endif
wxCharTypeBuffer<wchar_t>::Data
wxCharTypeBuffer<wchar_t>::NullData(NULL);