Skip to content

Commit

Permalink
#465 better error messages (triggers with memoryviews)
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@9016 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Apr 15, 2015
1 parent b3d6778 commit a8c5fc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xpra/codecs/xor/cyxor.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ cdef extern from "../buffers/buffers.h":


def xor_str(buf, xor_string):
assert len(buf)==len(xor_string), "cannot xor strings of different lengths (cyxor)"
assert len(buf)==len(xor_string), "cyxor cannot xor strings of different lengths (%s:%s vs %s:%s)" % (type(buf), len(buf), type(xor_string), len(xor_string))
cdef const unsigned char * cbuf = <unsigned char *> 0 #@DuplicatedSignature
cdef Py_ssize_t cbuf_len = 0 #@DuplicatedSignature
assert object_as_buffer(buf, <const void**> &cbuf, &cbuf_len)==0
assert object_as_buffer(buf, <const void**> &cbuf, &cbuf_len)==0, "cannot get buffer pointer for %s: %s" % (type(buf), buf)
cdef const unsigned char * xbuf = <unsigned char *> 0 #@DuplicatedSignature
cdef Py_ssize_t xbuf_len = 0 #@DuplicatedSignature
assert object_as_buffer(xor_string, <const void**> &xbuf, &xbuf_len)==0
Expand Down

0 comments on commit a8c5fc2

Please sign in to comment.