aboutsummaryrefslogtreecommitdiff
path: root/brill_data.py
diff options
context:
space:
mode:
Diffstat (limited to 'brill_data.py')
-rw-r--r--brill_data.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/brill_data.py b/brill_data.py
index cdb5ae5..e46417c 100644
--- a/brill_data.py
+++ b/brill_data.py
@@ -52,7 +52,9 @@ class BrillData(object):
def __init__(self, **kwargs):
self._libbd = ctypes.CDLL('libbrilldata.so')
- self._bdctx = ctypes.cast(self._libbd.bd_context_alloc(), ctypes.POINTER(self._BDContext))
+ bdctx_alloc = self._libbd.bd_context_alloc
+ bdctx_alloc.restype = ctypes.POINTER(self._BDContext)
+ self._bdctx = self._libbd.bd_context_alloc()
for arg, value in kwargs.iteritems():
try:
self._bdctx.contents.__setattr__(arg, value)