Skip to content

Commit

Permalink
Merge pull request iovisor#453 from yadutaf/jt-endian
Browse files Browse the repository at this point in the history
expose buitin byte swap methods
  • Loading branch information
drzaeus77 committed Mar 28, 2016
2 parents af66546 + e3b3b4c commit 7963166
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/python/bcc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
ksym_names = {}
ksym_loaded = 0
_kprobe_limit = 1000
BASE_CFLAGS = [
'-D__HAVE_BUILTIN_BSWAP16__',
'-D__HAVE_BUILTIN_BSWAP32__',
'-D__HAVE_BUILTIN_BSWAP64__',
]

@atexit.register
def cleanup_kprobes():
Expand Down Expand Up @@ -140,6 +145,7 @@ def __init__(self, src_file="", hdr_file="", text=None, cb=None, debug=0, cflags
self.debug = debug
self.funcs = {}
self.tables = {}
cflags = BASE_CFLAGS + cflags
cflags_array = (ct.c_char_p * len(cflags))()
for i, s in enumerate(cflags): cflags_array[i] = s.encode("ascii")
if text:
Expand Down

0 comments on commit 7963166

Please sign in to comment.