[ovs-dev] [PATCH 2/4] ovsdb: constify should apply to all pointer types.

Ethan Jackson ethan at nicira.com
Wed Nov 24 10:40:07 UTC 2010


All pointers (except double stars) should be const-able in
ovsdb-idlc.in generated header files.
---
 ovsdb/ovsdb-idlc.in |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in
index c6870cc..4183089 100755
--- a/ovsdb/ovsdb-idlc.in
+++ b/ovsdb/ovsdb-idlc.in
@@ -20,9 +20,7 @@ def annotateSchema(schemaFile, annotationFile):
     ovs.json.to_stream(schemaJson, sys.stdout)

 def constify(cType, const):
-    if (const
-        and cType.endswith('*') and not cType.endswith('**')
-        and (cType.startswith('struct uuid') or cType.startswith('char'))):
+    if (const and cType.endswith('*') and not cType.endswith('**')):
         return 'const %s' % cType
     else:
         return cType
-- 
1.7.3.2




More information about the dev mailing list