Skip to content

Commit 933ae15

Browse files
committed
Zend/zend_execute.c: mark some error functions as static
Those are never used outside of zend_execute.c so no reason to export them in a header
1 parent f4db0d0 commit 933ae15

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

Zend/zend_execute.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool s
835835
return zend_verify_weak_scalar_type_hint(type_mask, arg);
836836
}
837837

838-
zend_never_inline ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant)
838+
static zend_never_inline ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant)
839839
{
840840
zend_string *type_str = zend_type_to_string(c->type);
841841

@@ -845,7 +845,7 @@ zend_never_inline ZEND_COLD void zend_verify_class_constant_type_error(const zen
845845
zend_string_release(type_str);
846846
}
847847

848-
zend_never_inline ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property)
848+
static zend_never_inline ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property)
849849
{
850850
zend_string *type_str;
851851

@@ -863,7 +863,7 @@ zend_never_inline ZEND_COLD void zend_verify_property_type_error(const zend_prop
863863
zend_string_release(type_str);
864864
}
865865

866-
zend_never_inline ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
866+
static zend_never_inline ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
867867
{
868868
/* we _may_ land here in case reading already errored and runtime cache thus has not been updated (i.e. it contains a valid but unrelated info) */
869869
if (EG(exception)) {
@@ -3921,7 +3921,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info
39213921
zend_string_release(type_str);
39223922
}
39233923

3924-
ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
3924+
static ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
39253925
zend_string *type1_str = zend_type_to_string(prop1->type);
39263926
zend_string *type2_str = zend_type_to_string(prop2->type);
39273927
zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s and property %s::$%s of type %s, as this would result in an inconsistent type conversion",

Zend/zend_execute.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,8 @@ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *cal
585585

586586

587587
ZEND_API bool zend_verify_class_constant_type(const zend_class_constant *c, const zend_string *name, zval *constant);
588-
ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant);
589588

590589
ZEND_API bool zend_verify_property_type(const zend_property_info *info, zval *property, bool strict);
591-
ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property);
592-
ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property);
593590

594591
#define ZEND_REF_ADD_TYPE_SOURCE(ref, source) \
595592
zend_ref_add_type_source(&ZEND_REF_TYPE_SOURCES(ref), source)

0 commit comments

Comments
 (0)