Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion 2 Include/cpython/unicodeobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(

/* Similar to PyUnicode_AsUnicode(), but raises a ValueError if the string
contains null characters. */
Py_DEPRECATED(3.3) PyAPI_FUNC(const Py_UNICODE *) _PyUnicode_AsUnicode(
PyAPI_FUNC(const Py_UNICODE *) _PyUnicode_AsUnicode(
PyObject *unicode /* Unicode object */
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Mark ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``,
``PyUnicode_FromUnicode``, ``PyUnicode_AsUnicode``, ``_PyUnicode_AsUnicode``,
``PyUnicode_FromUnicode``, ``PyUnicode_AsUnicode``,
and ``PyUnicode_AsUnicodeAndSize`` as deprecated in C. Remove ``Py_UNICODE_MATCH``
which was deprecated and broken since Python 3.3.
8 changes: 1 addition & 7 deletions 8 Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions 6 Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -3310,14 +3310,11 @@ _PyUnicode_WideCharString_Converter(PyObject *obj, void *ptr)
}
if (PyUnicode_Check(obj)) {
#if USE_UNICODE_WCHAR_CACHE
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
*p = (wchar_t *)_PyUnicode_AsUnicode(obj);
if (*p == NULL) {
return 0;
}
return 1;
_Py_COMP_DIAG_POP
#else /* USE_UNICODE_WCHAR_CACHE */
*p = PyUnicode_AsWideCharString(obj, NULL);
if (*p == NULL) {
Expand Down Expand Up @@ -3349,14 +3346,11 @@ _PyUnicode_WideCharString_Opt_Converter(PyObject *obj, void *ptr)
}
if (PyUnicode_Check(obj)) {
#if USE_UNICODE_WCHAR_CACHE
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
*p = (wchar_t *)_PyUnicode_AsUnicode(obj);
if (*p == NULL) {
return 0;
}
return 1;
_Py_COMP_DIAG_POP
#else /* USE_UNICODE_WCHAR_CACHE */
*p = PyUnicode_AsWideCharString(obj, NULL);
if (*p == NULL) {
Expand Down
3 changes: 0 additions & 3 deletions 3 PC/_msi.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,10 +758,7 @@ _msi_SummaryInformation_SetProperty_impl(msiobj *self, int field,

if (PyUnicode_Check(data)) {
#if USE_UNICODE_WCHAR_CACHE
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
const WCHAR *value = _PyUnicode_AsUnicode(data);
_Py_COMP_DIAG_POP
#else /* USE_UNICODE_WCHAR_CACHE */
WCHAR *value = PyUnicode_AsWideCharString(data, NULL);
#endif /* USE_UNICODE_WCHAR_CACHE */
Expand Down
14 changes: 1 addition & 13 deletions 14 PC/clinic/_msi.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 1 addition & 31 deletions 32 PC/clinic/winreg.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions 6 Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3414,10 +3414,7 @@ def parse_arg(self, argname, argnum):
goto exit;
}}}}
#if USE_UNICODE_WCHAR_CACHE
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
{paramname} = _PyUnicode_AsUnicode({argname});
_Py_COMP_DIAG_POP
#else /* USE_UNICODE_WCHAR_CACHE */
{paramname} = PyUnicode_AsWideCharString({argname}, NULL);
#endif /* USE_UNICODE_WCHAR_CACHE */
Expand All @@ -3432,10 +3429,7 @@ def parse_arg(self, argname, argnum):
}}}}
else if (PyUnicode_Check({argname})) {{{{
#if USE_UNICODE_WCHAR_CACHE
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
{paramname} = _PyUnicode_AsUnicode({argname});
_Py_COMP_DIAG_POP
#else /* USE_UNICODE_WCHAR_CACHE */
{paramname} = PyUnicode_AsWideCharString({argname}, NULL);
#endif /* USE_UNICODE_WCHAR_CACHE */
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.