diff options
author | Nikita Popov <nikic@php.net> | 2014-04-25 15:21:26 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2014-04-25 23:21:05 +0200 |
commit | 9263d18bd9655a5f64f1956d9536e76e9ec22144 (patch) | |
tree | a1e406a11060db8cced3aeb6b550ec290fcf5ae5 /ext/mysql/php_mysql.c | |
parent | dd419d24ca01db3e3be66b4414c4d7926c6fdc69 (diff) | |
download | php-git-9263d18bd9655a5f64f1956d9536e76e9ec22144.tar.gz |
Optimize ZEND_CAST to avoid zval copies
The scalar type casts IS_NULL, IS_BOOL, IS_LONG, IS_DOUBLE and
IS_STRING will no longer require a copy when casting.
A copy is now only made when casting to IS_ARRAY and IS_OBJECT, if
the type doesn't already match.
I tweaked the reference handling for the type-already-correct case
to DEREF the zval after that check. References require a copy anyway,
so they can go through the slow codepath.
Diffstat (limited to 'ext/mysql/php_mysql.c')
0 files changed, 0 insertions, 0 deletions