diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-07-10 20:26:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 20:26:06 (GMT) |
commit | 4c8f09d7cef8c7aa07d5b5232b5b64f63819a743 (patch) | |
tree | 2d90e13b6dc939f019a6cafc45ea604cbb90f584 /PC/clinic/winreg.c.h | |
parent | 9650fe0197779b4dfded94be111e39c5810f098f (diff) | |
download | cpython-4c8f09d7cef8c7aa07d5b5232b5b64f63819a743.zip cpython-4c8f09d7cef8c7aa07d5b5232b5b64f63819a743.tar.gz cpython-4c8f09d7cef8c7aa07d5b5232b5b64f63819a743.tar.bz2 |
bpo-36346: Make using the legacy Unicode C API optional (GH-21437)
Add compile time option USE_UNICODE_WCHAR_CACHE. Setting it to 0
makes the interpreter not using the wchar_t cache and the legacy Unicode C API.
Diffstat (limited to 'PC/clinic/winreg.c.h')
-rw-r--r-- | PC/clinic/winreg.c.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index 3301bed..183301f 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -1143,8 +1143,7 @@ PyDoc_STRVAR(winreg_SetValue__doc__, static PyObject * winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key, - DWORD type, const Py_UNICODE *value, - Py_ssize_clean_t value_length); + DWORD type, PyObject *value_obj); static PyObject * winreg_SetValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) @@ -1153,14 +1152,13 @@ winreg_SetValue(PyObject *module, PyObject *const *args, Py_ssize_t nargs) HKEY key; const Py_UNICODE *sub_key; DWORD type; - const Py_UNICODE *value; - Py_ssize_clean_t value_length; + PyObject *value_obj; - if (!_PyArg_ParseStack(args, nargs, "O&O&ku#:SetValue", - clinic_HKEY_converter, &key, _PyUnicode_WideCharString_Opt_Converter, &sub_key, &type, &value, &value_length)) { + if (!_PyArg_ParseStack(args, nargs, "O&O&kU:SetValue", + clinic_HKEY_converter, &key, _PyUnicode_WideCharString_Opt_Converter, &sub_key, &type, &value_obj)) { goto exit; } - return_value = winreg_SetValue_impl(module, key, sub_key, type, value, value_length); + return_value = winreg_SetValue_impl(module, key, sub_key, type, value_obj); exit: /* Cleanup for sub_key */ @@ -1348,4 +1346,4 @@ winreg_QueryReflectionKey(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=30b1311886c13907 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=497a2e804821d5c9 input=a9049054013a1b77]*/ |