&filename, &lineno, &module, ®istry))
return NULL;
+#ifdef Py_GIL_DISABLED
WarningsState *st = warnings_get_state(tstate->interp);
assert(st != NULL);
+#endif
Py_BEGIN_CRITICAL_SECTION_MUT(&st->mutex);
res = warn_explicit(tstate, category, message, filename, lineno, module, registry,
}
}
+#ifdef Py_GIL_DISABLED
WarningsState *st = warnings_get_state(tstate->interp);
assert(st != NULL);
+#endif
Py_BEGIN_CRITICAL_SECTION_MUT(&st->mutex);
returned = warn_explicit(tstate, category, message, filename, lineno,
return -1;
}
+#ifdef Py_GIL_DISABLED
WarningsState *st = warnings_get_state(tstate->interp);
assert(st != NULL);
+#endif
Py_BEGIN_CRITICAL_SECTION_MUT(&st->mutex);
res = warn_explicit(tstate, category, message, filename, lineno,
PyObject *res;
PyThreadState *tstate = get_current_tstate();
if (tstate != NULL) {
+#ifdef Py_GIL_DISABLED
WarningsState *st = warnings_get_state(tstate->interp);
assert(st != NULL);
+#endif
Py_BEGIN_CRITICAL_SECTION_MUT(&st->mutex);
res = warn_explicit(tstate, category, message, filename, lineno,