Kaydet (Commit) 5dc8eb09 authored tarafından Guido van Rossum's avatar Guido van Rossum

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
üst 710e1df5
...@@ -35,6 +35,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ...@@ -35,6 +35,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Xx objects */ /* Xx objects */
#include "allobjects.h" #include "allobjects.h"
#include "modsupport.h" /* For getargs() etc. */
typedef struct { typedef struct {
OB_HEAD OB_HEAD
......
...@@ -102,7 +102,7 @@ sys_settrace(self, args) ...@@ -102,7 +102,7 @@ sys_settrace(self, args)
if (args == None) if (args == None)
args = NULL; args = NULL;
else else
INCREF(args); XINCREF(args);
XDECREF(sys_trace); XDECREF(sys_trace);
sys_trace = args; sys_trace = args;
INCREF(None); INCREF(None);
...@@ -117,7 +117,7 @@ sys_setprofile(self, args) ...@@ -117,7 +117,7 @@ sys_setprofile(self, args)
if (args == None) if (args == None)
args = NULL; args = NULL;
else else
INCREF(args); XINCREF(args);
XDECREF(sys_profile); XDECREF(sys_profile);
sys_profile = args; sys_profile = args;
INCREF(None); INCREF(None);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment