}
}
{
+#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
}
if (_argo6) {
if (_argo6 == Py_None) { _arg6 = NULL; }
}
}
{
+#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 (_argo3) {
if (_argo3 == Py_None) { _arg3 = 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(_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
}
if (_obj3)
{
}
}
{
+#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;
return NULL;
if (_obj0)
{
+#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(_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 (_obj3)
{
+#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
}
{
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
}
if (_argo3) {
if (_argo3 == Py_None) { _arg3 = NULL; }
}
if (_obj4)
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj4) && !PyUnicode_Check(_obj4)) {
+ PyErr_SetString(PyExc_TypeError, "String or Unicode type required");
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj4, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg4 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj4)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg4 = new wxString(PyString_AsString(_obj4), PyString_Size(_obj4));
+ _arg4 = new wxString(PyString_AS_STRING(_obj4), PyString_GET_SIZE(_obj4));
+#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(_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(_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(_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
}
{
wxPy_BEGIN_ALLOW_THREADS;
}
}
{
+#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
}
{
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
}
{
+#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(_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(_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 (_obj2)
{
+#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 (_obj3)
{
+#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
}
_arg4 = (bool ) tempbool4;
if (_argo5) {
}
}
{
+#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;