a few bug fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -245,7 +245,9 @@ PyObject* __wxSetDictionary(PyObject* /* self */, PyObject* args)
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
PyObject* wxPyConstructObject(void* ptr, const char* className) {
|
||||
PyObject* wxPyConstructObject(void* ptr,
|
||||
const char* className,
|
||||
int setThisOwn) {
|
||||
char buff[64]; // should always be big enough...
|
||||
char swigptr[64];
|
||||
|
||||
@@ -263,6 +265,10 @@ PyObject* wxPyConstructObject(void* ptr, const char* className) {
|
||||
PyObject* obj = PyInstance_New(classobj, arg, NULL);
|
||||
Py_DECREF(arg);
|
||||
|
||||
if (setThisOwn) {
|
||||
PyObject_SetAttrString(obj, "thisown", PyInt_FromLong(1));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user