[Python-checkins] r74139 - python/trunk/Objects/dictobject.c

Georg Brandl g.brandl at gmx.net
Tue Jul 21 18:56:03 CEST 2009


benjamin.peterson schrieb:
> Author: benjamin.peterson
> Date: Tue Jul 21 16:08:40 2009
> New Revision: 74139
> 
> Log:
> must use _PyThreadState_Current so it isn't checked for NULL #6530
> 
> Modified:
>    python/trunk/Objects/dictobject.c
> 
> Modified: python/trunk/Objects/dictobject.c
> ==============================================================================
> --- python/trunk/Objects/dictobject.c	(original)
> +++ python/trunk/Objects/dictobject.c	Tue Jul 21 16:08:40 2009
> @@ -712,10 +712,12 @@
>  		}
>  	}
>  
> -	/* We can arrive here with a NULL tstate during initialization:
> -	   try running "python -Wi" for an example related to string
> -	   interning.  Let's just hope that no exception occurs then... */
> -	tstate = PyThreadState_GET();
> +	/* We can arrive here with a NULL tstate during initialization: try
> +	   running "python -Wi" for an example related to string interning.
> +	   Let's just hope that no exception occurs then...  This must be
> +	   _PyThreadState_Current and not PyThreadState_GET() because in debug
> +	   mode, it complains if tstate is NULL. */
                 ^^
Maybe this could be "the latter" to avoid confusion?

Georg


-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-checkins mailing list