[pygobject/gsoc2009: 118/160] Clarify invoke error handling state



commit 455473b53a0badb57652f7558e4c0cf9b6380406
Author: Simon van der Linden <svdlinden src gnome org>
Date:   Thu Aug 6 14:15:28 2009 +0200

    Clarify invoke error handling state

 gi/pygi-argument.c |   13 ++++---------
 gi/pygi-info.c     |    5 ++++-
 2 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index 2b78f21..4b16c67 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -98,10 +98,12 @@ _pygi_gi_type_tag_size (GITypeTag type_tag)
         case GI_TYPE_TAG_GLIST:
         case GI_TYPE_TAG_GSLIST:
         case GI_TYPE_TAG_GHASH:
-        case GI_TYPE_TAG_ERROR:
             /* TODO */
             g_assert_not_reached();
             break;
+        case GI_TYPE_TAG_ERROR:
+            g_assert_not_reached();
+            break;
     }
 
     return size;
@@ -600,7 +602,6 @@ check_number_release:
             break;
         }
         case GI_TYPE_TAG_ERROR:
-            /* TODO */
             g_assert_not_reached();
             break;
     }
@@ -1147,12 +1148,6 @@ hash_table_release:
             break;
         }
         case GI_TYPE_TAG_ERROR:
-            /* Allow NULL GError, otherwise fall through */
-            if (object == Py_None) {
-                arg.v_pointer = NULL;
-                break;
-            }
-            /* TODO */
             g_assert_not_reached();
             break;
     }
@@ -1470,7 +1465,6 @@ _pygi_argument_to_object (GArgument  *arg,
             break;
         }
         case GI_TYPE_TAG_ERROR:
-            /* TODO */
             g_assert_not_reached();
             break;
     }
@@ -1714,6 +1708,7 @@ _pygi_argument_release (GArgument   *arg,
         }
         case GI_TYPE_TAG_ERROR:
             /* TODO */
+            g_assert_not_reached();
             break;
     }
 }
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 2b0f466..1d96b20 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -716,13 +716,16 @@ _wrap_g_function_info_invoke (PyGIBaseInfo *self,
 
             fullname = _pygi_g_base_info_get_fullname(self->info);
             if (fullname != NULL) {
+                /* FIXME: Raise the right error, out of the error domain. */
                 PyErr_Format(PyExc_RuntimeError, "Error invoking %s(): %s",
                     fullname, error->message);
                 g_free(fullname);
             }
 
             g_error_free(error);
-            /* TODO */
+
+            /* TODO: Release input arguments. */
+
             goto return_;
         }
     }



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