Changes needed for building with Python 2.5
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -150,8 +150,8 @@ bit depths, the behaviour is platform dependent.", "");
|
||||
|
||||
%RenameCtor(BitmapFromBits, wxBitmap(PyObject* bits, int width, int height, int depth=1 ))
|
||||
{
|
||||
char* buf;
|
||||
int length;
|
||||
char* buf;
|
||||
Py_ssize_t length;
|
||||
PyString_AsStringAndSize(bits, &buf, &length);
|
||||
return new wxBitmap(buf, width, height, depth);
|
||||
}
|
||||
|
@@ -1878,7 +1878,7 @@ wxString* wxString_in_helper(PyObject* source) {
|
||||
str = PyObject_Str(source);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}
|
||||
char* tmpPtr; int tmpSize;
|
||||
char* tmpPtr; Py_ssize_t tmpSize;
|
||||
PyString_AsStringAndSize(str, &tmpPtr, &tmpSize);
|
||||
target = new wxString(tmpPtr, tmpSize);
|
||||
|
||||
@@ -1921,7 +1921,7 @@ wxString Py2wxString(PyObject* source)
|
||||
str = PyObject_Str(source);
|
||||
if (PyErr_Occurred()) return wxEmptyString; // TODO: should we PyErr_Clear?
|
||||
}
|
||||
char* tmpPtr; int tmpSize;
|
||||
char* tmpPtr; Py_ssize_t tmpSize;
|
||||
PyString_AsStringAndSize(str, &tmpPtr, &tmpSize);
|
||||
target = wxString(tmpPtr, tmpSize);
|
||||
|
||||
|
Reference in New Issue
Block a user