[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] BUG: PixelArray



Marcus von Appen wrote:
On, Sat Aug 25, 2007, Lenard Lindstrom wrote:

[lambda errors]

Which SVN version do you exactly have? It should not happen in rev
1045ff. However, did you delete your (outdated) Setup file after
the latest checkout, so it will be regenerated from Setup.in? Make sure,
Setup contains the following lines:

[...]
mask src/mask.c src/bitmask.c $(SDL) $(DEBUG)
pixelarray src/pixelarray.c $(SDL) $(DEBUG)
[...]

The error you described is a typical "module not installed and thus not
found" issue, thus I guess, your Setup is broken.


The module didn't compile. I am building for Python 2.5 using gcc 3.4.5 under MinGW. This is the error message I got:

src/pixelarray.c:176: error: initializer element is not constant
src/pixelarray.c:176: error: (near initialization for `PyPixelArray_Type.tp_getattro')

This is the location in the code:

static PyTypeObject PyPixelArray_Type =
{
   PyObject_HEAD_INIT(NULL)
....
   PyObject_GenericGetAttr,    /* tp_getattro */  <---

I have seen this before. PyObject_GenericGetAttr is an imported function, so not a constant. Such slot assignments must be done in the module's init function.

--
Lenard Lindstrom
<len-l@xxxxxxxxx>