32
32
#include "MongoDB/WriteError.h"
33
33
#include "BulkWriteCommandResult_arginfo.h"
34
34
35
- #define PHONGO_BULKWRITECOMMANDRESULT_CHECK_ACKNOWLEDGED (method ) \
36
- if (!intern->is_acknowledged) { \
35
+ #define PHONGO_BULKWRITECOMMANDRESULT_CHECK_ACKNOWLEDGED (method ) \
36
+ if (!intern->is_acknowledged) { \
37
37
phongo_throw_exception(PHONGO_ERROR_LOGIC, "MongoDB\\Driver\\BulkWriteCommandResult::" method "() should not be called for an unacknowledged write result"); \
38
- return; \
38
+ return; \
39
39
}
40
40
41
41
zend_class_entry * php_phongo_bulkwritecommandresult_ce ;
@@ -338,7 +338,7 @@ static zend_object* php_phongo_bulkwritecommandresult_create_object(zend_class_e
338
338
static HashTable * php_phongo_bulkwritecommandresult_get_debug_info (zend_object * object , int * is_temp )
339
339
{
340
340
php_phongo_bulkwritecommandresult_t * intern ;
341
- zval retval = ZVAL_STATIC_INIT ;
341
+ zval retval = ZVAL_STATIC_INIT ;
342
342
343
343
intern = Z_OBJ_BULKWRITECOMMANDRESULT (object );
344
344
* is_temp = 1 ;
@@ -426,7 +426,7 @@ void php_phongo_bulkwritecommandresult_init_ce(INIT_FUNC_ARGS)
426
426
php_phongo_handler_bulkwritecommandresult .offset = XtOffsetOf (php_phongo_bulkwritecommandresult_t , std );
427
427
}
428
428
429
- static inline bson_t * _bson_copy_or_null (const bson_t * bson )
429
+ static inline bson_t * _bson_copy_or_null (const bson_t * bson )
430
430
{
431
431
return bson_empty0 (bson ) ? NULL : bson_copy (bson );
432
432
}
@@ -437,16 +437,16 @@ php_phongo_bulkwritecommandresult_t* phongo_bulkwritecommandresult_init(zval* re
437
437
438
438
object_init_ex (return_value , php_phongo_bulkwritecommandresult_ce );
439
439
440
- bwcr = Z_BULKWRITECOMMANDRESULT_OBJ_P (return_value );
440
+ bwcr = Z_BULKWRITECOMMANDRESULT_OBJ_P (return_value );
441
441
bwcr -> is_acknowledged = !!bw_ret -> res ;
442
442
443
443
// Copy mongoc_bulkwriteresult_t fields
444
444
if (bw_ret -> res ) {
445
445
bwcr -> inserted_count = mongoc_bulkwriteresult_insertedcount (bw_ret -> res );
446
446
bwcr -> upserted_count = mongoc_bulkwriteresult_upsertedcount (bw_ret -> res );
447
- bwcr -> matched_count = mongoc_bulkwriteresult_matchedcount (bw_ret -> res );
447
+ bwcr -> matched_count = mongoc_bulkwriteresult_matchedcount (bw_ret -> res );
448
448
bwcr -> modified_count = mongoc_bulkwriteresult_modifiedcount (bw_ret -> res );
449
- bwcr -> deleted_count = mongoc_bulkwriteresult_deletedcount (bw_ret -> res );
449
+ bwcr -> deleted_count = mongoc_bulkwriteresult_deletedcount (bw_ret -> res );
450
450
451
451
bwcr -> insert_results = _bson_copy_or_null (mongoc_bulkwriteresult_insertresults (bw_ret -> res ));
452
452
bwcr -> update_results = _bson_copy_or_null (mongoc_bulkwriteresult_updateresults (bw_ret -> res ));
@@ -457,8 +457,8 @@ php_phongo_bulkwritecommandresult_t* phongo_bulkwritecommandresult_init(zval* re
457
457
458
458
// Copy mongoc_bulkwriteexception_t fields
459
459
if (bw_ret -> exc ) {
460
- bwcr -> error_reply = _bson_copy_or_null (mongoc_bulkwriteexception_errorreply (bw_ret -> exc ));
461
- bwcr -> write_errors = _bson_copy_or_null (mongoc_bulkwriteexception_writeerrors (bw_ret -> exc ));
460
+ bwcr -> error_reply = _bson_copy_or_null (mongoc_bulkwriteexception_errorreply (bw_ret -> exc ));
461
+ bwcr -> write_errors = _bson_copy_or_null (mongoc_bulkwriteexception_writeerrors (bw_ret -> exc ));
462
462
bwcr -> write_concern_errors = _bson_copy_or_null (mongoc_bulkwriteexception_writeconcernerrors (bw_ret -> exc ));
463
463
}
464
464
0 commit comments