mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 09:48:09 +02:00
finalize the fontconfig library on exit
This commit is contained in:
@@ -85,6 +85,10 @@ init_fontconfig_library(PyObject *module) {
|
|||||||
PyErr_SetString(PyExc_RuntimeError, "Failed to initialize the fontconfig library");
|
PyErr_SetString(PyExc_RuntimeError, "Failed to initialize the fontconfig library");
|
||||||
return false;
|
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;
|
if (PyModule_AddFunctions(module, module_methods) != 0) return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user