@@ -224,7 +224,6 @@ create_converter('LPCVOID', '" F_POINTER "')
224
224
225
225
create_converter('BOOL', 'i') # F_BOOL used previously (always 'i')
226
226
create_converter('DWORD', 'k') # F_DWORD is always "k" (which is much shorter)
227
- create_converter('LPCTSTR', 's')
228
227
create_converter('UINT', 'I') # F_UINT used previously (always 'I')
229
228
230
229
class LPCWSTR_converter(Py_UNICODE_converter):
@@ -259,7 +258,7 @@ class LPVOID_return_converter(CReturnConverter):
259
258
data.return_conversion.append(
260
259
'return_value = HANDLE_TO_PYNUM(_return_value);\n')
261
260
[python start generated code]*/
262
- /*[python end generated code: output=da39a3ee5e6b4b0d input=ef52a757a1830d92 ]*/
261
+ /*[python end generated code: output=da39a3ee5e6b4b0d input=da0a4db751936ee7 ]*/
263
262
264
263
#include "clinic/_winapi.c.h"
265
264
@@ -530,7 +529,7 @@ _winapi_CreateFile_impl(PyObject *module, LPCWSTR file_name,
530
529
{
531
530
HANDLE handle ;
532
531
533
- if (PySys_Audit ("_winapi.CreateFile" , "uIIII " ,
532
+ if (PySys_Audit ("_winapi.CreateFile" , "ukkkk " ,
534
533
file_name , desired_access , share_mode ,
535
534
creation_disposition , flags_and_attributes ) < 0 ) {
536
535
return INVALID_HANDLE_VALUE ;
@@ -777,7 +776,7 @@ _winapi_CreateMutexW_impl(PyObject *module,
777
776
/*[clinic input]
778
777
_winapi.CreateNamedPipe -> HANDLE
779
778
780
- name: LPCTSTR
779
+ name: LPCWSTR
781
780
open_mode: DWORD
782
781
pipe_mode: DWORD
783
782
max_instances: DWORD
@@ -789,25 +788,25 @@ _winapi.CreateNamedPipe -> HANDLE
789
788
[clinic start generated code]*/
790
789
791
790
static HANDLE
792
- _winapi_CreateNamedPipe_impl (PyObject * module , LPCTSTR name , DWORD open_mode ,
791
+ _winapi_CreateNamedPipe_impl (PyObject * module , LPCWSTR name , DWORD open_mode ,
793
792
DWORD pipe_mode , DWORD max_instances ,
794
793
DWORD out_buffer_size , DWORD in_buffer_size ,
795
794
DWORD default_timeout ,
796
795
LPSECURITY_ATTRIBUTES security_attributes )
797
- /*[clinic end generated code: output=80f8c07346a94fbc input=5a73530b84d8bc37 ]*/
796
+ /*[clinic end generated code: output=7d6fde93227680ba input=5bd4e4a55639ee02 ]*/
798
797
{
799
798
HANDLE handle ;
800
799
801
- if (PySys_Audit ("_winapi.CreateNamedPipe" , "uII " ,
800
+ if (PySys_Audit ("_winapi.CreateNamedPipe" , "ukk " ,
802
801
name , open_mode , pipe_mode ) < 0 ) {
803
802
return INVALID_HANDLE_VALUE ;
804
803
}
805
804
806
805
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 );
811
810
Py_END_ALLOW_THREADS
812
811
813
812
if (handle == INVALID_HANDLE_VALUE )
@@ -1790,7 +1789,7 @@ _winapi_OpenEventW_impl(PyObject *module, DWORD desired_access,
1790
1789
{
1791
1790
HANDLE handle ;
1792
1791
1793
- if (PySys_Audit ("_winapi.OpenEventW" , "Iu " , desired_access , name ) < 0 ) {
1792
+ if (PySys_Audit ("_winapi.OpenEventW" , "ku " , desired_access , name ) < 0 ) {
1794
1793
return INVALID_HANDLE_VALUE ;
1795
1794
}
1796
1795
@@ -1821,7 +1820,7 @@ _winapi_OpenMutexW_impl(PyObject *module, DWORD desired_access,
1821
1820
{
1822
1821
HANDLE handle ;
1823
1822
1824
- if (PySys_Audit ("_winapi.OpenMutexW" , "Iu " , desired_access , name ) < 0 ) {
1823
+ if (PySys_Audit ("_winapi.OpenMutexW" , "ku " , desired_access , name ) < 0 ) {
1825
1824
return INVALID_HANDLE_VALUE ;
1826
1825
}
1827
1826
@@ -1882,7 +1881,7 @@ _winapi_OpenProcess_impl(PyObject *module, DWORD desired_access,
1882
1881
{
1883
1882
HANDLE handle ;
1884
1883
1885
- if (PySys_Audit ("_winapi.OpenProcess" , "II " ,
1884
+ if (PySys_Audit ("_winapi.OpenProcess" , "kk " ,
1886
1885
process_id , desired_access ) < 0 ) {
1887
1886
return INVALID_HANDLE_VALUE ;
1888
1887
}
@@ -2236,19 +2235,19 @@ _winapi_VirtualQuerySize_impl(PyObject *module, LPCVOID address)
2236
2235
/*[clinic input]
2237
2236
_winapi.WaitNamedPipe
2238
2237
2239
- name: LPCTSTR
2238
+ name: LPCWSTR
2240
2239
timeout: DWORD
2241
2240
/
2242
2241
[clinic start generated code]*/
2243
2242
2244
2243
static 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 ]*/
2247
2246
{
2248
2247
BOOL success ;
2249
2248
2250
2249
Py_BEGIN_ALLOW_THREADS
2251
- success = WaitNamedPipe (name , timeout );
2250
+ success = WaitNamedPipeW (name , timeout );
2252
2251
Py_END_ALLOW_THREADS
2253
2252
2254
2253
if (!success )
@@ -2917,7 +2916,7 @@ _winapi_CopyFile2_impl(PyObject *module, LPCWSTR existing_file_name,
2917
2916
HRESULT hr ;
2918
2917
COPYFILE2_EXTENDED_PARAMETERS params = { sizeof (COPYFILE2_EXTENDED_PARAMETERS ) };
2919
2918
2920
- if (PySys_Audit ("_winapi.CopyFile2" , "uuI " ,
2919
+ if (PySys_Audit ("_winapi.CopyFile2" , "uuk " ,
2921
2920
existing_file_name , new_file_name , flags ) < 0 ) {
2922
2921
return NULL ;
2923
2922
}
0 commit comments