]> git.proxmox.com Git - ovs.git/commitdiff
ovsdb-idl: Avoid mutable type specifier.
authorJoe Stringer <joe@ovn.org>
Fri, 11 Aug 2017 18:06:45 +0000 (11:06 -0700)
committerJoe Stringer <joe@ovn.org>
Tue, 15 Aug 2017 21:09:46 +0000 (14:09 -0700)
In C++, 'mutable' is a keyword. If this is used as the name for a field,
then C++ compilers can get confused about the context and fail to
compile references to such fields. Rename the field to 'is_mutable' to
avoid this issue.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
lib/ovsdb-idl-provider.h
lib/ovsdb-idl.c
ovsdb/ovsdb-idlc.in

index a2eb8cac67d74ffa347ff56e2a97991a72e6531a..cdb41221e43dcdb8283c78bc2f47174e34484836 100644 (file)
@@ -89,7 +89,7 @@ struct ovsdb_idl_row {
 struct ovsdb_idl_column {
     char *name;
     struct ovsdb_type type;
-    bool mutable;
+    bool is_mutable;
     void (*parse)(struct ovsdb_idl_row *, const struct ovsdb_datum *);
     void (*unparse)(struct ovsdb_idl_row *);
 };
index 227aa5fbfcb2f0622cb014ec88193fc7665d740f..2d0aa85ee31144dd945e438544a1e43af6a66c49 100644 (file)
@@ -2871,7 +2871,7 @@ bool
 ovsdb_idl_is_mutable(const struct ovsdb_idl_row *row,
                      const struct ovsdb_idl_column *column)
 {
-    return column->mutable || (row->new && !row->old);
+    return column->is_mutable || (row->new && !row->old);
 }
 
 /* Returns false if 'row' was obtained from the IDL, true if it was initialized
index bb07c21a80d035e624276ec7d0ca110139275c7d..24e86b772fbe9b30dbbc70c6fd5a3e933254025b 100755 (executable)
@@ -1268,7 +1268,7 @@ void
          .type = {
 %(type)s
          },
-         .mutable = %(mutable)s,
+         .is_mutable = %(mutable)s,
          .parse = %(s)s_parse_%(c)s,
          .unparse = %(s)s_unparse_%(c)s,
     },\n""" % {'P': prefix.upper(),