On Fri, 24 Aug 2001, Wez Furlong wrote:
> When parsing strings from parameters with zend_parse_parameters, it is
> required that the programmer pass in an int to receive the length of the
> string.
> 
> Could we relax this and allow a NULL instead if we do not need the length
> of the string?  It would make the calling code more pretty because we
> would not need to declare a bunch if ints that don't otherwise get used.
> 
> Yeah, I know about binary safety, but when I'm passing this stuff to binary
> unsafe functions there doesn't seem much point :)

Initially, I had another specifier that would let you receive just the
string pointer, but in discussions with Andi we agreed that it would be
good to always return the length as well. Binary safety was a major
consideration in this. Don't you think people will start passing NULL
all the time if this rule is relaxed?

-Andrei

It is commonly the case with technologies that you can get
the best insight about how they work by watching them fail.
                                        -- Neal Stephenson

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