Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread brad lafountain
--- Robert Cummings <[EMAIL PROTECTED]> wrote: > Robert Cummings wrote: > > > > brad lafountain wrote: > > > > > > Well i do believe that the zval string SHOULD be null termiated and have > the > > > length stored. > > > > You would think so, but on further thought, if that were the case you >

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings
Simon Fogg wrote: > > That's o.k.- I'm just grouchy. There seems to be so much information to wade > through to find out what you need to know. > > Since we are on the subject though, and you have already done this sort of > thing before, can you tell me whether extensions are supported on MacOS

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Simon Fogg
That's o.k.- I'm just grouchy. There seems to be so much information to wade through to find out what you need to know. Since we are on the subject though, and you have already done this sort of thing before, can you tell me whether extensions are supported on MacOSX. My Mac colleague is off sick

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings
Simon Fogg wrote: > > I believe you hijacked my thread - The original subject was: 'Creating > extension module for PHP'! I was asking about specific information about specific functionality, your thread asks about how to write an extension... I already know how and have done so, I'd just like t

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Simon Fogg
I believe you hijacked my thread - The original subject was: 'Creating extension module for PHP'! "Brad Lafountain" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Well i do believe that the zval string SHOULD be null termiated and have the > length stored. > >

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings
Robert Cummings wrote: > > brad lafountain wrote: > > > > Well i do believe that the zval string SHOULD be null termiated and have the > > length stored. > > You would think so, but on further thought, if that were the case you > wouldn't be able to store compressed data from gzip in a string be

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Zeev Suraski
zval strings must be NULL terminated, even if they contain binary data. The str.val.len property represents the length of the string w/o the terminating NULL. Zeev At 16:39 14/05/2002, Robert Cummings wrote: >brad lafountain wrote: > > > > Well i do believe that the zval string SHOULD be null

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings
brad lafountain wrote: > > 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*); Oh and I almost forgot... THANKS... this appears to be exactly what I was looking fo

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings
brad lafountain wrote: > > Well i do believe that the zval string SHOULD be null termiated and have the > length stored. You would think so, but on further thought, if that were the case you wouldn't be able to store compressed data from gzip in a string because the null bytes everywhere would i

Re: [PHP-DEV] Probably a simple answer...

2002-05-14 Thread brad lafountain
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 <[EMAIL PROTECTED]> wrote: > zval containers that are of string type don't seem to hold > a

[PHP-DEV] Probably a simple answer...

2002-05-14 Thread Robert Cummings
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