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
|
||||
: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()
|
||||
return fu
|
||||
|
||||
|
|
Loading…
Reference in New Issue