On Wed, Mar 14, 2007 at 09:44:17PM +0100, Duncan Webb wrote:
> hagit guy wrote:
> > The problem is this:
> > src/image.c:52: error: readbufferproc undeclared here (not in a function)
> > src/image.c:52: error: expected } before
> > Image_PyObject_Buffer__get_read_buffer
> > failed to build imlib2
> Which version of Python are you using?
This is a problem with the current svn version of kaa. In r2558
those *bufferproc casts were introduced, which are only present
in python 2.5 and above (see PEP 353).
Either (partially) revert r2558 or add typedefs for backward
compatibility. I've attached a small patch that does this
(yes, I know, it's ugly...)
so long,
Hias
Index: imlib2/src/imlib2.h
===================================================================
--- imlib2/src/imlib2.h (revision 2559)
+++ imlib2/src/imlib2.h (working copy)
@@ -30,8 +30,21 @@
* ----------------------------------------------------------------------------
*/
-#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+#if PY_VERSION_HEX < 0x02050000
+/* use int based index for python 2.4 and below */
+
typedef int Py_ssize_t;
+typedef getreadbufferproc readbufferproc;
+typedef getwritebufferproc writebufferproc;
+typedef getsegcountproc segcountproc;
+typedef getcharbufferproc charbufferproc;
+
+#ifndef PY_SSIZE_T_MAX
#define PY_SSIZE_T_MAX INT_MAX
+#endif
+
+#ifndef PY_SSIZE_T_MIN
#define PY_SSIZE_T_MIN INT_MIN
#endif
+
+#endif
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel