aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi/common.py')
-rw-r--r--scripts/qapi/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
index 547656c8b2..069ec3715d 100644
--- a/scripts/qapi/common.py
+++ b/scripts/qapi/common.py
@@ -1867,7 +1867,7 @@ def mcgen(code, **kwds):
def guardname(filename):
- return c_name(filename, protect=False).upper()
+ return re.sub(r'[^A-Za-z0-9_]', '_', filename).upper()
def guardstart(name):