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/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:262150a4-1114-c751-15e4-4163c1279fe9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9DAE:26A5A1:CB5D79:116BCA0:6969EF7C |
| html-safe-nonce | 629fa7d8dd33b612d26ca7fe591b1389c1a593881ec28edb00d61b8b0142c394 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REFFOjI2QTVBMTpDQjVENzk6MTE2QkNBMDo2OTY5RUY3QyIsInZpc2l0b3JfaWQiOiI1NzMyNzgxNDAwNTI3NTk3NDM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1f745f1e5a82977e6cf0f76504213e9ad8c38527621f494bea73addb148d31d3 |
| hovercard-subject-tag | pull_request:843187379 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/files |
| 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 | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width