finalize the fontconfig library on exit
This commit is contained in:
parent
cda385b37c
commit
150ffab72d
@ -85,6 +85,10 @@ init_fontconfig_library(PyObject *module) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "Failed to initialize the fontconfig library");
|
||||
return false;
|
||||
}
|
||||
if (Py_AtExit(FcFini) != 0) {
|
||||
PyErr_SetString(PyExc_RuntimeError, "Failed to register the fontconfig library at exit handler");
|
||||
return false;
|
||||
}
|
||||
if (PyModule_AddFunctions(module, module_methods) != 0) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user