Add buffer

This commit is contained in:
Joey Yakimowich-Payne 2023-02-17 12:17:52 -07:00
commit 9f667f8801
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
4 changed files with 8 additions and 51 deletions

View file

@ -19,5 +19,5 @@ mkdir -p $SHAREDLIBS_DIR
swig -c++ -c -cpperraswarn -nocxx -o "${WRAPPER_DIR}/${MOD_NAME}_wrap.cxx" $WX_CONFIG $(wx-config --cxxflags all) $MOD_PATH
clang++ -c "${WRAPPER_DIR}/${MOD_NAME}_wrap.cxx" -o "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" -I$TEMPLATE_DIR -I. $WX_CONFIG $(wx-config --cxxflags all)
clang++ -shared -o "${SHAREDLIBS_DIR}/lib${MOD_NAME}.so" "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" $(wx-config --libs all)
clang++ -O2 -c "${WRAPPER_DIR}/${MOD_NAME}_wrap.cxx" -o "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" -I$TEMPLATE_DIR -I. $WX_CONFIG $(wx-config --cxxflags all)
clang++ -O2 -shared -o "${SHAREDLIBS_DIR}/lib${MOD_NAME}.so" "${OBJECTS_DIR}/${MOD_NAME}_wrap.o" $(wx-config --libs all)

View file

@ -1,53 +1,10 @@
%module buffer
%include <std_string.i>
%include <std_common.i>
%include <common.i>
%{
#include <wx/wx.h>
#include <wx/buffer.h>
%}
%define __arm64__ 1
%enddef
%define TARGET_CPU_ARM64 1
%enddef
%define __APPLE__ 1
%enddef
%define __LP64__ 1
%enddef
%define __MACH__ 1
%enddef
#define __FUNCTION__ (NULL)
#define __asm(str)
#define __attribute__(str)
/* #define WXEXPORT */
/* #define WXIMPORT */
%ignore WX_DECLARE_LIST_XO;
%ignore WX_DECLARE_LIST_2(elementtype, listname, nodename, classexp);
%ignore WX_DECLARE_LIST_3;
%ignore WX_DECLARE_LIST_4;
%ignore WXDLLIMPEXP_BASE;
%ignore _WX_LIST_HELPER_wxWindowList;
%ignore _WX_LIST_HELPER_wxPointList;
%ignore wxWindowList::Nth;
%ignore wxPointList::Nth;
%ignore wxPendingDelete;
%ignore wxCreateApp;
%ignore wxTheAppInitializer;
%extend wxCharBuffer {
wxCharBuffer(const char *str = NULL) {
return new wxCharBuffer(str);
}
}
%extend wxWCharBuffer {
wxWCharBuffer(const wchar_t *str = NULL) {
return new wxWCharBuffer(str);
}
}
%ignore wxCharBuffer::wxCharBuffer(const CharType * str);
%ignore wxWCharBuffer::wxWCharBuffer(const CharType * str);
%import "wx/setup.h"
#undef HAVE_VISIBILITY

View file

@ -2,6 +2,7 @@
%include <common.i>
%import "object.i"
%import "buffer.i"
%import "wx/setup.h"
#undef HAVE_VISIBILITY
@ -19,4 +20,3 @@
%import "wx/strconv.h"
%import "wx/strvararg.h"
%include "wx/string.h"

View file

@ -311,7 +311,7 @@ public:
wxCharTypeBuffer& operator=(const wxScopedCharTypeBuffer<T>& src)
{
MakeOwnedCopyOf(src);
this->MakeOwnedCopyOf(src);
return *this;
}
@ -365,7 +365,7 @@ public:
wxCharBuffer(const wxScopedCharTypeBufferBase& buf)
: wxCharTypeBufferBase(buf) {}
wxCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
wxCharBuffer(const wxCharBuffer::CharType *str = NULL) : wxCharTypeBufferBase(str) {}
wxCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
wxCharBuffer(const wxCStrData& cstr);
@ -382,7 +382,7 @@ public:
wxWCharBuffer(const wxScopedCharTypeBufferBase& buf)
: wxCharTypeBufferBase(buf) {}
wxWCharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
wxWCharBuffer(const wxWCharBuffer::CharType *str = NULL) : wxCharTypeBufferBase(str) {}
wxWCharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
wxWCharBuffer(const wxCStrData& cstr);