#define _WX_BUFFER_H
#include "wx/chartype.h"
-#include "wx/wxcrt.h"
+#include "wx/wxcrtbase.h"
#include <stdlib.h> // malloc() and free()
-inline char *wxStrDup(const char *s) { return wxStrdupA(s); }
-#if wxUSE_WCHAR_T
- inline wchar_t *wxStrDup(const wchar_t *ws) { return wxStrdupW(ws); }
-#endif
+class WXDLLIMPEXP_BASE wxCStrData;
// ----------------------------------------------------------------------------
// Special classes for (wide) character strings: they use malloc/free instead
typedef T CharType;
wxCharTypeBuffer(const CharType *str = NULL)
- : m_str(str ? wxStrDup(str) : NULL),
+ : m_str(str ? wxStrdup(str) : NULL),
m_owned(true)
{
}
{
if ( m_owned )
free(m_str);
- m_str = str ? wxStrDup(str) : NULL;
+ m_str = str ? wxStrdup(str) : NULL;
m_owned = true;
return *this;
}
bool m_owned;
};
-class WXDLLIMPEXP_BASE wxCharBuffer : public wxCharTypeBuffer<char>
+class wxCharBuffer : public wxCharTypeBuffer<char>
{
public:
typedef wxCharTypeBuffer<char> wxCharTypeBufferBase;
};
#if wxUSE_WCHAR_T
-class WXDLLIMPEXP_BASE wxWCharBuffer : public wxCharTypeBuffer<wchar_t>
+class wxWCharBuffer : public wxCharTypeBuffer<wchar_t>
{
public:
typedef wxCharTypeBuffer<wchar_t> wxCharTypeBufferBase;