-static php_property_proxy_object_t *new_propro(zend_class_entry *ce,
- php_property_proxy_t *proxy TSRMLS_DC)
-{
- php_property_proxy_object_t *o;
-
- if (!ce) {
- ce = php_property_proxy_class_entry;
- }
-
- o = ecalloc(1, sizeof(*o) + sizeof(zval) * ce->default_properties_count);
- zend_object_std_init((zend_object *) o, ce TSRMLS_CC);
- object_properties_init((zend_object *) o, ce);
-
- o->proxy = proxy;
- o->zo.handlers = &php_property_proxy_object_handlers;
-
-#if DEBUG_PROPRO
- fprintf(stderr, "#PP %p init\n", o);
-#endif
-
- return o;
-}
-
-static zend_object *create_obj(zend_class_entry *ce TSRMLS_DC)
-{
- return (zend_object *) new_propro(ce, NULL TSRMLS_CC);
-}
-
-static void destroy_obj(zend_object *object TSRMLS_DC)
-{
- php_property_proxy_object_t *o = (php_property_proxy_object_t *) object;
-
-#if DEBUG_PROPRO
- fprintf(stderr, "#PP %p dtor\n", o);
-#endif
-
- if (o->proxy) {
- php_property_proxy_free(&o->proxy);
- }
- if (!Z_ISUNDEF(o->parent)) {
- zval_ptr_dtor(&o->parent);
- ZVAL_UNDEF(&o->parent);
- }
-}
-
-static inline php_property_proxy_object_t *get_propro(zval *object)
-{
- object = get_referenced_zval(object);
- switch (Z_TYPE_P(object)) {
- case IS_OBJECT:
- break;
- EMPTY_SWITCH_DEFAULT_CASE();
- }
- return (php_property_proxy_object_t *) Z_OBJ_P(object);
-}
+static inline php_property_proxy_object_t *get_propro(zval *object);
+static zval *get_parent_proxied_value(zval *object, zval *return_value);
+static zval *get_proxied_value(zval *object, zval *return_value);
+static zval *read_dimension(zval *object, zval *offset, int type, zval *return_value);
+static ZEND_RESULT_CODE cast_proxied_value(zval *object, zval *return_value, int type);
+static void write_dimension(zval *object, zval *offset, zval *value);
+static void set_proxied_value(zval *object, zval *value);