chiark
/
gitweb
/
~mdw
/
mLib-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
selpk.pyx: Fix bad cut-and-paste in the callback property.
[mLib-python]
/
codec.pyx
diff --git
a/codec.pyx
b/codec.pyx
index 815e6b236bbcad80508c5fcb6789aee619a4e35c..b9f910fd1ab3fb09547f6b05f46de8f9a0b1e0b5 100644
(file)
--- a/
codec.pyx
+++ b/
codec.pyx
@@
-50,6
+50,7
@@
cdef extern from 'mLib/codec.h':
CDCF_IGNEQMID
CDCF_IGNZPAD
CDCF_IGNNEWL
CDCF_IGNEQMID
CDCF_IGNZPAD
CDCF_IGNNEWL
+ CDCF_IGNSPC
CDCF_IGNINVCH
CDCF_IGNJUNK
CDCF_IGNINVCH
CDCF_IGNJUNK
@@
-69,6
+70,7
@@
class CDCF:
IGNEQMID = CDCF_IGNEQMID
IGNZPAD = CDCF_IGNZPAD
IGNNEWL = CDCF_IGNNEWL
IGNEQMID = CDCF_IGNEQMID
IGNZPAD = CDCF_IGNZPAD
IGNNEWL = CDCF_IGNNEWL
+ IGNSPC = CDCF_IGNSPC
IGNINVCH = CDCF_IGNINVCH
IGNJUNK = CDCF_IGNJUNK
IGNINVCH = CDCF_IGNINVCH
IGNJUNK = CDCF_IGNJUNK
@@
-106,14
+108,14
@@
cdef class _BaseCodec:
me.c.ops.destroy(me.c)
cdef code(me, text, int finishp):
cdef void *p
me.c.ops.destroy(me.c)
cdef code(me, text, int finishp):
cdef void *p
- cdef
in
t len
+ cdef
Py_ssize_
t len
cdef dstr d
cdef int err
if me.c is NULL:
raise ValueError, 'Encoding finished'
DCREATE(&d)
try:
cdef dstr d
cdef int err
if me.c is NULL:
raise ValueError, 'Encoding finished'
DCREATE(&d)
try:
- PyObject_AsReadBuffer(text, &p, &len)
+ PyObject_AsReadBuffer(text,
<cvp *>
&p, &len)
code(me.c, p, len, &d)
if finishp:
code(me.c, NULL, 0, &d)
code(me.c, p, len, &d)
if finishp:
code(me.c, NULL, 0, &d)