Remove native popen() and fdopen(), replacing them with subprocess calls.

Fix a path to an assert in fileio_read().
Some misc tweaks.
This commit is contained in:
Guido van Rossum 2007-05-24 00:50:02 +00:00
parent d8595fe304
commit c2f93dc2e4
7 changed files with 59 additions and 1552 deletions

View file

@ -375,6 +375,12 @@ fileio_read(PyFileIOObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "i", &size))
return NULL;
if (size < 0) {
PyErr_SetString(PyExc_ValueError,
"negative read count");
return NULL;
}
bytes = PyBytes_FromStringAndSize(NULL, size);
if (bytes == NULL)
return NULL;