diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-08 04:48:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-08 04:48:50 (GMT) |
commit | d54cfb160c626626394e2f171d3ccfe03309f34e (patch) | |
tree | 7cadfc0541bd650485f4e8e1e9ee45252492f06e /Modules/posixmodule.h | |
parent | a3f19c3f52ddff85dd52eaa01b77b2d50cc9af3f (diff) | |
download | cpython-d54cfb160c626626394e2f171d3ccfe03309f34e.zip cpython-d54cfb160c626626394e2f171d3ccfe03309f34e.tar.gz cpython-d54cfb160c626626394e2f171d3ccfe03309f34e.tar.bz2 |
bpo-33441: Make the sigset_t converter available in other modules. (GH-6720)
* Expose the sigset_t converter via private API _Py_Sigset_Converter().
* Use Argument Clinic for parsing sigset_t in signalmodule.c.
* Raise ValueError instead OverflowError for integers out of
the C long range.
Based on patch by Pablo Galindo Salgado.
Diffstat (limited to 'Modules/posixmodule.h')
-rw-r--r-- | Modules/posixmodule.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/posixmodule.h b/Modules/posixmodule.h index 1ec1833..1e00562 100644 --- a/Modules/posixmodule.h +++ b/Modules/posixmodule.h @@ -17,8 +17,17 @@ PyAPI_FUNC(PyObject *) _PyLong_FromGid(gid_t); PyAPI_FUNC(int) _Py_Uid_Converter(PyObject *, void *); PyAPI_FUNC(int) _Py_Gid_Converter(PyObject *, void *); #endif /* MS_WINDOWS */ + +#if defined(PYPTHREAD_SIGMASK) || defined(HAVE_SIGWAIT) || \ + defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT) +# define HAVE_SIGSET_T #endif +#ifdef HAVE_SIGSET_T +PyAPI_FUNC(int) _Py_Sigset_Converter(PyObject *, void *); +#endif /* HAVE_SIGSET_T */ +#endif /* Py_LIMITED_API */ + #ifdef __cplusplus } #endif |