summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2023-05-19 07:15:11 (GMT)
committerGitHub <noreply@github.com>2023-05-19 07:15:11 (GMT)
commit616fcad6e2e10b0d0252e7f3688e61c468c54e6e (patch)
treee967fa271d814f8f3ef741abbf81608b6a09e355 /Modules/posixmodule.c
parentfd04bfeaf7a4531120ad450dbd1afc121a2523ee (diff)
downloadcpython-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.c12
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