mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
OS/2 EMX port changes (Modules part of patch #450267):
Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
This commit is contained in:
parent
38b504e9e3
commit
7bf6833e17
11 changed files with 47 additions and 11 deletions
|
@ -128,8 +128,12 @@ pwd_getpwall(PyObject *self, PyObject *args)
|
|||
return NULL;
|
||||
if ((d = PyList_New(0)) == NULL)
|
||||
return NULL;
|
||||
#if defined(PYOS_OS2) && defined(PYCC_GCC)
|
||||
if ((p = getpwuid(0)) != NULL) {
|
||||
#else
|
||||
setpwent();
|
||||
while ((p = getpwent()) != NULL) {
|
||||
#endif
|
||||
PyObject *v = mkpwent(p);
|
||||
if (v == NULL || PyList_Append(d, v) != 0) {
|
||||
Py_XDECREF(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue