chiark
/
gitweb
/
~mdw
/
mLib-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*.pyx, defs.pxi, grim.h: Add awful casts to `PyObject_AsReadBuffer'.
[mLib-python]
/
selpk.pyx
diff --git
a/selpk.pyx
b/selpk.pyx
index ed08fcd779eeae78954868e234819f4e43f2a4e9..7e3de7ea63279edb992ee7e2b3764e5a7dfed06e 100644
(file)
--- a/
selpk.pyx
+++ b/
selpk.pyx
@@
-93,7
+93,7
@@
cdef void _selpkfunc(unsigned char *p, size_t n, pkbuf *pk,
else:
r = pb.packet(PyString_FromStringAndSize(<char *>p, n))
if r is not None:
else:
r = pb.packet(PyString_FromStringAndSize(<char *>p, n))
if r is not None:
- PyObject_AsReadBuffer(r, &rp, &rn)
+ PyObject_AsReadBuffer(r,
<cvp *>
&rp, &rn)
if rn > n:
raise ValueError, 'remaining buffer too large'
if rn:
if rn > n:
raise ValueError, 'remaining buffer too large'
if rn: