Commit f919054e authored by Dino Viehland's avatar Dino Viehland Committed by GitHub

bpo-38116: Convert select module to PEP-384 (#15971)

* Convert select module to PEP-384

Summary: Do the necessary versions to be Pyro-compatible, including migrating `PyType_Ready` to `PyType_FromSpec` and moving static data into a new `_selectstate` struct.

* 📜🤖 Added by blurb_it.

* Fixup Mac OS/X build
parent 0247e80f
The select module is now PEP-384 compliant and no longer has static state
\ No newline at end of file
...@@ -959,11 +959,11 @@ select_kqueue(PyTypeObject *type, PyObject *args, PyObject *kwargs) ...@@ -959,11 +959,11 @@ select_kqueue(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{ {
PyObject *return_value = NULL; PyObject *return_value = NULL;
if ((type == &kqueue_queue_Type) && if ((type == _selectstate_global->kqueue_queue_Type) &&
!_PyArg_NoPositional("kqueue", args)) { !_PyArg_NoPositional("kqueue", args)) {
goto exit; goto exit;
} }
if ((type == &kqueue_queue_Type) && if ((type == _selectstate_global->kqueue_queue_Type) &&
!_PyArg_NoKeywords("kqueue", kwargs)) { !_PyArg_NoKeywords("kqueue", kwargs)) {
goto exit; goto exit;
} }
...@@ -1215,4 +1215,4 @@ exit: ...@@ -1215,4 +1215,4 @@ exit:
#ifndef SELECT_KQUEUE_CONTROL_METHODDEF #ifndef SELECT_KQUEUE_CONTROL_METHODDEF
#define SELECT_KQUEUE_CONTROL_METHODDEF #define SELECT_KQUEUE_CONTROL_METHODDEF
#endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */ #endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */
/*[clinic end generated code: output=03041f3d09b04a3d input=a9049054013a1b77]*/ /*[clinic end generated code: output=26bb05e5fba2bfd1 input=a9049054013a1b77]*/
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment