From 1898084afabc78f962e515293e1382b7eb8e95aa Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 21 Nov 2007 21:53:11 +0000 Subject: [PATCH] More PyBytes -> PyString. --- Modules/posixmodule.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 658d159c4a..5d65985f33 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -6568,11 +6568,11 @@ win32_urandom(PyObject *self, PyObject *args) } /* Allocate bytes */ - result = PyBytes_FromStringAndSize(NULL, howMany); + result = PyString_FromStringAndSize(NULL, howMany); if (result != NULL) { /* Get random data */ if (! pCryptGenRandom(hCryptProv, howMany, (unsigned char*) - PyBytes_AS_STRING(result))) { + PyString_AS_STRING(result))) { Py_DECREF(result); return win32_error("CryptGenRandom", NULL); } @@ -6639,11 +6639,11 @@ vms_urandom(PyObject *self, PyObject *args) "negative argument not allowed"); /* Allocate bytes */ - result = PyBytes_FromStringAndSize(NULL, howMany); + result = PyString_FromStringAndSize(NULL, howMany); if (result != NULL) { /* Get random data */ if (RAND_pseudo_bytes((unsigned char*) - PyBytes_AS_STRING(result), + PyString_AS_STRING(result), howMany) < 0) { Py_DECREF(result); return PyErr_Format(PyExc_ValueError, -- 2.50.0