Re: Help with resources management
| From: | Yannick Warnier | Date: | Mon, 01 Nov 2004 16:37:44 +0000 |
| Subject: | Re: Help with resources management | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1561@lists.php.net to get a copy of this message | ||
Le lun 01/11/2004 à 12:08, Yannick Warnier a écrit :
> Hi there,
[..]
> I have come to this, which seems a lot nicer than before and even
> compiles, but doesn't return anything other than NULL:
>
> ZEND_FUNCTION(ssh_options_new)
> {
> zval *options;
> if (ZEND_NUM_ARGS() != 0) {
> WRONG_PARAM_COUNT;
> }
> options = (zval *) options_new();
> ZEND_REGISTER_RESOURCE(return_value, &options, le_ssh);
> }
OK, nevermind, human problem as usual.
As Michael told me kindly, I can use something like:
ZEND_FUNCTION(ssh_options_new)
> {
> SSH_OPTIONS *options;
> if (ZEND_NUM_ARGS() != 0) {
> WRONG_PARAM_COUNT;
> }
> options = options_new();
> ZEND_REGISTER_RESOURCE(return_value, &options, le_ssh);
> }
The thing is, in my deep quest for problem, I didn't even check that my
external library was included. Couldn't work.
Thanks anyway and sorry for the poor post.
Yannick