mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
build: added abi type maps for _Bool and __va_list_tag
This allows us to make the signature files platform independent
This commit is contained in:
parent
77768dbd75
commit
8dc2db0f6d
@ -3,12 +3,22 @@
|
||||
import Options, Utils, os, Logs, samba_utils, sys, Task, fnmatch, re
|
||||
from TaskGen import feature, before, after
|
||||
|
||||
# these type maps cope with platform specific names for common types
|
||||
# please add new type mappings into the list below
|
||||
abi_type_maps = {
|
||||
'_Bool' : 'bool',
|
||||
'__va_list_tag' : 'va_list'
|
||||
}
|
||||
|
||||
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('0x[0-9a-f]+', '0xXXXX', sig)
|
||||
|
||||
for t in abi_type_maps:
|
||||
sig = re.sub('\\b%s\\b' % t, abi_type_maps[t], sig)
|
||||
return sig
|
||||
|
||||
def normalise_varargs(sig):
|
||||
|
Loading…
Reference in New Issue
Block a user