B+tree discussions
John Arbash Meinel
john at arbash-meinel.com
Thu Aug 14 21:37:12 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Andrew Bennetts wrote:
> John Arbash Meinel wrote:
> [...]
>> I wish I could get guppy to compile on win32, but it seems that win32
>> doesn't like putting pointers into static structure definitions. (I'm
>> using gcc-mingw, but it really doesn't like:
>> PyTypeObject NyBitSet_Type = {
>> ~ PyObject_HEAD_INIT(&PyType_Type)
>> };
>
> This gotcha is covered in <http://docs.python.org/ext/dnt-basics.html>:
>
> “... what we'd like to write is:
>
> PyObject_HEAD_INIT(&PyType_Type)
>
> as the type of a type object is ``type'', but this isn't strictly conforming
> C and some compilers complain.”
>
> It says you should instead use PyObject_HEAD_INIT(NULL) and rely on
> PyType_Ready(...) to fill this in later (typically called during module init).
>
> -Andrew.
>
>
So I did this to guppy, which requires it done in lots of different
places (it exposes some C structures as a PyCObject, etc.)
Anyway, after spending a while getting it to actually compile, it now
segfaults at a really weird time. Which I don't understand because I've
compiled and run the code on Linux without any problems.... :(
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkikl3gACgkQJdeBCYSNAAOA9QCbB4CnlfIwDldGdr773guZ2E87
1xkAn3nEgZnCHfLA4fwwN6iF0DizmDt+
=QD6O
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list