depot/third_party/nixpkgs/pkgs/development/python-modules/pyfribidi/pyfribidi-clang.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

17 lines
590 B
Diff

diff --git a/pyfribidi.c b/pyfribidi.c
index 9a0120d..238134a 100644
--- a/pyfribidi.c
+++ b/pyfribidi.c
@@ -148,10 +148,11 @@ init_pyfribidi (void)
{
#if PY_MAJOR_VERSION >= 3
PyObject *module = PyModule_Create (&pyfribidi_moduledef);
+ if (module == NULL) return NULL;
#else
PyObject *module = Py_InitModule ("_pyfribidi", PyfribidiMethods);
+ if (module == NULL) return;
#endif
- if (module == NULL) return NULL;
PyModule_AddIntConstant (module, "RTL", (long) FRIBIDI_TYPE_RTL);
PyModule_AddIntConstant (module, "LTR", (long) FRIBIDI_TYPE_LTR);