B+tree discussions
John Arbash Meinel
john at arbash-meinel.com
Thu Aug 14 22:01:50 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> 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
> =:->
>
Even worse, it works under Cygwin, so it seems to be clearly a Win32
build/dll issue :(.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkiknT4ACgkQJdeBCYSNAAPTUACgt/W791lgt7fmXDWyXoJ5I0Nu
up8An1K22pbA/Mj3yPNgn1oe4LBNSROg
=2MfJ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list