diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-05-09 14:18:23 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-05-09 14:18:23 +0200 |
| commit | 1ef27cc47ad56a2c66aaa40e398a0063be2573d4 (patch) | |
| tree | fff365577d82274f2b05878e702238b8a575c5c8 /wrappers/python/src/__init__.py | |
| parent | fd0753c5463b4c54d09712336301e174f05e05ab (diff) | |
FSM/State: Profile correctness and connect name change
Also add a force tcp flag
Diffstat (limited to 'wrappers/python/src/__init__.py')
| -rw-r--r-- | wrappers/python/src/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wrappers/python/src/__init__.py b/wrappers/python/src/__init__.py index e417371..c028f09 100644 --- a/wrappers/python/src/__init__.py +++ b/wrappers/python/src/__init__.py @@ -33,15 +33,15 @@ class DataError(Structure): VPNStateChange = CFUNCTYPE(None, c_char_p, c_char_p, c_char_p) # Exposed functions -lib.Connect.argtypes, lib.Connect.restype = [c_char_p, c_char_p], DataError +# We have to use c_void_p instead of c_char_p to free it properly +# See https://stackoverflow.com/questions/13445568/python-ctypes-how-to-free-memory-getting-invalid-pointer-error +lib.GetConnectConfig.argtypes, lib.GetConnectConfig.restype = [c_char_p, c_char_p, c_int, c_int], DataError lib.Deregister.argtypes, lib.Deregister.restype = [c_char_p], c_void_p lib.Register.argtypes, lib.Register.restype = [c_char_p, c_char_p, VPNStateChange, c_int], c_void_p lib.GetOrganizationsList.argtypes, lib.GetOrganizationsList.restype = [c_char_p], DataError lib.GetServersList.argtypes, lib.GetServersList.restype = [c_char_p], DataError lib.CancelOAuth.argtypes, lib.CancelOAuth.restype = [c_char_p], c_void_p lib.SetProfileID.argtypes, lib.SetProfileID.restype = [c_char_p, c_char_p], c_void_p -# We have to use c_void_p instead of c_char_p to free it properly -# See https://stackoverflow.com/questions/13445568/python-ctypes-how-to-free-memory-getting-invalid-pointer-error lib.SetConnected.argtypes, lib.SetConnected.restype = [c_char_p], c_void_p lib.SetDisconnected.argtypes, lib.SetDisconnected.restype = [c_char_p], c_void_p lib.FreeString.argtypes, lib.FreeString.restype = [c_void_p], None |
