[Python-Dev] Optimization of the Year
Hye-Shik Chang
perky at i18n.org
Tue Feb 10 12:54:24 EST 2004
On Tue, Feb 10, 2004 at 06:25:18PM +0100, Anders J. Munch wrote:
> From: "Guido van Rossum" <guido at python.org>
> >
> > If in 3rd party code, that code is simply wrong.
> >
> > If indeed such 3rd party code exists, and we expect we can't get it
> > all fixed before 2.4 is released, the tracked_item hack can be used as
> > a temporary measure to hunt down all those 3rd party extensions that
> > break the abstraction. I propose to issue a warning when it is
> > discovered that ob_item != tracked_item. Then in 2.5 we can remove
> > the tracked_item feature.
>
> There is a simpler way to make sure all clients that illicitly use
> ob_item are updated appropriately: Break the build by renaming. If
> ob_item is renamed to ob_items or ob_item2 or whatever, any code that
> uses the old name will cease to compile.
>
Something like this?
typedef struct {
PyObject_VAR_HEAD
#ifdef Py_BUILD_CORE
PyObject **ob_item;
#else
PyObject **__ob_item;
#endif
};
Hye-Shik
More information about the Python-Dev
mailing list