]> granicus.if.org Git - python/commitdiff
bpo-30604: Fix __PyCodeExtraState_Get() prototype (#2152)
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 13 Jun 2017 08:39:30 +0000 (10:39 +0200)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2017 08:39:30 +0000 (10:39 +0200)
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();

Include/pystate.h
Python/pystate.c

index 6ca463f7e15a8f46939848aca8ae2ecfbe5b08a7..1838fa40480713a19d305a04aa8299c431d28bac 100644 (file)
@@ -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 */
 
index 92d08c41091878579399e70f5fabe364c6cf91a2..65f9b7ea05dd79c71538dacaa6d024b6af8205e7 100644 (file)
@@ -571,8 +571,8 @@ PyThreadState_Swap(PyThreadState *newts)
     return oldts;
 }
 
-__PyCodeExtraState* 
-__PyCodeExtraState_Get() {
+__PyCodeExtraState*
+__PyCodeExtraState_Get(void) {
     PyInterpreterState* interp = PyThreadState_Get()->interp;
 
     HEAD_LOCK();