Skip to content

Commit

Permalink
Fix for issue dsoprea#5, ctypes import error in Python 2.6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Forness authored and Forness committed May 31, 2017
1 parent c28865f commit b8fc41b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libarchive/types/archive.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from ctypes import *

try:
from ctypes import c_ssize_t
except ImportError:
from ctypes import c_longlong as c_ssize_t

ARCHIVE_WRITE_CALLBACK = CFUNCTYPE(c_ssize_t, c_void_p, c_void_p, POINTER(c_void_p), c_size_t)
ARCHIVE_OPEN_CALLBACK = CFUNCTYPE(c_int, c_void_p, c_void_p)
ARCHIVE_CLOSE_CALLBACK = CFUNCTYPE(c_int, c_void_p, c_void_p)

0 comments on commit b8fc41b

Please sign in to comment.