summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-18 18:21:04 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-18 18:24:27 +1000
commit7aa4c11fc4c25df6ea25dfe28d3dca851b91f909 (patch)
tree90ec97e846d85a96717563bc50f5dad91f4035ea /buildtools/wafsamba
parent1a73e967f594c739f7533fdce0e1c18579d0bf21 (diff)
downloadsamba-7aa4c11fc4c25df6ea25dfe28d3dca851b91f909.tar.gz
samba-7aa4c11fc4c25df6ea25dfe28d3dca851b91f909.tar.bz2
samba-7aa4c11fc4c25df6ea25dfe28d3dca851b91f909.zip
build: more adjustments for the ABI type name maps
- use 'va_list' instead of 'struct __va_list_tag *' Using the C name for va_list is preferable - add support for negative ABI name matches in abi_match=. That is used to exlude ldb_*module_ops from the ldb ABI - don't include the ldb module ops or backend ops in the ABI
Diffstat (limited to 'buildtools/wafsamba')
-rw-r--r--buildtools/wafsamba/samba_abi.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index 6df3ac3187..e327e76d24 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -7,8 +7,7 @@ from TaskGen import feature, before, after
# please add new type mappings into the list below
abi_type_maps = {
'_Bool' : 'bool',
- '__va_list_tag' : 'va_list',
- 'struct va_list' : 'va_list'
+ 'struct __va_list_tag *' : 'va_list'
}
def normalise_signature(sig):
@@ -19,7 +18,14 @@ def normalise_signature(sig):
sig = re.sub('0x[0-9a-f]+', '0xXXXX', sig)
for t in abi_type_maps:
- sig = re.sub('\\b%s\\b' % t, abi_type_maps[t], sig)
+ # we need to cope with non-word characters in mapped types
+ m = t
+ m = m.replace('*', '\*')
+ if m[-1].isalnum() or m[-1] == '_':
+ m += '\\b'
+ if m[0].isalnum() or m[0] == '_':
+ m = '\\b' + m
+ sig = re.sub(m, abi_type_maps[t], sig)
return sig
def normalise_varargs(sig):
@@ -39,7 +45,9 @@ def parse_sigs(sigs, abi_match):
if abi_match:
matched = False
for p in abi_match:
- if fnmatch.fnmatch(sa[0], p):
+ if p[0] == '!' and fnmatch.fnmatch(sa[0], p[1:]):
+ break
+ elif fnmatch.fnmatch(sa[0], p):
matched = True
break
if not matched: