Skip to content

Commit 2b61688

Browse files
committed
minor: rename private _mongoc_write_concern_has_gle to needs_gle
1 parent 2dabd11 commit 2b61688

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/mongoc/mongoc-bulk-operation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ mongoc_bulk_operation_insert (mongoc_bulk_operation_t *bulk,
177177
}
178178

179179
_mongoc_write_command_init_insert (&command, &document, 1, bulk->ordered,
180-
!_mongoc_write_concern_has_gle (bulk->write_concern));
180+
!_mongoc_write_concern_needs_gle (bulk->write_concern));
181181

182182
_mongoc_array_append_val (&bulk->commands, command);
183183

src/mongoc/mongoc-write-command.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#define SUPPORTS_WRITE_COMMANDS(n) \
3737
(((n)->min_wire_version <= 2) && ((n)->max_wire_version >= 2))
3838
#define WRITE_CONCERN_DOC(wc) \
39-
(wc && _mongoc_write_concern_has_gle ((wc))) ? \
39+
(wc && _mongoc_write_concern_needs_gle ((wc))) ? \
4040
(_mongoc_write_concern_freeze((mongoc_write_concern_t*)(wc))) : \
4141
(&gEmptyWriteConcern)
4242

@@ -224,7 +224,7 @@ _mongoc_write_command_delete_legacy (mongoc_write_command_t *command,
224224
GOTO (cleanup);
225225
}
226226

227-
if (_mongoc_write_concern_has_gle (write_concern)) {
227+
if (_mongoc_write_concern_needs_gle (write_concern)) {
228228
if (!_mongoc_client_recv_gle (client, hint, &gle, error)) {
229229
result->failed = true;
230230
GOTO (cleanup);
@@ -361,7 +361,7 @@ _mongoc_write_command_insert_legacy (mongoc_write_command_t *command,
361361
GOTO (cleanup);
362362
}
363363

364-
if (_mongoc_write_concern_has_gle (write_concern)) {
364+
if (_mongoc_write_concern_needs_gle (write_concern)) {
365365
bson_iter_t citer;
366366

367367
if (!_mongoc_client_recv_gle (client, hint, &gle, error)) {
@@ -462,7 +462,7 @@ _mongoc_write_command_update_legacy (mongoc_write_command_t *command,
462462
GOTO (cleanup);
463463
}
464464

465-
if (_mongoc_write_concern_has_gle (write_concern)) {
465+
if (_mongoc_write_concern_needs_gle (write_concern)) {
466466
if (!_mongoc_client_recv_gle (client, hint, &gle, error)) {
467467
result->failed = true;
468468
GOTO (cleanup);
@@ -509,7 +509,7 @@ _mongoc_write_command_delete (mongoc_write_command_t *command,
509509
* a response from the server.
510510
*/
511511
if ((client->cluster.nodes [hint - 1].min_wire_version == 0) &&
512-
!_mongoc_write_concern_has_gle (write_concern)) {
512+
!_mongoc_write_concern_needs_gle (write_concern)) {
513513
_mongoc_write_command_delete_legacy (command, client, hint, database,
514514
collection, write_concern, result,
515515
error);
@@ -582,7 +582,7 @@ _mongoc_write_command_insert (mongoc_write_command_t *command,
582582
* a response from the server.
583583
*/
584584
if ((client->cluster.nodes [hint - 1].min_wire_version == 0) &&
585-
!_mongoc_write_concern_has_gle (write_concern)) {
585+
!_mongoc_write_concern_needs_gle (write_concern)) {
586586
_mongoc_write_command_insert_legacy (command, client, hint, database,
587587
collection, write_concern, result,
588588
error);
@@ -699,7 +699,7 @@ _mongoc_write_command_update (mongoc_write_command_t *command,
699699
* a response from the server.
700700
*/
701701
if ((client->cluster.nodes [hint - 1].min_wire_version == 0) &&
702-
!_mongoc_write_concern_has_gle (write_concern)) {
702+
!_mongoc_write_concern_needs_gle (write_concern)) {
703703
_mongoc_write_command_update_legacy (command, client, hint, database,
704704
collection, write_concern, result,
705705
error);

src/mongoc/mongoc-write-concern-private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ struct _mongoc_write_concern_t
4343

4444

4545
const bson_t *_mongoc_write_concern_freeze (mongoc_write_concern_t *write_concern);
46-
bool _mongoc_write_concern_has_gle (const mongoc_write_concern_t *write_concern);
4746

47+
bool _mongoc_write_concern_needs_gle (const mongoc_write_concern_t *write_concern);
4848

4949
BSON_END_DECLS
5050

src/mongoc/mongoc-write-concern.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ _mongoc_write_concern_freeze (mongoc_write_concern_t *write_concern)
321321

322322

323323
/**
324-
* mongoc_write_concern_has_gle:
324+
* mongoc_write_concern_needs_gle:
325325
* @concern: (in): A mongoc_write_concern_t.
326326
*
327327
* Checks to see if @write_concern requests that a getlasterror command is to
@@ -330,7 +330,7 @@ _mongoc_write_concern_freeze (mongoc_write_concern_t *write_concern)
330330
* Returns: true if a getlasterror command should be sent.
331331
*/
332332
bool
333-
_mongoc_write_concern_has_gle (const mongoc_write_concern_t *write_concern)
333+
_mongoc_write_concern_needs_gle (const mongoc_write_concern_t *write_concern)
334334
{
335335
if (write_concern) {
336336
return ((write_concern->w != 0) && (write_concern->w != -1));

0 commit comments

Comments
 (0)