Skip to content

Commit b1e9fad

Browse files
committed
CDRIVER-366: not is a reserved keyword in C++
1 parent 542950a commit b1e9fad

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/mongoc/mongoc-matcher-op-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ union _mongoc_matcher_op_t
108108
mongoc_matcher_op_compare_t compare;
109109
mongoc_matcher_op_exists_t exists;
110110
mongoc_matcher_op_type_t type;
111-
mongoc_matcher_op_not_t not;
111+
mongoc_matcher_op_not_t not_;
112112
};
113113

114114

src/mongoc/mongoc-matcher-op.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ _mongoc_matcher_op_not_new (const char *path, /* IN */
210210
BSON_ASSERT (child);
211211

212212
op = (mongoc_matcher_op_t *)bson_malloc0 (sizeof *op);
213-
op->not.base.opcode = MONGOC_MATCHER_OPCODE_NOT;
214-
op->not.path = bson_strdup (path);
215-
op->not.child = child;
213+
op->not_.base.opcode = MONGOC_MATCHER_OPCODE_NOT;
214+
op->not_.path = bson_strdup (path);
215+
op->not_.child = child;
216216

217217
return op;
218218
}
@@ -258,8 +258,8 @@ _mongoc_matcher_op_destroy (mongoc_matcher_op_t *op) /* IN */
258258
_mongoc_matcher_op_destroy (op->logical.right);
259259
break;
260260
case MONGOC_MATCHER_OPCODE_NOT:
261-
_mongoc_matcher_op_destroy (op->not.child);
262-
bson_free (op->not.path);
261+
_mongoc_matcher_op_destroy (op->not_.child);
262+
bson_free (op->not_.path);
263263
break;
264264
case MONGOC_MATCHER_OPCODE_EXISTS:
265265
bson_free (op->exists.path);
@@ -369,13 +369,13 @@ _mongoc_matcher_op_type_match (mongoc_matcher_op_type_t *type, /* IN */
369369
*/
370370

371371
static bool
372-
_mongoc_matcher_op_not_match (mongoc_matcher_op_not_t *not, /* IN */
372+
_mongoc_matcher_op_not_match (mongoc_matcher_op_not_t *not_, /* IN */
373373
const bson_t *bson) /* IN */
374374
{
375-
BSON_ASSERT (not);
375+
BSON_ASSERT (not_);
376376
BSON_ASSERT (bson);
377377

378-
return !_mongoc_matcher_op_match (not->child, bson);
378+
return !_mongoc_matcher_op_match (not_->child, bson);
379379
}
380380

381381

@@ -1081,7 +1081,7 @@ _mongoc_matcher_op_match (mongoc_matcher_op_t *op, /* IN */
10811081
case MONGOC_MATCHER_OPCODE_NOR:
10821082
return _mongoc_matcher_op_logical_match (&op->logical, bson);
10831083
case MONGOC_MATCHER_OPCODE_NOT:
1084-
return _mongoc_matcher_op_not_match (&op->not, bson);
1084+
return _mongoc_matcher_op_not_match (&op->not_, bson);
10851085
case MONGOC_MATCHER_OPCODE_EXISTS:
10861086
return _mongoc_matcher_op_exists_match (&op->exists, bson);
10871087
case MONGOC_MATCHER_OPCODE_TYPE:
@@ -1190,9 +1190,9 @@ _mongoc_matcher_op_to_bson (mongoc_matcher_op_t *op, /* IN */
11901190
bson_append_array_end (bson, &child);
11911191
break;
11921192
case MONGOC_MATCHER_OPCODE_NOT:
1193-
bson_append_document_begin (bson, op->not.path, -1, &child);
1193+
bson_append_document_begin (bson, op->not_.path, -1, &child);
11941194
bson_append_document_begin (&child, "$not", 4, &child2);
1195-
_mongoc_matcher_op_to_bson (op->not.child, &child2);
1195+
_mongoc_matcher_op_to_bson (op->not_.child, &child2);
11961196
bson_append_document_end (&child, &child2);
11971197
bson_append_document_end (bson, &child);
11981198
break;

0 commit comments

Comments
 (0)