Title: bpo-45490: Convert unicodeobject.h macros to static inline functions by vstinner · Pull Request #31221 · python/cpython · GitHub
Open Graph Title: bpo-45490: Convert unicodeobject.h macros to static inline functions by vstinner · Pull Request #31221 · python/cpython
X Title: bpo-45490: Convert unicodeobject.h macros to static inline functions by vstinner · Pull Request #31221 · python/cpython
Description: Convert unicodeobject.h macros to static inline functions. Reorder functions to declare functions before their first usage. Add "kind" variable to PyUnicode_READ_CHAR() and PyUnicode_MAX_CHAR_VALUE() functions to only call PyUnicode_KIND() once. PyUnicode_KIND() now returns an "enum PyUnicode_Kind". Simplify PyUnicode_GET_SIZE(). Add assertions to PyUnicode_WRITE() on the max value. Add cast macros: _PyASCIIObject_CAST() _PyCompactUnicodeObject_CAST() _PyUnicodeObject_CAST() The following functions are now declared as deprecated using Py_DEPRECATED(3.3): PyUnicode_GET_SIZE() PyUnicode_GET_DATA_SIZE() PyUnicode_AS_UNICODE() PyUnicode_AS_DATA() The implementation of these functions disable deprecation warnings in their body. PyUnicode_READ_CHAR() now uses PyUnicode_1BYTE_DATA(), PyUnicode_2BYTE_DATA() and PyUnicode_4BYTE_DATA(). Replace "const PyObject*" with "PyObject*" in _decimal.c and pystrhex.c: PyUnicode_READY() can modify the object. Replace "const void *data" with "void *data" in some unicodedata.c and unicodeobject.c functions which use PyUnicode_WRITE(): data is used to modify the string. https://bugs.python.org/issue45490
Open Graph Description: Convert unicodeobject.h macros to static inline functions. Reorder functions to declare functions before their first usage. Add "kind" variable to PyUnicode_READ_CHAR() and PyUnicode_...
X Description: Convert unicodeobject.h macros to static inline functions. Reorder functions to declare functions before their first usage. Add "kind" variable to PyUnicode_READ_CHAR() and Py...
Opengraph URL: https://github.com/python/cpython/pull/31221
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:5416cf72-5f56-88bf-9483-1dac9ef3c48f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | B414:66035:A729C:E2671:6969D209 |
| html-safe-nonce | a10186cf5be68a2d55d99798657fc45da7afe3030e532891b9817da01a0a49a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDE0OjY2MDM1OkE3MjlDOkUyNjcxOjY5NjlEMjA5IiwidmlzaXRvcl9pZCI6IjQxNDIwMzg4MDI0NDE1NTY0ODkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 05200a80faa4fafd516a9839c5b7ab157e9fde0ae9c716a1484d23ec62c74ea7 |
| hovercard-subject-tag | pull_request:843187379 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/31221/checks |
| twitter:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| og:image:alt | Convert unicodeobject.h macros to static inline functions. Reorder functions to declare functions before their first usage. Add "kind" variable to PyUnicode_READ_CHAR() and PyUnicode_... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width