[pygi] Change SCOPE_TYPE_INVALID handling to be a warning and not an error



commit 10e558ca283cdd06725bb0d24b5071ccbecc7d13
Author: Zach Goldberg <zach zachgoldberg com>
Date:   Tue Apr 20 22:57:14 2010 -0400

    Change SCOPE_TYPE_INVALID handling to be a warning and not an error
    
    Be slightly nicer to library maintainers.  It really isn't a fatal condition
    if we don't have a proper scope type, better to leave a good code comment
    and a warning than to cause their code to segv.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=616356

 gi/pygi-closure.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index a47e675..a853df0 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -148,7 +148,8 @@ end:
         async_free_list = g_slist_prepend(async_free_list, closure);
         break;
     default:
-        g_assert_not_reached();
+        /* Invalid scope type.  Perhaps a typo in the annotation? */
+        g_warn_if_reached();
     }
 }
 



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