Move to kernel style SPDX license identifiers
[babeltrace.git] / src / bindings / python / bt2 / bt2 / native_bt_port.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
2e00bc76
SM
7/*
8 * Typemap for the user data attached to (and owned by) a self component port.
9 * The pointer saved as the port's user data is directly the PyObject *.
10 *
11 * As per the CPython calling convention, we need to return a new reference to
d6bb425c 12 * the returned object, which will be transferred to the caller.
2e00bc76 13 */
2e00bc76 14
d6bb425c 15%typemap(out) void * {
2e00bc76
SM
16 Py_INCREF($1);
17 $result = $1;
18}
19
43c59509 20%include <babeltrace2/graph/port.h>
d6bb425c 21%include <babeltrace2/graph/self-component-port.h>
6945df9a 22
d6bb425c
SM
23/*
24 * Clear this typemap, since it is a bit broad and could apply to something we
25 * don't want.
26 */
27%clear void *;
This page took 0.05196 seconds and 4 git commands to generate.