summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-07 00:09:06 (GMT)
committerGitHub <noreply@github.com>2023-09-07 00:09:06 (GMT)
commit19eddb515a8cf87df7aaa347379b3e56c324385b (patch)
tree25a1a75282ae5d051ff1a5a5cf7b9af14f10e0d9 /Modules
parenta52a3509770f29f940cda9307704908949912276 (diff)
downloadcpython-19eddb515a8cf87df7aaa347379b3e56c324385b.zip
cpython-19eddb515a8cf87df7aaa347379b3e56c324385b.tar.gz
cpython-19eddb515a8cf87df7aaa347379b3e56c324385b.tar.bz2
gh-107211: No longer export internal _PyLong_FromUid() (#109037)
No longer export _PyLong_FromUid() and _Py_Sigset_Converter() internal C API function.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.h28
1 files changed, 17 insertions, 11 deletions
diff --git a/Modules/posixmodule.h b/Modules/posixmodule.h
index 5452ffb..8827ce1 100644
--- a/Modules/posixmodule.h
+++ b/Modules/posixmodule.h
@@ -2,31 +2,37 @@
#ifndef Py_POSIXMODULE_H
#define Py_POSIXMODULE_H
+#ifndef Py_LIMITED_API
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
+# include <sys/types.h> // uid_t
#endif
-#ifndef Py_LIMITED_API
#ifndef MS_WINDOWS
-PyAPI_FUNC(PyObject *) _PyLong_FromUid(uid_t);
-PyAPI_FUNC(PyObject *) _PyLong_FromGid(gid_t);
+extern PyObject* _PyLong_FromUid(uid_t);
+
+// Export for 'grp' shared extension
+PyAPI_FUNC(PyObject*) _PyLong_FromGid(gid_t);
+
+// Export for '_posixsubprocess' shared extension
PyAPI_FUNC(int) _Py_Uid_Converter(PyObject *, uid_t *);
+
+// Export for 'grp' shared extension
PyAPI_FUNC(int) _Py_Gid_Converter(PyObject *, gid_t *);
-#endif /* MS_WINDOWS */
+#endif // !MS_WINDOWS
-#if defined(PYPTHREAD_SIGMASK) || defined(HAVE_SIGWAIT) || \
- defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT)
-# define HAVE_SIGSET_T
+#if (defined(PYPTHREAD_SIGMASK) || defined(HAVE_SIGWAIT) \
+ || defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT))
+# define HAVE_SIGSET_T
#endif
-PyAPI_FUNC(int) _Py_Sigset_Converter(PyObject *, void *);
-#endif /* Py_LIMITED_API */
+extern int _Py_Sigset_Converter(PyObject *, void *);
#ifdef __cplusplus
}
#endif
-#endif /* !Py_POSIXMODULE_H */
+#endif // !Py_LIMITED_API
+#endif // !Py_POSIXMODULE_H