summaryrefslogtreecommitdiff
path: root/Zend/zend_ini_parser.y
Commit message (Collapse)AuthorAgeFilesLines
* Change Zend Stream API to use zend_string* instead of char*.Dmitry Stogov2021-03-161-1/+0
| | | | | This allows to eliminate re-calculation of string lenght and hash value. See the detailed list of changes in UPGRADING.INTERNALS.
* Replace zend_bool uses with boolNikita Popov2021-01-151-2/+2
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Improve type declarations for Zend APIsGeorge Peter Banyard2020-08-281-2/+2
| | | | | | | | | Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
* Remove proto comments from C filesMax Semenik2020-07-061-18/+9
| | | | Closes GH-5758
* Merge branch 'PHP-7.4'Nikita Popov2020-05-141-0/+1
|\ | | | | | | | | * PHP-7.4: Canonicalize bison error during ini parsing
| * Canonicalize bison error during ini parsingNikita Popov2020-05-141-0/+1
| | | | | | | | | | Bison 3.6 seems to use "end of file" rather than "$end" for this. Force the same on older bison versions to be consistent.
* | Clean up the generation of the parsersAkim Demaille2020-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer '%define api.value.type' to '#define YYSTYPE', so that Bison know the type. Use '%code requires' to declare what is needed to define the api.value.type (that code is output in the generated header before the generated definition of YYSTYPE). Prefer '%define api.prefix' inside the grammar file to '-p' outside, as anyway the functions defined in the file actually use this prefix. Prefer `%param` to both `%parse-param` and `%lex-param`. Closes GH-5138
* | Bison: enable all the warnings and fix themAkim Demaille2020-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | First, fix 5547d361208d90e12d53bb62bb2ffbbff9b93ca0: the definition of YFLAGS was not passed into the Makefile: AC_SUBST does not suffice, we need PHP_SUBST_OLD. While at it, allow to pass variable and value at the same time. Then pass -Wall to bison, rather than only -Wempty-rules. Use %precedence where associativity is useless. Remove useless %precedence. GH-5138
* | Use "%empty" in the parsers, instead of commentsAkim Demaille2020-01-311-4/+4
|/ | | | | | | | | | The annotation %empty is properly enforced: warnings when it's missing, and errors when it's inappropriate. Support for %empty was introduced in Bison 3.0. Pass -Wempty-rule to Bison. Closes GH-5134
* Use "%define parse.error verbose"Akim Demaille2020-01-291-1/+2
| | | | | | | | | | | The YYERROR_VERBOSE macro will no longer be supported in Bison 3.6. It was superseded by the "%error-verbose" directive in Bison 1.875 (2003-01-01). Bison 2.6 (2012-07-19) clearly announced that support for YYERROR_VERBOSE would be removed. Note that since Bison 3.0 (2013-07-25), "%error-verbose" is deprecated in favor of "%define parse.error verbose". Closes GH-5125.
* Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-12-191-1/+1
|\ | | | | | | | | * PHP-7.3: Add destructor annotations in ini parser
| * Add destructor annotations in ini parserNikita Popov2019-12-191-1/+1
| | | | | | | | | | It would be better to switch this to use %union and %type annotations, but not going to do that change for 7.3.
* | Use %define api.pure instead of %pure-parserNikita Popov2019-06-121-1/+1
| | | | | | | | | | %pure-parser is deprecated. In our case there is no difference between true & full, as we don't use locations.
* | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-04-081-16/+18
|\ \ | |/
| * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-04-081-16/+18
| |\
| | * Fixed bug #77844Nikita Popov2019-04-081-16/+18
| | | | | | | | | | | | | | | We should probably return an integer result from the operation in typed mode, right now the result is always a string.
| | * Trim trailing whitespace in source code filesPeter Kokot2018-10-131-1/+1
| | |
| * | Future-proof email addressesZeev Suraski2018-11-011-1/+1
| | |
| * | Trim trailing whitespace in source code filesPeter Kokot2018-10-131-1/+1
| | |
* | | Remove unused PHP_AC_BROKEN_SPRINTF and AC_ZEND_BROKEN_SPRINTFPeter Kokot2019-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sprintf function has been normalized to php_sprintf via 61364b5bb172fa512c871b795c2613b1b587e4cd. This patch removes the checks to make a custom sprintf function The ZEND_BROKEN_SPRINTF has been removed and the hardcoded #define zend_sprintf sprintf is used. The php_sprintf and zend_sprintf are now symbols to sprintf. This patch now removes the custom PHP definitions of the php_sprintf and zend_sprintf functions in favor of the C99 sprintf which is also standardized in C89 already. Once, on some systems sprintf didn't behave in same way.
* | | Remove local variablesPeter Kokot2019-02-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
| | |
* | | Update email addresses. We're still @Zend, but future proofing it...Zeev Suraski2018-11-011-1/+1
| | |
* | | Trim trailing whitespace in source code filesPeter Kokot2018-10-131-1/+1
| | |
* | | Revert "Implement #67331: Have parse_ini_file add empty entries"Christoph M. Becker2018-09-151-18/+1
| | | | | | | | | | | | | | | | | | | | | This reverts commit 3f3e914df33793a36f51b4e44745d6a5aec4f685. The commit broke some tests on Windows, and generally needs more though.
* | | Implement #67331: Have parse_ini_file add empty entriesChristoph M. Becker2018-09-151-1/+18
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some INI processors allow to specify empty values by just giving the key without the equals sign, for instance MySQL and Python. It appears to be sensible to add this possibility to our INI parser, so that it can be used for such INI files as well. We choose NULL as the value of empty values. This syntactical enhancement is a (minor) BC break, though, as can be seen by the necessary change to bug49692.ini. The “comment” formerly has been simply ignored, but now it would be parsed as key with an empty value. This PR is based on Adam's former patch.
* | Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* | Fix return type of zend_ini_dtorNikita Popov2018-06-021-1/+1
| |
* | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-8/+14
| | | | | | | | where we sure about string persistence.
* | Merge branch 'PHP-7.2'Anatol Belski2018-03-101-4/+12
|\ \ | |/ | | | | | | * PHP-7.2: Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault
| * Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-03-101-4/+12
| |\ | | | | | | | | | | | | * PHP-7.1: Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault
| | * Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with ↵Anatol Belski2018-03-101-4/+12
| | | | | | | | | | | | segfault
| | * year++Xinchen Hui2018-01-021-1/+1
| | |
| * | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | ZVAL_COPY_OR_DUP() instead of ZVAL_DUP()Dmitry Stogov2018-01-171-1/+1
| | |
* | | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Avoid unnecessary reference-counting on strings.Dmitry Stogov2017-11-161-3/+4
|/ /
* | Merge branch 'PHP-7.1'Stanislav Malyshev2017-07-041-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.1: Improve fix for #74145 Fix wddx Fix tests Fixed bug #74111 Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #74087 Fixed parsing of strange formats with mixed month/day and time strings Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV Fixed bug #74111 Fix #74435: Buffer over-read into uninitialized memory Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #73807
| * Merge branch 'PHP-7.0' into PHP-7.1Stanislav Malyshev2017-07-041-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.0: Improve fix for #74145 Fix wddx Fix tests Fixed bug #74111 Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #74087 Fixed parsing of strange formats with mixed month/day and time strings Fix bug #74145 - wddx parsing empty boolean tag leads to SIGSEGV Fixed bug #74111 Fix #74435: Buffer over-read into uninitialized memory Fix bug #74603 - use correct buffer size Fix bug #74651 - check EVP_SealInit as it can return -1 Update NEWS Fix bug #73807
| | * Fix bug #74603 - use correct buffer sizeStanislav Malyshev2017-07-041-1/+1
| | |
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
| * | Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
* | | further sync for vim mode linesAnatol Belski2017-07-041-0/+2
| | |
* | | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|/ /
* | Merge branch 'PHP-7.0' into PHP-7.1Dmitry Stogov2016-11-221-1/+1
|\ \ | |/ | | | | | | * PHP-7.0: Fixed use after free
| * Fixed use after freeDmitry Stogov2016-11-221-1/+1
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-11-221-6/+2
|\ \ | |/ | | | | | | * PHP-7.0: Revert "fix invalid read, follow up on 97b65cc9"
| * Revert "fix invalid read, follow up on 97b65cc9"Anatol Belski2016-11-221-6/+2
| | | | | | | | This reverts commit b52fa5882a276c9397d108cd690721a006acd827.
* | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-11-221-2/+6
|\ \ | |/ | | | | | | * PHP-7.0: fix invalid read, follow up on 97b65cc9
| * fix invalid read, follow up on 97b65cc9Anatol Belski2016-11-221-2/+6
| |