Commit 55c531ca authored by Sam Rushing's avatar Sam Rushing

_decode_length, _decode_tag: needs "except?" clauses.

parent 63869d7f
......@@ -581,7 +581,7 @@ cdef object decode_boolean (unsigned char * s, long * pos, long length):
else:
return False
cdef long _decode_length (unsigned char * s, long * pos, long lol):
cdef long _decode_length (unsigned char * s, long * pos, long lol) except? -1:
# actually supports only up to 32-bit lengths
cdef unsigned long i, n
n = 0
......@@ -604,7 +604,7 @@ cdef check_has (long * pos, unsigned int n, long eos):
if pos[0] + n > eos:
raise InsufficientData (pos[0], n, eos)
cdef long _decode_tag (unsigned char * s, long * pos, long eos, uint8_t * flags):
cdef long _decode_tag (unsigned char * s, long * pos, long eos, uint8_t * flags) except? -1:
cdef unsigned long r = 0
cdef uint8_t b = s[pos[0]]
inc_pos (pos, 1, eos)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment