diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-01-21 16:01:41 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-01-21 16:01:41 +0100 |
commit | 2f65ea74cba1843162c0ea3ee0274782e1c2de50 (patch) | |
tree | 49b8e4eb583693435d150658af35b081bd991a80 | |
parent | 55a3341c7ede13438f4377bb49ac209aa191bec9 (diff) | |
download | psutil-2f65ea74cba1843162c0ea3ee0274782e1c2de50.tar.gz |
linux / users(): use _Py_PARSE_PID
-rw-r--r-- | psutil/_psutil_linux.c | 2 | ||||
-rw-r--r-- | psutil/_psutil_posix.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/psutil/_psutil_linux.c b/psutil/_psutil_linux.c index bc256a12..3d9ead83 100644 --- a/psutil/_psutil_linux.c +++ b/psutil/_psutil_linux.c @@ -444,7 +444,7 @@ psutil_users(PyObject *self, PyObject *args) { if (! py_hostname) goto error; py_tuple = Py_BuildValue( - "(OOOfOi)", + "(OOOfO" _Py_PARSE_PID ")", py_username, // username py_tty, // tty py_hostname, // hostname diff --git a/psutil/_psutil_posix.c b/psutil/_psutil_posix.c index 8bda75f2..f4ecbd93 100644 --- a/psutil/_psutil_posix.c +++ b/psutil/_psutil_posix.c @@ -670,7 +670,10 @@ static PyMethodDef mod_methods[] = { if (mod == NULL) INITERR; -#if defined(PSUTIL_BSD) || defined(PSUTIL_OSX) || defined(PSUTIL_SUNOS) || defined(PSUTIL_AIX) +#if defined(PSUTIL_BSD) || \ + defined(PSUTIL_OSX) || \ + defined(PSUTIL_SUNOS) || \ + defined(PSUTIL_AIX) if (PyModule_AddIntConstant(mod, "AF_LINK", AF_LINK)) INITERR; #endif |