[glibmm] h2def.py: Handle types such as 'const gchar* const *' for functions.
- From: Josà Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] h2def.py: Handle types such as 'const gchar* const *' for functions.
- Date: Mon, 27 Feb 2012 00:37:25 +0000 (UTC)
commit 033644e1a05aae97ac3fd161f73eac8097204ee2
Author: Josà Alburquerque <jaalburqu svn gnome org>
Date: Sun Feb 26 19:14:12 2012 -0500
h2def.py: Handle types such as 'const gchar* const *' for functions.
* tools/defs_gen/h2def.py (clean_func): Make deprecated handling more
general so that macros such as GDK_DEPRECATED and GDK_DEPRECATED_FOR()
are also stripped. Also replace '* const' with '*-const' in the
constants processing section so that types such as 'const gchar*
const*' (which are now used in the declaration of functions such as
gtk_about_dialog_get_authors()) are correctly processed.
ChangeLog | 11 +++++++++++
tools/defs_gen/h2def.py | 6 ++++--
2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4a85299..eb05f8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2012-02-26 Josà Alburquerque <jaalburquerque gmail com>
+ h2def.py: Handle types such as 'const gchar* const *' for functions.
+
+ * tools/defs_gen/h2def.py (clean_func): Make deprecated handling more
+ general so that macros such as GDK_DEPRECATED and GDK_DEPRECATED_FOR()
+ are also stripped. Also replace '* const' with '*-const' in the
+ constants processing section so that types such as 'const gchar*
+ const*' (which are now used in the declaration of functions such as
+ gtk_about_dialog_get_authors()) are correctly processed.
+
+2012-02-26 Josà Alburquerque <jaalburquerque gmail com>
+
Gio::DBus::[ActionGroup|MenuModel]: Have get() and not create() methods.
* gio/src/dbusactiongroup.hg:
diff --git a/tools/defs_gen/h2def.py b/tools/defs_gen/h2def.py
index 9499c66..e7be9f6 100755
--- a/tools/defs_gen/h2def.py
+++ b/tools/defs_gen/h2def.py
@@ -304,8 +304,8 @@ def clean_func(buf):
pat = re.compile(r"""G_GNUC_WARN_UNUSED_RESULT|G_INLINE_FUNC""", re.MULTILINE)
buf = pat.sub('', buf)
- #strip GLIB_DEPRECATED
- pat = re.compile(r"""GLIB_DEPRECATED""", re.MULTILINE)
+ #strip *_DEPRECATED*
+ pat = re.compile(r"""[A-Z]+_DEPRECATED\S*""", re.MULTILINE)
buf = pat.sub('', buf)
#we are not stripping G_GNUC_INTERNAL
@@ -334,6 +334,8 @@ def clean_func(buf):
buf = re.sub(r'\s*\*\s*G_CONST_RETURN\s*\*\s*', '** ', buf)
buf = string.replace(buf, 'G_CONST_RETURN ', 'const-')
buf = string.replace(buf, 'const ', 'const-')
+ # This is for types such as 'const gchar* const *'
+ buf = string.replace(buf, '* const', '*-const')
#strip GSEAL macros from the middle of function declarations:
pat = re.compile(r"""GSEAL""", re.VERBOSE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]