[gobject-introspection] [scanner] "GError *" is not the same as "GError **"



commit 6710cfa5063c041894d700b6cf6b4b85cdd08025
Author: Dan Winship <danw gnome org>
Date:   Wed Dec 9 16:37:18 2009 -0500

    [scanner] "GError *" is not the same as "GError **"
    
    Only set "throws" in the latter case
    
    https://bugzilla.gnome.org/show_bug.cgi?id=602512

 giscanner/glibtransformer.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/giscanner/glibtransformer.py b/giscanner/glibtransformer.py
index 158f8e8..d44987b 100644
--- a/giscanner/glibtransformer.py
+++ b/giscanner/glibtransformer.py
@@ -960,9 +960,9 @@ class GLibTransformer(object):
 
         last_param = func.parameters.pop()
 
-        if (last_param.type.name == 'GLib.Error' or
-            (self._namespace_name == 'GLib' and
-             last_param.type.name == 'Error')):
+        # Checking type.name=='GLib.Error' generates false positives
+        # on methods that take a 'GError *'
+        if last_param.type.ctype == 'GError**':
             func.throws = True
         else:
             func.parameters.append(last_param)



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