diff Objects/complexobject.c @ 43378:7630248b593c legacy-trunk

Add a bunch of GIL release/acquire points in tp_print implementations and for PyObject_Print(). Closes issue #1164.
author Brett Cannon <bcannon@gmail.com>
date Mon, 17 Sep 2007 03:28:34 +0000
parents 6620a510e9a9
children 60e6eaa378d9
line wrap: on
line diff
--- a/Objects/complexobject.c	Mon Sep 17 00:55:00 2007 +0000
+++ b/Objects/complexobject.c	Mon Sep 17 03:28:34 2007 +0000
@@ -341,7 +341,9 @@
 	char buf[100];
 	complex_to_buf(buf, sizeof(buf), v,
 		       (flags & Py_PRINT_RAW) ? PREC_STR : PREC_REPR);
+	Py_BEGIN_ALLOW_THREADS
 	fputs(buf, fp);
+	Py_END_ALLOW_THREADS
 	return 0;
 }