update secp256k1 extmod for free-threaded Python builds
This commit is contained in:
parent
6195b3b4c6
commit
efe3cd2261
1 changed files with 7 additions and 0 deletions
|
|
@ -428,12 +428,19 @@ PyMODINIT_FUNC PyInit_secp256k1(void) {
|
||||||
|
|
||||||
if (module == NULL)
|
if (module == NULL)
|
||||||
INITERROR;
|
INITERROR;
|
||||||
|
|
||||||
struct module_state *st = GETSTATE(module);
|
struct module_state *st = GETSTATE(module);
|
||||||
|
|
||||||
st->error = PyErr_NewException("secp256k1.Error", NULL, NULL);
|
st->error = PyErr_NewException("secp256k1.Error", NULL, NULL);
|
||||||
|
|
||||||
if (st->error == NULL) {
|
if (st->error == NULL) {
|
||||||
Py_DECREF(module);
|
Py_DECREF(module);
|
||||||
INITERROR;
|
INITERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef Py_GIL_DISABLED
|
||||||
|
PyUnstable_Module_SetGIL(module, Py_MOD_GIL_NOT_USED);
|
||||||
|
#endif
|
||||||
|
|
||||||
return module;
|
return module;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue