[glibmm] gmmproc: _WRAP_ENUM: Skip enum constants whose names are deleted.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] gmmproc: _WRAP_ENUM: Skip enum constants whose names are deleted.
- Date: Mon, 7 Jan 2013 16:11:08 +0000 (UTC)
commit 76b64020e39c2205a847557f84be31c774c17a13
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Jan 7 17:04:11 2013 +0100
gmmproc: _WRAP_ENUM: Skip enum constants whose names are deleted.
* tools/pm/Enum.pm, build_element_list(): If a custom substitution argument
in _WRAP_ENUM() removes all of an enum constant's name, exclude that constant
from the element list. Useful for GdkEventType. Bug #544694.
ChangeLog | 8 ++++++++
tools/pm/Enum.pm | 5 ++++-
2 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b362104..c6e9a51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2013-01-07 Kjell Ahlstedt <kjell ahlstedt bredband net>
+ gmmproc: _WRAP_ENUM: Skip enum constants whose names are deleted.
+
+ * tools/pm/Enum.pm, build_element_list(): If a custom substitution argument
+ in _WRAP_ENUM() removes all of an enum constant's name, exclude that constant
+ from the element list. Useful for GdkEventType. Bug #544694.
+
+2013-01-07 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
gmmproc: Improve the search for documentation of enums.
* tools/pm/Enum.pm, build_element_list(): Search for value documentation
diff --git a/tools/pm/Enum.pm b/tools/pm/Enum.pm
index 6f3bf21..2c71ab8 100644
--- a/tools/pm/Enum.pm
+++ b/tools/pm/Enum.pm
@@ -327,6 +327,9 @@ sub build_element_list($$$$)
$value =~ s/${subst_in[$ii]}/${subst_out[$ii]}/;
}
+ # Skip this element, if its name has been deleted.
+ next if($name eq "");
+
if($docs ne "")
{
# Make sure the docs is indented the right number of spaces.
@@ -338,10 +341,10 @@ sub build_element_list($$$$)
$docs = "${indent}${docs}";
}
+ $elements .= ",\n" if($elements ne "");
$elements .= $docs;
$elements .= "${indent}${name}";
$elements .= " = ${value}" if($value ne "");
- $elements .= ",\n" if($i < $num_elements - 1);
}
return $elements;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]