You're right, sorry :-)

Thanks Markus.. (and Derick too :D )

-- Mathieu

On Tue, 2001-12-04 at 15:07, Markus Fischer wrote:
>     Yo !
> 
>     But you specified two doubles "dd" after the string and try to fit
>     them into ints!
> 
>     - Markus
> 
> On Tue, Dec 04, 2001 at 03:00:13PM +0100, Mathieu Kooiman wrote : 
> > On Tue, 2001-12-04 at 15:02, Markus Fischer wrote:
> > >     You're trying to fit a double into an int .. doesn't seem
> > >     right to me. int is 4 bytes, double 8 bytes (at least on i386
> > >     here).
> > > 
> > >     - Markus
> > 
> > README.PARAMETERS_PARSING_API tells me 's' gets you the string
> > and it's length..
> > 
> > Quote:
> > 
> > Examples
> > --------
> > /* Gets a long, a string and its length, and a zval */
> > long l;
> > char *s;
> > int s_len;
> > zval *param;
> > if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
> >                                               &l, &s, &s_len, &param) == FAILURE) {
> >     return;
> > }
> > 
> > --------
> > 
> > So IMO, my code should work..
> > 
> > > 
> > > On Tue, Dec 04, 2001 at 02:47:05PM +0100, Mathieu Kooiman wrote : 
> > > > For my module I've been playing with zend_parse_parameters().
> > > > I ran into something weird though:
> > > > 
> > > > --
> > > > zval *rsrc_pdb;
> > > > char *data;
> > > > int s_len = 0, index = 0, mode = PDB_ADD_APPEND;
> > > > 
> > > > if ( zend_parse_parameters ( ZEND_NUM_ARGS() TSRMLS_CC, "rsdd",
> > > > &rsrc_pdb, &data, &s_len, &index, &mode) == FAILURE) {
> > > >         return;
> > > > }
> > > > --
> > > > 
> > > > This "works". As in, it doesn't return FAILURE. However, after
> > > > inspecting this with gdb, s_len seems to still be 0 after calling
> > > > zend_parse_parameters()..
> > > > 
> > > > Am I doing something wrong or is zend_parse_parameters() ??
> > > > 
> > > > Mathieu
> > > > 
> > > > 
> > > > 
> > > > -- 
> > > > 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]
> > > 
> > > -- 
> > > Please always Cc to me when replying to me on the lists.
> > > 
> > > -- 
> > > 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]
> > 
> 
> -- 
> Please always Cc to me when replying to me on the lists.
> 
> -- 
> 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]



-- 
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