bpo-33441: Make the sigset_t converter available in other modules. by serhiy-storchaka · Pull Request #6720 · python/cpython

Conversation

@serhiy-storchaka

  • 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 @pablogsal.

https://bugs.python.org/issue33441

* 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.

pablogsal

long signum;
int overflow;

sigemptyset(mask);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check the return value of this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks.

pablogsal

Labels