Skip to content

Commit

Permalink
ovsdb-idl: Avoid mutable type specifier.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
joestringer committed Aug 15, 2017
1 parent 3eb1423 commit c6e5d06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/ovsdb-idl-provider.h
Expand Up @@ -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 *);
};
Expand Down
2 changes: 1 addition & 1 deletion lib/ovsdb-idl.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ovsdb/ovsdb-idlc.in
Expand Up @@ -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(),
Expand Down

0 comments on commit c6e5d06

Please sign in to comment.