diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2023-05-19 07:15:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-19 07:15:11 (GMT) |
commit | 616fcad6e2e10b0d0252e7f3688e61c468c54e6e (patch) | |
tree | e967fa271d814f8f3ef741abbf81608b6a09e355 /Modules/posixmodule.c | |
parent | fd04bfeaf7a4531120ad450dbd1afc121a2523ee (diff) | |
download | cpython-616fcad6e2e10b0d0252e7f3688e61c468c54e6e.zip cpython-616fcad6e2e10b0d0252e7f3688e61c468c54e6e.tar.gz cpython-616fcad6e2e10b0d0252e7f3688e61c468c54e6e.tar.bz2 |
GH-103545: Add macOS specific constants for ``os.setpriority`` to ``os`` (#104606)
This adds a number of PRIO_DARWIN_* constants to the os module for use with os.setpriority.
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 5022fde..531f26b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -15917,6 +15917,18 @@ all_ins(PyObject *m) #ifdef PRIO_USER if (PyModule_AddIntMacro(m, PRIO_USER)) return -1; #endif +#ifdef PRIO_DARWIN_THREAD + if (PyModule_AddIntMacro(m, PRIO_DARWIN_THREAD)) return -1; +#endif +#ifdef PRIO_DARWIN_PROCESS + if (PyModule_AddIntMacro(m, PRIO_DARWIN_PROCESS)) return -1; +#endif +#ifdef PRIO_DARWIN_BG + if (PyModule_AddIntMacro(m, PRIO_DARWIN_BG)) return -1; +#endif +#ifdef PRIO_DARWIN_NONUI + if (PyModule_AddIntMacro(m, PRIO_DARWIN_NONUI)) return -1; +#endif #ifdef O_CLOEXEC if (PyModule_AddIntMacro(m, O_CLOEXEC)) return -1; #endif |