diff options
author | Stanislav Malyshev <stas@php.net> | 2015-04-01 12:50:40 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-04-01 12:50:40 -0700 |
commit | 4975019dd7077a83112b3ba1f7b4ddb9969da79b (patch) | |
tree | 6782dd9511800228795b99378ca576373a5df4c0 /ext/date/php_date.c | |
parent | ec760d8fffe7e6f56b458d477dd2dfdda73329ec (diff) | |
parent | 2d9399af3514189375f34610acc33a34de44d772 (diff) | |
download | php-git-4975019dd7077a83112b3ba1f7b4ddb9969da79b.tar.gz |
Merge branch 'PHP-5.6'
* PHP-5.6:
Revert "Merge branch 'PHP-5.5' into PHP-5.6"
Conflicts:
ext/date/php_date.c
ext/date/tests/DateTime_verify.phpt
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 7ca3aad266..8c6b2e5a1f 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -183,10 +183,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_date_format, 0, 0, 2) ZEND_ARG_INFO(0, format) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_date_method_create_from_immutable, 0, 0, 1) - ZEND_ARG_INFO(0, DateTimeImmutable) -ZEND_END_ARG_INFO() - ZEND_BEGIN_ARG_INFO_EX(arginfo_date_method_format, 0, 0, 1) ZEND_ARG_INFO(0, format) ZEND_END_ARG_INFO() @@ -470,7 +466,6 @@ const zend_function_entry date_funcs_date[] = { PHP_ME(DateTime, __construct, arginfo_date_create, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC) PHP_ME(DateTime, __wakeup, NULL, ZEND_ACC_PUBLIC) PHP_ME(DateTime, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - PHP_ME(DateTime, createFromImmutable, arginfo_date_method_create_from_immutable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(createFromFormat, date_create_from_format, arginfo_date_create_from_format, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(getLastErrors, date_get_last_errors, arginfo_date_get_last_errors, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(format, date_format, arginfo_date_method_format, 0) @@ -2835,34 +2830,6 @@ PHP_METHOD(DateTime, __wakeup) } /* }}} */ -/* {{{ proto DateTime::createFromImmutable(DateTimeImmutable object) - Creates new DateTime object from an existing DateTimeImmutable object. -*/ -PHP_METHOD(DateTime, createFromImmutable) -{ - zval *datetimeimmutable_object = NULL; - php_date_obj *new_obj = NULL; - php_date_obj *old_obj = NULL; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &datetimeimmutable_object, date_ce_immutable) == FAILURE) { - return; - } - - php_date_instantiate(date_ce_date, return_value); - old_obj = Z_PHPDATE_P(datetimeimmutable_object); - new_obj = Z_PHPDATE_P(return_value); - - new_obj->time = timelib_time_ctor(); - *new_obj->time = *old_obj->time; - if (old_obj->time->tz_abbr) { - new_obj->time->tz_abbr = strdup(old_obj->time->tz_abbr); - } - if (old_obj->time->tz_info) { - new_obj->time->tz_info = old_obj->time->tz_info; - } -} -/* }}} */ - /* Helper function used to add an associative array of warnings and errors to a zval */ static void zval_from_error_container(zval *z, timelib_error_container *error) /* {{{ */ { |