*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
- * Version 1.1 (Build 810)
+ * Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
#ifdef __cplusplus
extern "C" {
#endif
+
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
- if (!target) {
+ if (!target) {
target = o;
- } else if (target == Py_None) {
+ } else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
- } else {
+ } else {
if (!PyList_Check(target)) {
o2 = target;
target = PyList_New(0);
PyObject* o2;
PyObject* o3;
- if (!target) {
+ if (!target) {
target = o;
- } else if (target == Py_None) {
+ } else if (target == Py_None) {
Py_DECREF(Py_None);
target = o;
- } else {
+ } else {
if (!PyTuple_Check(target)) {
o2 = target;
target = PyTuple_New(1);
PyTuple_SetItem(target, 0, o2);
}
- o3 = PyTuple_New(1);
- PyTuple_SetItem(o3, 0, o);
+ o3 = PyTuple_New(1);
+ PyTuple_SetItem(o3, 0, o);
o2 = target;
- target = PySequence_Concat(o2, o3);
- Py_DECREF(o2);
+ target = PySequence_Concat(o2, o3);
+ Py_DECREF(o2);
Py_DECREF(o3);
}
return target;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxImage",_kwnames,&_obj0,&_argo1,&_arg2))
return NULL;
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg0 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj0)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
+ _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
+#endif
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOl:__wxMemoryFSHandler_AddFile_wxBitmap",_kwnames,&_obj0,&_argo1,&_arg2))
return NULL;
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg0 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj0)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
+ _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
+#endif
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:__wxMemoryFSHandler_AddFile_Data",_kwnames,&_obj0,&_obj1))
return NULL;
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg0 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj0)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
+ _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
+#endif
}
{
_arg1 = _obj1;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg2 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+ _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg3 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj3)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3));
+ _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3));
+#endif
}
if (_argo4) {
if (_argo4 == Py_None) { _arg4 = NULL; }
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg2 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+ _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
_arg2 = (bool ) tempbool2;
{
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg2 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+ _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg2 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+ _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxMemoryFSHandler_RemoveFile",_kwnames,&_obj0))
return NULL;
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg0 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj0)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0));
+ _arg0 = new wxString(PyString_AS_STRING(_obj0), PyString_GET_SIZE(_obj0));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg2 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj2)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2));
+ _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxPy_BEGIN_ALLOW_THREADS;