]> granicus.if.org Git - python/commitdiff
Issue #18408: Fix typo in build_node_tree() of the parser module
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 16 Jul 2013 22:13:52 +0000 (00:13 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 16 Jul 2013 22:13:52 +0000 (00:13 +0200)
Type "o" format of Py_BuildValue() is invalid: it must be "O".

Modules/parsermodule.c

index e7fd8390f0de29c960827b1c32c4e1ebbfd61835..7a6e4552079670d32a5797119a746d8172b4e795 100644 (file)
@@ -899,7 +899,7 @@ build_node_tree(PyObject *tuple)
          *  The tuple is simple, but it doesn't start with a start symbol.
          *  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.");
         PyErr_SetObject(parser_error, tuple);
         Py_XDECREF(tuple);