@@ -973,28 +973,28 @@ Overlapped_AcceptEx(OverlappedObject *self, PyObject *args)
973
973
static int
974
974
parse_address (PyObject * obj , SOCKADDR * Address , int Length )
975
975
{
976
- Py_UNICODE * Host ;
976
+ char * Host ;
977
977
unsigned short Port ;
978
978
unsigned long FlowInfo ;
979
979
unsigned long ScopeId ;
980
980
981
981
memset (Address , 0 , Length );
982
982
983
- if (PyArg_ParseTuple (obj , "uH " , & Host , & Port ))
983
+ if (PyArg_ParseTuple (obj , "sH " , & Host , & Port ))
984
984
{
985
985
Address -> sa_family = AF_INET ;
986
- if (WSAStringToAddressW (Host , AF_INET , NULL , Address , & Length ) < 0 ) {
986
+ if (WSAStringToAddressA (Host , AF_INET , NULL , Address , & Length ) < 0 ) {
987
987
SetFromWindowsErr (WSAGetLastError ());
988
988
return -1 ;
989
989
}
990
990
((SOCKADDR_IN * )Address )-> sin_port = htons (Port );
991
991
return Length ;
992
992
}
993
- else if (PyArg_ParseTuple (obj , "uHkk " , & Host , & Port , & FlowInfo , & ScopeId ))
993
+ else if (PyArg_ParseTuple (obj , "sHkk " , & Host , & Port , & FlowInfo , & ScopeId ))
994
994
{
995
995
PyErr_Clear ();
996
996
Address -> sa_family = AF_INET6 ;
997
- if (WSAStringToAddressW (Host , AF_INET6 , NULL , Address , & Length ) < 0 ) {
997
+ if (WSAStringToAddressA (Host , AF_INET6 , NULL , Address , & Length ) < 0 ) {
998
998
SetFromWindowsErr (WSAGetLastError ());
999
999
return -1 ;
1000
1000
}
0 commit comments