com php-src: Merge branch 'PHP-7.0' into PHP-7.1: NEWS Zend/zend_builtin_functions.c Zend/zend_inheritance .c
| From: | Nikita Popov | Date: | Thu, 22 Sep 2016 10:34:55 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0' into PHP-7.1: NEWS Zend/zend_builtin_functions.c Zend/zend_inheritance .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94616@lists.php.net to get a copy of this message | ||
Commit: 7cd2494bb8a2379a116f0b895438c2fd7166b29f
Author: Nikita Popov <nikic@php.net> Thu, 22 Sep 2016 12:34:55 +0200
Parents: d4144a6ec93485076ee93dd1316bb2c2c691a6e2 8e313becf4190a8cdc4ef52a1efdbce475f51ae0
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7cd2494bb8a2379a116f0b895438c2fd7166b29f
Log:
Merge branch 'PHP-7.0' into PHP-7.1
Changed paths:
MM NEWS
MM Zend/zend_builtin_functions.c
MM Zend/zend_inheritance.c
Diff:
diff --cc NEWS
index a225124,726b9b7..293ff51
--- a/NEWS
+++ b/NEWS
@@@ -1,24 -1,6 +1,25 @@@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2016 PHP 7.0.12
+?? ??? 2016, PHP 7.1.0RC3
+
+- COM:
+ . Fixed bug #73126 (Cannot pass parameter 1 by reference). (Anatol)
++ . Fixed bug #69579 (Invalid free in extension trait). (John Boehr)
+
+- GD:
+ .. Fixed bug #50194 (imagettftext broken on transparent background w/o
+ alphablending). (cmb)
+ . Fixed bug #73003 (Integer Overflow in gdImageWebpCtx of gd_webp.c). (trylab,
+ cmb)
+
+- JSON:
+ . Fixed bug #73113 (Segfault with throwing JsonSerializable). (julien)
+
+- Session:
+ . Fixed bug #73100 (session_destroy null dereference in ps_files_path_create).
+ (cmb)
+
+15 Sep 2016, PHP 7.1.0RC2
- Core:
. Fixed bug #73067 (__debugInfo crashes when throwing an exception).
diff --cc Zend/zend_builtin_functions.c
index f118ebd,c3160d0..3943c73
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@@ -32,9 -32,7 +32,10 @@@
#undef ZEND_TEST_EXCEPTIONS
#if ZEND_DEBUG
+static zend_class_entry *zend_test_interface;
+static zend_class_entry *zend_test_class;
+ static zend_class_entry *zend_test_trait;
+static zend_object_handlers zend_test_class_handlers;
#endif
static ZEND_FUNCTION(zend_version);
@@@ -264,48 -262,15 +265,58 @@@ ZEND_END_ARG_INFO(
/* }}} */
#if ZEND_DEBUG
+static zend_object *zend_test_class_new(zend_class_entry *class_type) /* {{{ */ {
+ zend_object *obj = zend_objects_new(class_type);
+ obj->handlers = &zend_test_class_handlers;
+ return obj;
+}
+/* }}} */
+
+static zend_function *zend_test_class_method_get(zend_object **object, zend_string *name, const
zval *key) /* {{{ */ {
+ zend_internal_function *fptr = emalloc(sizeof(zend_internal_function));
+ fptr->type = ZEND_OVERLOADED_FUNCTION_TEMPORARY;
+ fptr->num_args = 1;
+ fptr->arg_info = NULL;
+ fptr->scope = (*object)->ce;
+ fptr->fn_flags = ZEND_ACC_CALL_VIA_HANDLER;
+ fptr->function_name = zend_string_copy(name);
+ fptr->handler = ZEND_FN(zend_test_func);
+ zend_set_function_arg_flags((zend_function*)fptr);
+
+ return (zend_function*)fptr;
+}
+/* }}} */
+
+static zend_function *zend_test_class_static_method_get(zend_class_entry *ce, zend_string *name)
/* {{{ */ {
+ zend_internal_function *fptr = emalloc(sizeof(zend_internal_function));
+ fptr->type = ZEND_OVERLOADED_FUNCTION;
+ fptr->num_args = 1;
+ fptr->arg_info = NULL;
+ fptr->scope = ce;
+ fptr->fn_flags = ZEND_ACC_CALL_VIA_HANDLER|ZEND_ACC_STATIC;
+ fptr->function_name = name;
+ fptr->handler = ZEND_FN(zend_test_func);
+ zend_set_function_arg_flags((zend_function*)fptr);
+
+ return (zend_function*)fptr;
+}
+/* }}} */
+
+static int zend_test_class_call_method(zend_string *method, zend_object *object,
INTERNAL_FUNCTION_PARAMETERS) /* {{{ */ {
+ RETVAL_STR(zend_string_copy(method));
+ return 0;
+}
+/* }}} */
++
+ static ZEND_METHOD(_ZendTestTrait, testMethod) /* {{{ */ {
+ RETURN_TRUE;
+ }
+ /* }}} */
+
+ static zend_function_entry zend_test_trait_methods[] = {
+ ZEND_ME(_ZendTestTrait, testMethod, arginfo_zend__void, ZEND_ACC_PUBLIC)
+ ZEND_FE_END
+ };
#endif
static const zend_function_entry builtin_functions[] = { /* {{{ */
@@@ -391,18 -356,10 +402,23 @@@ ZEND_MINIT_FUNCTION(core) { /* {{{ *
zend_register_default_classes();
#if ZEND_DEBUG
+ INIT_CLASS_ENTRY(class_entry, "_ZendTestInterface", NULL);
+ zend_test_interface = zend_register_internal_interface(&class_entry);
+ zend_declare_class_constant_long(zend_test_interface, ZEND_STRL("DUMMY"), 0);
+ INIT_CLASS_ENTRY(class_entry, "_ZendTestClass", NULL);
+ zend_test_class = zend_register_internal_class_ex(&class_entry, NULL);
+ zend_class_implements(zend_test_class, 1, zend_test_interface);
+ zend_test_class->create_object = zend_test_class_new;
+ zend_test_class->get_static_method = zend_test_class_static_method_get;
+
+ memcpy(&zend_test_class_handlers, zend_get_std_object_handlers(),
sizeof(zend_object_handlers));
+ zend_test_class_handlers.get_method = zend_test_class_method_get;
+ zend_test_class_handlers.call_method = zend_test_class_call_method;
++
+ INIT_CLASS_ENTRY(class_entry, "_ZendTestTrait", zend_test_trait_methods);
+ zend_test_trait = zend_register_internal_class(&class_entry);
+ zend_test_trait->ce_flags |= ZEND_ACC_TRAIT;
+ zend_declare_property_null(zend_test_trait, "testProp", sizeof("testProp")-1,
ZEND_ACC_PUBLIC);
#endif
return SUCCESS;