From 6a4e3bafac61250fb3fe5b335fb5811df3758e10 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sat, 22 Jan 2011 10:37:36 -0600 Subject: [PATCH] struct function pointer field regex fix. * parser/gapi2xml.pl: match when there is whitespace after the function name within the parens of a struct field declaration. --- parser/gapi2xml.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index b5d4cc009..ae6d8cd96 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -520,7 +520,7 @@ sub addClassElem $fields = $2; $fields =~ s!/\*.*?\*/!!g; # Remove comments foreach $field (split (/;/, $fields)) { - if ($field =~ /\s*(G_CONST_RETURN\s+)?(\S+\s*\**)\s*\(\s*\*\s*(\w+)\)\s*(\((.*?)\))?/) { + if ($field =~ /\s*(G_CONST_RETURN\s+)?(\S+\s*\**)\s*\(\s*\*\s*(\w+)\s*\)\s*(\((.*?)\))?/) { $ret = $1 . $2; $cname = $3; $parms = $5; $class_elem = $doc->createElement('method'); @@ -1042,7 +1042,7 @@ sub addSignalElem my $method = $1; $sig_elem->setAttribute('field_name', $method); - if ($class =~ /;\s*(\/\*< (public|protected|private) >\s*\*\/)?(G_CONST_RETURN\s+)?(\w+\s*\**)\s*\(\s*\*\s*$method\)\s*\((.*?)\);/) { + if ($class =~ /;\s*(\/\*< (public|protected|private) >\s*\*\/)?(G_CONST_RETURN\s+)?(\w+\s*\**)\s*\(\s*\*\s*$method\s*\)\s*\((.*?)\);/) { $ret = $4; $parms = $5; addReturnElem($sig_elem, $ret); if ($parms && ($parms ne "void")) {