aboutsummaryrefslogtreecommitdiffstats
path: root/ctracecmd.i
diff options
context:
space:
mode:
Diffstat (limited to 'ctracecmd.i')
-rw-r--r--ctracecmd.i28
1 files changed, 2 insertions, 26 deletions
diff --git a/ctracecmd.i b/ctracecmd.i
index 51e98d5..f3daad2 100644
--- a/ctracecmd.i
+++ b/ctracecmd.i
@@ -5,38 +5,14 @@
5 5
6%apply Pointer NONNULL { struct tracecmd_input *handle }; 6%apply Pointer NONNULL { struct tracecmd_input *handle };
7%apply Pointer NONNULL { struct pevent *pevent }; 7%apply Pointer NONNULL { struct pevent *pevent };
8 8%apply unsigned long long *OUTPUT {unsigned long long *}
9/* return a (rec,cpu) tuple in python */ 9%apply int *OUTPUT {int *}
10extern struct record *tracecmd_read_at(struct tracecmd_input *handle,
11 unsigned long long offset,
12 int *OUTPUT);
13 10
14 11
15%{ 12%{
16#include "trace-cmd.h" 13#include "trace-cmd.h"
17%} 14%}
18 15
19
20/* return python longs from unsigned long long functions */
21%typemap(out) unsigned long long {
22$result = PyLong_FromUnsignedLongLong((unsigned long long) $1);
23}
24
25
26%inline %{
27PyObject *pevent_read_number_field_py(struct format_field *f, void *data)
28{
29 unsigned long long val;
30 int ret;
31
32 ret = pevent_read_number_field(f, data, &val);
33 if (ret)
34 Py_RETURN_NONE;
35 else
36 return PyLong_FromUnsignedLongLong(val);
37}
38%}
39
40%ignore trace_seq_vprintf; 16%ignore trace_seq_vprintf;
41 17
42/* SWIG can't grok these, define them to nothing */ 18/* SWIG can't grok these, define them to nothing */