Implemented hook_read (triggered after read() method is done).

parent 2ae8c15d
......@@ -128,6 +128,9 @@ cdef public void py_input(object parser, char *buf, int *result, int max_size):
except KeyboardInterrupt:
raw = ''
if hasattr(parser, 'hook_read'):
raw = parser.hook_read(raw)
buflen = PyInt_AsLong(len(raw))
result[0] = buflen
memcpy(buf, PyString_AsString(raw), buflen)
......
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