libbcc-py: Fix libbpf types
authorMauricio Vásquez <mauricio@kinvolk.io>
Thu, 21 May 2020 15:22:30 +0000 (10:22 -0500)
committeryonghong-song <ys114321@gmail.com>
Thu, 21 May 2020 19:34:05 +0000 (12:34 -0700)
commit7722fc55f6c8a5ec1c16ba76f10db3b709af5d36
treee5124a4ab99a9bdf89b0bd186b7d92d398ee4914
parent44e0f43eeac53648adb4734862f9b36d80853420
libbcc-py: Fix libbpf types

1ad2656a1d9c ("Add support_kfunc function to BPF object") added new functions
to libbcc-py but didn't set the restype and argstypes for those. It's causing
the `bpf_has_kernel_btf` function to return True in systems without support
for BTF, making tools like opensnoop, klockstat and any other using kfuncs
unusable in those systems.

The following Python script reproduces the problem:

```
from bcc import BPF
print(BPF.support_kfunc())
```

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>
src/python/bcc/libbcc.py