5
5
| Copyright (c) 1998-2013 Zend Technologies Ltd. (http://www.zend.com) |
6
6
+----------------------------------------------------------------------+
7
7
| This source file is subject to version 2.00 of the Zend license, |
8
- | that is bundled with this package in the file LICENSE, and is |
8
+ | that is bundled with this package in the file LICENSE, and is |
9
9
| available through the world-wide-web at the following url: |
10
10
| http://www.zend.com/license/2_00.txt. |
11
11
| If you did not receive a copy of the Zend license and are unable to |
@@ -88,7 +88,7 @@ ZEND_METHOD(Closure, bind)
88
88
RETURN_NULL ();
89
89
}
90
90
91
- closure = (zend_closure * )zend_object_store_get_object (zclosure TSRMLS_CC );
91
+ closure = (zend_closure * )zend_object_store_get_object (zclosure TSRMLS_CC );
92
92
93
93
if ((newthis != NULL ) && (closure -> func .common .fn_flags & ZEND_ACC_STATIC )) {
94
94
zend_error (E_WARNING , "Cannot bind an instance to a static closure" );
@@ -152,7 +152,7 @@ static int zend_closure_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */
152
152
153
153
ZEND_API zend_function * zend_get_closure_invoke_method (zval * obj TSRMLS_DC ) /* {{{ */
154
154
{
155
- zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
155
+ zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
156
156
zend_function * invoke = (zend_function * )emalloc (sizeof (zend_function ));
157
157
158
158
invoke -> common = closure -> func .common ;
@@ -168,14 +168,14 @@ ZEND_API zend_function *zend_get_closure_invoke_method(zval *obj TSRMLS_DC) /* {
168
168
169
169
ZEND_API const zend_function * zend_get_closure_method_def (zval * obj TSRMLS_DC ) /* {{{ */
170
170
{
171
- zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
171
+ zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
172
172
return & closure -> func ;
173
173
}
174
174
/* }}} */
175
175
176
176
ZEND_API zval * zend_get_closure_this_ptr (zval * obj TSRMLS_DC ) /* {{{ */
177
177
{
178
- zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
178
+ zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
179
179
return closure -> this_ptr ;
180
180
}
181
181
/* }}} */
@@ -212,7 +212,7 @@ static void zend_closure_write_property(zval *object, zval *member, zval *value,
212
212
}
213
213
/* }}} */
214
214
215
- static zval * * zend_closure_get_property_ptr_ptr (zval * object , zval * member , const zend_literal * key TSRMLS_DC ) /* {{{ */
215
+ static zval * * zend_closure_get_property_ptr_ptr (zval * object , zval * member , int type , const zend_literal * key TSRMLS_DC ) /* {{{ */
216
216
{
217
217
ZEND_CLOSURE_PROPERTY_ERROR ();
218
218
return NULL ;
@@ -378,7 +378,7 @@ static HashTable *zend_closure_get_debug_info(zval *object, int *is_temp TSRMLS_
378
378
379
379
static HashTable * zend_closure_get_gc (zval * obj , zval * * * table , int * n TSRMLS_DC ) /* {{{ */
380
380
{
381
- zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
381
+ zend_closure * closure = (zend_closure * )zend_object_store_get_object (obj TSRMLS_CC );
382
382
383
383
* table = closure -> this_ptr ? & closure -> this_ptr : NULL ;
384
384
* n = closure -> this_ptr ? 1 : 0 ;
@@ -474,7 +474,7 @@ ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_ent
474
474
zend_error (E_WARNING , "Cannot bind function %s::%s to scope class %s" , func -> common .scope -> name , func -> common .function_name , scope -> name );
475
475
scope = NULL ;
476
476
}
477
- if (scope && this_ptr && (func -> common .fn_flags & ZEND_ACC_STATIC ) == 0 &&
477
+ if (scope && this_ptr && (func -> common .fn_flags & ZEND_ACC_STATIC ) == 0 &&
478
478
!instanceof_function (Z_OBJCE_P (this_ptr ), closure -> func .common .scope TSRMLS_CC )) {
479
479
zend_error (E_WARNING , "Cannot bind function %s::%s to object of class %s" , func -> common .scope -> name , func -> common .function_name , Z_OBJCE_P (this_ptr )-> name );
480
480
scope = NULL ;
0 commit comments