GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |
GeezerVison is showing github.com — bpo-1635741: Add a global module state to unicodedata by vstinner · Pull Request #22712 · python/cpython Conversation
|
|
With this PR, I understood that my main concern comes from the PyCapsule API: _PyUnicode_DecodeUnicodeEscape() uses it like this: No state is passed to _getcode() and so currently it can only access global variables. I looked at how to create a C function which would be a wrapper to _getcode() which automatically pass a state. Problem: the only portable way is to use it with something like: Hopefully we don't need to go that far. _PyUnicode_Name_CAPI is private and excluded from the limited C API. We can move it to the internal C API and introduce incompatible change, like require to pass a state. For example, we can add a state in the _PyUnicode_Name_CAPI structure and require the caller to pass it: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Prepare unicodedata to add a state per module: start with a global "module" state, pass it to subfunctions which access &UCD_Type. This change also prepares the conversion of the UCD_Type static type to a heap type.
Prepare unicodedata to add a state per module: start with a global "module" state, pass it to subfunctions which access &UCD_Type. This change also prepares the conversion of the UCD_Type static type to a heap type.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.