summaryrefslogtreecommitdiff
path: root/ext/intl/dateformat/dateformat_helpers.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-10-25 10:45:42 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-10-25 10:51:17 +0200
commitc858d17f06179aa25f6e8aa06965313fd519d8e9 (patch)
treede199c2dada0099a344ff595cf024958f98caa5b /ext/intl/dateformat/dateformat_helpers.cpp
parentbd7b1afd6eb623a4905673dfc92bb0de62f23edd (diff)
downloadphp-git-c858d17f06179aa25f6e8aa06965313fd519d8e9.tar.gz
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.
Diffstat (limited to 'ext/intl/dateformat/dateformat_helpers.cpp')
-rw-r--r--ext/intl/dateformat/dateformat_helpers.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/intl/dateformat/dateformat_helpers.cpp b/ext/intl/dateformat/dateformat_helpers.cpp
index f58317ebc1..f578512de6 100644
--- a/ext/intl/dateformat/dateformat_helpers.cpp
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -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) {