summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-21 21:53:11 (GMT)
committerGuido van Rossum <guido@python.org>2007-11-21 21:53:11 (GMT)
commit1898084afabc78f962e515293e1382b7eb8e95aa (patch)
tree641ec347c98ba55d2e90732283a6d1fbe37353b9 /Modules/posixmodule.c
parentf9e443c49f682d36dc4a183f1ce5f6b32f84d80c (diff)
downloadcpython-1898084afabc78f962e515293e1382b7eb8e95aa.zip
cpython-1898084afabc78f962e515293e1382b7eb8e95aa.tar.gz
cpython-1898084afabc78f962e515293e1382b7eb8e95aa.tar.bz2
More PyBytes -> PyString.
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 658d159..5d65985 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,