diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2009-02-03 21:32:44 +0000 |
---|---|---|
committer | Rob Taylor <rob.taylor@codethink.co.uk> | 2009-02-03 21:32:44 +0000 |
commit | 7922621dc261b45570b45468066669253cb26760 (patch) | |
tree | cbda474702f2fc6379bf6acbdafc31d805227d19 /python | |
parent | c7cb2cd35bf772c7ab8ba8ceea350aad8bd9cc8f (diff) |
Calling context_provider_init works in python ctypes binding now!
Diffstat (limited to 'python')
-rw-r--r-- | python/ContextProvider.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/ContextProvider.py b/python/ContextProvider.py index 4048fc16..fdea7995 100644 --- a/python/ContextProvider.py +++ b/python/ContextProvider.py @@ -1,3 +1,5 @@ +import gobject + from ctypes import * from CTypesHelpers import * @@ -16,8 +18,8 @@ class ContextProvider: def define_types(self): self.dll = CDLL("libcontextprovider.so") self.STRING_ARRAY = POINTER(c_char_p) - self.GET_CALLBACK = CFUNCTYPE(STRING_SET, CHANGE_SET, c_void_p) - self.SUBSCRIBE_CALLBACK = CFUNCTYPE(STRING_SET, c_void_p) + self.GET_CALLBACK = POINTER(CFUNCTYPE(STRING_SET, CHANGE_SET, c_void_p)) + self.SUBSCRIBE_CALLBACK = POINTER(CFUNCTYPE(STRING_SET, c_void_p)) def define_functions(self): self.init = cfunc('context_provider_init', self.dll, None, @@ -38,3 +40,4 @@ class ContextProvider: if __name__ == "__main__": cp = ContextProvider() + cp.init(["foo.bar", "foo.baz"], 1, None, None, None, None, None, None) |