Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1898084

Browse files
committed
More PyBytes -> PyString.
1 parent f9e443c commit 1898084

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/posixmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6568,11 +6568,11 @@ win32_urandom(PyObject *self, PyObject *args)
65686568
}
65696569

65706570
/* Allocate bytes */
6571-
result = PyBytes_FromStringAndSize(NULL, howMany);
6571+
result = PyString_FromStringAndSize(NULL, howMany);
65726572
if (result != NULL) {
65736573
/* Get random data */
65746574
if (! pCryptGenRandom(hCryptProv, howMany, (unsigned char*)
6575-
PyBytes_AS_STRING(result))) {
6575+
PyString_AS_STRING(result))) {
65766576
Py_DECREF(result);
65776577
return win32_error("CryptGenRandom", NULL);
65786578
}
@@ -6639,11 +6639,11 @@ vms_urandom(PyObject *self, PyObject *args)
66396639
"negative argument not allowed");
66406640

66416641
/* Allocate bytes */
6642-
result = PyBytes_FromStringAndSize(NULL, howMany);
6642+
result = PyString_FromStringAndSize(NULL, howMany);
66436643
if (result != NULL) {
66446644
/* Get random data */
66456645
if (RAND_pseudo_bytes((unsigned char*)
6646-
PyBytes_AS_STRING(result),
6646+
PyString_AS_STRING(result),
66476647
howMany) < 0) {
66486648
Py_DECREF(result);
66496649
return PyErr_Format(PyExc_ValueError,

0 commit comments

Comments
 (0)