@@ -563,7 +563,9 @@ static zend_object_value date_object_clone_interval(zval *this_ptr TSRMLS_DC);
563
563
static zend_object_value date_object_clone_period (zval * this_ptr TSRMLS_DC );
564
564
565
565
static int date_object_compare_date (zval * d1 , zval * d2 TSRMLS_DC );
566
+ static HashTable * date_object_get_gc (zval * object , zval * * * table , int * n TSRMLS_DC );
566
567
static HashTable * date_object_get_properties (zval * object TSRMLS_DC );
568
+ static HashTable * date_object_get_gc_interval (zval * object , zval * * * table , int * n TSRMLS_DC );
567
569
static HashTable * date_object_get_properties_interval (zval * object TSRMLS_DC );
568
570
569
571
zval * date_interval_read_property (zval * object , zval * member , int type , const zend_literal * key TSRMLS_DC );
@@ -1887,6 +1889,7 @@ static void date_register_classes(TSRMLS_D)
1887
1889
date_object_handlers_date .clone_obj = date_object_clone_date ;
1888
1890
date_object_handlers_date .compare_objects = date_object_compare_date ;
1889
1891
date_object_handlers_date .get_properties = date_object_get_properties ;
1892
+ date_object_handlers_date .get_gc = date_object_get_gc ;
1890
1893
1891
1894
#define REGISTER_DATE_CLASS_CONST_STRING (const_name , value ) \
1892
1895
zend_declare_class_constant_stringl(date_ce_date, const_name, sizeof(const_name)-1, value, sizeof(value)-1 TSRMLS_CC);
@@ -1937,6 +1940,7 @@ static void date_register_classes(TSRMLS_D)
1937
1940
date_object_handlers_interval .write_property = date_interval_write_property ;
1938
1941
date_object_handlers_interval .get_properties = date_object_get_properties_interval ;
1939
1942
date_object_handlers_interval .get_property_ptr_ptr = NULL ;
1943
+ date_object_handlers_interval .get_gc = date_object_get_gc_interval ;
1940
1944
1941
1945
INIT_CLASS_ENTRY (ce_period , "DatePeriod" , date_funcs_period );
1942
1946
ce_period .create_object = date_object_new_period ;
@@ -2023,6 +2027,13 @@ static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC)
2023
2027
return 1 ;
2024
2028
}
2025
2029
2030
+ static HashTable * date_object_get_gc (zval * object , zval * * * table , int * n TSRMLS_DC )
2031
+ {
2032
+ * table = NULL ;
2033
+ * n = 0 ;
2034
+ return zend_std_get_properties (object TSRMLS_CC );
2035
+ }
2036
+
2026
2037
static HashTable * date_object_get_properties (zval * object TSRMLS_DC )
2027
2038
{
2028
2039
HashTable * props ;
@@ -2034,7 +2045,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC)
2034
2045
2035
2046
props = zend_std_get_properties (object TSRMLS_CC );
2036
2047
2037
- if (!dateobj -> time || GC_G ( gc_active ) ) {
2048
+ if (!dateobj -> time ) {
2038
2049
return props ;
2039
2050
}
2040
2051
@@ -2168,6 +2179,14 @@ static zend_object_value date_object_clone_interval(zval *this_ptr TSRMLS_DC)
2168
2179
return new_ov ;
2169
2180
}
2170
2181
2182
+ static HashTable * date_object_get_gc_interval (zval * object , zval * * * table , int * n TSRMLS_DC )
2183
+ {
2184
+
2185
+ * table = NULL ;
2186
+ * n = 0 ;
2187
+ return zend_std_get_properties (object TSRMLS_CC );
2188
+ }
2189
+
2171
2190
static HashTable * date_object_get_properties_interval (zval * object TSRMLS_DC )
2172
2191
{
2173
2192
HashTable * props ;
@@ -2179,7 +2198,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
2179
2198
2180
2199
props = zend_std_get_properties (object TSRMLS_CC );
2181
2200
2182
- if (!intervalobj -> initialized || GC_G ( gc_active ) ) {
2201
+ if (!intervalobj -> initialized ) {
2183
2202
return props ;
2184
2203
}
2185
2204
0 commit comments