Call hook_read_before when hook_read_before attribute exists.

parent b4fd7ccf
...@@ -133,7 +133,7 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size) ...@@ -133,7 +133,7 @@ void py_input(PyObject *parser, char *buf, int *result, int max_size)
INIT_ATTR(py_attr_close_name, "close"); INIT_ATTR(py_attr_close_name, "close");
// Check if the "hook_READ_BEFORE" callback exists // Check if the "hook_READ_BEFORE" callback exists
if (unlikely(!PyObject_HasAttr(parser, py_attr_hook_read_before_name))) if (PyObject_HasAttr(parser, py_attr_hook_read_before_name))
{ {
handle = PyObject_GetAttr(parser, py_attr_hook_read_before_name); handle = PyObject_GetAttr(parser, py_attr_hook_read_before_name);
if (unlikely(!handle)) return; if (unlikely(!handle)) return;
......
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