From 8c56c4352b11a320f44880d1a0b4e6091ed92a2a Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Thu, 4 Jan 2018 17:51:22 -0500 Subject: [PATCH] Remove redundant phongo_bulkwrite_init function --- php_phongo.c | 4 ---- php_phongo.h | 1 - src/MongoDB/BulkWrite.c | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/php_phongo.c b/php_phongo.c index 4ae3a51be..da21e85f4 100644 --- a/php_phongo.c +++ b/php_phongo.c @@ -463,10 +463,6 @@ static bool phongo_split_namespace(const char *namespace, char **dbname, char ** return true; } /* }}} */ -mongoc_bulk_operation_t *phongo_bulkwrite_init(zend_bool ordered) { /* {{{ */ - return mongoc_bulk_operation_new(ordered); -} /* }}} */ - /* Parses the "readConcern" option for an execute method. If mongoc_opts is not * NULL, the option will be appended. On error, false is returned and an * exception is thrown. */ diff --git a/php_phongo.h b/php_phongo.h index 56248bce7..fb39554a3 100644 --- a/php_phongo.h +++ b/php_phongo.h @@ -133,7 +133,6 @@ void phongo_session_init (zval *return_value, mongoc void phongo_readconcern_init (zval *return_value, const mongoc_read_concern_t *read_concern TSRMLS_DC); void phongo_readpreference_init (zval *return_value, const mongoc_read_prefs_t *read_prefs TSRMLS_DC); void phongo_writeconcern_init (zval *return_value, const mongoc_write_concern_t *write_concern TSRMLS_DC); -mongoc_bulk_operation_t* phongo_bulkwrite_init (zend_bool ordered); bool phongo_execute_bulk_write (mongoc_client_t *client, const char *namespace, php_phongo_bulkwrite_t *bulk_write, zval *zwriteConcern, uint32_t server_id, zval *return_value, int return_value_used TSRMLS_DC); int phongo_execute_command (mongoc_client_t *client, php_phongo_command_type_t type, const char *db, zval *zcommand, zval *zreadPreference, uint32_t server_id, zval *return_value, int return_value_used TSRMLS_DC); int phongo_execute_query (mongoc_client_t *client, const char *namespace, zval *zquery, zval *zreadPreference, uint32_t server_id, zval *return_value, int return_value_used TSRMLS_DC); diff --git a/src/MongoDB/BulkWrite.c b/src/MongoDB/BulkWrite.c index e1e0177a5..7f2864cd4 100644 --- a/src/MongoDB/BulkWrite.c +++ b/src/MongoDB/BulkWrite.c @@ -188,7 +188,7 @@ static PHP_METHOD(BulkWrite, __construct) ordered = php_array_fetchc_bool(options, "ordered"); } - intern->bulk = phongo_bulkwrite_init(ordered); + intern->bulk = mongoc_bulk_operation_new(ordered); intern->ordered = ordered; intern->bypass = PHONGO_BULKWRITE_BYPASS_UNSET; intern->num_ops = 0;