Skip to content

Commit

Permalink
feat: add php 8.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
qkdreyer committed Dec 29, 2022
1 parent 065c994 commit 112dd23
Show file tree
Hide file tree
Showing 21 changed files with 70 additions and 25 deletions.
18 changes: 13 additions & 5 deletions ext/php_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ typedef zend_object php7to8_object;
#define PHP7TO8_ARG_INFO_VOID_RETURN(arginfo) \
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo, 0, 0, IS_VOID, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_STRING_RETURN(arginfo) \
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo, 0, 0, IS_STRING, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_BOOL_RETURN(arginfo) \
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo, 0, 0, _IS_BOOL, 0) \
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -172,6 +175,9 @@ typedef zval php7to8_object;
#define PHP7TO8_ARG_INFO_VOID_RETURN(arginfo) \
ZEND_BEGIN_ARG_INFO_EX(arginfo, 0, ZEND_RETURN_VALUE, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_STRING_RETURN(arginfo) \
ZEND_BEGIN_ARG_INFO_EX(arginfo, 0, ZEND_RETURN_VALUE, 0) \
ZEND_END_ARG_INFO()
#define PHP7TO8_ARG_INFO_BOOL_RETURN(arginfo) \
ZEND_BEGIN_ARG_INFO_EX(arginfo, 0, ZEND_RETURN_VALUE, 0) \
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -200,6 +206,12 @@ typedef zval php7to8_object;
ZEND_END_ARG_INFO()
#endif

#if ((PHP_MAJOR_VERSION == 8 && PHP_MINOR_VERSION >= 2) || PHP_MAJOR_VERSION > 8)
#define PHP7TO82_ZEND_KEY() __key ? __key->val : NULL
#else
#define PHP7TO82_ZEND_KEY() _p->key ? _p->key->val : NULL
#endif

#if PHP_MAJOR_VERSION >= 7
#define php5to7_zend_register_internal_class_ex(ce, parent_ce) zend_register_internal_class_ex((ce), (parent_ce) TSRMLS_CC);

Expand Down Expand Up @@ -276,11 +288,7 @@ php5to7_string_compare(php5to7_string s1, php5to7_string s2)

#define PHP5TO7_ZEND_HASH_FOREACH_STR_KEY_VAL(ht, _key, _val) \
ZEND_HASH_FOREACH(ht, 0); \
if (_p->key) { \
(_key) = _p->key->val; \
} else { \
(_key) = NULL; \
} \
_key = PHP7TO82_ZEND_KEY(); \
_val = _z;

#define PHP5TO7_ZEND_HASH_FOREACH_END(ht) ZEND_HASH_FOREACH_END()
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Bigint.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_bigint_methods[] = {
PHP_ME(Bigint, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Bigint, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Bigint, add, arginfo_num, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Blob.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_blob_methods[] = {
PHP_ME(Blob, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Blob, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Blob, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Blob, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Blob, bytes, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Blob, toBinaryString, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Date.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,15 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_date_methods[] = {
PHP_ME(Date, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Date, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Date, seconds, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Date, toDateTime, arginfo_time, ZEND_ACC_PUBLIC)
PHP_ME(Date, fromDateTime, arginfo_datetime, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Date, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Date, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Decimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_decimal_methods[] = {
PHP_ME(Decimal, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Decimal, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Decimal, scale, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Duration.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo__construct, 0, ZEND_RETURN_VALUE, 3)
ZEND_ARG_INFO(0, nanos)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_duration_methods[] = {
PHP_ME(Duration, __construct, arginfo__construct, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
PHP_ME(Duration, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, months, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, days, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, nanos, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Duration, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Float.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_float_methods[] = {
PHP_ME(Float, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Float, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Float, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Float, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Float, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Float, isInfinite, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_inet_methods[] = {
PHP_ME(Inet, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Inet, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Inet, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Inet, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Inet, address, arginfo_none, ZEND_ACC_PUBLIC)
PHP_FE_END
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Smallint.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_smallint_methods[] = {
PHP_ME(Smallint, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Smallint, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Smallint, add, arginfo_num, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Time.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,14 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_time_methods[] = {
PHP_ME(Time, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Time, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Time, seconds, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Time, fromDateTime, arginfo_datetime, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
PHP_ME(Time, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Time, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Timestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,15 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_timestamp_methods[] = {
PHP_ME(Timestamp, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, time, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, microtime, arginfo_microtime, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, toDateTime, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timestamp, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_FE_END
};

Expand Down
4 changes: 3 additions & 1 deletion ext/src/Timeuuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_timeuuid_methods[] = {
PHP_ME(Timeuuid, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, uuid, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Timeuuid, version, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Tinyint.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_tinyint_methods[] = {
PHP_ME(Tinyint, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Tinyint, add, arginfo_num, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Type.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_map, 0, ZEND_RETURN_VALUE, 2)
PHP_DRIVER_NAMESPACE_ZEND_ARG_OBJ_INFO(0, valueType, Type, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_methods[] = {
PHP_ABSTRACT_ME(Type, name, arginfo_none)
PHP_ABSTRACT_ME(Type, __toString, arginfo_none)
PHP_ABSTRACT_ME(Type, __toString, arginfo_string_return)

#define XX_SCALAR_METHOD(name, _) PHP_ME(Type, name, arginfo_none, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC|ZEND_ACC_FINAL)
PHP_DRIVER_SCALAR_TYPES_MAP(XX_SCALAR_METHOD)
Expand Down
3 changes: 2 additions & 1 deletion ext/src/Type/Collection.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_VARIADIC(arginfo_value, value)
PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_collection_methods[] = {
PHP_ME(TypeCollection, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeCollection, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, valueType, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeCollection, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Type/Custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_value, 0, ZEND_RETURN_VALUE, 0)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_custom_methods[] = {
PHP_ME(TypeCustom, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeCustom, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCustom, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeCustom, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeCustom, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Type/Scalar.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_value, 0, ZEND_RETURN_VALUE, 0)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_scalar_methods[] = {
PHP_ME(TypeScalar, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeScalar, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeScalar, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeScalar, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeScalar, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
3 changes: 2 additions & 1 deletion ext/src/Type/Set.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_VARIADIC(arginfo_value, value)
PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_set_methods[] = {
PHP_ME(TypeSet, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeSet, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, valueType, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeSet, create, arginfo_value, ZEND_ACC_PUBLIC)
PHP_FE_END
};
Expand Down
3 changes: 2 additions & 1 deletion ext/src/Type/Tuple.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_VARIADIC(arginfo_values, values)
PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_type_tuple_methods[] = {
PHP_ME(TypeTuple, __construct, arginfo_none, ZEND_ACC_PRIVATE)
PHP_ME(TypeTuple, name, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, types, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(TypeTuple, create, arginfo_values, ZEND_ACC_PUBLIC)
PHP_FE_END
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Uuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_none, 0, ZEND_RETURN_VALUE, 0)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_uuid_methods[] = {
PHP_ME(Uuid, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Uuid, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, uuid, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Uuid, version, arginfo_none, ZEND_ACC_PUBLIC)
Expand Down
4 changes: 3 additions & 1 deletion ext/src/Varint.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_num, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, num)
ZEND_END_ARG_INFO()

PHP7TO8_ARG_INFO_STRING_RETURN(arginfo_string_return)

static zend_function_entry php_driver_varint_methods[] = {
PHP_ME(Varint, __construct, arginfo__construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(Varint, __toString, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Varint, __toString, arginfo_string_return, ZEND_ACC_PUBLIC)
PHP_ME(Varint, type, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Varint, value, arginfo_none, ZEND_ACC_PUBLIC)
PHP_ME(Varint, add, arginfo_num, ZEND_ACC_PUBLIC)
Expand Down

0 comments on commit 112dd23

Please sign in to comment.