@@ -374,7 +374,7 @@ php_phongo_writeresult_t *phongo_writeresult_init(zval *return_value, mongoc_wri
374
374
375
375
/* {{{ CRUD */
376
376
/* Splits a namespace name into the database and collection names, allocated with estrdup. */
377
- bool phongo_split_namespace (char * namespace , char * * dbname , char * * cname ) /* {{{ */
377
+ bool phongo_split_namespace (const char * namespace , char * * dbname , char * * cname ) /* {{{ */
378
378
{
379
379
char * dot = strchr (namespace , '.' );
380
380
@@ -416,7 +416,7 @@ void phongo_unwrap_exception(bool retval, zval *return_value TSRMLS_DC)
416
416
}
417
417
}
418
418
419
- int phongo_execute_single_insert (mongoc_client_t * client , char * namespace , bson_t * doc , mongoc_write_concern_t * write_concern , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
419
+ int phongo_execute_single_insert (mongoc_client_t * client , const char * namespace , const bson_t * doc , const mongoc_write_concern_t * write_concern , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
420
420
{
421
421
bool retval = false;
422
422
mongoc_bulk_operation_t * bulk ;
@@ -431,7 +431,7 @@ int phongo_execute_single_insert(mongoc_client_t *client, char *namespace, bson_
431
431
return retval ;
432
432
} /* }}} */
433
433
434
- int phongo_execute_single_update (mongoc_client_t * client , char * namespace , bson_t * query , bson_t * update , mongoc_write_concern_t * write_concern , mongoc_update_flags_t flags , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
434
+ int phongo_execute_single_update (mongoc_client_t * client , const char * namespace , const bson_t * query , const bson_t * update , const mongoc_write_concern_t * write_concern , mongoc_update_flags_t flags , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
435
435
{
436
436
bool retval = false;
437
437
mongoc_bulk_operation_t * bulk ;
@@ -449,7 +449,7 @@ int phongo_execute_single_update(mongoc_client_t *client, char *namespace, bson_
449
449
return retval ;
450
450
} /* }}} */
451
451
452
- int phongo_execute_single_delete (mongoc_client_t * client , char * namespace , bson_t * query , mongoc_write_concern_t * write_concern , mongoc_delete_flags_t flags , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
452
+ int phongo_execute_single_delete (mongoc_client_t * client , const char * namespace , const bson_t * query , const mongoc_write_concern_t * write_concern , mongoc_delete_flags_t flags , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
453
453
{
454
454
bool retval = false;
455
455
mongoc_bulk_operation_t * bulk ;
@@ -468,7 +468,7 @@ int phongo_execute_single_delete(mongoc_client_t *client, char *namespace, bson_
468
468
return retval ;
469
469
} /* }}} */
470
470
471
- bool phongo_execute_write (mongoc_client_t * client , char * namespace , mongoc_bulk_operation_t * bulk , mongoc_write_concern_t * write_concern , int server_hint , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
471
+ bool phongo_execute_write (mongoc_client_t * client , const char * namespace , mongoc_bulk_operation_t * bulk , const mongoc_write_concern_t * write_concern , int server_hint , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
472
472
{
473
473
bson_error_t error ;
474
474
char * dbname ;
@@ -535,7 +535,7 @@ bool phongo_execute_write(mongoc_client_t *client, char *namespace, mongoc_bulk_
535
535
return true;
536
536
} /* }}} */
537
537
538
- int phongo_execute_query (mongoc_client_t * client , char * namespace , php_phongo_query_t * query , mongoc_read_prefs_t * read_preference , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
538
+ int phongo_execute_query (mongoc_client_t * client , const char * namespace , const php_phongo_query_t * query , const mongoc_read_prefs_t * read_preference , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
539
539
{
540
540
const bson_t * doc = NULL ;
541
541
mongoc_cursor_t * cursor ;
@@ -581,7 +581,7 @@ int phongo_execute_query(mongoc_client_t *client, char *namespace, php_phongo_qu
581
581
return true;
582
582
} /* }}} */
583
583
584
- int phongo_execute_command (mongoc_client_t * client , char * db , bson_t * command , mongoc_read_prefs_t * read_preference , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
584
+ int phongo_execute_command (mongoc_client_t * client , const char * db , const bson_t * command , const mongoc_read_prefs_t * read_preference , zval * return_value , int return_value_used TSRMLS_DC ) /* {{{ */
585
585
{
586
586
mongoc_cursor_t * cursor ;
587
587
const bson_t * doc ;
@@ -1041,7 +1041,7 @@ void php_phongo_objectid_new_from_oid(zval *object, const bson_oid_t *oid TSRMLS
1041
1041
} /* }}} */
1042
1042
1043
1043
1044
- void php_phongo_read_preference_to_zval (zval * retval , mongoc_read_prefs_t * read_prefs ) /* {{{ */
1044
+ void php_phongo_read_preference_to_zval (zval * retval , const mongoc_read_prefs_t * read_prefs ) /* {{{ */
1045
1045
{
1046
1046
1047
1047
array_init_size (retval , 2 );
@@ -1058,7 +1058,7 @@ void php_phongo_read_preference_to_zval(zval *retval, mongoc_read_prefs_t *read_
1058
1058
}
1059
1059
} /* }}} */
1060
1060
1061
- void php_phongo_write_concern_to_zval (zval * retval , mongoc_write_concern_t * write_concern ) /* {{{ */
1061
+ void php_phongo_write_concern_to_zval (zval * retval , const mongoc_write_concern_t * write_concern ) /* {{{ */
1062
1062
{
1063
1063
const char * wtag = mongoc_write_concern_get_wtag (write_concern );
1064
1064
const int32_t w = mongoc_write_concern_get_w (write_concern );
0 commit comments