File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments