Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix return and argument types for various libiptc API calls.

  • Loading branch information...
commit 6c30ca04656062bf95a1039d6e4bc7440150b9bc 1 parent 0ece237
@radhermit radhermit authored
Showing with 6 additions and 6 deletions.
  1. +3 −3 iptc/ip4tc.py
  2. +3 −3 iptc/ip6tc.py
View
6 iptc/ip4tc.py
@@ -103,7 +103,7 @@ class IPTCError(Exception):
class iptc(object):
"""This class contains all libiptc API calls."""
iptc_init = _libiptc.iptc_init
- iptc_init.restype = ct.c_void_p
+ iptc_init.restype = ct.POINTER(ct.c_int)
iptc_init.argstype = [ct.c_char_p]
iptc_free = _libiptc.iptc_free
@@ -120,11 +120,11 @@ class iptc(object):
iptc_first_chain = _libiptc.iptc_first_chain
iptc_first_chain.restype = ct.c_char_p
- iptc_first_chain.argstype = [ct.c_char_p, ct.c_void_p]
+ iptc_first_chain.argstype = [ct.c_void_p]
iptc_next_chain = _libiptc.iptc_next_chain
iptc_next_chain.restype = ct.c_char_p
- iptc_next_chain.argstype = [ct.c_char_p, ct.c_void_p]
+ iptc_next_chain.argstype = [ct.c_void_p]
iptc_is_chain = _libiptc.iptc_is_chain
iptc_is_chain.restype = ct.c_int
View
6 iptc/ip6tc.py
@@ -82,7 +82,7 @@ class ip6t_entry(ct.Structure):
class ip6tc(object):
"""This class contains all libip6tc API calls."""
iptc_init = _libiptc.ip6tc_init
- iptc_init.restype = ct.c_void_p
+ iptc_init.restype = ct.POINTER(ct.c_int)
iptc_init.argstype = [ct.c_char_p]
iptc_free = _libiptc.ip6tc_free
@@ -99,11 +99,11 @@ class ip6tc(object):
iptc_first_chain = _libiptc.ip6tc_first_chain
iptc_first_chain.restype = ct.c_char_p
- iptc_first_chain.argstype = [ct.c_char_p, ct.c_void_p]
+ iptc_first_chain.argstype = [ct.c_void_p]
iptc_next_chain = _libiptc.ip6tc_next_chain
iptc_next_chain.restype = ct.c_char_p
- iptc_next_chain.argstype = [ct.c_char_p, ct.c_void_p]
+ iptc_next_chain.argstype = [ct.c_void_p]
iptc_is_chain = _libiptc.ip6tc_is_chain
iptc_is_chain.restype = ct.c_int
Please sign in to comment.
Something went wrong with that request. Please try again.