You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
18 lines
599 B
Diff
18 lines
599 B
Diff
diff --git a/_fsevents.c b/_fsevents.c
|
|
index 8bf01ab..31eeef3 100644
|
|
--- a/_fsevents.c
|
|
+++ b/_fsevents.c
|
|
@@ -94,9 +94,11 @@ static PyObject* pyfsevents_loop(PyObject* self, PyObject* args) {
|
|
PyObject* thread;
|
|
if (!PyArg_ParseTuple(args, "O:loop", &thread))
|
|
return NULL;
|
|
- if (! PyEval_ThreadsInitialized()) {
|
|
+#if PY_MAJOR_VERSION < 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7)
|
|
+ if (!PyEval_ThreadsInitialized()) {
|
|
PyEval_InitThreads();
|
|
}
|
|
+#endif
|
|
|
|
/* allocate info and store thread state */
|
|
PyObject* value = PyDict_GetItem(loops, thread);
|