[pygobject] [gi] return PYGLIB_MODULE_ERROR_RETURN on error



commit c913c1789296310c2cf27554ce719d7f6e9c94cd
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Feb 2 20:37:21 2011 +0100

    [gi] return PYGLIB_MODULE_ERROR_RETURN on error
    
    This is to avoid some warnings when building with python 3

 gi/gimodule.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gi/gimodule.c b/gi/gimodule.c
index 3ab08d0..f70d0f2 100644
--- a/gi/gimodule.c
+++ b/gi/gimodule.c
@@ -375,11 +375,11 @@ PYGLIB_MODULE_START(_gi, "_gi")
     PyObject *api;
 
     if (pygobject_init (-1, -1, -1) == NULL) {
-        return;
+        return PYGLIB_MODULE_ERROR_RETURN;
     }
 
     if (_pygobject_import() < 0) {
-        return;
+        return PYGLIB_MODULE_ERROR_RETURN;
     }
 
     _pygi_repository_register_types (module);
@@ -390,7 +390,7 @@ PYGLIB_MODULE_START(_gi, "_gi")
 
     api = PYGLIB_CPointer_WrapPointer ( (void *) &CAPI, "gi._API");
     if (api == NULL) {
-        return;
+        return PYGLIB_MODULE_ERROR_RETURN;
     }
     PyModule_AddObject (module, "_API", api);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]