X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bt_message_iterator.i;h=7362bb7962d861a166689ed166759562f2788af9;hb=0530003ff4f693e0a582a0ed4a15245455398b4a;hp=7ebd783668cf662b87165b8d8db1a455e14f1c70;hpb=5fa16feb3a91ff1f590769707e3886ddb0b4494c;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/native_bt_message_iterator.i b/src/bindings/python/bt2/bt2/native_bt_message_iterator.i index 7ebd7836..7362bb79 100644 --- a/src/bindings/python/bt2/bt2/native_bt_message_iterator.i +++ b/src/bindings/python/bt2/bt2/native_bt_message_iterator.i @@ -22,8 +22,28 @@ * THE SOFTWARE. */ +/* Output argument typemap for message_iterator (always appends) */ +%typemap(in, numinputs=0) + (bt_self_component_port_input_message_iterator **) + (bt_self_component_port_input_message_iterator *temp_msg_iter = NULL) { + $1 = &temp_msg_iter; +} + +%typemap(argout) + (bt_self_component_port_input_message_iterator **) { + if (*$1) { + /* SWIG_Python_AppendOutput() steals the created object */ + $result = SWIG_Python_AppendOutput($result, + SWIG_NewPointerObj(SWIG_as_voidptr(*$1), + SWIGTYPE_p_bt_self_component_port_input_message_iterator, 0)); + } else { + /* SWIG_Python_AppendOutput() steals Py_None */ + Py_INCREF(Py_None); + $result = SWIG_Python_AppendOutput($result, Py_None); + } +} + %include -%include %include %include @@ -32,9 +52,17 @@ #include "native_bt_message_iterator.i.h" %} +bt_self_component_port_input_message_iterator_create_from_message_iterator_status +bt_bt2_self_component_port_input_message_iterator_create_from_message_iterator( + bt_self_message_iterator *self_msg_iter, + bt_self_component_port_input *input_port, + bt_self_component_port_input_message_iterator **message_iterator); +bt_self_component_port_input_message_iterator_create_from_sink_component_status +bt_bt2_self_component_port_input_message_iterator_create_from_sink_component( + bt_self_component_sink *self_comp, + bt_self_component_port_input *input_port, + bt_self_component_port_input_message_iterator **message_iterator); PyObject *bt_bt2_get_user_component_from_user_msg_iter( bt_self_message_iterator *self_message_iterator); PyObject *bt_bt2_self_component_port_input_get_msg_range( bt_self_component_port_input_message_iterator *iter); -PyObject *bt_bt2_port_output_get_msg_range( - bt_port_output_message_iterator *iter);