Commit graph

1106 commits

Author SHA1 Message Date
Dmitry Stogov
f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
8c41e314c8 Merge branch 'PHP-7.2'
* PHP-7.2:
  Allow pecl like usage in ext/pdo, refs #2955
2018-05-21 12:20:27 +02:00
Anatol Belski
1c8c06a403 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Allow pecl like usage in ext/pdo, refs #2955
2018-05-21 12:19:45 +02:00
Tianon Gravi
bc6ddb7f45 Allow pecl like usage in ext/pdo, refs #2955 2018-05-21 12:18:46 +02:00
Dmitry Stogov
eafa92ba9d zend_fcall_info_cache.calling_scope is not used by zend_call_function() and doesn't have to be initialized.
It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
2018-05-03 19:27:04 +03:00
Dmitry Stogov
8a719c1b12 Fixed mess between BOOL and SUCCESS/FAILURE 2018-04-28 14:12:36 +03:00
Anatol Belski
6cce3548f1 Fix datatypes 2018-03-26 15:10:16 +02:00
Dmitry Stogov
1af60a2a71 Keep initialized object_handlers structures in read-only memory. 2018-03-14 14:01:45 +03:00
Gabriel Caruso
701437a948
Remove return types from some magic method in protos
__construct, __destruct, __wakeup does not have return types defined.
2018-03-09 12:04:46 +01:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Nikita Popov
ede663f381 Convert iterator by reference errors to exceptions
I'm using RuntimeException in SPL, because other SPL classes that
throw this error used it. Error is used for everything else, because
that's what core does.
2018-02-19 21:58:56 +01:00
Anatol Belski
65be13a89a Reduce struct size by 8 bytes on 64-bit 2018-02-19 10:12:46 +01:00
Gabriel Caruso
84488d921b Remove superfluous SKIPIF sections in more tests 2018-02-04 16:57:08 +01:00
Dmitry Stogov
a22f8ac1a9 More effecient array duplication 2018-01-17 17:57:59 +03:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Anatol Belski
dd0ebc02dc Merge branch 'PHP-7.2'
* PHP-7.2:
  Skip test for pdo_odbc
2018-01-02 12:29:43 +01:00
Anatol Belski
8a8bf1dc13 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Skip test for pdo_odbc
2018-01-02 12:29:19 +01:00
Anatol Belski
463fd04758 Skip test for pdo_odbc
The error messages are too discrepant and '-' is otherwise not allowed
by the parser.
2018-01-02 12:12:46 +01:00
Anatol Belski
53b79dfe09 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix test for pdo_odbc
2018-01-02 11:39:36 +01:00
Anatol Belski
08d06f7d4f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test for pdo_odbc
2018-01-02 11:39:09 +01:00
Anatol Belski
1a9d09784e Fix test for pdo_odbc
SqlServer requires parentheses to the TOP argument.
2018-01-02 11:34:57 +01:00
Xinchen Hui
6cf9c91b55 Merge branch 'PHP-7.2'
* PHP-7.2:
  regenerated with newer re2c
2018-01-02 13:59:07 +08:00
Xinchen Hui
b2346a9888 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  regenerated with newer re2c
2018-01-02 13:57:56 +08:00
Xinchen Hui
b65abecfdf regenerated with newer re2c 2018-01-02 13:54:29 +08:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
d9f5ea691f zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set). 2017-12-27 15:15:03 +03:00
Anatol Belski
edab9ce1db Merge branch 'PHP-7.2'
* PHP-7.2:
  pdo_odbc has no driver API for quoting, skip the test
2017-12-22 16:28:48 +01:00
Anatol Belski
a93445bf55 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  pdo_odbc has no driver API for quoting, skip the test
2017-12-22 16:28:10 +01:00
Anatol Belski
d7cc1ce58f pdo_odbc has no driver API for quoting, skip the test 2017-12-22 16:22:12 +01:00
Nikita Popov
744d3c5753 Merge branch 'PHP-7.2' 2017-12-17 12:57:40 +01:00
Jaromír Doleček
11eed9f3ba Fixed bug #75616
PDO can be built shared on Darwin nowadays. There used to be issues
relating to symbol references between dynamically loaded shared
objects.
2017-12-17 12:56:37 +01:00
Dmitry Stogov
0d484172fe Turn "pdo_stmt_methods" into constants. 2017-12-14 22:59:58 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
1db8402208 Move zend_object_iterator_funcs structures into read-only data segment 2017-12-14 14:21:22 +03:00
Peter Kokot
2783b1c823 Remove outdated TODO files
Some extensions included TODO files that has been present for several
years in the repository tree without changes. This included:

- ext/phar
- ext/intl
- ext/zip
- ext/soap
- ext/pdo
- ext/spl
- ext/dom
- ext/gmp
- ext/xmlwriter
- ext/xmlreader

ext/phar feature request has been created instead, and for others it
would be better to use wiki and RFC workflow instead based on current
feature requests and further PHP development requirements.

[ci skip]
2017-12-09 19:18:58 +01:00
Dmitry Stogov
084c17fe0b Use zend_string_tolower() where it's possible (to avoid reallocations).
Allow zend_string_tolower_ex() to create parsistent strings
2017-11-30 01:13:39 +03:00
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Nikita Popov
26f8fc833b Enable and fix printf() format warnings
Add _unchecked() variants of zend_spprintf and zend_strpprintf for
cases where we specifically want to disable these checks, such as
use of %H.
2017-11-16 21:15:36 +01:00
Dmitry Stogov
67d5f39a47 Persistent resources are "thread-local".
Register persistent resources through new functions zend_register_persistent_resource()/zend_register_persistent_resource_ex().
2017-11-01 15:19:31 +03:00
Xinchen Hui
a8a17a72b0 RC manipulation cleanup 2017-11-01 10:25:10 +08:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
555f6dfdec Merge branch 'PHP-7.2'
* PHP-7.2:
  Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql
2017-10-16 19:02:46 +03:00
Dmitry Stogov
5d6912d185 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql
2017-10-16 19:02:22 +03:00
Dmitry Stogov
c33ca443ee Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql
2017-10-16 19:02:07 +03:00
Dmitry Stogov
8bfe748fb0 Prevent crash on ext/pdo_mysql/tests/bug_39858.phpt when built with libmysql 2017-10-16 19:00:12 +03:00
Dmitry Stogov
44e0b79ac6 Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values. 2017-09-20 02:25:56 +03:00