Skip to content

Commit a6d40fc

Browse files
committed
Remove redundant phongo_bulkwrite_init function
1 parent 258d2e6 commit a6d40fc

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

php_phongo.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,6 @@ static bool phongo_split_namespace(const char *namespace, char **dbname, char **
463463
return true;
464464
} /* }}} */
465465

466-
mongoc_bulk_operation_t *phongo_bulkwrite_init(zend_bool ordered) { /* {{{ */
467-
return mongoc_bulk_operation_new(ordered);
468-
} /* }}} */
469-
470466
/* Parses the "readConcern" option for an execute method. If mongoc_opts is not
471467
* NULL, the option will be appended. On error, false is returned and an
472468
* exception is thrown. */

php_phongo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ void phongo_session_init (zval *return_value, mongoc
133133
void phongo_readconcern_init (zval *return_value, const mongoc_read_concern_t *read_concern TSRMLS_DC);
134134
void phongo_readpreference_init (zval *return_value, const mongoc_read_prefs_t *read_prefs TSRMLS_DC);
135135
void phongo_writeconcern_init (zval *return_value, const mongoc_write_concern_t *write_concern TSRMLS_DC);
136-
mongoc_bulk_operation_t* phongo_bulkwrite_init (zend_bool ordered);
137136
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);
138137
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);
139138
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);

src/MongoDB/BulkWrite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static PHP_METHOD(BulkWrite, __construct)
188188
ordered = php_array_fetchc_bool(options, "ordered");
189189
}
190190

191-
intern->bulk = phongo_bulkwrite_init(ordered);
191+
intern->bulk = mongoc_bulk_operation_new(ordered);
192192
intern->ordered = ordered;
193193
intern->bypass = PHONGO_BULKWRITE_BYPASS_UNSET;
194194
intern->num_ops = 0;

0 commit comments

Comments
 (0)