git » libfiu » commit d9d3e1d

preload: Fix function definition regexp to cope with "void *f();"

author Alberto Bertogli
2009-06-13 16:42:25 UTC
committer Alberto Bertogli
2009-06-13 16:42:25 UTC
parent 44db8f99e73b5b370e641ed3e42097055fe51b46

preload: Fix function definition regexp to cope with "void *f();"

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

preload/generate +1 -1

diff --git a/preload/generate b/preload/generate
index a2e293a..be51c49 100755
--- a/preload/generate
+++ b/preload/generate
@@ -12,7 +12,7 @@ import re
 
 # Function definition regular expression
 func_def_re = re.compile(
-		r'(?P<ret_type>.*)\s+(?P<name>\w+).*\((?P<params>.*)\).*;')
+	r'(?P<ret_type>(?:[\w\*]+\s+\**)+)+(?P<name>\w+).*\((?P<params>.*)\).*;')
 
 # Regular expression to extract the types and names of the parameters from a
 # string containing the definition parameters (e.g. from