2 * SPDX-License-Identifier: MIT
4 * Copyright (c) 2016 Philippe Proulx <pproulx@efficios.com>
7 /* Parameter names seem to be required for multi-argument typemaps to match. */
8 %typemap(in, numinputs=0)
9 (bt_field_class_enumeration_mapping_label_array *labels, uint64_t *count)
10 (bt_field_class_enumeration_mapping_label_array temp_array, uint64_t temp_label_count = 0) {
12 $2 = &temp_label_count;
16 (bt_field_class_enumeration_mapping_label_array *labels, uint64_t *count) {
18 PyObject *py_label_list = PyList_New(*$2);
21 for (i = 0; i < *$2; i++) {
22 PyList_SET_ITEM(py_label_list, i, PyUnicode_FromString((*$1)[i]));
25 $result = SWIG_Python_AppendOutput($result, py_label_list);
28 $result = SWIG_Python_AppendOutput($result, Py_None);
32 %include <babeltrace2/trace-ir/field-class.h>