comparison Python/ceval.c @ 44893:fdd74bdeee15 2.5

Fix two crashers (borrowed_ref_[34].py from the trunk).
author Guido van Rossum <guido@python.org>
date Wed, 23 Jan 2008 20:09:39 +0000
parents d5fc6e96091f
children 60fd0886811c
comparison
equal deleted inserted replaced
44892:148c87a667c2 44893:fdd74bdeee15
2034 if (x == NULL) { 2034 if (x == NULL) {
2035 PyErr_SetString(PyExc_ImportError, 2035 PyErr_SetString(PyExc_ImportError,
2036 "__import__ not found"); 2036 "__import__ not found");
2037 break; 2037 break;
2038 } 2038 }
2039 Py_INCREF(x);
2039 v = POP(); 2040 v = POP();
2040 u = TOP(); 2041 u = TOP();
2041 if (PyInt_AsLong(u) != -1 || PyErr_Occurred()) 2042 if (PyInt_AsLong(u) != -1 || PyErr_Occurred())
2042 w = PyTuple_Pack(5, 2043 w = PyTuple_Pack(5,
2043 w, 2044 w,
2055 v); 2056 v);
2056 Py_DECREF(v); 2057 Py_DECREF(v);
2057 Py_DECREF(u); 2058 Py_DECREF(u);
2058 if (w == NULL) { 2059 if (w == NULL) {
2059 u = POP(); 2060 u = POP();
2061 Py_DECREF(x);
2060 x = NULL; 2062 x = NULL;
2061 break; 2063 break;
2062 } 2064 }
2063 READ_TIMESTAMP(intr0); 2065 READ_TIMESTAMP(intr0);
2064 x = PyEval_CallObject(x, w); 2066 v = x;
2067 x = PyEval_CallObject(v, w);
2068 Py_DECREF(v);
2065 READ_TIMESTAMP(intr1); 2069 READ_TIMESTAMP(intr1);
2066 Py_DECREF(w); 2070 Py_DECREF(w);
2067 SET_TOP(x); 2071 SET_TOP(x);
2068 if (x != NULL) continue; 2072 if (x != NULL) continue;
2069 break; 2073 break;