Skip to content

Commit

Permalink
Add support for Cython 0.22
Browse files Browse the repository at this point in the history
  • Loading branch information
njoyce committed Feb 16, 2015
1 parent 72f7612 commit e1f90dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cpyamf/amf0.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ cdef class Encoder(codec.Encoder):

return self.stream.write_double(n)

cdef int writeLong(self, object a):
cdef int writeLong(self, object a) except -1:
self.writeType(TYPE_NUMBER)

return self.stream.write_double(a)
Expand Down
4 changes: 2 additions & 2 deletions cpyamf/codec.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cdef class IndexedCollection(object):
cdef Py_ssize_t length

cdef int _actually_increase_size(self) except -1
cdef int _increase_size(self) except? -1
cdef int _increase_size(self) except -1
cdef void _clear(self)
cpdef int clear(self) except -1
cdef object _ref(self, object obj)
Expand Down Expand Up @@ -51,7 +51,7 @@ cdef class Context(object):
cdef dict _strings
cdef public dict extra

cpdef int clear(self) except? -1
cpdef int clear(self) except -1
cpdef object getClassAlias(self, object klass)

cpdef object getObject(self, Py_ssize_t ref)
Expand Down
2 changes: 1 addition & 1 deletion cpyamf/util.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cdef class cBufferedByteStream:

cpdef Py_ssize_t tell(self) except -1
cdef int write(self, char *buf, Py_ssize_t size) except -1
cdef inline int _init_buffer(self)
cdef inline int _init_buffer(self) except -1
cdef int _actually_increase_buffer(self, Py_ssize_t size) except -1
cdef int _increase_buffer(self, Py_ssize_t size) except -1
cdef inline bint has_available(self, Py_ssize_t size) except -1
Expand Down
4 changes: 2 additions & 2 deletions cpyamf/util.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ cdef class cBufferedByteStream(object):

return 0

cpdef Py_ssize_t tell(self):
cpdef Py_ssize_t tell(self) except -1:
"""
Returns the position of the stream pointer.
"""
Expand Down Expand Up @@ -284,7 +284,7 @@ cdef class cBufferedByteStream(object):

return 0

cdef inline bint has_available(self, Py_ssize_t size):
cdef inline bint has_available(self, Py_ssize_t size) except -1:
if size == 0:
return 1
elif size < 0:
Expand Down

0 comments on commit e1f90dc

Please sign in to comment.