mirror of https://gitlab.com/ita1024/waf.git
Issue 1412 - reduce multiple underscores to one in computed define names
This commit is contained in:
parent
a8626ef19c
commit
afd9d8fae9
|
@ -497,7 +497,8 @@ def quote_define_name(s):
|
||||||
:rtype: string
|
:rtype: string
|
||||||
:return: Identifier suitable for C defines
|
:return: Identifier suitable for C defines
|
||||||
"""
|
"""
|
||||||
fu = re.compile("[^a-zA-Z0-9]").sub("_", s)
|
fu = re.sub('[^a-zA-Z0-9]', '_', s)
|
||||||
|
fu = re.sub('_+', '_', fu)
|
||||||
fu = fu.upper()
|
fu = fu.upper()
|
||||||
return fu
|
return fu
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue