Ingo Karkat wrote:

> On 29-Jun-2012 16:28:48 +0200, Bram Moolenaar wrote:
> 
> > Patch 7.3.579 (after 7.3.569)
> > Problem:    Can't compile with Python 2.5.
> > Solution:   Use PyCObject when Capsules are not available.
> > Files:          src/if_py_both.h, src/if_python.c, src/if_python3.c
> 
> Thanks for the quick response, Bram. With this patch, I get a compile error,
> though: (same Ubuntu 10.04/x86 / Python 2.5.2)
> 
> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-2.0
> -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo
> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1     
> -g
> -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       -I/usr/include/python2.5
> -DPYTHON_HOME=\"/usr\" -pthread  -o objects/if_python.o if_python.c
> In file included from if_python.c:569:
> if_py_both.h: In function ‘convert_dl’:
> if_py_both.h:2438: error: ‘PyCObject’ undeclared (first use in this function)
> if_py_both.h:2438: error: (Each undeclared identifier is reported only once
> if_py_both.h:2438: error: for each function it appears in.)
> if_py_both.h:2438: error: ‘cobject’ undeclared (first use in this function)
> if_py_both.h:2448: error: expected expression before ‘)’ token
> make[1]: *** [objects/if_python.o] Error 1
> make[1]: Leaving directory `/home/inkarkat/swdev/vim/vim/src'
> make: *** [first] Error 2
> 
> I cannot find any definition of a PyCObject type on my system, just stuff 
> like this:
> 
> /usr/include/python2.5/cobject.h
> 17:PyAPI_DATA(PyTypeObject) PyCObject_Type;
> 19:#define PyCObject_Check(op) ((op)->ob_type == &PyCObject_Type)
> 21:/* Create a PyCObject from a pointer to a C object and an optional
> 23:   will be called with the first argument if and when the PyCObject is
> 27:PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtr(
> 31:/* Create a PyCObject from a pointer to a C object, a description object,
> 34:   the PyCObject is destroyed.
> 36:PyAPI_FUNC(PyObject *) PyCObject_FromVoidPtrAndDesc(
> 39:/* Retrieve a pointer to a C object from a PyCObject. */
> 40:PyAPI_FUNC(void *) PyCObject_AsVoidPtr(PyObject *);
> 42:/* Retrieve a pointer to a description object from a PyCObject. */
> 43:PyAPI_FUNC(void *) PyCObject_GetDesc(PyObject *);
> 45:/* Import a pointer to a C object from a module using a PyCObject. */
> 46:PyAPI_FUNC(void *) PyCObject_Import(char *module_name, char *cobject_name);
> 49:PyAPI_FUNC(int) PyCObject_SetVoidPtr(PyObject *self, void *cobj);

PyCObject is supposed to be a sub-type of PyObject.  What happens if you
change all PyCObject to PyObject?

-- 
hundred-and-one symptoms of being an internet addict:
80. At parties, you introduce your spouse as your "service provider."

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui