diff options
author | Paul Moore <pmoore@redhat.com> | 2014-08-21 15:23:21 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-08-21 15:23:21 -0400 |
commit | 5a703f60136a2f375657446e1660904de1e39a85 (patch) | |
tree | 25c4d8c23439df2b1dcfbd824ed91fbf17e183cd /src/python | |
parent | b61f4065f76f3868a6c597f37932de2e65e4fa97 (diff) | |
download | libseccomp-5a703f60136a2f375657446e1660904de1e39a85.tar.gz |
python: add the missing 64-bit MIPS cython/python bindings
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/libseccomp.pxd | 4 | ||||
-rw-r--r-- | src/python/seccomp.pyx | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/python/libseccomp.pxd b/src/python/libseccomp.pxd index f02f342..24cbe68 100644 --- a/src/python/libseccomp.pxd +++ b/src/python/libseccomp.pxd @@ -32,7 +32,11 @@ cdef extern from "seccomp.h": SCMP_ARCH_X32 SCMP_ARCH_ARM SCMP_ARCH_MIPS + SCMP_ARCH_MIPS64 + SCMP_ARCH_MIPS64N32 SCMP_ARCH_MIPSEL + SCMP_ARCH_MIPSEL64 + SCMP_ARCH_MIPSEL64N32 cdef enum scmp_filter_attr: SCMP_FLTATR_ACT_DEFAULT diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx index 1e8da84..3721c50 100644 --- a/src/python/seccomp.pyx +++ b/src/python/seccomp.pyx @@ -140,8 +140,12 @@ cdef class Arch: X86_64 - 64-bit x86 X32 - 64-bit x86 using the x32 ABI ARM - ARM - MIPS - MIPS - MIPSEL - MIPS little endian + MIPS - MIPS O32 ABI + MIPS64 - MIPS 64-bit ABI + MIPS64N32 - MIPS N32 ABI + MIPSEL - MIPS little endian O32 ABI + MIPSEL64 - MIPS little endian 64-bit ABI + MIPSEL64N32 - MIPS little endian N32 ABI """ cdef int _token @@ -152,7 +156,11 @@ cdef class Arch: X32 = libseccomp.SCMP_ARCH_X32 ARM = libseccomp.SCMP_ARCH_ARM MIPS = libseccomp.SCMP_ARCH_MIPS + MIPS64 = libseccomp.SCMP_ARCH_MIPS64 + MIPS64N32 = libseccomp.SCMP_ARCH_MIPS64N32 MIPSEL = libseccomp.SCMP_ARCH_MIPSEL + MIPSEL64 = libseccomp.SCMP_ARCH_MIPSEL64 + MIPSEL64N32 = libseccomp.SCMP_ARCH_MIPSEL64N32 def __cinit__(self, arch=libseccomp.SCMP_ARCH_NATIVE): """ Initialize the architecture object. @@ -176,8 +184,16 @@ cdef class Arch: self._token = libseccomp.SCMP_ARCH_ARM elif arch == libseccomp.SCMP_ARCH_MIPS: self._token = libseccomp.SCMP_ARCH_MIPS + elif arch == libseccomp.SCMP_ARCH_MIPS64: + self._token = libseccomp.SCMP_ARCH_MIPS64 + elif arch == libseccomp.SCMP_ARCH_MIPS64N32: + self._token = libseccomp.SCMP_ARCH_MIPS64N32 elif arch == libseccomp.SCMP_ARCH_MIPSEL: self._token = libseccomp.SCMP_ARCH_MIPSEL + elif arch == libseccomp.SCMP_ARCH_MIPSEL64: + self._token = libseccomp.SCMP_ARCH_MIPSEL64 + elif arch == libseccomp.SCMP_ARCH_MIPSEL64N32: + self._token = libseccomp.SCMP_ARCH_MIPSEL64N32 else: self._token = 0; elif isinstance(arch, basestring): |