1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00
Commit Graph

26 Commits

Author SHA1 Message Date
Peter Kokot 1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Christoph M. Becker 8a4c2f1621 Require ICU ≥ 50.1
Given that ICU is a set of lively developed libraries, that ICU 50.1
has been released on 2012-11-05, and PHP 7.4 is scheduled to be
released seven years after it, we consider it appropriate to ditch
these legacy versions.

Particularly, that would be a reasonable groundwork to implement part
two of the “Deprecate and remove INTL_IDNA_VARIANT_2003” RFC[1], namely
to default idn_to_ascii()'s and idn_to_utf8()'s $variant parameter to
INTL_IDNA_VARIANT_UTS46, which is not defined in ICU < 4.6.

See also the related discussion on internals@[2].

[1] <https://wiki.php.net/rfc/deprecate-and-remove-intl_idna_variant_2003>
[2] <http://news.php.net/php.internals/101626>ff
2018-09-15 13:59:54 +02:00
Dmitry Stogov 83f6f8563c Use zval_ptr_dtor() instead of legacy zval_dtor(), to destroy unused values returned from PHP functions (they may be circular data structures). 2018-07-05 14:09:47 +03:00
Dmitry Stogov b6fb584505 Replace zval_dtor() with specialized destructors 2018-07-05 13:32:39 +03:00
Sara Golemon 1108b5a19b Move class constant definition to the right enum file 2018-06-19 18:21:08 -04:00
Dmitry Stogov 524f5245c5 Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string. 2018-05-08 17:30:15 +03:00
Anatol Belski 9a8e7b5718 Use recommended way to handle utf*.h headers and obsolete symbols 2018-04-05 17:22:44 +02:00
Dmitry Stogov 9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Fabien Villepinte c0f3c3d222 Fix typo in comments 2017-10-25 20:59:13 +01:00
Anatol Belski 5c8aa478da Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix double free
2016-08-29 18:57:50 +02:00
Anatol Belski 1d93086937 fix double free 2016-08-29 18:56:25 +02:00
Anatol Belski de643ead3e re-add range check 2016-07-05 15:15:20 +02:00
Anatol Belski 41622c86bd Revert "fix datatype and add range check"
This reverts commit 14bdd8246c.
2016-07-05 10:35:19 +02:00
Anatol Belski 14bdd8246c fix datatype and add range check 2016-07-05 10:04:23 +02:00
Dmitry Stogov 323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Daniel Persson 0030fa322f Changed to check for error with the new function that returns null if error is set 2016-04-08 12:31:19 +02:00
Anatol Belski 93f8eaf3b8 Fixed bug #70455 Missing constant: IntlChar::NO_NUMERIC_VALUE 2016-04-08 09:55:57 +02:00
Christoph M. Becker 46c20ecf0a Aligned IntlChar protos to their ARG_INFO (related to #70453) 2015-09-10 01:38:15 +02:00
Christoph M. Becker 31962306f4 Skip IntlChar related test if ext/intl is not available 2015-09-10 01:31:55 +02:00
Christoph M. Becker 1c902e2e63 Fix #70454: IntlChar::forDigit second parameter should be optional
ZPP expects "ll" instead of "l|l" what would match the "proto" and the
ARG_INFO.
2015-09-07 23:46:12 +02:00
Christoph M. Becker 1372909429 Fix #70453: IntlChar::foldCase() incorrect arguments and missing constants
We add missing ARG_INFO for the seconds parameter $options, and add the
respective constants IntlChar::FOLD_CASE_DEFAULT and
::FOLD_CASE_EXCLUDE_SPECIAL_I.
2015-09-07 23:02:56 +02:00
Dmitry Stogov f7b6de5b5e Cleanup (avoid string reallocations) 2015-07-01 13:26:39 +03:00
Dmitry Stogov 4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
zxcvdavid a4a85887e0 Fix compile error 2015-03-04 09:56:50 +08:00
Stanislav Malyshev 02402ae695 fix size & compilation on Darwin 2015-01-18 22:44:35 -08:00
Sara Golemon ebb60ac7dd Add IntlChar class to intl extension
Exposes ICU's uchar functionality as a set of static methods
2015-01-16 14:37:44 -08:00