Skip to content

Commit 507deed

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 f33aeff commit 507deed

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Zend/zend_execute.c

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

839-
zend_never_inline ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant)
839+
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)
840840
{
841841
zend_string *type_str = zend_type_to_string(c->type);
842842

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

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

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

867-
zend_never_inline ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
867+
static zend_never_inline ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
868868
{
869869
/* 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) */
870870
if (EG(exception)) {
@@ -3917,7 +3917,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info
39173917
zend_string_release(type_str);
39183918
}
39193919

3920-
ZEND_API ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
3920+
static ZEND_COLD void zend_throw_conflicting_coercion_error(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
39213921
zend_string *type1_str = zend_type_to_string(prop1->type);
39223922
zend_string *type2_str = zend_type_to_string(prop2->type);
39233923
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
@@ -586,11 +586,8 @@ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *cal
586586

587587

588588
ZEND_API bool zend_verify_class_constant_type(const zend_class_constant *c, const zend_string *name, zval *constant);
589-
ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant);
590589

591590
ZEND_API bool zend_verify_property_type(const zend_property_info *info, zval *property, bool strict);
592-
ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property);
593-
ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property);
594591

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

0 commit comments

Comments
 (0)