Move to kernel style SPDX license identifiers
[babeltrace.git] / src / bindings / python / bt2 / bt2 / native_bt_message.i
CommitLineData
6945df9a 1/*
0235b0db 2 * SPDX-License-Identifier: MIT
6945df9a
SM
3 *
4 * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
6945df9a
SM
5 */
6
9ec609ec
SM
7
8/* Output argument typemap for clock value output (always appends) */
9%typemap(in, numinputs=0)
d6bb425c 10 (const bt_clock_snapshot **)
9ec609ec
SM
11 (bt_clock_snapshot *temp_clock_snapshot = NULL) {
12 $1 = &temp_clock_snapshot;
13}
14
15%typemap(argout)
d6bb425c 16 (const bt_clock_snapshot **) {
9ec609ec
SM
17 if (*$1) {
18 /* SWIG_Python_AppendOutput() steals the created object */
19 $result = SWIG_Python_AppendOutput($result,
20 SWIG_NewPointerObj(SWIG_as_voidptr(*$1),
21 SWIGTYPE_p_bt_clock_snapshot, 0));
22 } else {
23 /* SWIG_Python_AppendOutput() steals Py_None */
24 Py_INCREF(Py_None);
25 $result = SWIG_Python_AppendOutput($result, Py_None);
26 }
27}
28
43c59509 29%include <babeltrace2/graph/message.h>
This page took 0.051201 seconds and 4 git commands to generate.