[gtk-doc/wip/desrt/fixes-for-glib: 3/3] gtkdoc-scan: fix regex for get_type() functions
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc/wip/desrt/fixes-for-glib: 3/3] gtkdoc-scan: fix regex for get_type() functions
- Date: Thu, 12 Mar 2015 23:07:20 +0000 (UTC)
commit 8e08e1f73d8934c37f8806400356d076d0866273
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Mar 12 18:50:50 2015 -0400
gtkdoc-scan: fix regex for get_type() functions
This regexp was apparently looking for "(void)" or "()" but in fact, due
to improper order of operations, would match any declaration with either
of "(void" or ")" in it (ie: everything).
Since nobody is really doing '()' anyway, just make it match '(void)'.
This fixes the inappropriate matching of g_io_extension_get_type().
https://bugzilla.gnome.org/show_bug.cgi?id=746118
gtkdoc-scan.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in
index a45744a..28ab6be 100755
--- a/gtkdoc-scan.in
+++ b/gtkdoc-scan.in
@@ -786,7 +786,7 @@ sub ScanHeader {
print DECL
"<FUNCTION>\n<NAME>$symbol</NAME>\n$deprecated<RETURNS>$ret_type</RETURNS>\n$decl\n</FUNCTION>\n";
if ($REBUILD_TYPES) {
# check if this looks like a get_type function and if so remember
- if (($symbol =~ m/_get_type$/) && ($ret_type =~ m/GType/) && ($decl =~
m/(void|)/)) {
+ if (($symbol =~ m/_get_type$/) && ($ret_type =~ m/GType/) && ($decl =~
m/(void)/)) {
@TRACE@("Adding get-type: [$ret_type] [$symbol] [$decl]\tfrom $input_file");
push (@get_types, $symbol);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]