From 088d15c842d57bdfd50d942d315e8f7761331de6 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 17 Jun 2016 13:25:01 +0300 Subject: Issue #27336: Fix compilation failures --without-threads --- Python/pylifecycle.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 7187fe448a..12a5d4c8b7 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -746,9 +746,11 @@ Py_NewInterpreter(void) if (!initialized) Py_FatalError("Py_NewInterpreter: call Py_Initialize first"); +#if WITH_THREAD /* Issue #10915, #15751: The GIL API doesn't work with multiple interpreters: disable PyGILState_Check(). */ _PyGILState_check_enabled = 0; +#endif interp = PyInterpreterState_New(); if (interp == NULL) -- cgit v1.2.1 From 8a5c0e95b0a8c9109ca4395491612bf6f6856e3e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 17 Jun 2016 12:29:00 +0200 Subject: Issue #27336: Fix compilation on Windows Replace "#if WITH_THREAD" with "#ifdef WITH_THREAD". --- Python/pylifecycle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 12a5d4c8b7..72a00e671f 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -746,7 +746,7 @@ Py_NewInterpreter(void) if (!initialized) Py_FatalError("Py_NewInterpreter: call Py_Initialize first"); -#if WITH_THREAD +#ifdef WITH_THREAD /* Issue #10915, #15751: The GIL API doesn't work with multiple interpreters: disable PyGILState_Check(). */ _PyGILState_check_enabled = 0; @@ -1409,7 +1409,7 @@ exit: /* Clean up and exit */ #ifdef WITH_THREAD -#include "pythread.h" +# include "pythread.h" #endif static void (*pyexitfunc)(void) = NULL; -- cgit v1.2.1 From ca47ebf3fce4e3b9f9a29136bcfd77994e8c481e Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 3 Jul 2016 21:03:53 +0300 Subject: Issue #23034: The output of a special Python build with defined COUNT_ALLOCS, SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by default. It can be re-enabled using the "-X showalloccount" option. It now outputs to stderr instead of stdout. --- Python/pylifecycle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/pylifecycle.c') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 72a00e671f..2d2dcba016 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -626,7 +626,7 @@ Py_FinalizeEx(void) /* Debugging stuff */ #ifdef COUNT_ALLOCS - dump_counts(stdout); + dump_counts(stderr); #endif /* dump hash stats */ _PyHash_Fini(); -- cgit v1.2.1