From 9c3e294400234ebdf9b98031bae583524fd0b0ac Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 30 Aug 2012 18:46:23 +0300 Subject: wafsamba/samba_abi: allow negative matches in abi_match abi_match keyword for samba libraries allows to selectively apply ABI versions. samba_abi.py implied !sym to be used to say 'all symbols but this one' but the actual demotion of !sym to the local scope was not implemented. Now abi_match='!sym' properly moves symbol to a local scope. --- buildtools/wafsamba/samba_abi.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'buildtools') diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py index 69da7bd9a5..f5cac8a134 100644 --- a/buildtools/wafsamba/samba_abi.py +++ b/buildtools/wafsamba/samba_abi.py @@ -182,10 +182,19 @@ def abi_write_vscript(vscript, libname, current_version, versions, symmap, abi_m f.write("}%s;\n\n" % last_key) last_key = " %s" % symver f.write("%s {\n" % current_version) + local_abi = filter(lambda x: x[0] == '!', abi_match) + global_abi = filter(lambda x: x[0] != '!', abi_match) f.write("\tglobal:\n") - for x in abi_match: - f.write("\t\t%s;\n" % x) - if abi_match != ["*"]: + if len(global_abi) > 0: + for x in global_abi: + f.write("\t\t%s;\n" % x) + else: + f.write("\t\t*;\n") + if len(local_abi) > 0: + f.write("\tlocal:\n") + for x in local_abi: + f.write("\t\t%s;\n" % x[1:]) + elif abi_match != ["*"]: f.write("\tlocal: *;\n") f.write("};\n") f.close() -- cgit