|
28 | 28 | #include "zend_globals.h"
|
29 | 29 | #include "zend_closures_arginfo.h"
|
30 | 30 |
|
31 |
| -#define ZEND_CLOSURE_PRINT_NAME "Closure object" |
32 |
| - |
33 |
| -#define ZEND_CLOSURE_PROPERTY_ERROR() \ |
34 |
| - zend_throw_error(NULL, "Closure object cannot have properties") |
35 |
| - |
36 | 31 | typedef struct _zend_closure {
|
37 | 32 | zend_object std;
|
38 | 33 | zend_function func;
|
@@ -442,42 +437,6 @@ static zend_function *zend_closure_get_method(zend_object **object, zend_string
|
442 | 437 | }
|
443 | 438 | /* }}} */
|
444 | 439 |
|
445 |
| -static ZEND_COLD zval *zend_closure_read_property(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv) /* {{{ */ |
446 |
| -{ |
447 |
| - ZEND_CLOSURE_PROPERTY_ERROR(); |
448 |
| - return &EG(uninitialized_zval); |
449 |
| -} |
450 |
| -/* }}} */ |
451 |
| - |
452 |
| -static ZEND_COLD zval *zend_closure_write_property(zend_object *object, zend_string *member, zval *value, void **cache_slot) /* {{{ */ |
453 |
| -{ |
454 |
| - ZEND_CLOSURE_PROPERTY_ERROR(); |
455 |
| - return &EG(error_zval); |
456 |
| -} |
457 |
| -/* }}} */ |
458 |
| - |
459 |
| -static ZEND_COLD zval *zend_closure_get_property_ptr_ptr(zend_object *object, zend_string *member, int type, void **cache_slot) /* {{{ */ |
460 |
| -{ |
461 |
| - ZEND_CLOSURE_PROPERTY_ERROR(); |
462 |
| - return NULL; |
463 |
| -} |
464 |
| -/* }}} */ |
465 |
| - |
466 |
| -static ZEND_COLD int zend_closure_has_property(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot) /* {{{ */ |
467 |
| -{ |
468 |
| - if (has_set_exists != ZEND_PROPERTY_EXISTS) { |
469 |
| - ZEND_CLOSURE_PROPERTY_ERROR(); |
470 |
| - } |
471 |
| - return 0; |
472 |
| -} |
473 |
| -/* }}} */ |
474 |
| - |
475 |
| -static ZEND_COLD void zend_closure_unset_property(zend_object *object, zend_string *member, void **cache_slot) /* {{{ */ |
476 |
| -{ |
477 |
| - ZEND_CLOSURE_PROPERTY_ERROR(); |
478 |
| -} |
479 |
| -/* }}} */ |
480 |
| - |
481 | 440 | static void zend_closure_free_storage(zend_object *object) /* {{{ */
|
482 | 441 | {
|
483 | 442 | zend_closure *closure = (zend_closure *)object;
|
@@ -645,11 +604,6 @@ void zend_register_closure_ce(void) /* {{{ */
|
645 | 604 | closure_handlers.free_obj = zend_closure_free_storage;
|
646 | 605 | closure_handlers.get_constructor = zend_closure_get_constructor;
|
647 | 606 | closure_handlers.get_method = zend_closure_get_method;
|
648 |
| - closure_handlers.write_property = zend_closure_write_property; |
649 |
| - closure_handlers.read_property = zend_closure_read_property; |
650 |
| - closure_handlers.get_property_ptr_ptr = zend_closure_get_property_ptr_ptr; |
651 |
| - closure_handlers.has_property = zend_closure_has_property; |
652 |
| - closure_handlers.unset_property = zend_closure_unset_property; |
653 | 607 | closure_handlers.compare = zend_closure_compare;
|
654 | 608 | closure_handlers.clone_obj = zend_closure_clone;
|
655 | 609 | closure_handlers.get_debug_info = zend_closure_get_debug_info;
|
|
0 commit comments