depot/third_party/nixpkgs/pkgs/development/python-modules/pyfribidi/pyfribidi-clang.patch

18 lines
590 B
Diff
Raw Normal View History

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);