Issue #6012: Add cleanup support to O& argument parsing.
diff --git a/Doc/c-api/arg.rst b/Doc/c-api/arg.rst
index dcf7547..e968c8f 100644
--- a/Doc/c-api/arg.rst
+++ b/Doc/c-api/arg.rst
@@ -250,6 +250,14 @@
the conversion has failed. When the conversion fails, the *converter* function
should raise an exception and leave the content of *address* unmodified.
+ If the *converter* returns Py_CLEANUP_SUPPORTED, it may get called a second time
+ if the argument parsing eventually fails, giving the converter a chance to release
+ any memory that it had already allocated. In this second call, the *object* parameter
+ will be NULL; *address* will have the same value as in the original call.
+
+ .. versionchanged:: 3.1
+ Py_CLEANUP_SUPPORTED was added.
+
``S`` (string) [PyStringObject \*]
Like ``O`` but requires that the Python object is a string object. Raises
:exc:`TypeError` if the object is not a string object. The C variable may also