diff options
author | Anders Broman <anders.broman@ericsson.com> | 2011-10-28 06:18:59 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2011-10-28 06:18:59 +0000 |
commit | 37db4ed4ae7a127b39657aa9c074659821c2084a (patch) | |
tree | e3317bb7169b3b5501fb326a085aeb8da87328fe /epan/wspython | |
parent | fb1736120faf6d12fa02be25ca4df0ecb5bc1d8d (diff) |
From Eliot:
Define correct ctypes parameter and return types for used functions.
Define correct ctypes parameter and return types for used functions.
Particularly on 64 bit, int default doesn't work.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6448
svn path=/trunk/; revision=39647
Diffstat (limited to 'epan/wspython')
-rwxr-xr-x | epan/wspython/wspy_libws.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/wspython/wspy_libws.py b/epan/wspython/wspy_libws.py index 6d47102b1f..3d0d9960b1 100755 --- a/epan/wspython/wspy_libws.py +++ b/epan/wspython/wspy_libws.py @@ -22,7 +22,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -from ctypes import cdll +from ctypes import cdll, c_void_p, c_int, POINTER import platform __libwireshark = None @@ -43,6 +43,12 @@ def get_libws_handle(): if not __libwireshark: libname = get_libws_libname() __libwireshark = cdll.LoadLibrary(libname) + __libwireshark.py_create_dissector_handle.restype = c_void_p + __libwireshark.py_create_dissector_handle.argtypes = [c_int] + __libwireshark.py_dissector_args.argtypes = [POINTER(c_void_p),POINTER(c_void_p),POINTER(c_void_p)] + __libwireshark.proto_tree_add_item.argtypes = [c_void_p, + c_int, c_void_p, c_int, c_int, c_int] + return __libwireshark except Exception, e: print e |