Hi,

you want to duplicate if you don't want the called procedure to touch the
original variable, or if you declare it as a local in your procedure and
don't pass it as a pointer.

Fab.
----- Original Message -----
From: "Tony Leake" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 25, 2002 2:05 PM
Subject: [PHP-DEV] help with duplicate flag in string functions


> Hi,
>
> I'm just starting out writing modules by reading api docs on zend.com
> and reading source code of existing modules.
>
> Several functions (example:)
> add_next_index_string(zval *array, char *str, int duplicate)
>
> have the int duplicate flag, the docs say,  The flag duplicate specifies
> whether the string contents have to be copied to Zend internal memory.
>
> but how do I know if the string should be copied to memory, in the
> simple functions I'm writing it seams to make no difference whether I
> set this to 1 or 0 but it must do something?
>
> Thanks for your time
> Tony
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to