diff options
author | Guido van Rossum <guido@python.org> | 1998-04-28 16:04:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-04-28 16:04:50 (GMT) |
commit | 92f01c54d4796f81bc9cb8fd1883fc5dfe176a26 (patch) | |
tree | 2b144162fd84e6f19fb70625b93b544b2b9e01d9 /Tools/bgen | |
parent | db9a7b9ef6f341841538a2275d0013dd3bcda1fb (diff) | |
download | cpython-92f01c54d4796f81bc9cb8fd1883fc5dfe176a26.zip cpython-92f01c54d4796f81bc9cb8fd1883fc5dfe176a26.tar.gz cpython-92f01c54d4796f81bc9cb8fd1883fc5dfe176a26.tar.bz2 |
accept * in return value type and convert it to _ptr after the
typename, as in argument types.
(Jack)
Diffstat (limited to 'Tools/bgen')
-rw-r--r-- | Tools/bgen/bgen/scantools.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py index 851a4d0..80cfd5e 100644 --- a/Tools/bgen/bgen/scantools.py +++ b/Tools/bgen/bgen/scantools.py @@ -228,7 +228,7 @@ if missing: raise "Missing Types" # self.type_pat = "pascal[ \t\n]+\(<type>[a-zA-Z0-9_ \t]*[a-zA-Z0-9_]\)[ \t\n]+" self.type_pat = "EXTERN_API" + \ "[ \t\n]*([ \t\n]*" + \ - "\(<type>[a-zA-Z0-9_ \t]*[a-zA-Z0-9_]\)" + \ + "\(<type>[a-zA-Z0-9_* \t]*[a-zA-Z0-9_*]\)" + \ "[ \t\n]*)[ \t\n]*" self.name_pat = "\(<name>[a-zA-Z0-9_]+\)[ \t\n]*" self.args_pat = "(\(<args>\([^(;=)]+\|([^(;=)]*)\)*\))" @@ -399,6 +399,7 @@ if missing: raise "Missing Types" self.report("Bad raw spec: %s", `raw`) return type, name, args = self.whole.group('type', 'name', 'args') + type = regsub.gsub("\*", " ptr", type) type = regsub.gsub("[ \t]+", "_", type) if name in self.alreadydone: self.report("Name has already been defined: %s", `name`) |