mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Issue #26671: Fixed #ifdef indentation.
This commit is contained in:
parent
765c635dc8
commit
026110f0a2
1 changed files with 26 additions and 2 deletions
|
@ -905,6 +905,30 @@ path_converter(PyObject *o, void *p)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
PyObject *pathattr;
|
||||||
|
_Py_IDENTIFIER(path);
|
||||||
|
|
||||||
|
pathattr = _PyObject_GetAttrId(o, &PyId_path);
|
||||||
|
if (pathattr == NULL) {
|
||||||
|
PyErr_Clear();
|
||||||
|
}
|
||||||
|
else if (PyUnicode_Check(pathattr) || PyObject_CheckBuffer(pathattr)) {
|
||||||
|
if (!path_converter(pathattr, path)) {
|
||||||
|
Py_DECREF(pathattr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (path->cleanup == NULL) {
|
||||||
|
path->cleanup = pathattr;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Py_DECREF(pathattr);
|
||||||
|
}
|
||||||
|
return Py_CLEANUP_SUPPORTED;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Py_DECREF(pathattr);
|
||||||
|
}
|
||||||
|
|
||||||
PyErr_Format(PyExc_TypeError, "%s%s%s should be %s, not %.200s",
|
PyErr_Format(PyExc_TypeError, "%s%s%s should be %s, not %.200s",
|
||||||
path->function_name ? path->function_name : "",
|
path->function_name ? path->function_name : "",
|
||||||
path->function_name ? ": " : "",
|
path->function_name ? ": " : "",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue