[pypy-dev] ZODB3

Amaury Forgeot d'Arc amauryfa at gmail.com
Thu Mar 22 09:33:34 CET 2012


2012/3/22 Armin Rigo <arigo at tunes.org>:
> On Wed, Mar 21, 2012 at 20:46, Amaury Forgeot d'Arc <amauryfa at gmail.com> wrote:
>> Persistent.__getstate__ uses _PyObject_GetDictPtr(), which always
>> returns NULL in cpyext.
>
> Does it make sense?  Shouldn't it be unimplemented, or raise a
> warning, or something?

The first time I encountered this function it was in SWIG generated code:
https://github.com/klickverbot/swig/blob/244c758f0d32d19856d1e69011aa79f5bf323e0b/Lib/python/pyrun.swg#L1100
which gracefully falls back to a regular PyObject_GetAttr() if the
dict pointer is not provided.

-- 
Amaury Forgeot d'Arc


More information about the pypy-dev mailing list