@@ -224,7 +224,6 @@ create_converter('LPCVOID', '" F_POINTER "')
224224
225225create_converter('BOOL', 'i') # F_BOOL used previously (always 'i')
226226create_converter('DWORD', 'k') # F_DWORD is always "k" (which is much shorter)
227- create_converter('LPCTSTR', 's')
228227create_converter('UINT', 'I') # F_UINT used previously (always 'I')
229228
230229class LPCWSTR_converter(Py_UNICODE_converter):
@@ -259,7 +258,7 @@ class LPVOID_return_converter(CReturnConverter):
259258 data.return_conversion.append(
260259 'return_value = HANDLE_TO_PYNUM(_return_value);\n')
261260[python start generated code]*/
262- /*[python end generated code: output=da39a3ee5e6b4b0d input=ef52a757a1830d92 ]*/
261+ /*[python end generated code: output=da39a3ee5e6b4b0d input=da0a4db751936ee7 ]*/
263262
264263#include "clinic/_winapi.c.h"
265264
@@ -530,7 +529,7 @@ _winapi_CreateFile_impl(PyObject *module, LPCWSTR file_name,
530529{
531530 HANDLE handle ;
532531
533- if (PySys_Audit ("_winapi.CreateFile" , "uIIII " ,
532+ if (PySys_Audit ("_winapi.CreateFile" , "ukkkk " ,
534533 file_name , desired_access , share_mode ,
535534 creation_disposition , flags_and_attributes ) < 0 ) {
536535 return INVALID_HANDLE_VALUE ;
@@ -777,7 +776,7 @@ _winapi_CreateMutexW_impl(PyObject *module,
777776/*[clinic input]
778777_winapi.CreateNamedPipe -> HANDLE
779778
780- name: LPCTSTR
779+ name: LPCWSTR
781780 open_mode: DWORD
782781 pipe_mode: DWORD
783782 max_instances: DWORD
@@ -789,25 +788,25 @@ _winapi.CreateNamedPipe -> HANDLE
789788[clinic start generated code]*/
790789
791790static HANDLE
792- _winapi_CreateNamedPipe_impl (PyObject * module , LPCTSTR name , DWORD open_mode ,
791+ _winapi_CreateNamedPipe_impl (PyObject * module , LPCWSTR name , DWORD open_mode ,
793792 DWORD pipe_mode , DWORD max_instances ,
794793 DWORD out_buffer_size , DWORD in_buffer_size ,
795794 DWORD default_timeout ,
796795 LPSECURITY_ATTRIBUTES security_attributes )
797- /*[clinic end generated code: output=80f8c07346a94fbc input=5a73530b84d8bc37 ]*/
796+ /*[clinic end generated code: output=7d6fde93227680ba input=5bd4e4a55639ee02 ]*/
798797{
799798 HANDLE handle ;
800799
801- if (PySys_Audit ("_winapi.CreateNamedPipe" , "uII " ,
800+ if (PySys_Audit ("_winapi.CreateNamedPipe" , "ukk " ,
802801 name , open_mode , pipe_mode ) < 0 ) {
803802 return INVALID_HANDLE_VALUE ;
804803 }
805804
806805 Py_BEGIN_ALLOW_THREADS
807- handle = CreateNamedPipe (name , open_mode , pipe_mode ,
808- max_instances , out_buffer_size ,
809- in_buffer_size , default_timeout ,
810- security_attributes );
806+ handle = CreateNamedPipeW (name , open_mode , pipe_mode ,
807+ max_instances , out_buffer_size ,
808+ in_buffer_size , default_timeout ,
809+ security_attributes );
811810 Py_END_ALLOW_THREADS
812811
813812 if (handle == INVALID_HANDLE_VALUE )
@@ -1790,7 +1789,7 @@ _winapi_OpenEventW_impl(PyObject *module, DWORD desired_access,
17901789{
17911790 HANDLE handle ;
17921791
1793- if (PySys_Audit ("_winapi.OpenEventW" , "Iu " , desired_access , name ) < 0 ) {
1792+ if (PySys_Audit ("_winapi.OpenEventW" , "ku " , desired_access , name ) < 0 ) {
17941793 return INVALID_HANDLE_VALUE ;
17951794 }
17961795
@@ -1821,7 +1820,7 @@ _winapi_OpenMutexW_impl(PyObject *module, DWORD desired_access,
18211820{
18221821 HANDLE handle ;
18231822
1824- if (PySys_Audit ("_winapi.OpenMutexW" , "Iu " , desired_access , name ) < 0 ) {
1823+ if (PySys_Audit ("_winapi.OpenMutexW" , "ku " , desired_access , name ) < 0 ) {
18251824 return INVALID_HANDLE_VALUE ;
18261825 }
18271826
@@ -1882,7 +1881,7 @@ _winapi_OpenProcess_impl(PyObject *module, DWORD desired_access,
18821881{
18831882 HANDLE handle ;
18841883
1885- if (PySys_Audit ("_winapi.OpenProcess" , "II " ,
1884+ if (PySys_Audit ("_winapi.OpenProcess" , "kk " ,
18861885 process_id , desired_access ) < 0 ) {
18871886 return INVALID_HANDLE_VALUE ;
18881887 }
@@ -2236,19 +2235,19 @@ _winapi_VirtualQuerySize_impl(PyObject *module, LPCVOID address)
22362235/*[clinic input]
22372236_winapi.WaitNamedPipe
22382237
2239- name: LPCTSTR
2238+ name: LPCWSTR
22402239 timeout: DWORD
22412240 /
22422241[clinic start generated code]*/
22432242
22442243static PyObject *
2245- _winapi_WaitNamedPipe_impl (PyObject * module , LPCTSTR name , DWORD timeout )
2246- /*[clinic end generated code: output=c2866f4439b1fe38 input=36fc781291b1862c ]*/
2244+ _winapi_WaitNamedPipe_impl (PyObject * module , LPCWSTR name , DWORD timeout )
2245+ /*[clinic end generated code: output=e161e2e630b3e9c2 input=099a4746544488fa ]*/
22472246{
22482247 BOOL success ;
22492248
22502249 Py_BEGIN_ALLOW_THREADS
2251- success = WaitNamedPipe (name , timeout );
2250+ success = WaitNamedPipeW (name , timeout );
22522251 Py_END_ALLOW_THREADS
22532252
22542253 if (!success )
@@ -2917,7 +2916,7 @@ _winapi_CopyFile2_impl(PyObject *module, LPCWSTR existing_file_name,
29172916 HRESULT hr ;
29182917 COPYFILE2_EXTENDED_PARAMETERS params = { sizeof (COPYFILE2_EXTENDED_PARAMETERS ) };
29192918
2920- if (PySys_Audit ("_winapi.CopyFile2" , "uuI " ,
2919+ if (PySys_Audit ("_winapi.CopyFile2" , "uuk " ,
29212920 existing_file_name , new_file_name , flags ) < 0 ) {
29222921 return NULL ;
29232922 }
0 commit comments