stmts.append('%s.u.string.minLen = %d;' % (var, self.minLength))
if self.maxLength != None:
stmts.append('%s.u.string.maxLen = %d;' % (var, self.maxLength))
+ elif self.type == 'uuid':
+ if self.refTable != None:
+ stmts.append('%s.u.uuid.refTableName = "%s";' % (var, escapeCString(self.refTable)))
return '\n'.join([indent + stmt for stmt in stmts])
class Type:
else:
keyJson = mustGetMember(json, 'key', [dict, unicode], description)
key = BaseType.fromJson(keyJson, 'key in %s' % description)
- keyRefTable = getMember(json, 'keyRefTable', [unicode], description)
- if keyRefTable:
- key.refTable = keyRefTable
valueJson = getMember(json, 'value', [dict, unicode], description)
if valueJson:
value = BaseType.fromJson(valueJson,
'value in %s' % description)
- valueRefTable = getMember(json, 'valueRefTable', [unicode], description)
- if valueRefTable:
- value.refTable = valueRefTable
else:
value = None
static bool inited;
-static void UNUSED
+static void OVS_UNUSED
do_set_regex(struct ovsdb_base_type *base, const char *reMatch,
const char *reComment)
{
else:
print '''
static void
-%(s)s_unparse_%(c)s(struct ovsdb_idl_row *row UNUSED)
+%(s)s_unparse_%(c)s(struct ovsdb_idl_row *row OVS_UNUSED)
{
/* Nothing to do. */
}''' % {'s': structName, 'c': columnName}
# IDL class.
print "\nstruct ovsdb_idl_class %sidl_class = {" % prefix
- print " %stable_classes, ARRAY_SIZE(%stable_classes)" % (prefix, prefix)
+ print " \"%s\", %stable_classes, ARRAY_SIZE(%stable_classes)" % (
+ schema.name, prefix, prefix)
print "};"
# global init function