From eae4ace88a9cb2c450aaa7b4b0402a8a7e97a0e5 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 13 Oct 2011 04:59:23 +0000 Subject: [PATCH] Add a holder class for integer arrays too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@69401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/wxpy_utils.sip | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/wxpy_utils.sip b/src/wxpy_utils.sip index 7f14cc81..2183a2c7 100644 --- a/src/wxpy_utils.sip +++ b/src/wxpy_utils.sip @@ -184,6 +184,19 @@ PyObject* wxPyConstructObject(void* ptr, } wxString* m_array; }; + + // And the same for integers + class wxIntArrayHolder + { + public: + wxIntArrayHolder() : m_array(NULL) {} + ~wxIntArrayHolder() { + delete [] m_array; + m_array = NULL; + } + int* m_array; + }; + %End class wxStringArrayHolder @@ -195,4 +208,15 @@ public: private: wxStringArrayHolder(const wxStringArrayHolder&); // no copies wxStringArrayHolder& operator=(wxStringArrayHolder); // no assignment +}; + +class wxIntArrayHolder +{ +public: + wxIntArrayHolder(); + ~wxIntArrayHolder(); + +private: + wxIntArrayHolder(const wxIntArrayHolder&); // no copies + wxIntArrayHolder& operator=(wxIntArrayHolder); // no assignment }; \ No newline at end of file