File tree Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Unreleased (2.0.0)
7
7
now applies `batchSize:0` to the `aggregate` command. Useful to request an immediate cursor. Previously the value
8
8
was ignored.
9
9
* `bson_oid_init_sequence` is removed. Use `bson_oid_init` instead.
10
+ * `mongoc_server_description_host` changes the return type from `mongoc_host_list_t *` to `const mongoc_host_list_t *`.
10
11
11
12
## Removals
12
13
Original file line number Diff line number Diff line change 8
8
9
9
.. code-block :: c
10
10
11
- mongoc_host_list_t *
11
+ const mongoc_host_list_t *
12
12
mongoc_server_description_host (const mongoc_server_description_t *description);
13
13
14
14
Parameters
@@ -24,5 +24,7 @@ Return the server's host and port. This object is owned by the server descriptio
24
24
Returns
25
25
-------
26
26
27
- A reference to the server description's :symbol: `mongoc_host_list_t `, which you must not modify or free.
27
+ .. versionchanged :: 2.0.0 The return type changed from ``mongoc_host_list_t *`` to ``const mongoc_host_list_t *``.
28
+
29
+ A reference to the server description's :symbol: `mongoc_host_list_t `.
28
30
Original file line number Diff line number Diff line change @@ -287,13 +287,12 @@ mongoc_server_description_id (const mongoc_server_description_t *description)
287
287
* Return a reference to the host associated with this server description.
288
288
*
289
289
* Returns:
290
- * This server description's host, a mongoc_host_list_t * you must
291
- * not modify or free.
290
+ * This server description's host, a const mongoc_host_list_t *.
292
291
*
293
292
*--------------------------------------------------------------------------
294
293
*/
295
294
296
- mongoc_host_list_t *
295
+ const mongoc_host_list_t *
297
296
mongoc_server_description_host (const mongoc_server_description_t * description )
298
297
{
299
298
return & ((mongoc_server_description_t * ) description )-> host ;
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ mongoc_server_description_new_copy (const mongoc_server_description_t *descripti
38
38
MONGOC_EXPORT (uint32_t )
39
39
mongoc_server_description_id (const mongoc_server_description_t * description );
40
40
41
- MONGOC_EXPORT (mongoc_host_list_t * )
41
+ MONGOC_EXPORT (const mongoc_host_list_t * )
42
42
mongoc_server_description_host (const mongoc_server_description_t * description );
43
43
44
44
MONGOC_EXPORT (int64_t )
Original file line number Diff line number Diff line change @@ -533,7 +533,7 @@ test_topology_discovery (void *ctx)
533
533
mongoc_client_t * client ;
534
534
mongoc_read_prefs_t * prefs ;
535
535
mongoc_server_description_t * sd_secondary ;
536
- mongoc_host_list_t * hl_secondary ;
536
+ const mongoc_host_list_t * hl_secondary ;
537
537
mongoc_collection_t * collection ;
538
538
bson_t doc = BSON_INITIALIZER ;
539
539
bson_t reply ;
@@ -597,7 +597,7 @@ test_direct_connection (void *ctx)
597
597
mongoc_client_t * client ;
598
598
mongoc_read_prefs_t * prefs ;
599
599
mongoc_server_description_t * sd_secondary ;
600
- mongoc_host_list_t * hl_secondary ;
600
+ const mongoc_host_list_t * hl_secondary ;
601
601
mongoc_collection_t * collection ;
602
602
bson_t doc = BSON_INITIALIZER ;
603
603
bson_t reply ;
@@ -662,7 +662,7 @@ test_existing_behavior (void *ctx)
662
662
mongoc_client_t * client ;
663
663
mongoc_read_prefs_t * prefs ;
664
664
mongoc_server_description_t * sd_secondary ;
665
- mongoc_host_list_t * hl_secondary ;
665
+ const mongoc_host_list_t * hl_secondary ;
666
666
mongoc_collection_t * collection ;
667
667
bson_t doc = BSON_INITIALIZER ;
668
668
bson_t reply ;
You can’t perform that action at this time.
0 commit comments