Re: Re: [ZEND-ENGINE] cvs: Zend / zend_API.c zend_API.h

From: Date: Mon, 12 Mar 2001 16:22:21 +0000
Subject: Re: Re: [ZEND-ENGINE] cvs: Zend / zend_API.c zend_API.h
References: 1 2 3 4 5 6 7 8 9  Groups: php.dev 
Request: Send a blank email to php-dev+get-48745@lists.php.net to get a copy of this message
Simple, allocate an arbitrary large number, like a gig, give there OS's paging routines a test : ) That is a true point, I was thinking that in most cases you could accurately predict the size. g_strdup_printf - that sounds like a fun function, why don't most libraries have this feature : ) -Jason ----- Original Message ----- From: "Andrei Zmievski" <andrei@ispi.net> To: "Jason Greene" <jason@inetgurus.net> Cc: "Zeev Suraski" <zeev@zend.com>; "php-dev mailinglist" <php-dev@lists.php.net> Sent: Monday, March 12, 2001 10:15 AM Subject: Re: [PHP-DEV] Re: [ZEND-ENGINE] cvs: Zend / zend_API.c zend_API.h > On Mon, 12 Mar 2001, Jason Greene wrote: > > strlcpy, and strlcat are in the win32 build (main/strlcat.c main/strlcpy.c) > > why dont you malloc a buffer that would fit the sprintf data, and then strlcpy > > the size restriction? > > Hmm, and how would you know how big the sprintf buffer would need to be > for an arbitrary format and arguments? :) In my case it's much simpler, > so yes, I could do that, but otherwise.. That's why Glib has > g_strdup_printf() function.. quite nice. > > -Andrei > * If it ain't broken, it doesn't have enough features yet. * > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#48745) next »