diff options
Diffstat (limited to 'scripts/qapi/common.py')
-rw-r--r-- | scripts/qapi/common.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index e0b88f1896..97e9060b67 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -1775,11 +1775,10 @@ def c_enum_const(type_name, const_name, prefix=None): type_name = prefix return camel_to_upper(type_name) + '_' + c_name(const_name, False).upper() -# Temporary HACK for '/': if hasattr(str, 'maketrans'): - c_name_trans = str.maketrans('.-/', '___') + c_name_trans = str.maketrans('.-', '__') else: - c_name_trans = string.maketrans('.-/', '___') + c_name_trans = string.maketrans('.-', '__') # Map @name to a valid C identifier. |