Changes to make mingw happy with the swig wrapper

git-svn-id: http://svn.osgeo.org/qgis/trunk@6242 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2006-12-11 22:32:27 +00:00
parent 40435bd0b7
commit 6e881ca591

View File

@ -1174,7 +1174,11 @@ type_error:
obj = pyobj;
if (PyCFunction_Check(obj)) {
/* here we get the method pointer for callbacks */
#ifdef WIN32
char *doc = (char *)(((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
#else
char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
#endif
c = doc ? strstr(doc, "swig_ptr: ") : 0;
if (c) {
c = SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name);
@ -2061,7 +2065,11 @@ extern "C" {
swig_type_info **types_initial) {
size_t i;
for (i = 0; methods[i].ml_name; ++i) {
#ifdef WIN32
char *c = (char *)methods[i].ml_doc;
#else
char *c = methods[i].ml_doc;
#endif
if (c && (c = strstr(c, "swig_ptr: "))) {
int j;
swig_const_info *ci = 0;