[glibmm/gmmproc-refactor] Bail out if we have invalid ownership transfer.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm/gmmproc-refactor] Bail out if we have invalid ownership transfer.
- Date: Fri, 13 Jul 2012 14:31:20 +0000 (UTC)
commit e02b29aac1b03bf0192fa71c7248a9fb9e324be9
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Thu Jul 12 18:15:08 2012 +0200
Bail out if we have invalid ownership transfer.
tools/pm/Common/Output/Shared.pm | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/tools/pm/Common/Output/Shared.pm b/tools/pm/Common/Output/Shared.pm
index ba2ac4c..41ccb1f 100644
--- a/tools/pm/Common/Output/Shared.pm
+++ b/tools/pm/Common/Output/Shared.pm
@@ -612,6 +612,14 @@ sub get_parent_from_object ($$)
sub convert_or_die
{
my ($wrap_parser, $from, $to, $transfer, $subst) = @_;
+ my @good_range = Common::TypeInfo::Common::transfer_good_range ();
+
+ unless ($transfer ~~ @good_range)
+ {
+ my $message = join ('', 'Got invalid transfer for conversion from `', $from, '\' to `', $to, '\' for substitution `', $subst, '\'');
+ $wrap_parser->fixed_error ($message);
+ }
+
my $type_info_local = $wrap_parser->get_type_info_local ();
my $conversion = $type_info_local->get_conversion ($from,
$to,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]