Mercurial > cpython-lru_cache-weakref
comparison Python/sysmodule.c @ 901:fea3f594df77 legacy-trunk
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
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 19 Jun 1992 13:57:27 +0000 |
| parents | ba4ec13c0f9f |
| children | a1ce5a949828 |
comparison
equal
deleted
inserted
replaced
| 900:58a7438c2e7e | 901:fea3f594df77 |
|---|---|
| 100 object *args; | 100 object *args; |
| 101 { | 101 { |
| 102 if (args == None) | 102 if (args == None) |
| 103 args = NULL; | 103 args = NULL; |
| 104 else | 104 else |
| 105 INCREF(args); | 105 XINCREF(args); |
| 106 XDECREF(sys_trace); | 106 XDECREF(sys_trace); |
| 107 sys_trace = args; | 107 sys_trace = args; |
| 108 INCREF(None); | 108 INCREF(None); |
| 109 return None; | 109 return None; |
| 110 } | 110 } |
| 115 object *args; | 115 object *args; |
| 116 { | 116 { |
| 117 if (args == None) | 117 if (args == None) |
| 118 args = NULL; | 118 args = NULL; |
| 119 else | 119 else |
| 120 INCREF(args); | 120 XINCREF(args); |
| 121 XDECREF(sys_profile); | 121 XDECREF(sys_profile); |
| 122 sys_profile = args; | 122 sys_profile = args; |
| 123 INCREF(None); | 123 INCREF(None); |
| 124 return None; | 124 return None; |
| 125 } | 125 } |
