Re: Probably a simple answer...
| From: | Simon Fogg | Date: | Tue, 14 May 2002 14:08:57 +0000 |
| Subject: | Re: Probably a simple answer... | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84040@lists.php.net to get a copy of this message | ||
I believe you hijacked my thread - The original subject was: 'Creating
extension module for PHP'!
"Brad Lafountain" <rodif_bl@yahoo.com> wrote in message
news:20020514132140.62925.qmail@web9601.mail.yahoo.com...
> Well i do believe that the zval string SHOULD be null termiated and have
the
> length stored.
>
> But zend does provied this api function
>
> zend_binary_zval_strcmp(zval *, zval*);
>
> - Brad
>
> --- Robert Cummings <robert.cummings@webmotion.com> wrote:
> > zval containers that are of string type don't seem to hold
> > a null terminating character, but rather directly store the
> > length of the string - I note this because of how the
> > ZVAL_STRING macro works... My question then is what is the
> > best way to compare two strings in a zval? I would imagine
> > a macro or function would already exist, and I'm quite sure
> > that the following simple invocation is asking for trouble:
> >
> > strcmp( Z_STRVAL_P( target1 ), Z_STRVAL_P( target2 ) ) == 0
> >
> > Thanks for any information.
> >
> > Cheers,
> > Rob.
> > --
> > .-----------------.
> > | Robert Cummings |
> > :-----------------`----------------------------.
> > | Webdeployer - Chief PHP and Java Programmer |
> > :----------------------------------------------:
> > | Mail : mailto:robert.cummings@webmotion.com |
> > | Phone : (613) 731-4046 x.109 |
> > :----------------------------------------------:
> > | Website : http://www.webmotion.com |
> > | Fax : (613) 260-9545 |
> > `----------------------------------------------'
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com