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.
This commit is contained in:
Victor Stinner 2023-07-03 10:23:43 +02:00 committed by GitHub
parent d65b783b69
commit 5ccbbe5bb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 166 additions and 144 deletions

View file

@ -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"

View file

@ -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"

View file

@ -10,6 +10,8 @@
extern "C" {
#endif
#include "pycore_unicodeobject.h" // _PyUnicodeWriter
#ifdef uint16_t
typedef uint16_t ucs2_t, DBCHAR;
#else