[Xapian-discuss] problem building python bindings

James Aylett james-xapian at tartarus.org
Tue Aug 21 17:50:07 BST 2007


On Tue, Aug 21, 2007 at 06:42:46PM +0200, Marcus Rueckert wrote:

> > Can you find what that Py type is typedef to?
> 
> object.h:typedef Py_ssize_t (*lenfunc)(PyObject *)

No, that's a typedef for lenfunc as a function pointer. C is fun like
that :)

It's actually:

pyport.h:typedef ssize_t Py_ssize_t;

which makes sense. ssize_t is __darwin_ssize_t, which is long. Which
again makes sense.

Okay, I've forgotten the context. But something it trying to cast
(int*) and (long*) to each other somehow. It should work one way, it
won't work the other. I suspect that hacking the file in question to
replace (int*) with (long*) or (Py_ssize_t*) will fix it.

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list