From: Victor Stinner Date: Tue, 13 Jun 2017 08:39:30 +0000 (+0200) Subject: bpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152) X-Git-Tag: v3.6.2rc1~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=932946ca14168e556293d2508c8eebb23a56a2b2;p=python bpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152) Replace __PyCodeExtraState_Get() with __PyCodeExtraState_Get(void) to fix the following GCC warning: ./Include/pystate.h:63:1: warning: function declaration isn't a prototype [-Wstrict-prototypes] __PyCodeExtraState* __PyCodeExtraState_Get(); --- diff --git a/Include/pystate.h b/Include/pystate.h index 6ca463f7e1..1838fa4048 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -60,7 +60,7 @@ typedef struct _co_extra_state { } __PyCodeExtraState; /* This is temporary for backwards compat in 3.6 and will be removed in 3.7 */ -__PyCodeExtraState* __PyCodeExtraState_Get(); +__PyCodeExtraState* __PyCodeExtraState_Get(void); /* State unique per thread */ diff --git a/Python/pystate.c b/Python/pystate.c index 92d08c4109..65f9b7ea05 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -571,8 +571,8 @@ PyThreadState_Swap(PyThreadState *newts) return oldts; } -__PyCodeExtraState* -__PyCodeExtraState_Get() { +__PyCodeExtraState* +__PyCodeExtraState_Get(void) { PyInterpreterState* interp = PyThreadState_Get()->interp; HEAD_LOCK();