From 39599dca9db7431510f1d68609db5ea0b60af2cb Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Thu, 22 Nov 2007 02:48:12 +0000 Subject: PyString_AsString is permissive and accepts unicode strings. Replace it with PyUnicode_AsString when the argument is known to be a str. --- Python/peephole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/peephole.c') diff --git a/Python/peephole.c b/Python/peephole.c index d012d391e7..9f1e6420e6 100644 --- a/Python/peephole.c +++ b/Python/peephole.c @@ -407,7 +407,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, case LOAD_NAME: case LOAD_GLOBAL: j = GETARG(codestr, i); - name = PyString_AsString(PyTuple_GET_ITEM(names, j)); + name = PyUnicode_AsString(PyTuple_GET_ITEM(names, j)); h = load_global(codestr, i, name, consts); if (h < 0) goto exitUnchanged; -- cgit v1.2.1