[pypy-dev] extregistry refactoring

Armin Rigo arigo at tunes.org
Fri Apr 21 21:16:59 CEST 2006


Hi all,

Warning: if you're using the extregistry, I just refactored its
interface.  I think the result is nicer -- you don't have to define a
bunch of functions and link them together in a register_xxx() call;
instead, all relevant functions are now methods on a class that is
linked via a class method call or automatically with a metaclass trick.

The motivation for this was a subtle annotation crash in rctypes:
indeed, in the previous model, families of built-in functions (e.g. all
ctypes function objects) would get annotated in a way that kept creating
new closures.  The annotator was then complaining about the resulting
SomeBuiltin annotation: as it stores the closure in question, it was
always different whenever a block was reflown through the annotator.

This refactoring was pending for some time, because previously some
functions were missing some information and had to hack around to get at
it.


A bientot,

Armin.



More information about the Pypy-dev mailing list