Added allocation constructor (makes it easy to convert right into a buffer
authorOve Kaaven <ovek@arcticnet.no>
Mon, 12 Apr 1999 20:10:56 +0000 (20:10 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Mon, 12 Apr 1999 20:10:56 +0000 (20:10 +0000)
commitf93d01be83e490fb20cce50a76821a3aac2cffba
treea709da82a4eeb5392c8cf7f3ad6e347310ee9a7a
parent9e55588fe3053b5ce068935a9a17846f3add7462
Added allocation constructor (makes it easy to convert right into a buffer
allocated to size by this class), copy constructor (egcs does not like
const wxCharBuffer& mb_str() { return wxCharBuffer(...); }, so it HAS to be
copiable), and assignment constructor (so it can be stored to a variable
for efficiency, instead of being converted every time the string is needed).

(The copy and assignment operator wipes the source, so the buffer is
essentially passed on to the new instance without being freed by the old.)

wcsdup() is not declared in glibc by default, so use malloc() instead.
Added some 'convenience' macros.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2107 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/buffer.h