summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/veryhigh.rst8
-rw-r--r--Doc/whatsnew/3.4.rst6
2 files changed, 14 insertions, 0 deletions
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst
index 19af7bf..a129963 100644
--- a/Doc/c-api/veryhigh.rst
+++ b/Doc/c-api/veryhigh.rst
@@ -166,6 +166,14 @@ the same library that the Python runtime is using.
resulting string. For example, The :mod:`readline` module sets
this hook to provide line-editing and tab-completion features.
+ The result must be a string allocated by :c:func:`PyMem_RawMalloc` or
+ :c:func:`PyMem_RawRealloc`, or *NULL* if an error occurred.
+
+ .. versionchanged:: 3.4
+ The result must be allocated by :c:func:`PyMem_RawMalloc` or
+ :c:func:`PyMem_RawRealloc`, instead of being allocated by
+ :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`.
+
.. c:function:: struct _node* PyParser_SimpleParseString(const char *str, int start)
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 636d05d..ed4ea17 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -587,3 +587,9 @@ that may require changes to your code.
attribute in the chain referring to the innermost function. Introspection
libraries that assumed the previous behaviour was intentional can use
:func:`inspect.unwrap` to gain equivalent behaviour.
+
+* (C API) The result of the :c:var:`PyOS_ReadlineFunctionPointer` callback must
+ now be a string allocated by :c:func:`PyMem_RawMalloc` or
+ :c:func:`PyMem_RawRealloc`, or *NULL* if an error occurred, instead of a
+ string allocated by :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`.
+