diff options
Diffstat (limited to 'php/ext/google/protobuf/message.c')
-rw-r--r-- | php/ext/google/protobuf/message.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c index e28e42a1..a40e0f63 100644 --- a/php/ext/google/protobuf/message.c +++ b/php/ext/google/protobuf/message.c @@ -869,7 +869,11 @@ PHP_PROTO_INIT_ENUMCLASS_START("Google\\Protobuf\\Field\\Cardinality", zend_declare_class_constant_long(field_cardinality_type, "CARDINALITY_REPEATED", 20, 3 TSRMLS_CC); const char *alias = "Google\\Protobuf\\Field_Cardinality"; +#if PHP_VERSION_ID < 70300 zend_register_class_alias_ex(alias, strlen(alias), field_cardinality_type TSRMLS_CC); +#else + zend_register_class_alias_ex(alias, strlen(alias), field_cardinality_type, 1); +#endif PHP_PROTO_INIT_ENUMCLASS_END // ----------------------------------------------------------------------------- @@ -924,7 +928,11 @@ PHP_PROTO_INIT_ENUMCLASS_START("Google\\Protobuf\\Field\\Kind", zend_declare_class_constant_long(field_kind_type, "TYPE_SINT64", 11, 18 TSRMLS_CC); const char *alias = "Google\\Protobuf\\Field_Kind"; +#if PHP_VERSION_ID < 70300 zend_register_class_alias_ex(alias, strlen(alias), field_kind_type TSRMLS_CC); +#else + zend_register_class_alias_ex(alias, strlen(alias), field_kind_type, 1); +#endif PHP_PROTO_INIT_ENUMCLASS_END // ----------------------------------------------------------------------------- |