> Below there is a quick fix:
>
> diff -r 3adaf1ef25b9 Cython/Compiler/TypeSlots.py
> --- a/Cython/Compiler/TypeSlots.py Tue Apr 27 21:36:49 2010 +0200
> +++ b/Cython/Compiler/TypeSlots.py Tue Apr 27 20:14:34 2010 -0300
> @@ -637,7 +637,7 @@
> EmptySlot("tp_print"), #MethodSlot(printfunc, "tp_print", "__print__"),
> EmptySlot("tp_getattr"),
> EmptySlot("tp_setattr"),
> - MethodSlot(cmpfunc, "tp_compare", "__cmp__"),
> + MethodSlot(cmpfunc, "tp_compare", "__cmp__", py3k = '<RESERVED>'),
> MethodSlot(reprfunc, "tp_repr", "__repr__"),
>
> SuiteSlot(PyNumberMethods, "PyNumberMethods", "tp_as_number"),
>
> BTW, Should I push this?
Well, fixes it for me at least.
> We could try to synthesize __richcmp__ from __cmp__, but perhaps I'm
> missing something.
>
> In the mean time, I recommend you to move to use __richcmp__
Yeah, I was going to do that anyway; but it‘s still a bug ;)
> The handling of public/api is something in my radar, but I'm not sure
> what to do. Discussing here have not been helpful. BTW, the PyAPI_***
> macros also have issues, as they depend on Py_ENABLE_SHARED. We should
> find a solution that work as expected even in the case of a Python
> build with static libraries (BTW, this is the default for official
> Python tarballs).
But it would be a fix until that gets taken care of, would it not? It
doesn‘t happen for my code anymore, I‘m now using the *_api.h headers
since I realized the relevant code is not in fact in the same module,
but still ...
I think I even spotted that discussion, or a part of it, when going
through the archives looking for information on 'public' and 'api'. I‘m
not really into all this shared library stuff, though what the 'api'
keyword does is probably *immensely* more useful for cross-module stuff;
shared-linking to Python modules doesn‘t seem like a good idea.
Oh, and by the way, amazing project you have going here. Writing Python
extension modules (for whatever reason) has never been more fun.
Not that I‘ve written any without Cython.
Regards,
Felix
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev