X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pq_params.c;h=259fbb9a13b1c4b6e3c2d243e5106f39c1e9763d;hb=118696aeeb3bed44f1642e62f8697885b7630a90;hp=a691eebd62464efbe897c2f91533c064b7f85961;hpb=5ba3107011d4050d5ae5877dae80e382dc228e6a;p=m6w6%2Fext-pq diff --git a/src/php_pq_params.c b/src/php_pq_params.c index a691eeb..259fbb9 100644 --- a/src/php_pq_params.c +++ b/src/php_pq_params.c @@ -133,7 +133,7 @@ static int apply_to_param_from_array(zval *zparam, void *arg_ptr) zval ztype, rv; ZVAL_LONG(&ztype, arg->type); - zend_call_method_with_2_params(arg->zconv, NULL, NULL, "converttostring", &rv, zparam, &ztype); + php_pq_call_method(arg->zconv, "converttostring", 2, &rv, zparam, &ztype); tmpstr = zval_get_string(&rv); zval_ptr_dtor(&rv); goto append_string; @@ -243,7 +243,7 @@ static void php_pq_params_set_param(php_pq_params_t *p, unsigned index, zval *zp ZVAL_NULL(&rv); ZVAL_LONG(&ztype, type); - zend_call_method_with_2_params(zconv, NULL, NULL, "converttostring", &rv, zpp, &ztype); + php_pq_call_method(zconv, "converttostring", 2, &rv, zpp, &ztype); convert_to_string(&rv); p->param.strings[index] = Z_STRVAL_P(&rv); zend_hash_next_index_insert(&p->param.dtor, &rv); @@ -307,7 +307,8 @@ static int apply_to_params(zval *zp, void *arg_ptr) { struct apply_to_params_arg *arg = arg_ptr; - SEPARATE_ZVAL_IF_NOT_REF(zp); + ZVAL_DEREF(zp); + SEPARATE_ZVAL(zp); php_pq_params_set_param(arg->params, arg->index++, zp); return ZEND_HASH_APPLY_KEEP; }