Re: [PHP-DEV] zend_parse_parameters()

2001-12-30 Thread Markus Fischer
On Sun, Dec 30, 2001 at 04:09:54PM -0500, Sean R. Bright wrote : > Is the goal to existing code over to use the zend_parse_parameters() > function or just those functions that take more than one parameter/ > optional parameters? The point to use the never API is the unified error messages,

Re: [PHP-DEV] zend_parse_parameters()

2001-12-04 Thread Mathieu Kooiman
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

Re: [PHP-DEV] zend_parse_parameters()

2001-12-04 Thread Markus Fischer
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 s

Re: [PHP-DEV] zend_parse_parameters()

2001-12-04 Thread Mathieu Kooiman
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.. Q

Re: [PHP-DEV] zend_parse_parameters()

2001-12-04 Thread Markus Fischer
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 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

[PHP-DEV] Re: Documenting ZE (was: Re: [PHP-DEV] zend_parse_parameters)

2001-09-09 Thread lo-tek
I've wanted to suggest for a while that there be an option to annotate the API docs on Zend's site. There have been a few things ive discovered in the process of extension development that could benefit fellow travelers, but as of now there seems not to be a process (that im aware of) to accomodat

[PHP-DEV] Re: Documenting ZE (was: Re: [PHP-DEV] zend_parse_parameters)

2001-09-09 Thread Zeev Suraski
At 20:22 09-09-01, Jani Taskinen wrote: >I don't think I have really 'bugged' you about it so far. Once is once too many, but anyway, I don't take count of who bugged me with what. It's definitely not the first time I'm bugged with this... I'm not sure I did, but at least Andi said numerous ti

Re: [PHP-DEV] zend_parse_parameters

2001-09-09 Thread Zeev Suraski
At 14:44 09-09-01, Jani Taskinen wrote: >"..People don't read the .h files usually and copy from other extensions.." > >If ZE was properly documented, people didn't have to rely on >only the sources. > >Like I suggested earlier, by adding at least protos there >would help the documentation effort

Re: [PHP-DEV] zend_parse_parameters

2001-09-08 Thread Zeev Suraski
At 18:14 08-09-01, Andrei Zmievski wrote: >The real solution to this, of course, would be keyword arguments. It's not really a solution, as this would also be slow (except for fairly rare cases, where we might be able to do the work in compile time). > How >about them for v2? I think we shoul

RE: [PHP-DEV] zend_parse_parameters

2001-09-08 Thread Wez Furlong
Andi Gutmans [mailto:[EMAIL PROTECTED]] wrote: > >Seriously though - if you put comments in big enough letters in > the header > >and source files, and any docs that use them, stating that they are > >much slower than the usual way of doing then we should have it covered? > > People don't read th

Re: [PHP-DEV] zend_parse_parameters

2001-09-08 Thread Andrei Zmievski
On Sat, 08 Sep 2001, Andi Gutmans wrote: > Anyway, performance aside, there is also the point of conventions. Up to > now, PHP has been pretty much a functional language with an argument list. > It might make sense for big certificates to be passed as arrays. But > instead of going ahead and di

Re: [PHP-DEV] zend_parse_parameters

2001-09-08 Thread Andi Gutmans
At 11:01 AM 9/8/2001 +0100, Wez Furlong wrote: >On 08/09/01, "Andi Gutmans" <[EMAIL PROTECTED]> wrote: > > I do have some bad thoughts about it. I'm worried that if we supply > such an > > easy function to parse incoming hash table's people will start writing a > > lot of PHP functions which acce

Re: [PHP-DEV] zend_parse_parameters

2001-09-08 Thread Wez Furlong
On 08/09/01, "Andi Gutmans" <[EMAIL PROTECTED]> wrote: > I do have some bad thoughts about it. I'm worried that if we supply such an > easy function to parse incoming hash table's people will start writing a > lot of PHP functions which accept hash tables instead of regular argument > lists. Th

Re: [PHP-DEV] zend_parse_parameters

2001-09-08 Thread Andi Gutmans
At 09:33 PM 9/7/2001 +0100, Wez Furlong wrote: >On 07/09/01, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote: > > If this is implemented (I think Andi may have some thoughts about this), > >Hopefully not bad thoughts! I do have some bad thoughts about it. I'm worried that if we supply such an easy f

Re: [PHP-DEV] zend_parse_parameters

2001-09-07 Thread Zeev Suraski
At 23:33 07-09-01, Wez Furlong wrote: >On 07/09/01, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote: > > If this is implemented (I think Andi may have some thoughts about this), > >Hopefully not bad thoughts! They are bad thoughts, actually... The main reason against it is that it's ultra slow, man

Re: [PHP-DEV] zend_parse_parameters

2001-09-07 Thread Wez Furlong
On 07/09/01, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote: > If this is implemented (I think Andi may have some thoughts about this), Hopefully not bad thoughts! > zend_parse_parameters_hash(HASH_OF(my_zval), "{s:firstname}|{s:lastname} > {l:age}", &firstname, &firstname_len, &lastname, &lastname

Re: [PHP-DEV] zend_parse_parameters

2001-09-07 Thread Andrei Zmievski
On Fri, 07 Sep 2001, Wez Furlong wrote: > How about a new zend function that will parse values, much like > zend_parse_parameters does, except that it operates on a hash and allows > you to specify the keys of the hash: > > my_zval = array( > "firstname" => "fred", > "lastname" => "bloggs", >

Re: [PHP-DEV] zend_parse_parameters

2001-09-07 Thread Wez Furlong
Hi, While adding some CA support functions to the openssl extension I have discovered the need to be able to have a large number of optional parameters (there are just so many things to tune for a certificate). Obviously this is a real pain to code in "user space". How about a new zend function

Re: [PHP-DEV] zend_parse_parameters

2001-08-24 Thread Andrei Zmievski
On Fri, 24 Aug 2001, Wez Furlong wrote: > I understand, and yes, they would. > > It just seems a shame to have to declare those ints when they are not > used. If you come up with a solution that covers both fronts, I promise we'll consider it. :) > zend_parse_parameters does a great job of redu

Re: [PHP-DEV] zend_parse_parameters

2001-08-24 Thread Wez Furlong
On 24/08/01, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote: > 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

Re: [PHP-DEV] zend_parse_parameters

2001-08-24 Thread Andrei Zmievski
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