Hey,

I've just converted ext/openssl.c to use the new zend_parse_parameters
(because it really needed it!) and I noticed that openssl_seal was doing
this:

// sealdata and ekeys are the [out] parameters
// the PHP_FE says arg2and3of4_force_ref
proto int openssl_seal(string data, &string sealdata,
  &array ekeys, array pubkeys)

...
SEPARATE_ZVAL(pubkeys);
...

I think this is a typo; it should be ekeys not pubkeys.
>From my understanding of SEPARATE_ZVAL, it is not needed if
the parameter was passed by reference, and the only reason
to use it on one of the other parameters is if you want to
locally modify it.  openssl_seal doesn't modify the zval AFAICT.

Can someone clarify this in this particular case?

In the meantime, to preserve what it was doing I've used this
for zend_parse_parameters:

if (zend_parse_parameters(ZEND_NUM_ARGS(), "szza/",
        &data, &data_len, &sealdata, &ekeys, &pubkeys) == FAILURE)
    return;

So pubkeys is separated if not ref.

TIA,

--Wez.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to