summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2012-08-23 18:44:01 +0300
committerAlexander Bokovoy <ab@samba.org>2012-09-07 12:31:42 +0200
commit6b2e7aabb79f7825568985a9138394dee06b76de (patch)
tree0af976eb333a490fcf104be1480c94887fee63a5 /buildtools/wafsamba
parentb86c8fd92d4c1b238572690660a2093f50ba88b1 (diff)
downloadsamba-6b2e7aabb79f7825568985a9138394dee06b76de.tar.gz
samba-6b2e7aabb79f7825568985a9138394dee06b76de.tar.bz2
samba-6b2e7aabb79f7825568985a9138394dee06b76de.zip
wafsamba/samba_abi: fix signature parsing for structures
Signature parsing for structure objects was broken. Existing regexp was greedingly cutting off additional curly brackets that belonged to the first and last structure member.
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_abi.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index 2966d7c1bf..69da7bd9a5 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -15,8 +15,9 @@ version_key = lambda x: map(int, x.split("."))
def normalise_signature(sig):
'''normalise a signature from gdb'''
sig = sig.strip()
- sig = re.sub('^\$[0-9]+\s=\s\{*', '', sig)
- sig = re.sub('\}(\s0x[0-9a-f]+\s<\w+>)?$', '', sig)
+ sig = re.sub('^\$[0-9]+\s=\s\{(.+)\}$', r'\1', sig)
+ sig = re.sub('^\$[0-9]+\s=\s\{(.+)\}(\s0x[0-9a-f]+\s<\w+>)+$', r'\1', sig)
+ sig = re.sub('^\$[0-9]+\s=\s(0x[0-9a-f]+)\s?(<\w+>)?$', r'\1', sig)
sig = re.sub('0x[0-9a-f]+', '0xXXXX', sig)
sig = re.sub('", <incomplete sequence (\\\\[a-z0-9]+)>', r'\1"', sig)