Mercurial > cpython-lru_cache-weakref
diff Modules/_tkinter.c @ 17053:90e4064ca045 2.0
Move _tkinter.c 1.115 into release branch.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Thu, 15 Mar 2001 16:56:36 +0000 |
| parents | 52d2d36b8bf7 |
| children | c780c61b35ce d579a5d8b3fe |
line wrap: on
line diff
--- a/Modules/_tkinter.c Mon Feb 12 22:03:02 2001 +0000 +++ b/Modules/_tkinter.c Thu Mar 15 16:56:36 2001 +0000 @@ -572,13 +572,13 @@ objv = objStore; if (args == NULL) - objc = 0; + /* do nothing */; else if (!PyTuple_Check(args)) { - objc = 1; objv[0] = AsObj(args); if (objv[0] == 0) goto finally; + objc = 1; Tcl_IncrRefCount(objv[0]); } else { @@ -588,6 +588,7 @@ objv = (Tcl_Obj **)ckalloc(objc * sizeof(char *)); if (objv == NULL) { PyErr_NoMemory(); + objc = 0; goto finally; } } @@ -599,8 +600,12 @@ break; } objv[i] = AsObj(v); - if (!objv[i]) + if (!objv[i]) { + /* Reset objc, so it attempts to clear + objects only up to i. */ + objc = i; goto finally; + } Tcl_IncrRefCount(objv[i]); } }
