summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2011-02-24 13:04:44 +0100
committerMurray Cumming <murrayc@murrayc.com>2011-02-24 13:04:44 +0100
commitba29ea78537d2d41c6b6f54a6180a52ac3ae2937 (patch)
treeefa79efb1e6e26d42e513740b9eff61633727dfb
parente83194f152f896b344da937b8f3512b933e1fb10 (diff)
downloadglibmm-ba29ea78537d2d41c6b6f54a6180a52ac3ae2937.tar.gz
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.
-rw-r--r--ChangeLog8
-rw-r--r--tools/generate_wrap_init.pl.in15
2 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a85bb14c..a68e119e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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/)
{