Commit 1c4a8350 authored by Stefan Behnel's avatar Stefan Behnel

Add missing branch hint for exception case.

parent 01085d2a
......@@ -2268,7 +2268,7 @@ class FuncDefNode(StatNode, BlockNode):
def getbuffer_check(self, code):
py_buffer, _ = self._get_py_buffer_info()
view = py_buffer.cname
code.putln("if (%s == NULL) {" % view)
code.putln("if (unlikely(%s == NULL)) {" % view)
code.putln("PyErr_SetString(PyExc_BufferError, "
"\"PyObject_GetBuffer: view==NULL argument is obsolete\");")
code.putln("return -1;")
......
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