|
24 | 24 |
|
25 | 25 | union _zend_function;
|
26 | 26 |
|
| 27 | +/* The following rule applies to read_property() and read_dimension() implementations: |
| 28 | + If you return a zval which is not otherwise referenced by the extension or the engine's |
| 29 | + symbol table, its reference count should be 0. |
| 30 | +*/ |
27 | 31 | /* Used to fetch property from the object, read-only */
|
28 | 32 | typedef zval *(*zend_object_read_property_t)(zval *object, zval *member, zend_bool silent TSRMLS_DC);
|
29 | 33 |
|
30 | 34 | /* Used to fetch dimension from the object, read-only */
|
31 | 35 | typedef zval *(*zend_object_read_dimension_t)(zval *object, zval *offset, int type TSRMLS_DC);
|
32 | 36 |
|
| 37 | + |
| 38 | +/* The following rule applies to write_property() and write_dimension() implementations: |
| 39 | + If you receive a value zval in write_property/write_dimension, you may only modify it if |
| 40 | + its reference count is 1. Otherwise, you must create a copy of that zval before making |
| 41 | + any changes. You should NOT modify the reference count of the value passed to you. |
| 42 | +*/ |
33 | 43 | /* Used to set property of the object */
|
34 | 44 | typedef void (*zend_object_write_property_t)(zval *object, zval *member, zval *value TSRMLS_DC);
|
35 | 45 |
|
36 | 46 | /* Used to set dimension of the object */
|
37 | 47 | typedef void (*zend_object_write_dimension_t)(zval *object, zval *offset, zval *value TSRMLS_DC);
|
38 | 48 |
|
| 49 | + |
39 | 50 | /* Used to create pointer to the property of the object, for future direct r/w access */
|
40 | 51 | typedef zval **(*zend_object_get_property_ptr_ptr_t)(zval *object, zval *member TSRMLS_DC);
|
41 | 52 |
|
|
0 commit comments