- TSRMLS_DF(p);
-
- if (type && SUCCESS == zend_hash_index_find(&p->type.conv, type, (void *) &zconv)) {
- zval *ztype, *rv = NULL;
-
- MAKE_STD_ZVAL(ztype);
- ZVAL_LONG(ztype, type);
- zend_call_method_with_2_params(zconv, NULL, NULL, "converttostring", &rv, *zpp, ztype);
- zval_ptr_dtor(&ztype);
- if (rv) {
- convert_to_string(rv);
- p->param.strings[index] = Z_STRVAL_P(rv);
- zend_hash_next_index_insert(&p->param.dtor, (void *) &rv, sizeof(zval *), NULL);
- }
+
+ if (type && (zconv = zend_hash_index_find(&p->type.conv, type))) {
+ zval ztype, rv;
+
+ ZVAL_NULL(&rv);
+ ZVAL_LONG(&ztype, type);
+ zend_call_method_with_2_params(zconv, NULL, NULL, "converttostring", &rv, zpp, &ztype);
+ convert_to_string(&rv);
+ p->param.strings[index] = Z_STRVAL_P(&rv);
+ zend_hash_next_index_insert(&p->param.dtor, &rv);