Package: rhash / 1.2.9-8+deb7u1

02_python_function_prototypes.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: Add librhash function prototypes
 The patch fixes crash on ia64 arch, caused by incorrect arguments marshalling.

Author: Aleksey Kravchenko <rhash.admin@gmail.com>
Origin: other
Forwarded: sent-to-upstream
Last-Update: 2012-05-09

--- rhash-1.2.9.orig/bindings/python/rhash.py
+++ rhash-1.2.9/bindings/python/rhash.py
@@ -82,6 +82,19 @@ else:
 librhash = CDLL(libname)
 librhash.rhash_library_init()
 
+# function prototypes
+librhash.rhash_init.argtypes = [c_uint]
+librhash.rhash_init.restype = c_void_p
+librhash.rhash_free.argtypes = [c_void_p]
+librhash.rhash_reset.argtypes = [c_void_p]
+librhash.rhash_update.argtypes = [c_void_p, c_char_p, c_size_t]
+librhash.rhash_final.argtypes = [c_void_p, c_char_p]
+librhash.rhash_print.argtypes = [c_char_p, c_void_p, c_uint, c_int]
+librhash.rhash_print.restype = c_size_t
+librhash.rhash_print_magnet.argtypes = [c_char_p, c_char_p, c_void_p, c_uint, c_int]
+librhash.rhash_print_magnet.restype = c_size_t
+librhash.rhash_transmit.argtypes = [c_uint, c_void_p, c_size_t, c_size_t]
+
 # hash_id values
 CRC32 = 0x01
 MD4   = 0x02