diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | tools/generate_wrap_init.pl.in | 15 |
2 files changed, 21 insertions, 2 deletions
@@ -1,5 +1,13 @@ 2011-02-24 Murray Cumming <murrayc@murrayc.com> + Restore the Gio::DBus::Error registration. + + * tools/generate_wrap_init.pl.in: Use a qualified C++ name for the key in + the associated-array of exceptions. This seems to work, though it feels very + hacky. + +2011-02-24 Murray Cumming <murrayc@murrayc.com> + Rename Gio::DBus::DBusError to Gio::DBus::Error. * gio/src/dbuserror.hg: Rename the class to Error. diff --git a/tools/generate_wrap_init.pl.in b/tools/generate_wrap_init.pl.in index 804dab21..5d62bf2d 100644 --- a/tools/generate_wrap_init.pl.in +++ b/tools/generate_wrap_init.pl.in @@ -128,9 +128,20 @@ while ($ARGV[0]) $line =~ s/\)//; ($cppname, $cname, $ccast) = split(/,/, $line); - $exceptions{$cppname} = $cname; + # Generate a unique ID for the GError. + # Otherwise we will overwrite Gio::Error with Gio::DBus::Error. + # TODO: Isn't this necessary for other classes (not just Errors)? + my $qualification = ""; + foreach ( @tmpnamespace ) + { + $qualification .= "::$_"; + } + + my $qualified_cppname = $qualification . "::" . $cppname; + # print "debug: " . $qualified_cppname . "\n"; + $exceptions{$qualified_cppname} = $cname; @{$namespaces{$cppname}} = ( @tmpnamespace ); #both are lists of strings - $basenames{$cppname} = lc($ccast); + $basenames{$qualified_cppname} = lc($ccast); } elsif (/_GTKMMPROC_WIN32_NO_WRAP/) { |