summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorPaul Moore <pmoore@redhat.com>2014-02-07 07:52:46 -0500
committerPaul Moore <pmoore@redhat.com>2014-02-07 07:52:46 -0500
commitdd673b5124b725d4ec531c482d312f7f7fd0b01a (patch)
treed9139807901606c885cd9a09a46002bc6439204c /src/python
parent2d09a74c7f04d29ae740db1e2187ff1a1886b2c3 (diff)
downloadlibseccomp-dd673b5124b725d4ec531c482d312f7f7fd0b01a.tar.gz
python: fix build problems with Cython 0.20
Resolve the following build problem with Cython 0.20; I've also tested this change on Cython 0.19.2 without problem. >>> Error compiling Cython file: ------------------------------------------------------------ ... Helper function which should only be used internally by SyscallFilter objects and exists for the sole purpose of making it easier to deal with the varadic functions of the libseccomp API, e.g. seccomp_rule_add(). """ return self._arg ^ ------------------------------------------------------------ seccomp.pyx:194:19: Cannot convert 'scmp_arg_cmp' to Python object >>> Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'src/python')
-rw-r--r--src/python/seccomp.pyx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/python/seccomp.pyx b/src/python/seccomp.pyx
index 01ea0a9..4082bad 100644
--- a/src/python/seccomp.pyx
+++ b/src/python/seccomp.pyx
@@ -182,7 +182,7 @@ cdef class Arg:
self._arg.datum_a = datum_a
self._arg.datum_b = datum_b
- def to_c(self):
+ cdef libseccomp.scmp_arg_cmp to_c(self):
""" Convert the object into a C structure.
Description:
@@ -425,6 +425,7 @@ cdef class SyscallFilter:
""" NOTE: the code below exists solely to deal with the varadic
nature of seccomp_rule_add() function and the inability of Cython
to handle this automatically """
+ cdef Arg arg
for i, arg in enumerate(args):
c_arg[i] = arg.to_c()
if len(args) == 0:
@@ -504,6 +505,7 @@ cdef class SyscallFilter:
""" NOTE: the code below exists solely to deal with the varadic
nature of seccomp_rule_add_exact() function and the inability of
Cython to handle this automatically """
+ cdef Arg arg
for i, arg in enumerate(args):
c_arg[i] = arg.to_c()
if len(args) == 0: