diff options
author | Stanislav Malyshev <stas@php.net> | 2015-04-01 12:48:08 -0700 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-04-01 12:49:25 -0700 |
commit | 2d9399af3514189375f34610acc33a34de44d772 (patch) | |
tree | da7519332b5e8060d6ae7c16ce09ef1cc88b4e55 /ext/date/php_date.c | |
parent | 978128b446f5f45816495fac4c5361a28621cd25 (diff) | |
download | php-git-2d9399af3514189375f34610acc33a34de44d772.tar.gz |
Revert "Merge branch 'PHP-5.5' into PHP-5.6"
This reverts commit aa22e80b1af500e5d6cdc0f7783537a768d0e373, reversing
changes made to 3e7f47cb039fd8803776eaf2899d576c503cdb63.
Conflicts:
ext/date/php_date.c
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index c892c86da1..ca61fb7b68 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -185,10 +185,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() @@ -472,7 +468,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) @@ -2786,7 +2781,7 @@ PHP_METHOD(DateTimeImmutable, createFromMutable) php_date_obj *new_obj = NULL; php_date_obj *old_obj = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &datetime_object, date_ce_date) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O!", &datetime_object, date_ce_date) == FAILURE) { return; } @@ -2917,34 +2912,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() TSRMLS_CC, "O", &datetimeimmutable_object, date_ce_immutable) == FAILURE) { - return; - } - - php_date_instantiate(date_ce_date, return_value TSRMLS_CC); - old_obj = (php_date_obj *) zend_object_store_get_object(datetimeimmutable_object TSRMLS_CC); - new_obj = (php_date_obj *) zend_object_store_get_object(return_value TSRMLS_CC); - - 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) { |