On Sat, Sep 25, 2010 at 9:20 AM, Tim Peters <tim.pet...@gmail.com> wrote:
[MvL]
>> I think it would be possible to have two versions of
>> _PyGC_REFS_UNTRACKED, one being, say, -5.
>> _PyGC_REFS_UNTRACKED_AND_KEEP_IT_THAT_WAY would be what you get
>> when you call PyObject_GC_UnTrack; the code to do automatic
>> tracking/untracking based on contents would use some other
>> new API (which would be non-public in 2.7.x).
>
> Looks like a promising idea!  gcmodule.c's IS_TRACKED macro would have
> to change to check both states, and likewise the debug assert in
> visit_reachable().

Given the intent is to restore the 2.6 state, perhaps it is the
"UNTRACK_ALLOW_RETRACK" optimisation that should get the new special
value? Other than that, MvL's suggestion looks like a good idea.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to