File: | goocanvas.override |
Function: | _wrap_goo_canvas_item_model_get_child_properties |
Error: | ob_refcnt of '*item' is 1 too high |
1087 static PyObject *
1088 _wrap_goo_canvas_item_model_get_child_properties(PyGObject *self, PyObject *args)
1089 {
1090 GObjectClass *class;
1091 GooCanvasItemModel *parent, *child;
1092 PyGObject *pychild;
1093 int i, len;
1094 gint c_pos;
1095 PyObject *tuple;
1096
1097 if ((len = PyTuple_Size(args)) < 1) {
when PyTuple_Size() returns ob_size
when considering range: 1 <= value <= 0x7fffffff
taking False path
1098 PyErr_SetString(PyExc_TypeError, "requires at least one argument");
1099 return NULL;
1100 }
1101
1102 pychild = (PyGObject*)PyTuple_GetItem(args, 0);
1103
1104 if (!pygobject_check(pychild, &PyGooCanvasItemModel_Type)) {
taking True path
when considering range: -0x80000000 <= value <= -1
taking False path
1105 PyErr_SetString(PyExc_TypeError,
1106 "first argument should be a GooCanvasItemModel");
1107 return NULL;
1108 }
1109
1110 parent = GOO_CANVAS_ITEM_MODEL(self->obj);
1111 child = GOO_CANVAS_ITEM_MODEL(pychild->obj);
1112
1113 c_pos = goo_canvas_item_model_find_child(parent, child);
1114 if (c_pos == -1) {
when considering range: -0x80000000 <= value <= -2
taking False path
1115 PyErr_SetString(PyExc_TypeError,
1116 "first argument must be a child");
1117 return NULL;
1118 }
1119
1120 tuple = PyTuple_New(len-1);
when PyTuple_New() succeeds
1121
1122 class = G_OBJECT_GET_CLASS(self->obj);
when treating unknown struct GObject * from goocanvas.override:1122 as non-NULL
1123
1124 for (i = 1; i < len; i++) {
when considering range: 2 <= value <= 0x7fffffff
taking True path
when considering value == (int)2 from goocanvas.override:1097
taking False path
1125 PyObject *py_property = PyTuple_GetItem(args, i);
1126 gchar *property_name;
1127 GParamSpec *pspec;
1128 GValue value = { 0 };
1129 PyObject *item;
1130
1131 if (!PyString_Check(py_property)) {
when considering range: 1 <= value <= 0x8000000
taking False path
1132 PyErr_SetString(PyExc_TypeError,
1133 "Expected string argument for property.");
1134 return NULL;
1135 }
1136
1137 property_name = PyString_AsString(py_property);
when PyString_AsString() succeeds
1138 pspec = goo_canvas_item_model_class_find_child_property (class, property_name);
1139
1140 if (!pspec) {
when treating unknown struct GParamSpec * from goocanvas.override:1138 as non-NULL
taking False path
1141 PyErr_Format(PyExc_TypeError,
1142 "object of type `%s' does not have child property `%s'",
1143 g_type_name(G_OBJECT_TYPE(self->obj)), property_name);
1144 return NULL;
1145 }
1146 if (!(pspec->flags & G_PARAM_READABLE)) {
when considering range: -0x80000000 <= value <= -1
taking False path
1147 PyErr_Format(PyExc_TypeError, "property %s is not readable",
1148 property_name);
1149 return NULL;
1150 }
1151 g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
when treating unknown struct GTypeInstance * from goocanvas.override:1151 as non-NULL
1152 GooCanvasItemModelIface *iface;
1153
1154 iface = g_type_interface_peek (class, GOO_TYPE_CANVAS_ITEM_MODEL);
1155 iface->get_child_property ((GooCanvasItemModel*) parent,
when treating unknown void * from goocanvas.override:1154 as non-NULL
calling unknown void (*) (struct GooCanvasItemModel *, struct GooCanvasItemModel *, guint, struct GValue *, struct GParamSpec *) from goocanvas.override:1155
1156 (GooCanvasItemModel*) child,
1157 pspec->param_id, &value, pspec);
1158
1159 item = pyg_value_as_pyobject(&value, TRUE);
when treating unknown struct _PyGObject_Functions * from /usr/include/pygtk-2.0/pygobject.h:207 as non-NULL
when call succeeds
new ref from call through function pointer allocated at: item = pyg_value_as_pyobject(&value, TRUE);
ob_refcnt is now refs: 1 + N where N >= 0
1160 PyTuple_SetItem(tuple, i-1, item);
when considering value == (int)0 from goocanvas.override:1120
when PyTuple_SetItem() fails (index out of range)
1161
1162 g_value_unset(&value);
1163 }
1164
1165 return tuple;
1166 }
ob_refcnt of '*item' 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 1 similar trace(s) to this
File: | goocanvas.override |
Function: | _wrap_goo_canvas_item_model_get_child_properties |
Error: | ob_refcnt of '*tuple' is 1 too high |
1087 static PyObject *
1088 _wrap_goo_canvas_item_model_get_child_properties(PyGObject *self, PyObject *args)
1089 {
1090 GObjectClass *class;
1091 GooCanvasItemModel *parent, *child;
1092 PyGObject *pychild;
1093 int i, len;
1094 gint c_pos;
1095 PyObject *tuple;
1096
1097 if ((len = PyTuple_Size(args)) < 1) {
when PyTuple_Size() returns ob_size
when considering range: 1 <= value <= 0x7fffffff
taking False path
1098 PyErr_SetString(PyExc_TypeError, "requires at least one argument");
1099 return NULL;
1100 }
1101
1102 pychild = (PyGObject*)PyTuple_GetItem(args, 0);
1103
1104 if (!pygobject_check(pychild, &PyGooCanvasItemModel_Type)) {
taking True path
when considering range: -0x80000000 <= value <= -1
taking False path
1105 PyErr_SetString(PyExc_TypeError,
1106 "first argument should be a GooCanvasItemModel");
1107 return NULL;
1108 }
1109
1110 parent = GOO_CANVAS_ITEM_MODEL(self->obj);
1111 child = GOO_CANVAS_ITEM_MODEL(pychild->obj);
1112
1113 c_pos = goo_canvas_item_model_find_child(parent, child);
1114 if (c_pos == -1) {
when considering range: -0x80000000 <= value <= -2
taking False path
1115 PyErr_SetString(PyExc_TypeError,
1116 "first argument must be a child");
1117 return NULL;
1118 }
1119
1120 tuple = PyTuple_New(len-1);
when PyTuple_New() succeeds
PyTupleObject allocated at: tuple = PyTuple_New(len-1);
ob_refcnt is now refs: 1 + N where N >= 0
1121
1122 class = G_OBJECT_GET_CLASS(self->obj);
when treating unknown struct GObject * from goocanvas.override:1122 as non-NULL
1123
1124 for (i = 1; i < len; i++) {
when considering range: 2 <= value <= 0x7fffffff
taking True path
1125 PyObject *py_property = PyTuple_GetItem(args, i);
1126 gchar *property_name;
1127 GParamSpec *pspec;
1128 GValue value = { 0 };
1129 PyObject *item;
1130
1131 if (!PyString_Check(py_property)) {
when considering range: 1 <= value <= 0x8000000
taking False path
1132 PyErr_SetString(PyExc_TypeError,
1133 "Expected string argument for property.");
1134 return NULL;
1135 }
1136
1137 property_name = PyString_AsString(py_property);
when PyString_AsString() succeeds
1138 pspec = goo_canvas_item_model_class_find_child_property (class, property_name);
1139
1140 if (!pspec) {
when treating unknown struct GParamSpec * from goocanvas.override:1138 as non-NULL
taking False path
1141 PyErr_Format(PyExc_TypeError,
1142 "object of type `%s' does not have child property `%s'",
1143 g_type_name(G_OBJECT_TYPE(self->obj)), property_name);
1144 return NULL;
1145 }
1146 if (!(pspec->flags & G_PARAM_READABLE)) {
when considering value == (int)0 from goocanvas.override:1146
taking True path
1147 PyErr_Format(PyExc_TypeError, "property %s is not readable",
PyErr_Format()
1148 property_name);
1149 return NULL;
1150 }
1151 g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec));
1152 GooCanvasItemModelIface *iface;
1153
1154 iface = g_type_interface_peek (class, GOO_TYPE_CANVAS_ITEM_MODEL);
1155 iface->get_child_property ((GooCanvasItemModel*) parent,
1156 (GooCanvasItemModel*) child,
1157 pspec->param_id, &value, pspec);
1158
1159 item = pyg_value_as_pyobject(&value, TRUE);
1160 PyTuple_SetItem(tuple, i-1, item);
1161
1162 g_value_unset(&value);
1163 }
1164
1165 return tuple;
1166 }
ob_refcnt of '*tuple' 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 2 similar trace(s) to this