}
if (PyErr_GivenExceptionMatches(exc, py_mod_bt2_exc_stop_type)) {
- status = BT_MESSAGE_ITERATOR_STATUS_END;
+ status = BT_SELF_MESSAGE_ITERATOR_STATUS_END;
} else if (PyErr_GivenExceptionMatches(exc, py_mod_bt2_exc_try_again_type)) {
- status = BT_MESSAGE_ITERATOR_STATUS_AGAIN;
+ status = BT_SELF_MESSAGE_ITERATOR_STATUS_AGAIN;
} else {
bt2_py_loge_exception();
- status = BT_MESSAGE_ITERATOR_STATUS_ERROR;
+ status = BT_SELF_MESSAGE_ITERATOR_STATUS_ERROR;
}
end:
* (PyLong) containing the address of a BT value object (new
* reference).
*/
- *result = (void *) PyLong_AsUnsignedLongLong(py_results_addr);
+ *result = PyLong_AsVoidPtr(py_results_addr);
BT_ASSERT(!PyErr_Occurred());
BT_ASSERT(*result);
goto end;
bt_self_component *self_component,
bt_self_component_port_output *self_component_port_output)
{
- bt_self_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK;
+ bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK;
PyObject *py_comp_cls = NULL;
PyObject *py_iter_cls = NULL;
PyObject *py_iter_ptr = NULL;
bt_message_array_const msgs, uint64_t capacity,
uint64_t *count)
{
- bt_self_message_iterator_status status = BT_MESSAGE_ITERATOR_STATUS_OK;
+ bt_self_message_iterator_status status = BT_SELF_MESSAGE_ITERATOR_STATUS_OK;
PyObject *py_message_iter = bt_self_message_iterator_get_data(message_iterator);
PyObject *py_method_result = NULL;
* (PyLong) containing the address of a native message
* object (which is now ours).
*/
- msgs[0] =
- (const bt_message *) PyLong_AsUnsignedLongLong(
- py_method_result);
+ msgs[0] = PyLong_AsVoidPtr(py_method_result);
*count = 1;
/* Clear potential overflow error; should never happen */