diff options
author | Darren Hart <dvhltc@us.ibm.com> | 2009-12-28 20:24:12 -0500 |
---|---|---|
committer | Darren Hart <dvhltc@us.ibm.com> | 2009-12-30 12:22:40 -0500 |
commit | c52d8d059d46dcd359b11c9137962ac0b7679d52 (patch) | |
tree | 1d62c4ce5e6432ab1a43a02e5aa2f0291597efa8 | |
parent | 55e9ea135e0d869430f4686633744ed093bd77ad (diff) |
trace-cmd: Add python wrapper for tracecmd_read_at
Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
-rw-r--r-- | ctracecmd.i | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ctracecmd.i b/ctracecmd.i index a9d3ca5..f0b0eb7 100644 --- a/ctracecmd.i +++ b/ctracecmd.i | |||
@@ -2,14 +2,23 @@ | |||
2 | %module ctracecmd | 2 | %module ctracecmd |
3 | %include typemaps.i | 3 | %include typemaps.i |
4 | 4 | ||
5 | /* return a (rec,cpu) tuple in python */ | ||
6 | extern struct record *tracecmd_read_at(struct tracecmd_input *handle, | ||
7 | unsigned long long offset, | ||
8 | int *OUTPUT); | ||
9 | |||
10 | |||
5 | %{ | 11 | %{ |
6 | #include "trace-cmd.h" | 12 | #include "trace-cmd.h" |
7 | %} | 13 | %} |
8 | 14 | ||
15 | |||
16 | /* return python longs from unsigned long long functions */ | ||
9 | %typemap(out) unsigned long long { | 17 | %typemap(out) unsigned long long { |
10 | $result = PyLong_FromUnsignedLongLong((unsigned long long) $1); | 18 | $result = PyLong_FromUnsignedLongLong((unsigned long long) $1); |
11 | } | 19 | } |
12 | 20 | ||
21 | |||
13 | %inline %{ | 22 | %inline %{ |
14 | PyObject *pevent_read_number_field_py(struct format_field *f, void *data) | 23 | PyObject *pevent_read_number_field_py(struct format_field *f, void *data) |
15 | { | 24 | { |