Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Wez Furlong
On 2001-05-12 13:45:25, "Andi Gutmans" <[EMAIL PROTECTED]> wrote: > At 11:50 AM 5/12/2001 +0100, Wez Furlong wrote: > >I would like to see an add_assoc_zval() macro to complement > There is an add_assoc_zval() function. Doh! I wonder why I didn't see it before... --Wez. -- PHP Development Mai

Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Andi Gutmans
At 11:50 AM 5/12/2001 +0100, Wez Furlong wrote: >Hi, > >I would like to see an add_assoc_zval() macro to complement the other add_ >functions. There is an add_assoc_zval() function. Andi >Just thought that I would throw that in while there are a couple of threads >in the Zend API... :-) > >--W

Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Wez Furlong
Hi, I would like to see an add_assoc_zval() macro to complement the other add_ functions. Just thought that I would throw that in while there are a couple of threads in the Zend API... :-) --Wez. -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Zeev Suraski
At 14:39 12/5/2001, Andi Gutmans wrote: >By the way, another thing. You don't have to do the zval_copy_ctor() == >SUCCESS either. I guess it is more correct but we don't do it anywhere in >our code and if it ever happens we're screwed anyway. It could probably >return void but I'd have to go ba

Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Andi Gutmans
At 11:28 AM 5/12/2001 +0100, Wez Furlong wrote: >On 2001-05-12 10:12:14, "Andi Gutmans" <[EMAIL PROTECTED]> wrote: > > The code is almost OK. The only problem is that the reference count and > > > is_ref from rfcbuf->headers are also copied to *headers. So what you >should > > be doing (if you onl

Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Wez Furlong
On 2001-05-12 10:12:14, "Andi Gutmans" <[EMAIL PROTECTED]> wrote: > The code is almost OK. The only problem is that the reference count and > is_ref from rfcbuf->headers are also copied to *headers. So what you should > be doing (if you only add it once to the return_value) is to do > INIT_PZVA

Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Wez Furlong
On 2001-05-12 04:29:19, "Jason Greene" <[EMAIL PROTECTED]> wrote: > zval_copy_ctor used on an array makes a reference copy of the array. > Basically, it just copies all the data items in the hashtable and then adds one to the > reference count for all data items. > > Looking at the code, it app

Re: [PHP-DEV] zval_copy_ctor

2001-05-12 Thread Andi Gutmans
At 02:42 AM 5/12/2001 +0100, Wez Furlong wrote: >Hi, > >In my mailparse extension I am building up an array to contain the headers >while parsing the message. The array is held in a zval in the internal C >structure, one for each message part. > >When the "user space" code requests info for a par

Re: [PHP-DEV] zval_copy_ctor

2001-05-11 Thread Jason Greene
Sorry, default=segfault spellcheck got me -Jason - Original Message - From: "Jason Greene" <[EMAIL PROTECTED]> To: "Wez Furlong" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 10:29 PM Subject: Re: [PHP-DEV] zval_copy_ct

Re: [PHP-DEV] zval_copy_ctor

2001-05-11 Thread Jason Greene
, May 11, 2001 8:42 PM Subject: [PHP-DEV] zval_copy_ctor > Hi, > > In my mailparse extension I am building up an array to contain the headers > while parsing the message. The array is held in a zval in the internal C > structure, one for each message part. > > When the "

[PHP-DEV] zval_copy_ctor

2001-05-11 Thread Wez Furlong
Hi, In my mailparse extension I am building up an array to contain the headers while parsing the message. The array is held in a zval in the internal C structure, one for each message part. When the "user space" code requests info for a particular message part it is returned as an assoc. array.