Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "Review"
This reverts commit b24b994.
  • Loading branch information
StanFromIreland committed Oct 29, 2025
commit b9ae70d3294f0318694972f3a5d11c184c09c135
17 changes: 17 additions & 0 deletions Include/internal/pycore_unicodedata.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef Py_INTERNAL_UNICODEDATA_H
#define Py_INTERNAL_UNICODEDATA_H
#ifdef __cplusplus
extern "C" {
#endif

#ifndef Py_BUILD_CORE
# error "this header requires Py_BUILD_CORE define"
#endif

PyAPI_FUNC(int) _PyUnicode_IsXidStart(Py_UCS4 ch);
PyAPI_FUNC(int) _PyUnicode_IsXidContinue(Py_UCS4 ch);
Comment thread
vstinner marked this conversation as resolved.

#ifdef __cplusplus
}
#endif
#endif /* !Py_INTERNAL_UNICODEDATA_H */
6 changes: 2 additions & 4 deletions Include/internal/pycore_unicodeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ _PyUnicodeWriter_WriteCharInline(_PyUnicodeWriter *writer, Py_UCS4 ch)

/* --- Characters Type APIs ----------------------------------------------- */

// Export for 'unicodedata' shared extension.
PyAPI_FUNC(int) _PyUnicode_IsXidStart(Py_UCS4 ch);
PyAPI_FUNC(int) _PyUnicode_IsXidContinue(Py_UCS4 ch);

extern int _PyUnicode_IsXidStart(Py_UCS4 ch);
extern int _PyUnicode_IsXidContinue(Py_UCS4 ch);
Comment thread
StanFromIreland marked this conversation as resolved.
Outdated
extern int _PyUnicode_ToLowerFull(Py_UCS4 ch, Py_UCS4 *res);
extern int _PyUnicode_ToTitleFull(Py_UCS4 ch, Py_UCS4 *res);
extern int _PyUnicode_ToUpperFull(Py_UCS4 ch, Py_UCS4 *res);
Comment thread
StanFromIreland marked this conversation as resolved.
Outdated
Expand Down
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_typeobject.h \
$(srcdir)/Include/internal/pycore_typevarobject.h \
$(srcdir)/Include/internal/pycore_ucnhash.h \
$(srcdir)/Include/internal/pycore_unicodedata.h \
$(srcdir)/Include/internal/pycore_unicodeobject.h \
$(srcdir)/Include/internal/pycore_unicodeobject_generated.h \
$(srcdir)/Include/internal/pycore_unionobject.h \
Expand Down
2 changes: 1 addition & 1 deletion Modules/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "Python.h"
#include "pycore_object.h" // _PyObject_VisitType()
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
#include "pycore_unicodeobject.h" // _PyUnicode_IsXidStart, _PyUnicode_IsXidContinue
#include "pycore_unicodedata.h" // _PyUnicode_IsXidStart, _PyUnicode_IsXidContinue

#include <stdbool.h>
#include <stddef.h> // offsetof()
Expand Down
2 changes: 1 addition & 1 deletion Objects/unicodectype.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

#include "Python.h"
#include "pycore_unicodeobject.h" // export _PyUnicode_IsXidStart(), _PyUnicode_IsXidContinue()
#include "pycore_unicodedata.h" // export _PyUnicode_IsXidStart(), _PyUnicode_IsXidContinue()

#define ALPHA_MASK 0x01
#define DECIMAL_MASK 0x02
Expand Down
1 change: 1 addition & 0 deletions PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@
<ClInclude Include="..\Include\internal\pycore_typevarobject.h" />
<ClInclude Include="..\Include\internal\pycore_ucnhash.h" />
<ClInclude Include="..\Include\internal\pycore_unionobject.h" />
<ClInclude Include="..\Include\internal\pycore_unicodedata.h" />
<ClInclude Include="..\Include\internal\pycore_unicodeobject.h" />
<ClInclude Include="..\Include\internal\pycore_unicodeobject_generated.h" />
<ClInclude Include="..\Include\internal\pycore_uniqueid.h" />
Expand Down