181 static PyObject*
182 BaseContext_push(BaseContext *self, PyObject *args)
183 {
184 PyObject *value = NULL;
185 struct StackLayer *new;
186
187 if (!PyArg_ParseTuple(args, "|O:push", &value))
when PyArg_ParseTuple() succeeds
taking False path
188 return NULL;
189 if (!value) {
taking False path
190 value = PyDict_New();
191 if (!value)
192 return NULL;
193 }
194 else if (!PyDict_Check(value)) {
when treating unknown struct _typeobject * from jinja/_speedups.c:194 as non-NULL
when considering range: 1 <= value <= 0x20000000
taking False path
195 PyErr_SetString(PyExc_TypeError, "dict required.");
196 return NULL;
197 }
198 else
199 Py_INCREF(value);
200 new = PyMem_Malloc(sizeof(struct StackLayer));
when PyMem_Malloc() fails
201 if (!new) {
taking True path
202 Py_DECREF(value);
when considering range: -0x8000000000000000 <= value <= -1
taking True path
203 return NULL;
204 }
205 new->dict = value;
206 new->prev = self->current;
207 self->current = new;
208 self->stacksize++;
209 Py_INCREF(value);
210 return value;
211 }
returning (PyObject*)NULL without setting an exception
found 2 similar trace(s) to this