]> granicus.if.org Git - python/commitdiff
Fix warnings GCC emits where the argument of PyErr_Format is a single variable.
authorGeorg Brandl <georg@python.org>
Fri, 13 Feb 2009 11:06:59 +0000 (11:06 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 13 Feb 2009 11:06:59 +0000 (11:06 +0000)
Objects/unicodeobject.c

index c95889e00b8dbf7a3e841a5bc1b70d4979d8b296..1b36a56a254057f8f192d041052596e28e2c8cfe 100644 (file)
@@ -1385,7 +1385,7 @@ int unicode_decode_call_errorhandler(const char *errors, PyObject **errorHandler
     if (restuple == NULL)
         goto onError;
     if (!PyTuple_Check(restuple)) {
-        PyErr_Format(PyExc_TypeError, &argparse[4]);
+        PyErr_SetString(PyExc_TypeError, &argparse[4]);
         goto onError;
     }
     if (!PyArg_ParseTuple(restuple, argparse, &PyUnicode_Type, &repunicode, &newpos))
@@ -3440,7 +3440,7 @@ static PyObject *unicode_encode_call_errorhandler(const char *errors,
     if (restuple == NULL)
         return NULL;
     if (!PyTuple_Check(restuple)) {
-        PyErr_Format(PyExc_TypeError, &argparse[4]);
+        PyErr_SetString(PyExc_TypeError, &argparse[4]);
         Py_DECREF(restuple);
         return NULL;
     }
@@ -4712,7 +4712,7 @@ static PyObject *unicode_translate_call_errorhandler(const char *errors,
     if (restuple == NULL)
         return NULL;
     if (!PyTuple_Check(restuple)) {
-        PyErr_Format(PyExc_TypeError, &argparse[4]);
+        PyErr_SetString(PyExc_TypeError, &argparse[4]);
         Py_DECREF(restuple);
         return NULL;
     }