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