diff options
author | Victor Stinner <vstinner@python.org> | 2023-07-03 08:23:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-03 08:23:43 (GMT) |
commit | 5ccbbe5bb9a659fa8f2fe551428c84cc14015f44 (patch) | |
tree | dda828881a98a880d128b97c1072fc08b7b262b1 /Modules | |
parent | d65b783b6966d233467a48ef633afb4aff9d5df8 (diff) | |
download | cpython-5ccbbe5bb9a659fa8f2fe551428c84cc14015f44.zip cpython-5ccbbe5bb9a659fa8f2fe551428c84cc14015f44.tar.gz cpython-5ccbbe5bb9a659fa8f2fe551428c84cc14015f44.tar.bz2 |
gh-106320: Move _PyUnicodeWriter to the internal C API (#106342)
Move also _PyUnicode_FormatAdvancedWriter().
CJK codecs and multibytecodec.c now define the Py_BUILD_CORE_MODULE
macro.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/cjkcodecs/cjkcodecs.h | 4 | ||||
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 4 | ||||
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.h | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h index 48cdcfb..97290aa 100644 --- a/Modules/cjkcodecs/cjkcodecs.h +++ b/Modules/cjkcodecs/cjkcodecs.h @@ -7,6 +7,10 @@ #ifndef _CJKCODECS_H_ #define _CJKCODECS_H_ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif + #include "Python.h" #include "multibytecodec.h" diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index cf437d0..3febd1a 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -4,6 +4,10 @@ * Written by Hye-Shik Chang <perky@FreeBSD.org> */ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif + #include "Python.h" #include "structmember.h" // PyMemberDef #include "multibytecodec.h" diff --git a/Modules/cjkcodecs/multibytecodec.h b/Modules/cjkcodecs/multibytecodec.h index f593622..5b85e2e 100644 --- a/Modules/cjkcodecs/multibytecodec.h +++ b/Modules/cjkcodecs/multibytecodec.h @@ -10,6 +10,8 @@ extern "C" { #endif +#include "pycore_unicodeobject.h" // _PyUnicodeWriter + #ifdef uint16_t typedef uint16_t ucs2_t, DBCHAR; #else |