From c7b0c205029049c977eb6492d3d4163498e49fd6 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 6 Sep 2014 10:01:15 +0200 Subject: [PATCH] miniupnpc/miniupnpcmidule.c: fix for both python2 and python3 --- miniupnpc/miniupnpcmodule.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/miniupnpc/miniupnpcmodule.c b/miniupnpc/miniupnpcmodule.c index 057c153..ecddf7e 100644 --- a/miniupnpc/miniupnpcmodule.c +++ b/miniupnpc/miniupnpcmodule.c @@ -1,4 +1,4 @@ -/* $Id: miniupnpcmodule.c,v 1.22 2014/01/31 13:18:25 nanard Exp $*/ +/* $Id: miniupnpcmodule.c,v 1.24 2014/06/10 09:48:11 nanard Exp $*/ /* Project : miniupnp * Author : Thomas BERNARD * website : http://miniupnp.tuxfamily.org/ @@ -599,7 +599,11 @@ initminiupnpc(void) UPnPType.tp_new = PyType_GenericNew; #endif if (PyType_Ready(&UPnPType) < 0) +#if PY_MAJOR_VERSION >= 3 return 0; +#else + return; +#endif #if PY_MAJOR_VERSION >= 3 m = PyModule_Create(&moduledef);