File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -1541,6 +1541,14 @@ php_phongo_writeresult_t *php_phongo_writeresult_get_from_bulkwriteexception(zva
1541
1541
return (php_phongo_writeresult_t * )zend_object_store_get_object (wr TSRMLS_CC );
1542
1542
}
1543
1543
1544
+ static void php_phongo_cursor_free_current (php_phongo_cursor_t * cursor ) /* {{{ */
1545
+ {
1546
+ if (cursor -> visitor_data .zchild ) {
1547
+ zval_ptr_dtor (& cursor -> visitor_data .zchild );
1548
+ cursor -> visitor_data .zchild = NULL ;
1549
+ }
1550
+ } /* }}} */
1551
+
1544
1552
void php_phongo_cursor_free (php_phongo_cursor_t * cursor )
1545
1553
{
1546
1554
if (cursor -> firstBatch ) {
@@ -1551,20 +1559,9 @@ void php_phongo_cursor_free(php_phongo_cursor_t *cursor)
1551
1559
mongoc_cursor_destroy (cursor -> cursor );
1552
1560
cursor -> cursor = NULL ;
1553
1561
}
1554
- if (cursor -> visitor_data .zchild ) {
1555
- zval_ptr_dtor (& cursor -> visitor_data .zchild );
1556
- cursor -> visitor_data .zchild = NULL ;
1557
- }
1562
+ php_phongo_cursor_free_current (cursor );
1558
1563
}
1559
1564
1560
- static void php_phongo_cursor_free_current (php_phongo_cursor_t * cursor ) /* {{{ */
1561
- {
1562
- if (cursor -> visitor_data .zchild ) {
1563
- zval_ptr_dtor (& cursor -> visitor_data .zchild );
1564
- cursor -> visitor_data .zchild = NULL ;
1565
- }
1566
- } /* }}} */
1567
-
1568
1565
/* {{{ Iterator */
1569
1566
static void php_phongo_cursor_iterator_dtor (zend_object_iterator * iter TSRMLS_DC ) /* {{{ */
1570
1567
{
You can’t perform that action at this time.
0 commit comments