Commit eede9aea authored by Victor Stinner's avatar Victor Stinner

Issue #18408: Fix typo in build_node_tree() of the parser module

Type "o" format of Py_BuildValue() is invalid: it must be "O".
parent 457a7e02
...@@ -899,7 +899,7 @@ build_node_tree(PyObject *tuple) ...@@ -899,7 +899,7 @@ build_node_tree(PyObject *tuple)
* The tuple is simple, but it doesn't start with a start symbol. * The tuple is simple, but it doesn't start with a start symbol.
* Raise an exception now and be done with it. * Raise an exception now and be done with it.
*/ */
tuple = Py_BuildValue("os", tuple, tuple = Py_BuildValue("Os", tuple,
"Illegal syntax-tree; cannot start with terminal symbol."); "Illegal syntax-tree; cannot start with terminal symbol.");
PyErr_SetObject(parser_error, tuple); PyErr_SetObject(parser_error, tuple);
Py_XDECREF(tuple); Py_XDECREF(tuple);
......
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