2012/3/22 Armin Rigo <ar...@tunes.org>: > On Wed, Mar 21, 2012 at 20:46, Amaury Forgeot d'Arc <amaur...@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 _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev