Skip to content

Commit 27b74f0

Browse files
committed
PHPC-2540: Use const for mongoc_host_list_t
1 parent 5e27513 commit 27b74f0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/MongoDB/Server.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -619,9 +619,9 @@ void phongo_server_init(zval* return_value, zval* manager, uint32_t server_id)
619619

620620
bool php_phongo_server_to_zval(zval* retval, mongoc_client_t* client, mongoc_server_description_t* sd)
621621
{
622-
mongoc_host_list_t* host = mongoc_server_description_host(sd);
623-
const bson_t* hello_response = mongoc_server_description_hello_response(sd);
624-
bson_iter_t iter;
622+
const mongoc_host_list_t* host = mongoc_server_description_host(sd);
623+
const bson_t* hello_response = mongoc_server_description_hello_response(sd);
624+
bson_iter_t iter;
625625

626626
array_init(retval);
627627

src/MongoDB/ServerDescription.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ HashTable* php_phongo_serverdescription_get_properties_hash(zend_object* object,
194194
}
195195

196196
{
197-
zval host, port, type;
198-
mongoc_host_list_t* host_list = mongoc_server_description_host(intern->server_description);
197+
zval host, port, type;
198+
const mongoc_host_list_t* host_list = mongoc_server_description_host(intern->server_description);
199199

200200
ZVAL_STRING(&host, host_list->host);
201201
zend_hash_str_update(props, "host", sizeof("host") - 1, &host);

0 commit comments

Comments
 (0)