76 dbus_bool_t
77 dbus_py_variant_level_set(PyObject *obj, long variant_level)
78 {
79 /* key is the object's ID (= pointer) to avoid referencing it */
80 PyObject *key = PyLong_FromVoidPtr(obj);
when PyLong_FromVoidPtr() succeeds
81
82 if (!key) {
taking False path
83 return FALSE;
84 }
85
86 if (variant_level <= 0) {
when considering range: 1 <= value <= 0x7fffffffffffffff
taking False path
87 if (PyDict_GetItem (_dbus_py_variant_levels, key)) {
88 if (PyDict_DelItem (_dbus_py_variant_levels, key) < 0) {
89 Py_CLEAR(key);
90 return FALSE;
91 }
92 }
93 }
94 else {
95 PyObject *vl_obj = NATIVEINT_FROMLONG(variant_level);
when PyInt_FromLong() succeeds
PyIntObject allocated at: PyObject *vl_obj = NATIVEINT_FROMLONG(variant_level);
ob_refcnt is now refs: 1 + N where N >= 0
96 if (!vl_obj) {
taking False path
97 Py_CLEAR(key);
98 return FALSE;
99 }
100 if (PyDict_SetItem(_dbus_py_variant_levels, key, vl_obj) < 0) {
when treating unknown struct PyObject * from abstract.c:40 as non-NULL
when PyDict_SetItem() succeeds
taking False path
ob_refcnt is now refs: 1 + N where N >= 1
101 Py_CLEAR(key);
102 return FALSE;
103 }
104 }
105 Py_CLEAR(key);
taking True path
when taking True path
106 return TRUE;
107 }
ob_refcnt of '*vl_obj' is 1 too high
was expecting final ob_refcnt to be N + 0 (for some unknown N)
but final ob_refcnt is N + 1
found 3 similar trace(s) to this