1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Commit Graph

129 Commits

Author SHA1 Message Date
Dmitry Stogov 90b7bde615 Use more compact representation for packed arrays.
- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
  instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
  familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
  (ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
  (packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
  ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
    - sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
    - zend_hash_sort_ex() may require converting packed arrays to hash.
2021-11-03 15:18:26 +03:00
Nikita Popov 3acdab864d Fix printf formats in mysql debug logging
Enable printf format verification and fix the reported errors.
2021-06-16 16:09:06 +02:00
KsaR 01b3fc03c3 Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
George Peter Banyard 5caaf40b43 Introduce pseudo-keyword ZEND_FALLTHROUGH
And use it instead of comments
2021-04-07 00:46:29 +01:00
Nikita Popov 3e01f5afb1 Replace zend_bool uses with bool
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.
2021-01-15 12:33:06 +01:00
Christoph M. Becker f601d7c743 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #80115: mysqlnd.debug doesn't recognize absolute paths with slashes
2020-09-17 12:39:25 +02:00
Christoph M. Becker c3c76dbfb9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80115: mysqlnd.debug doesn't recognize absolute paths with slashes
2020-09-17 12:38:16 +02:00
Christoph M. Becker efdbc3688b Fix #80115: mysqlnd.debug doesn't recognize absolute paths with slashes 2020-09-17 12:37:02 +02:00
George Peter Banyard fa8d9b1183 Improve type declarations for Zend APIs
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
2020-08-28 15:41:27 +02:00
George Peter Banyard c74001997f Drop '#if 0' in mysqlnd_debug() from the MySQLnd extension
Closes GH-5587
2020-08-07 18:17:33 +02:00
George Peter Banyard 1330359515 Fix [-Wundef] warning in MySQLnd extension 2020-05-18 00:37:20 +02:00
Nikita Popov dc6ede092f Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79011
  Fix memory leaks in mysqlnd debug functionality
2020-01-24 14:55:00 +01:00
Nikita Popov 555567468a Fix memory leaks in mysqlnd debug functionality 2020-01-24 14:54:46 +01:00
Gabriel Caruso 5d6e923d46 Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Peter Kokot c245898bfa Update and fix remaining year ranges (2019)
This patch follows previous license year ranges updates. With new
approach source code files now have simplified headers with license
information without year ranges.
2019-02-08 23:14:29 +01:00
Peter Kokot 92ac598aab Remove local variables
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.
2019-02-03 21:03:00 +01:00
Xinchen Hui a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Sammy Kaye Powers 9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Anatol Belski b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Andrey Hristov 61a6109298 Merge branch 'PHP-7.0' 2016-03-16 10:55:09 +01:00
Andrey Hristov fa4addd409 More email fixing 2016-03-16 10:54:56 +01:00
Andrey Hristov 3a33ee63e8 Merge branch 'PHP-7.0' 2016-03-16 10:47:27 +01:00
Andrey Hristov f2ab731a8c Fix emails in headers. @mysql.com addresses are no more since many years. 2016-03-16 10:24:52 +01:00
Lior Kaplan 3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan 49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Andrey Hristov 2e3fc57c5c MNDR:
- move things out of mysqlnd_priv.h
2015-11-12 16:19:16 +01: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
Dmitry Stogov 4d9a1883aa Fixed bug #68887 (resources are not freed correctly) 2015-04-08 13:29:42 +03:00
Andrey Hristov 871ff65fd1 Rename prefixed mysqlnd functions - prefixed with undescore, which were
accessible through a macro. Also removing the access macros.
These prefixed functions were used, similarly to many functions in Zend2,
because of TSRMLS - the macro was adding the the tsrm pointer to the call.
However, as in Zend3 no TSRM pointers are passed down the stack, because of
the usage of cached TSRM pointer in a real thread local variable, these
macros and prefixed naming have lost their purpose.
2015-04-07 21:48:08 +02:00
Anatol Belski 2d78023244 cleanup the mod version macros, round 2 2015-03-23 20:33:54 +01:00
Xinchen Hui fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui 0579e8278d bump year 2015-01-15 23:26:37 +08:00
Stanislav Malyshev b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski 386cb177bd remove unused ZTS macros 2014-12-17 11:05:23 +01:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski 57dbe02364 drop unused tsrm_ls 2014-09-26 20:48:41 +02:00
Anatol Belski 31cc63b1a4 fix some extension builds 2014-09-25 20:02:48 +02:00
Johannes Schlüter d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Xinchen Hui c25828e41e Fixed stack usage 2014-06-25 12:33:35 +08:00
Xinchen Hui 6288bb8ffe Refactoring mysqlnd (incompleted, only mysqlnd ext compilable) 2014-06-18 12:09:37 +08:00
Andrey Hristov e6e5d3535d remove mysqlnd_bt.c as it a long dead code 2014-05-19 20:32:41 +03:00
Xinchen Hui c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui cbb5d42b9b Merge branch 'PHP-5.4' into PHP-5.5 2013-01-06 10:23:21 +08:00
Xinchen Hui c2f8e90504 Merge branch 'PHP-5.3' into PHP-5.4 2013-01-06 10:20:00 +08:00
Xinchen Hui bc11e6fdbb bump year 2013-01-06 10:19:09 +08:00
Xinchen Hui f13288de96 Merge branch 'PHP-5.4'
* PHP-5.4:
  Fixed bug #62594 (segfault in mysqlnd_res_meta::set_mode)
2012-07-18 19:06:58 +08:00
Xinchen Hui 25be12a3bc Fixed bug #62594 (segfault in mysqlnd_res_meta::set_mode) 2012-07-18 19:06:27 +08:00
andrey 6e648e9340 trace allocations in a file 2012-06-27 16:51:07 +03:00
Felipe Pena e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00