REGISTER_PERIOD_CLASS_CONST_STRING("EXCLUDE_START_DATE", PHP_DATE_PERIOD_EXCLUDE_START_DATE);
} /* }}} */
-static inline zend_object *date_object_new_date_ex(zend_class_entry *class_type, int init_props) /* {{{ */
+static zend_object *date_object_new_date(zend_class_entry *class_type) /* {{{ */
{
php_date_obj *intern = zend_object_alloc(sizeof(php_date_obj), class_type);
zend_object_std_init(&intern->std, class_type);
- if (init_props) {
- object_properties_init(&intern->std, class_type);
- }
+ object_properties_init(&intern->std, class_type);
intern->std.handlers = &date_object_handlers_date;
return &intern->std;
} /* }}} */
-static zend_object *date_object_new_date(zend_class_entry *class_type) /* {{{ */
-{
- return date_object_new_date_ex(class_type, 1);
-} /* }}} */
-
static zend_object *date_object_clone_date(zval *this_ptr) /* {{{ */
{
php_date_obj *old_obj = Z_PHPDATE_P(this_ptr);
- php_date_obj *new_obj = php_date_obj_from_obj(date_object_new_date_ex(old_obj->std.ce, 0));
+ php_date_obj *new_obj = php_date_obj_from_obj(date_object_new_date(old_obj->std.ce));
zend_objects_clone_members(&new_obj->std, &old_obj->std);
if (!old_obj->time) {
return props;
} /* }}} */
-static inline zend_object *date_object_new_timezone_ex(zend_class_entry *class_type, int init_props) /* {{{ */
+static zend_object *date_object_new_timezone(zend_class_entry *class_type) /* {{{ */
{
php_timezone_obj *intern = zend_object_alloc(sizeof(php_timezone_obj), class_type);
zend_object_std_init(&intern->std, class_type);
- if (init_props) {
- object_properties_init(&intern->std, class_type);
- }
+ object_properties_init(&intern->std, class_type);
intern->std.handlers = &date_object_handlers_timezone;
return &intern->std;
} /* }}} */
-static zend_object *date_object_new_timezone(zend_class_entry *class_type) /* {{{ */
-{
- return date_object_new_timezone_ex(class_type, 1);
-} /* }}} */
-
static zend_object *date_object_clone_timezone(zval *this_ptr) /* {{{ */
{
php_timezone_obj *old_obj = Z_PHPTIMEZONE_P(this_ptr);
- php_timezone_obj *new_obj = php_timezone_obj_from_obj(date_object_new_timezone_ex(old_obj->std.ce, 0));
+ php_timezone_obj *new_obj = php_timezone_obj_from_obj(date_object_new_timezone(old_obj->std.ce));
zend_objects_clone_members(&new_obj->std, &old_obj->std);
if (!old_obj->initialized) {
return props;
} /* }}} */
-static inline zend_object *date_object_new_interval_ex(zend_class_entry *class_type, int init_props) /* {{{ */
+static zend_object *date_object_new_interval(zend_class_entry *class_type) /* {{{ */
{
php_interval_obj *intern = zend_object_alloc(sizeof(php_interval_obj), class_type);
zend_object_std_init(&intern->std, class_type);
- if (init_props) {
- object_properties_init(&intern->std, class_type);
- }
+ object_properties_init(&intern->std, class_type);
intern->std.handlers = &date_object_handlers_interval;
return &intern->std;
} /* }}} */
-static zend_object *date_object_new_interval(zend_class_entry *class_type) /* {{{ */
-{
- return date_object_new_interval_ex(class_type, 1);
-} /* }}} */
-
static zend_object *date_object_clone_interval(zval *this_ptr) /* {{{ */
{
php_interval_obj *old_obj = Z_PHPINTERVAL_P(this_ptr);
- php_interval_obj *new_obj = php_interval_obj_from_obj(date_object_new_interval_ex(old_obj->std.ce, 0));
+ php_interval_obj *new_obj = php_interval_obj_from_obj(date_object_new_interval(old_obj->std.ce));
zend_objects_clone_members(&new_obj->std, &old_obj->std);
new_obj->initialized = old_obj->initialized;
return props;
} /* }}} */
-static inline zend_object *date_object_new_period_ex(zend_class_entry *class_type, int init_props) /* {{{ */
+static zend_object *date_object_new_period(zend_class_entry *class_type) /* {{{ */
{
php_period_obj *intern = zend_object_alloc(sizeof(php_period_obj), class_type);
zend_object_std_init(&intern->std, class_type);
- if (init_props) {
- object_properties_init(&intern->std, class_type);
- }
+ object_properties_init(&intern->std, class_type);
intern->std.handlers = &date_object_handlers_period;
return &intern->std;
} /* }}} */
-static zend_object *date_object_new_period(zend_class_entry *class_type) /* {{{ */
-{
- return date_object_new_period_ex(class_type, 1);
-} /* }}} */
-
static zend_object *date_object_clone_period(zval *this_ptr) /* {{{ */
{
php_period_obj *old_obj = Z_PHPPERIOD_P(this_ptr);
- php_period_obj *new_obj = php_period_obj_from_obj(date_object_new_period_ex(old_obj->std.ce, 0));
+ php_period_obj *new_obj = php_period_obj_from_obj(date_object_new_period(old_obj->std.ce));
zend_objects_clone_members(&new_obj->std, &old_obj->std);
new_obj->initialized = old_obj->initialized;
}
/* }}} */
-static dom_object* dom_objects_set_class(zend_class_entry *class_type, zend_bool hash_copy);
+static dom_object* dom_objects_set_class(zend_class_entry *class_type);
static zend_object *dom_objects_store_clone_obj(zval *zobject) /* {{{ */
{
dom_object *intern = Z_DOMOBJ_P(zobject);
- dom_object *clone = dom_objects_set_class(intern->std.ce, 0);
+ dom_object *clone = dom_objects_set_class(intern->std.ce);
clone->std.handlers = dom_get_obj_handlers();
}
/* }}} */
-static dom_object* dom_objects_set_class(zend_class_entry *class_type, zend_bool hash_copy) /* {{{ */
+static dom_object* dom_objects_set_class(zend_class_entry *class_type) /* {{{ */
{
dom_object *intern = zend_object_alloc(sizeof(dom_object), class_type);
intern->prop_handler = zend_hash_find_ptr(&classes, base_class->name);
zend_object_std_init(&intern->std, class_type);
- if (hash_copy) {
- object_properties_init(&intern->std, class_type);
- }
+ object_properties_init(&intern->std, class_type);
return intern;
}
/* {{{ dom_objects_new */
zend_object *dom_objects_new(zend_class_entry *class_type)
{
- dom_object *intern = dom_objects_set_class(class_type, 1);
+ dom_object *intern = dom_objects_set_class(class_type);
intern->std.handlers = dom_get_obj_handlers();
return &intern->std;
}
dom_object *intern;
dom_nnodemap_object *objmap;
- intern = dom_objects_set_class(class_type, 1);
+ intern = dom_objects_set_class(class_type);
intern->ptr = emalloc(sizeof(dom_nnodemap_object));
objmap = (dom_nnodemap_object *)intern->ptr;
ZVAL_UNDEF(&objmap->baseobj_zv);