Skip to content

Commit

Permalink
Merge pull request #7002 from radarhere/setup_module
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Mar 12, 2023
2 parents 8ef6503 + 347dea1 commit 436ebdb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/_webp.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,13 @@ addTransparencyFlagToModule(PyObject *m) {

static int
setup_module(PyObject *m) {
#ifdef HAVE_WEBPANIM
/* Ready object types */
if (PyType_Ready(&WebPAnimDecoder_Type) < 0 ||
PyType_Ready(&WebPAnimEncoder_Type) < 0) {
return -1;
}
#endif
PyObject *d = PyModule_GetDict(m);
addMuxFlagToModule(m);
addAnimFlagToModule(m);
Expand All @@ -963,13 +970,6 @@ setup_module(PyObject *m) {
PyDict_SetItemString(
d, "webpdecoder_version", PyUnicode_FromString(WebPDecoderVersion_str()));

#ifdef HAVE_WEBPANIM
/* Ready object types */
if (PyType_Ready(&WebPAnimDecoder_Type) < 0 ||
PyType_Ready(&WebPAnimEncoder_Type) < 0) {
return -1;
}
#endif
return 0;
}

Expand Down

0 comments on commit 436ebdb

Please sign in to comment.