help request: passing return value
| From: | netcat | Date: | Tue, 07 Oct 2003 08:43:45 +0000 |
| Subject: | help request: passing return value | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-4714@lists.php.net to get a copy of this message | ||
Hi internals.
[background]
I'm newbie here and with php extensions.
Working on php extension.
It should give access to librep.
I have very little experience with C.
[problem]
zval f1(some_args) {
zval r;
...
return r;
}
/* f1 can return many different types */
ZEND_FUNCTION(f2) {
/* working on some_args here */
...
...
/* here i need to return what
f1(some_args) returns */
}
What's the best way to pass the result ?
Any macro that would ?
[tried]
To look at another modules.
Make f1 be (zval *) and
"*return_value=*rep_data_converter(result);"
in f2.
Since zval is not very simple structure - it doesn't work.
P.S.
Posting this message to php.internals seems to fail.
--
NetCat
---------------------------------------------------
FREE 10MB Email + AntiSpam + POP3 + more.
Get it at http://www.doal.co.il:81/free/?c=antispam