And PyObject_Str() and PyObject_Repr() don't make strings ready in debug
mode to ensure that the caller makes the string ready before using it.
Py_DECREF(res);
return NULL;
}
+#ifndef Py_DEBUG
+ if (PyUnicode_READY(res) < 0)
+ return NULL;
+#endif
return res;
}
if (v == NULL)
return PyUnicode_FromString("<NULL>");
if (PyUnicode_CheckExact(v)) {
+#ifndef Py_DEBUG
if (PyUnicode_READY(v) < 0)
return NULL;
+#endif
Py_INCREF(v);
return v;
}
Py_DECREF(res);
return NULL;
}
+#ifndef Py_DEBUG
if (PyUnicode_READY(res) < 0)
return NULL;
+#endif
assert(_PyUnicode_CheckConsistency(res, 1));
return res;
}