qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qapi: escaping the dots in c_var
@ 2012-03-15 13:53 Federico Simoncelli
  2012-03-15 14:51 ` Michael Roth
  2012-03-15 15:45 ` [Qemu-devel] [PATCH v2] qapi: escaping dots in c_var and in de_camel_case Federico Simoncelli
  0 siblings, 2 replies; 9+ messages in thread
From: Federico Simoncelli @ 2012-03-15 13:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, Federico Simoncelli, lcapitulino

This allows qapi commands and types with dots.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-26 20:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 13:53 [Qemu-devel] [PATCH] qapi: escaping the dots in c_var Federico Simoncelli
2012-03-15 14:51 ` Michael Roth
2012-03-15 15:03   ` Luiz Capitulino
2012-03-15 15:42     ` Michael Roth
2012-03-15 15:45 ` [Qemu-devel] [PATCH v2] qapi: escaping dots in c_var and in de_camel_case Federico Simoncelli
2012-03-16 19:16   ` Luiz Capitulino
2012-03-20 13:54     ` [Qemu-devel] [PATCH v3] qapi: add c_fun to escape function names Federico Simoncelli
2012-03-23 20:38       ` Luiz Capitulino
2012-03-26 20:07       ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).