I have solved the problem. I had confused the functions hash_* with the
funtions array_*. This works:
MAKE_STD_ZVAL(hash);
array_init(hash);
g_hash_table_iter_init (&iter, m->params);
while (g_hash_table_iter_next (&iter, &key, &value)) {
add_assoc_string(hash, key, value,
Thanks for your response, but I'm unable to make it work. I have changed the
code, and it works with strings and even with arrays, but not with hashes:
Am I missing something?
zval *hash;
zval **args[2], *func, *retval;
zval *str;
MAKE_STD_ZVAL(retval);
MAKE_STD_ZVAL(func);
ZVAL_STRIN
Hello mr,
Monday, September 8, 2008, 6:58:19 PM, you wrote:
> Hi all,
> I'm having problems passing an array to the function call_user_function as
> parameter. This is the code:
> zval *args[3], *func, *retval;
args maust be *** not **
> MAKE_STD_ZVAL(func);
> MAKE_STD_ZVAL(retval)
Hi all,
I'm having problems passing an array to the function call_user_function as
parameter. This is the code:
zval *args[3], *func, *retval;
MAKE_STD_ZVAL(func);
MAKE_STD_ZVAL(retval);
MAKE_STD_ZVAL(args[0]);
MAKE_STD_ZVAL(args[1]);
MAKE_STD_ZVAL(args[2]);
ALLOC_HASH