This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients bfroehle, larry, loewis, vstinner
Date 2014-01-31.19:21:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1391196098.6.0.493928444024.issue17162@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure we are looking at the same code base, I look at

http://hg.python.org/cpython/file/b56ce3410ca6/Lib/collections/__init__.py#l401

and ISTM that collections.Counter is *not* implemented in C. Also, according to

http://hg.python.org/cpython/file/b56ce3410ca6/Include/object.h#l486

I see that _PyType_LookupId is *not* in the limited API (and it really shouldn't).

In any case, _PyType_LookupId cannot replace PyType_GetSlot, since it returns a PyObject* from the namespace of the type. Many of the slots don't actually have a Python name (including tp_free, which is the OP's original use case), plus the value returned ought to be a function pointer, not a PyObject*.
History
Date User Action Args
2014-01-31 19:21:38loewissetrecipients: + loewis, vstinner, larry, bfroehle
2014-01-31 19:21:38loewissetmessageid: <1391196098.6.0.493928444024.issue17162@psf.upfronthosting.co.za>
2014-01-31 19:21:38loewislinkissue17162 messages
2014-01-31 19:21:38loewiscreate