]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-121489: Export private _PyBytes_Join() again (#122267)
authorMarc Mueller <30130371+cdce8p@users.noreply.github.com>
Thu, 25 Jul 2024 15:31:30 +0000 (17:31 +0200)
committerGitHub <noreply@github.com>
Thu, 25 Jul 2024 15:31:30 +0000 (17:31 +0200)
Include/cpython/bytesobject.h
Include/internal/pycore_bytesobject.h
Misc/NEWS.d/next/C API/2024-07-21-17-40-07.gh-issue-121489.SUMFCr.rst [new file with mode: 0644]
Modules/_io/bufferedio.c

index 816823716e9a6f5c9bbb785c2d2229fa2b344408..41537210b748a1c51b15f9226d14e33cdcfd43b2 100644 (file)
@@ -31,3 +31,7 @@ static inline Py_ssize_t PyBytes_GET_SIZE(PyObject *op) {
     return Py_SIZE(self);
 }
 #define PyBytes_GET_SIZE(self) PyBytes_GET_SIZE(_PyObject_CAST(self))
+
+/* _PyBytes_Join(sep, x) is like sep.join(x).  sep must be PyBytesObject*,
+   x must be an iterable object. */
+PyAPI_FUNC(PyObject*) _PyBytes_Join(PyObject *sep, PyObject *x);
index 94d421a9eb742ae02704f7cc487e027d094f420c..300e7f4896a39efa6d7e16d5d76b40766d6800c3 100644 (file)
@@ -23,10 +23,6 @@ extern PyObject* _PyBytes_FromHex(
 PyAPI_FUNC(PyObject*) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
                                             const char *, const char **);
 
-/* _PyBytes_Join(sep, x) is like sep.join(x).  sep must be PyBytesObject*,
-   x must be an iterable object. */
-extern PyObject* _PyBytes_Join(PyObject *sep, PyObject *x);
-
 
 // Substring Search.
 //
diff --git a/Misc/NEWS.d/next/C API/2024-07-21-17-40-07.gh-issue-121489.SUMFCr.rst b/Misc/NEWS.d/next/C API/2024-07-21-17-40-07.gh-issue-121489.SUMFCr.rst
new file mode 100644 (file)
index 0000000..8c18a49
--- /dev/null
@@ -0,0 +1 @@
+Export private :c:func:`!_PyBytes_Join` again.
index aa52711941d374a7a68d2683a8cc6e0a14e3002e..e45323c93a17ef83e7a94f96e539b2866abbf24d 100644 (file)
@@ -8,7 +8,6 @@
 */
 
 #include "Python.h"
-#include "pycore_bytesobject.h"         // _PyBytes_Join()
 #include "pycore_call.h"                // _PyObject_CallNoArgs()
 #include "pycore_object.h"              // _PyObject_GC_UNTRACK()
 #include "pycore_pyerrors.h"            // _Py_FatalErrorFormat()