mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Optimize instanceof_function
Split out the simple equality check into an inline function -- this is one of the common cases. Replace instanceof_function_ex with zend_class_implements_interface. There are a few more places where it may be used.
This commit is contained in:
parent
bd7b1afd6e
commit
c858d17f06
9 changed files with 51 additions and 51 deletions
|
@ -69,8 +69,7 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
|
|||
cal_int_type = Z_LVAL_P(calendar_zv);
|
||||
|
||||
} else if (Z_TYPE_P(calendar_zv) == IS_OBJECT &&
|
||||
instanceof_function_ex(Z_OBJCE_P(calendar_zv),
|
||||
Calendar_ce_ptr, 0)) {
|
||||
instanceof_function(Z_OBJCE_P(calendar_zv), Calendar_ce_ptr)) {
|
||||
|
||||
cal = calendar_fetch_native_calendar(calendar_zv);
|
||||
if (cal == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue