| 1 | /* |
| 2 | * SPDX-License-Identifier: MIT |
| 3 | * |
| 4 | * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com> |
| 5 | */ |
| 6 | |
| 7 | |
| 8 | /* Output argument typemap for clock value output (always appends) */ |
| 9 | %typemap(in, numinputs=0) |
| 10 | (const bt_clock_snapshot **) |
| 11 | (bt_clock_snapshot *temp_clock_snapshot = NULL) { |
| 12 | $1 = &temp_clock_snapshot; |
| 13 | } |
| 14 | |
| 15 | %typemap(argout) |
| 16 | (const bt_clock_snapshot **) { |
| 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 | |
| 29 | %include <babeltrace2/graph/message.h> |