Skip to content

Commit 42c8751

Browse files
committed
Zend/zend_execute: make some functions private
1 parent f129586 commit 42c8751

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

Zend/zend_execute.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ static bool zend_verify_weak_scalar_type_hint_no_sideeffect(uint32_t type_mask,
815815
}
816816
#endif
817817

818-
ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg)
818+
static bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg)
819819
{
820820
if (UNEXPECTED(strict)) {
821821
/* SSTH Exception: IS_LONG may be accepted as IS_DOUBLE (converted) */
@@ -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_COLD zend_never_inline void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant)
839+
static ZEND_COLD zend_never_inline 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_COLD zend_never_inline void zend_verify_class_constant_type_error(const zen
846846
zend_string_release(type_str);
847847
}
848848

849-
ZEND_COLD zend_never_inline void zend_verify_property_type_error(const zend_property_info *info, const zval *property)
849+
static ZEND_COLD zend_never_inline 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_COLD zend_never_inline void zend_verify_property_type_error(const zend_prop
864864
zend_string_release(type_str);
865865
}
866866

867-
ZEND_COLD zend_never_inline void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property)
867+
static ZEND_COLD zend_never_inline 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)) {
@@ -3778,7 +3778,7 @@ ZEND_API zval* ZEND_FASTCALL zend_fetch_static_property(zend_execute_data *ex, i
37783778
return result;
37793779
}
37803780

3781-
ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
3781+
static ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv) {
37823782
zend_string *type1_str = zend_type_to_string(prop1->type);
37833783
zend_string *type2_str = zend_type_to_string(prop2->type);
37843784
zend_type_error("Reference with value of type %s held by property %s::$%s of type %s is not compatible with property %s::$%s of type %s",
@@ -3794,7 +3794,7 @@ ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info
37943794
zend_string_release(type2_str);
37953795
}
37963796

3797-
ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv) {
3797+
static ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv) {
37983798
zend_string *type_str = zend_type_to_string(prop->type);
37993799
zend_type_error("Cannot assign %s to reference held by property %s::$%s of type %s",
38003800
zend_zval_value_name(zv),

Zend/zend_execute.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ typedef enum {
8080
ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref_ex(const zend_property_info *prop_info, zval *orig_val, bool strict, zend_verify_prop_assignable_by_ref_context context);
8181
ZEND_API bool ZEND_FASTCALL zend_verify_prop_assignable_by_ref(const zend_property_info *prop_info, zval *orig_val, bool strict);
8282

83-
ZEND_API ZEND_COLD void zend_throw_ref_type_error_zval(const zend_property_info *prop, const zval *zv);
84-
ZEND_API ZEND_COLD void zend_throw_ref_type_error_type(const zend_property_info *prop1, const zend_property_info *prop2, const zval *zv);
8583
ZEND_API ZEND_COLD zval* ZEND_FASTCALL zend_undefined_offset_write(HashTable *ht, zend_long lval);
8684
ZEND_API ZEND_COLD zval* ZEND_FASTCALL zend_undefined_index_write(HashTable *ht, zend_string *offset);
8785
ZEND_API ZEND_COLD void zend_wrong_string_offset_error(void);
@@ -99,7 +97,6 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_cannot_add_element(void);
9997
ZEND_API bool ZEND_FASTCALL zend_asymmetric_property_has_set_access(const zend_property_info *prop_info);
10098
ZEND_API ZEND_COLD void ZEND_FASTCALL zend_asymmetric_visibility_property_modification_error(const zend_property_info *prop_info, const char *operation);
10199

102-
ZEND_API bool zend_verify_scalar_type_hint(uint32_t type_mask, zval *arg, bool strict, bool is_internal_arg);
103100
ZEND_API ZEND_COLD void zend_verify_arg_error(
104101
const zend_function *zf, const zend_arg_info *arg_info, uint32_t arg_num, const zval *value);
105102
ZEND_API ZEND_COLD void zend_verify_return_error(
@@ -577,13 +574,9 @@ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *cal
577574
#define ZEND_CLASS_HAS_TYPE_HINTS(ce) ((bool)(ce->ce_flags & ZEND_ACC_HAS_TYPE_HINTS))
578575
#define ZEND_CLASS_HAS_READONLY_PROPS(ce) ((bool)(ce->ce_flags & ZEND_ACC_HAS_READONLY_PROPS))
579576

580-
581577
ZEND_API bool zend_verify_class_constant_type(const zend_class_constant *c, const zend_string *name, zval *constant);
582-
ZEND_COLD void zend_verify_class_constant_type_error(const zend_class_constant *c, const zend_string *name, const zval *constant);
583578

584579
ZEND_API bool zend_verify_property_type(const zend_property_info *info, zval *property, bool strict);
585-
ZEND_COLD void zend_verify_property_type_error(const zend_property_info *info, const zval *property);
586-
ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_property_info *info, const zval *property);
587580

588581
#define ZEND_REF_ADD_TYPE_SOURCE(ref, source) \
589582
zend_ref_add_type_source(&ZEND_REF_TYPE_SOURCES(ref), source)

0 commit comments

Comments
 (0)