Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def ctype_convert(n, typ):
- c_n = typ(n)
- if c_n.value != n:
- raise(ValueError("out of %r bounds with %r" % (typ, n)))
- return c_n.value
- ctype_convert(-1, ctypes.c_uint8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement