Re: com php-src: Add str_* macros to UPGRADING.INTERNALS: UPGRADING.INTERNALS

From: Date: Sun, 13 Apr 2014 08:59:38 +0000
Subject: Re: com php-src: Add str_* macros to UPGRADING.INTERNALS: UPGRADING.INTERNALS
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-76819@lists.php.net to get a copy of this message
Thank you!
_o_
2014.04.13. 10:50, "Nikita Popov" <nikic@php.net> ezt írta:

> Commit:    57b88ba6ead31cc426a74159839c2f02f67f8c50
> Author:    Nikita Popov <nikic@php.net>         Sun, 13 Apr 2014 10:30:02
> +0200
> Parents:   20036525e2b5ee7613a6d3ead0270631b23f6a15
> Branches:  PHP-5.6 master
>
> Link:
> http://git.php.net/?p=php-src.git;a=commitdiff;h=57b88ba6ead31cc426a74159839c2f02f67f8c50
>
> Log:
> Add str_* macros to UPGRADING.INTERNALS
>
> Changed paths:
>   M  UPGRADING.INTERNALS
>
>
> Diff:
> diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
> index 474aed5..b8c8697 100644
> --- a/UPGRADING.INTERNALS
> +++ b/UPGRADING.INTERNALS
> @@ -9,6 +9,7 @@ UPGRADE NOTES - PHP X.Y
>    d. Arginfo changes
>    e. tsrm_virtual_cwd.h moved to zend_virtual_cwd.h
>    f. empty strings are interned
> +  g. Additional str_* APIs
>
>  2. Build system changes
>    a. Unix build system changes
> @@ -120,7 +121,21 @@ UPGRADE NOTES - PHP X.Y
>
>    String created using STR_EMPTY_ALLOC() are now interned.
>    convert_to_string use STR_EMPTY_ALLOC() for zval when IS_NULL.
> -  STR_FREE() shoud be prefered as efree on such strings can raise memory
> corruption.
> +  str_efree() shoud be preferred as efree() on such strings can cause
> memory
> +  corruption.
> +
> +  g. Additional str_* APIs
> +
> +  In addition to the previously existing str_free() and str_efree()
> macros, the
> +  following macros have been introduced to simplify dealing with
> potentially
> +  interned strings:
> +
> +      str_efree_rel(str)         - efree_rel() if not interned
> +      str_erealloc(str, new_len) - erealloc() or emalloc+memcpy if
> interned
> +      str_estrndup(str, len)     - estrndup() if not interned
> +      str_strndup(str, len)      - zend_strndup() if not interned
> +      str_hash(str, len)         - INTERNED_HASH(str) if interned,
> +                                   zend_hash_func(str, len+1) otherwise
>
>
>  ========================
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Thread (2 messages)

« previous php.cvs (#76819) next »