646 static PyObject *
647 DBusPythonLong_tp_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs)
648 {
649 PyObject *self;
650 long variantness = 0;
651 static char *argnames[] = {"variant_level", NULL};
652
653 if (PyTuple_Size(args) > 1) {
when PyTuple_Size() returns ob_size
when considering range: -0x8000000000000000 <= value <= 1
taking False path
654 PyErr_SetString(PyExc_TypeError,
655 "__new__ takes at most one positional parameter");
656 return NULL;
657 }
658 if (!PyArg_ParseTupleAndKeywords(dbus_py_empty_tuple, kwargs,
when PyArg_ParseTupleAndKeywords() succeeds
taking False path
659 "|l:__new__", argnames,
660 &variantness)) return NULL;
661 if (variantness < 0) {
when considering range: 0 <= value <= 0x7fffffffffffffff
taking False path
662 PyErr_SetString(PyExc_ValueError,
663 "variant_level must be non-negative");
664 return NULL;
665 }
666
667 self = (PyLong_Type.tp_new)(cls, args, NULL);
when call succeeds
668 if (self) {
taking True path
669 if (!dbus_py_variant_level_set(self, variantness)) {
when considering value == (dbus_bool_t)0 from abstract.c:669
taking True path
670 Py_CLEAR(self);
taking True path
when taking True path
671 return NULL;
672 }
673 }
674 return self;
675 }
returning (PyObject*)NULL without setting an exception
found 1 similar trace(s) to this