diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-12-14 09:19:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-14 09:19:51 (GMT) |
commit | afb3e71a1710c444fbe789b51df43ee16ee9ede7 (patch) | |
tree | 31c2164ceb03c23e1ce6a10c93a016693349f776 /PC/winreg.c | |
parent | 7b36016a15aeed0d76a4c05a66203e6d7723aace (diff) | |
download | cpython-afb3e71a1710c444fbe789b51df43ee16ee9ede7.zip cpython-afb3e71a1710c444fbe789b51df43ee16ee9ede7.tar.gz cpython-afb3e71a1710c444fbe789b51df43ee16ee9ede7.tar.bz2 |
bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. (GH-11150)
Diffstat (limited to 'PC/winreg.c')
-rw-r--r-- | PC/winreg.c | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/PC/winreg.c b/PC/winreg.c index 4505c31..8ed6be4 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -825,9 +825,9 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_ConnectRegistry_impl(PyObject *module, Py_UNICODE *computer_name, - HKEY key) -/*[clinic end generated code: output=5ab79d02aa3167b4 input=5f98a891a347e68e]*/ +winreg_ConnectRegistry_impl(PyObject *module, + const Py_UNICODE *computer_name, HKEY key) +/*[clinic end generated code: output=cd4f70fb9ec901fb input=5f98a891a347e68e]*/ { HKEY retKey; long rc; @@ -862,8 +862,8 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_CreateKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key) -/*[clinic end generated code: output=9c81d4095527c927 input=3cdd1622488acea2]*/ +winreg_CreateKey_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key) +/*[clinic end generated code: output=2af13910d56eae26 input=3cdd1622488acea2]*/ { HKEY retKey; long rc; @@ -901,9 +901,10 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_CreateKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key, - int reserved, REGSAM access) -/*[clinic end generated code: output=b9fce6dc5c4e39b1 input=42c2b03f98406b66]*/ +winreg_CreateKeyEx_impl(PyObject *module, HKEY key, + const Py_UNICODE *sub_key, int reserved, + REGSAM access) +/*[clinic end generated code: output=643a70ad6a361a97 input=42c2b03f98406b66]*/ { HKEY retKey; long rc; @@ -936,8 +937,8 @@ is removed. If the function fails, an OSError exception is raised. [clinic start generated code]*/ static PyObject * -winreg_DeleteKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key) -/*[clinic end generated code: output=7734b1e431991ae4 input=b31d225b935e4211]*/ +winreg_DeleteKey_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key) +/*[clinic end generated code: output=d2652a84f70e0862 input=b31d225b935e4211]*/ { long rc; rc = RegDeleteKeyW(key, sub_key ); @@ -971,9 +972,10 @@ On unsupported Windows versions, NotImplementedError is raised. [clinic start generated code]*/ static PyObject * -winreg_DeleteKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key, - REGSAM access, int reserved) -/*[clinic end generated code: output=01378d86ad3eb936 input=711d9d89e7ecbed7]*/ +winreg_DeleteKeyEx_impl(PyObject *module, HKEY key, + const Py_UNICODE *sub_key, REGSAM access, + int reserved) +/*[clinic end generated code: output=52a1c8b374ebc003 input=711d9d89e7ecbed7]*/ { HMODULE hMod; typedef LONG (WINAPI *RDKEFunc)(HKEY, const wchar_t*, REGSAM, int); @@ -1013,8 +1015,8 @@ Removes a named value from a registry key. [clinic start generated code]*/ static PyObject * -winreg_DeleteValue_impl(PyObject *module, HKEY key, Py_UNICODE *value) -/*[clinic end generated code: output=67e7e9a514f84951 input=a78d3407a4197b21]*/ +winreg_DeleteValue_impl(PyObject *module, HKEY key, const Py_UNICODE *value) +/*[clinic end generated code: output=56fa9d21f3a54371 input=a78d3407a4197b21]*/ { long rc; Py_BEGIN_ALLOW_THREADS @@ -1181,8 +1183,9 @@ Expand environment vars. [clinic start generated code]*/ static PyObject * -winreg_ExpandEnvironmentStrings_impl(PyObject *module, Py_UNICODE *string) -/*[clinic end generated code: output=cba46ac293a8af1a input=b2a9714d2b751aa6]*/ +winreg_ExpandEnvironmentStrings_impl(PyObject *module, + const Py_UNICODE *string) +/*[clinic end generated code: output=8fa4e959747a7312 input=b2a9714d2b751aa6]*/ { wchar_t *retValue = NULL; DWORD retValueSize; @@ -1274,9 +1277,9 @@ tree. [clinic start generated code]*/ static PyObject * -winreg_LoadKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key, - Py_UNICODE *file_name) -/*[clinic end generated code: output=87344005c5905cde input=e3b5b45ade311582]*/ +winreg_LoadKey_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key, + const Py_UNICODE *file_name) +/*[clinic end generated code: output=65f89f2548cb27c7 input=e3b5b45ade311582]*/ { long rc; @@ -1308,9 +1311,9 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_OpenKey_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key, +winreg_OpenKey_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key, int reserved, REGSAM access) -/*[clinic end generated code: output=a905f1b947f3ce85 input=098505ac36a9ae28]*/ +/*[clinic end generated code: output=8849bff2c30104ad input=098505ac36a9ae28]*/ { HKEY retKey; long rc; @@ -1335,9 +1338,9 @@ If the function fails, an OSError exception is raised. [clinic start generated code]*/ static HKEY -winreg_OpenKeyEx_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key, +winreg_OpenKeyEx_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key, int reserved, REGSAM access) -/*[clinic end generated code: output=226042593b37e940 input=c6c4972af8622959]*/ +/*[clinic end generated code: output=81bc2bd684bc77ae input=c6c4972af8622959]*/ { return winreg_OpenKey_impl(module, key, sub_key, reserved, access); } @@ -1405,8 +1408,8 @@ completeness. [clinic start generated code]*/ static PyObject * -winreg_QueryValue_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key) -/*[clinic end generated code: output=2bb8d1e02c10d0b6 input=41cafbbf423b21d6]*/ +winreg_QueryValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key) +/*[clinic end generated code: output=c655810ae50c63a9 input=41cafbbf423b21d6]*/ { long rc; PyObject *retStr; @@ -1472,8 +1475,8 @@ The return value is a tuple of the value and the type_id. [clinic start generated code]*/ static PyObject * -winreg_QueryValueEx_impl(PyObject *module, HKEY key, Py_UNICODE *name) -/*[clinic end generated code: output=5b4fa3e33d6d3e8f input=cf366cada4836891]*/ +winreg_QueryValueEx_impl(PyObject *module, HKEY key, const Py_UNICODE *name) +/*[clinic end generated code: output=f1b85b1c3d887ec7 input=cf366cada4836891]*/ { long rc; BYTE *retBuf, *tmp; @@ -1545,8 +1548,8 @@ to the API. [clinic start generated code]*/ static PyObject * -winreg_SaveKey_impl(PyObject *module, HKEY key, Py_UNICODE *file_name) -/*[clinic end generated code: output=1dda1502bd4c30d8 input=da735241f91ac7a2]*/ +winreg_SaveKey_impl(PyObject *module, HKEY key, const Py_UNICODE *file_name) +/*[clinic end generated code: output=ca94b835c88f112b input=da735241f91ac7a2]*/ { LPSECURITY_ATTRIBUTES pSA = NULL; @@ -1591,10 +1594,10 @@ KEY_SET_VALUE access. [clinic start generated code]*/ static PyObject * -winreg_SetValue_impl(PyObject *module, HKEY key, Py_UNICODE *sub_key, - DWORD type, Py_UNICODE *value, +winreg_SetValue_impl(PyObject *module, HKEY key, const Py_UNICODE *sub_key, + DWORD type, const Py_UNICODE *value, Py_ssize_clean_t value_length) -/*[clinic end generated code: output=1e31931174820631 input=2cd2adab79339c53]*/ +/*[clinic end generated code: output=686bedb1cbb4367b input=2cd2adab79339c53]*/ { long rc; @@ -1657,9 +1660,10 @@ the configuration registry to help the registry perform efficiently. [clinic start generated code]*/ static PyObject * -winreg_SetValueEx_impl(PyObject *module, HKEY key, Py_UNICODE *value_name, - PyObject *reserved, DWORD type, PyObject *value) -/*[clinic end generated code: output=c88c8426b6c00ec7 input=900a9e3990bfb196]*/ +winreg_SetValueEx_impl(PyObject *module, HKEY key, + const Py_UNICODE *value_name, PyObject *reserved, + DWORD type, PyObject *value) +/*[clinic end generated code: output=811b769a66ae11b7 input=900a9e3990bfb196]*/ { BYTE *data; DWORD len; |