diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-25 04:57:33 -0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-25 04:57:33 -0800 |
commit | cbf2bafbd33ad21ef63400d94cb313c299e78a45 (patch) | |
tree | b4d515d5889aa6a545f164871987ac8da45022b0 /psutil/_psutil_osx.c | |
parent | b7c562e29c3b172af46afba378759a486f8fbb4d (diff) | |
download | psutil-cbf2bafbd33ad21ef63400d94cb313c299e78a45.tar.gz |
expose WINVER constants in the cext module
Diffstat (limited to 'psutil/_psutil_osx.c')
-rw-r--r-- | psutil/_psutil_osx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/psutil/_psutil_osx.c b/psutil/_psutil_osx.c index 1b98cc58..2be0b3f4 100644 --- a/psutil/_psutil_osx.c +++ b/psutil/_psutil_osx.c @@ -2043,6 +2043,12 @@ init_psutil_osx(void) #else PyObject *module = Py_InitModule("_psutil_osx", PsutilMethods); #endif + if (module == NULL) + INITERROR; + + if (psutil_setup() != 0) + INITERROR; + PyModule_AddIntConstant(module, "version", PSUTIL_VERSION); // process status constants, defined in: // http://fxr.watson.org/fxr/source/bsd/sys/proc.h?v=xnu-792.6.70#L149 @@ -2071,8 +2077,6 @@ init_psutil_osx(void) Py_INCREF(ZombieProcessError); PyModule_AddObject(module, "ZombieProcessError", ZombieProcessError); - psutil_setup(); - if (module == NULL) INITERROR; #if PY_MAJOR_VERSION >= 3 |