comparison Python/errors.c @ 65482:38ad57db88ac

PyErr_SyntaxLocationEx() uses PyUnicode_DecodeFSDefault(), instead of PyUnicode_FromString(), to decode the filename.
author Victor Stinner <victor.stinner@haypocalc.com>
date Sun, 17 Oct 2010 19:03:16 +0000
parents 00e4ce31d404
children 39b9e9de372b
comparison
equal deleted inserted replaced
65479:39a2c3b10a7b 65482:38ad57db88ac
817 PyErr_Clear(); 817 PyErr_Clear();
818 Py_DECREF(tmp); 818 Py_DECREF(tmp);
819 } 819 }
820 } 820 }
821 if (filename != NULL) { 821 if (filename != NULL) {
822 tmp = PyUnicode_FromString(filename); 822 tmp = PyUnicode_DecodeFSDefault(filename);
823 if (tmp == NULL) 823 if (tmp == NULL)
824 PyErr_Clear(); 824 PyErr_Clear();
825 else { 825 else {
826 if (PyObject_SetAttrString(v, "filename", tmp)) 826 if (PyObject_SetAttrString(v, "filename", tmp))
827 PyErr_Clear(); 827 PyErr_Clear();