Peter Kese wrote:

>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.
>
This is caused by an error in the code generator.  I didn't pick it up 
immediately because it wasn't flagged as an error by gcc (it is invalid 
standard C, but valid GNU C).  The problem is fixed in CVS.

Please report any compatibility problems w.r.t. pygtk on windows at 
http://bugzilla.gnome.org/ (product=gnome-python).  If possible, I would 
like 2.0 to build out of the box on windows.

James.


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to