A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-April/014287.html below:

[Python-Dev] Showstopper

[Python-Dev] Showstopper [Python-Dev] ShowstopperGuido van Rossum guido@digicool.com
Sun, 15 Apr 2001 20:11:05 -0500
> 	/* Allocate the result tuple first.  Believe it or not,
> 	 * this allocation could trigger a garbage collection which
> 	 * could resize the dict, which would invalidate the pointer
> 	 * (ep) into the dict calculated below, or clear the dict.
> 	 * So we have to do this first.
> 	 */
> 	res = PyTuple_New(2);
> 	if (res == NULL)
> 		return NULL;
> 	if (mp->ma_used == 0) {
> 		PyErr_SetString(PyExc_KeyError,
> 				"popitem(): dictionary is empty");
> 		Py_DECREF(res);
> 		return NULL;
> 	}

Good catch -- checked in now!

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4