This commit is contained in:
Kovid Goyal 2022-08-14 19:16:47 +05:30
parent ae16fed39b
commit a9f1928913
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1638,11 +1638,12 @@ void cleanup_glfw(void) {
#endif
}
// constants {{{
bool
init_glfw(PyObject *m) {
if (PyModule_AddFunctions(m, module_methods) != 0) return false;
register_at_exit_cleanup_func(GLFW_CLEANUP_FUNC, cleanup_glfw);
// constants {{{
#define ADDC(n) if(PyModule_AddIntConstant(m, #n, n) != 0) return false;
ADDC(GLFW_RELEASE);
ADDC(GLFW_PRESS);
@ -1884,9 +1885,8 @@ init_glfw(PyObject *m) {
// ---
ADDC(GLFW_CONNECTED);
ADDC(GLFW_DISCONNECTED);
#undef ADDC
// }}}
return true;
#undef ADDC
}
// }}}
// }}}