ovsdb: constify should apply to all pointer types.
authorEthan Jackson <ethan@nicira.com>
Wed, 24 Nov 2010 00:50:57 +0000 (16:50 -0800)
committerEthan Jackson <ethan@nicira.com>
Mon, 29 Nov 2010 22:47:14 +0000 (14:47 -0800)
All pointers (except double stars) should be const-able in
ovsdb-idlc.in generated header files.

ovsdb/ovsdb-idlc.in

index c6870cc..4183089 100755 (executable)
@@ -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