- zend_hash_index_find(&p->type.conv, PHP_PQ_TYPE_OF_ARRAY(type), (void *) &zconv);
-
- smart_str_appendc(&s, '{');
- zend_hash_apply_with_arguments(Z_ARRVAL_P(zarr) TSRMLS_CC, apply_to_param_from_array, 5, p, &i, &s, (Oid) PHP_PQ_TYPE_OF_ARRAY(type), zconv);
- smart_str_appendc(&s, '}');
- smart_str_0(&s);
+ arg.params = p;
+ arg.buffer = &s;
+ arg.type = PHP_PQ_TYPE_OF_ARRAY(type);
+ arg.delim = PHP_PQ_DELIM_OF_ARRAY(type);
+ arg.zconv = zend_hash_index_find(&p->type.conv, PHP_PQ_TYPE_OF_ARRAY(type));
+ smart_str_appendc(arg.buffer, '{');
+ SEPARATE_ZVAL(zarr);
+ zend_hash_apply_with_argument(Z_ARRVAL_P(zarr), apply_to_param_from_array, &arg);
+ smart_str_appendc(arg.buffer, '}');