Re: [PHP-DEV] array and call_user_function

2008-09-10 Thread mr esnafrao
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,

Re: [PHP-DEV] array and call_user_function

2008-09-10 Thread mr esnafrao
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

Re: [PHP-DEV] array and call_user_function

2008-09-08 Thread Marcus Boerger
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)

[PHP-DEV] array and call_user_function

2008-09-08 Thread mr esnafrao
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