[glibmm] Gmmproc: Warn about unwrapped properties.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gmmproc: Warn about unwrapped properties.
- Date: Wed, 5 Jan 2011 16:49:27 +0000 (UTC)
commit 10e393a02a5adfb4b6d7d630d6de1cb43cd71849
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Wed Jan 5 17:48:41 2011 +0100
Gmmproc: Warn about unwrapped properties.
* tools/gmmproc.in: When displaying a list of unwrapped properties,
ignore the ones that are nonreadable and construct only.
* tools/pm/Property.pm: Added entity_type member initialized with
'property' value to Property class, which allows us to sort out
which unwrapped entities are actually properties.
ChangeLog | 10 ++++++++++
tools/gmmproc.in | 3 ++-
tools/pm/Property.pm | 1 +
3 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e1bd9e3..304cae6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-01-05 Krzesimir Nowak <qdlacz gmail com>
+
+ Gmmproc: Warn about unwrapped properties.
+
+ * tools/gmmproc.in: When displaying a list of unwrapped properties,
+ ignore the ones that are nonreadable and construct only.
+ * tools/pm/Property.pm: Added entity_type member initialized with
+ 'property' value to Property class, so when getting unwrapped
+ entities, we can sort out which are properties also.
+
2.27.5.1:
2010-12-30 José Alburquerque <jaalburqu svn gnome org>
diff --git a/tools/gmmproc.in b/tools/gmmproc.in
index 9b735bd..a39ab0c 100644
--- a/tools/gmmproc.in
+++ b/tools/gmmproc.in
@@ -116,7 +116,8 @@ if ($main::unwrapped)
{
my @methods = grep { $$_{entity_type} eq 'method' and $$_{c_name} !~ m/^_/s } @unwrapped;
my @signals = grep { $$_{entity_type} eq 'signal' } @unwrapped;
- my @properties = grep { $$_{entity_type} eq 'property' } @unwrapped;
+ # Don't take non-readable construct-only properties into account.
+ my @properties = grep { $$_{entity_type} eq 'property' and ( $$_{readable} or not $$_{construct_only} ) } @unwrapped;
local $, = "\ngmmproc: ";
local $\ = "\n";
diff --git a/tools/pm/Property.pm b/tools/pm/Property.pm
index 703cfdc..80f21bb 100644
--- a/tools/pm/Property.pm
+++ b/tools/pm/Property.pm
@@ -46,6 +46,7 @@ sub new
$$self{readable} = ($1 eq "#t") if ($def =~ s/\(readable (\S+)\)//);
$$self{writable} = ($1 eq "#t") if ($def =~ s/\(writable (\S+)\)//);
$$self{construct_only} = ($1 eq "#t") if ($def =~ s/\(construct-only (\S+)\)//);
+ $$self{entity_type} = 'property';
# Property documentation:
my $propertydocs = $1 if ($def =~ s/\(docs "([^"]*)"\)//);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]