From: Guido van Rossum Date: Fri, 19 Jun 1992 13:57:27 +0000 (+0000) Subject: sysmodule.c: calling sys.settrace() or sys.setprofile() without X-Git-Tag: v0.9.8~282 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5dc8eb0914a6fcea604a6626af9e63120e84b527;p=thirdparty%2FPython%2Fcpython.git sysmodule.c: calling sys.settrace() or sys.setprofile() without arguments crashed in INCREF() calls which should be XINCREF() calls. timemodule.c: fix for SEQUENT port (sys/select, struct timezone) by Jaap Vermeulen xxobject.c: include modsupport.h --- diff --git a/Objects/xxobject.c b/Objects/xxobject.c index 8edf689e1863..bfe9c842889c 100644 --- a/Objects/xxobject.c +++ b/Objects/xxobject.c @@ -35,6 +35,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /* Xx objects */ #include "allobjects.h" +#include "modsupport.h" /* For getargs() etc. */ typedef struct { OB_HEAD diff --git a/Python/sysmodule.c b/Python/sysmodule.c index a12595caa8f5..3a6516ffa442 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -102,7 +102,7 @@ sys_settrace(self, args) if (args == None) args = NULL; else - INCREF(args); + XINCREF(args); XDECREF(sys_trace); sys_trace = args; INCREF(None); @@ -117,7 +117,7 @@ sys_setprofile(self, args) if (args == None) args = NULL; else - INCREF(args); + XINCREF(args); XDECREF(sys_profile); sys_profile = args; INCREF(None);