Hi all!
I am porting pygtk to windows and have made quite some progress in
one afternoon. There is however something that MS Visual C won't
compile and even I don't know what that *thing* was supposed to be.
Can anyone explain the code and help me make it compilable.
Here it is (an excerpt from gtk.c)...
-----------------------------------------------
static PyObject *
_wrap_gtk_selection_data_getattr(PyObject *self, char *attr)
{
if (!strcmp(attr, "__members__"))
return Py_BuildValue("[sssss]", "selection", "target", "type",
"format", "data");
...
...
if (!strcmp(attr, "data")) {
static PyObject *
_wrap_gtk_selection_data__get_data(PyGObject *self, void
*closure)
{
if (pyg_boxed_get(self, GtkSelectionData)->length >= 0) {
return PyString_FromStringAndSize(
pyg_boxed_get(self,
GtkSelectionData)->data,
pyg_boxed_get(self,
GtkSelectionData)->length);
} else {
Py_INCREF(Py_None);
return Py_None;
}
}
}
return Py_FindMethod(_PyGtkSelectionData_methods, self, attr);
}
------------------------------------------------------
The compiler stops at line
_wrap_gtk_selection_data__get_data(PyGObject *self, void
*closure)
and says there should be a ';' before the next opening brace.
To me it seems, there is a whole function being embedded into a block
of code instead of just a call to that function.
Thanks,
Peter
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/