[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qapi: escaping the dots in c_var
From: |
Federico Simoncelli |
Subject: |
[Qemu-devel] [PATCH] qapi: escaping the dots in c_var |
Date: |
Thu, 15 Mar 2012 13:53:38 +0000 |
This allows qapi commands and types with dots.
Signed-off-by: Federico Simoncelli <address@hidden>
---
scripts/qapi.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 6e05469..4090c55 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -131,7 +131,7 @@ def camel_case(name):
return new_name
def c_var(name):
- return '_'.join(name.split('-')).lstrip("*")
+ return name.replace('-', '_').replace('.', '_').lstrip('*')
def c_list_type(name):
return '%sList' % name
--
1.7.1
- [Qemu-devel] [PATCH] qapi: escaping the dots in c_var,
Federico Simoncelli <=