2092 static PyObject *
2093 ArmSubbufferMetricBindings_bind (ArmSubbufferMetricBindings *self, PyObject *args)
2094 {
2095 int index;
2096 ArmID *metric;
2097
2098 /*
2099 * Supported calling signatures:
2100 * bind (index, id)
2101 */
2102 if (!PyArg_ParseTuple(args, "iO", &index, &metric))
when PyArg_ParseTuple() succeeds
taking False path
2103 return NULL;
2104 if ((index < ARM_METRIC_MIN_ARRAY_INDEX) || (index > ARM_METRIC_MAX_ARRAY_INDEX))
when considering range: -0x80000000 <= value <= 6
taking False path
2105 return NULL;
2106 if (!ArmID_Object_Check(metric))
when taking True path
when considering range: -0x80000000 <= value <= -1
taking False path
2107 return NULL;
2108
2109 /* Allocate the metric binding array as required */
2110 if (self->arm_buffer.metric_binding_array == NULL)
when treating unknown const struct arm_metric_binding_t * from arm4module.c:2110 as non-NULL
taking False path
2111 {
2112 self->arm_buffer.metric_binding_array = calloc (sizeof (arm_metric_binding_t), ARM_METRIC_MAX_COUNT);
2113 memset ((void *) self->arm_buffer.metric_binding_array, 0, sizeof (arm_metric_binding_t) * ARM_METRIC_MAX_COUNT);
2114 }
2115
2116 /* Copy the values */
2117 if (self->arm_buffer.count >= ARM_METRIC_MAX_ARRAY_INDEX)
when considering range: 6 <= value <= 0x7fffffff
taking True path
2118 return NULL;
2119 ((arm_metric_binding_t *) self->arm_buffer.metric_binding_array) [self->arm_buffer.count].slot = index;
2120 ((arm_metric_binding_t *) self->arm_buffer.metric_binding_array) [self->arm_buffer.count].id = metric->arm_id;
2121 self->arm_buffer.count++;
2122
2123 Py_INCREF(Py_None);
2124 return Py_None;
2125 }
returning (PyObject*)NULL without setting an exception
found 6 similar trace(s) to this