diff --git a/rdkafka_arginfo.h b/rdkafka_arginfo.h index 25f473a1..c040b880 100644 --- a/rdkafka_arginfo.h +++ b/rdkafka_arginfo.h @@ -4,68 +4,40 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka___construct, 0, 0, 0) ZEND_END_ARG_INFO() -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_addBrokers, 0, 1, IS_LONG, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_addBrokers, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, broker_list, IS_STRING, 0) ZEND_END_ARG_INFO() -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_RdKafka_getMetadata, 0, 3, RdKafka\\Metadata, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_getMetadata, 0, 0, 3) -#endif ZEND_ARG_TYPE_INFO(0, all_topics, _IS_BOOL, 0) ZEND_ARG_OBJ_INFO(0, only_topic, RdKafka\\Topic, 1) ZEND_ARG_TYPE_INFO(0, timeout_ms, IS_LONG, 0) ZEND_END_ARG_INFO() -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_getOutQLen, 0, 0, IS_LONG, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_getOutQLen, 0, 0, 0) -#endif ZEND_END_ARG_INFO() #define arginfo_class_RdKafka_metadata arginfo_class_RdKafka_getMetadata -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_setLogLevel, 0, 1, IS_VOID, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_setLogLevel, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, level, IS_LONG, 0) ZEND_END_ARG_INFO() -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_RdKafka_newTopic, 0, 1, RdKafka\\Topic, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_newTopic, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, topic_name, IS_STRING, 0) ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, topic_conf, RdKafka\\TopicConf, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_RdKafka_outqLen arginfo_class_RdKafka_getOutQLen -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_poll, 0, 1, IS_LONG, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_poll, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, timeout_ms, IS_LONG, 0) ZEND_END_ARG_INFO() #define arginfo_class_RdKafka_flush arginfo_class_RdKafka_poll #if defined(HAS_RD_KAFKA_PURGE) -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_purge, 0, 1, IS_LONG, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_purge, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, purge_flags, IS_LONG, 0) ZEND_END_ARG_INFO() #endif @@ -90,31 +62,19 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_queryWatermarkOffsets, 0, 0, 5) ZEND_ARG_TYPE_INFO(0, timeout_ms, IS_LONG, 0) ZEND_END_ARG_INFO() -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_offsetsForTimes, 0, 2, IS_ARRAY, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_offsetsForTimes, 0, 0, 2) -#endif ZEND_ARG_TYPE_INFO(0, topic_partitions, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO(0, timeout_ms, IS_LONG, 0) ZEND_END_ARG_INFO() -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_pausePartitions, 0, 1, IS_ARRAY, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_pausePartitions, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, topic_partitions, IS_ARRAY, 0) ZEND_END_ARG_INFO() #define arginfo_class_RdKafka_resumePartitions arginfo_class_RdKafka_pausePartitions - + #if defined(HAS_RD_KAFKA_OAUTHBEARER) -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_oauthbearerSetToken, 0, 3, IS_VOID, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_oauthbearerSetToken, 0, 0, 3) -#endif ZEND_ARG_TYPE_INFO(0, token_value, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, lifetime_ms, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, principal_name, IS_STRING, 0) @@ -123,11 +83,7 @@ ZEND_END_ARG_INFO() #endif #if defined(HAS_RD_KAFKA_OAUTHBEARER) -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_oauthbearerSetTokenFailure, 0, 1, IS_VOID, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_oauthbearerSetTokenFailure, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, error, IS_STRING, 0) ZEND_END_ARG_INFO() #endif @@ -136,31 +92,19 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_Consumer___construct, 0, 0, 0) ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, conf, RdKafka\\Conf, 1, "null") ZEND_END_ARG_INFO() -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_RdKafka_Consumer_newQueue, 0, 0, RdKafka\\Queue, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_Consumer_newQueue, 0, 0, 0) -#endif ZEND_END_ARG_INFO() #define arginfo_class_RdKafka_Producer___construct arginfo_class_RdKafka_Consumer___construct #if defined(HAS_RD_KAFKA_TRANSACTIONS) -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_Producer_initTransactions, 0, 1, IS_VOID, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_Producer_initTransactions, 0, 0, 1) -#endif ZEND_ARG_TYPE_INFO(0, timeout_ms, IS_LONG, 0) ZEND_END_ARG_INFO() #endif #if defined(HAS_RD_KAFKA_TRANSACTIONS) -#if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_RdKafka_Producer_beginTransaction, 0, 0, IS_VOID, 0) -#else -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_RdKafka_Producer_beginTransaction, 0, 0, 0) -#endif ZEND_END_ARG_INFO() #endif @@ -281,13 +225,13 @@ static zend_class_entry *register_class_RdKafka(void) zval property_error_cb_default_value; ZVAL_UNDEF(&property_error_cb_default_value); zend_string *property_error_cb_name = zend_string_init("error_cb", sizeof("error_cb") - 1, 1); - zend_declare_typed_property(class_entry, property_error_cb_name, &property_error_cb_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_CALLABLE|MAY_BE_NULL)); + zend_declare_property_ex(class_entry, property_error_cb_name, &property_error_cb_default_value, ZEND_ACC_PRIVATE, NULL); zend_string_release(property_error_cb_name); zval property_dr_cb_default_value; ZVAL_UNDEF(&property_dr_cb_default_value); zend_string *property_dr_cb_name = zend_string_init("dr_cb", sizeof("dr_cb") - 1, 1); - zend_declare_typed_property(class_entry, property_dr_cb_name, &property_dr_cb_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_CALLABLE|MAY_BE_NULL)); + zend_declare_property_ex(class_entry, property_dr_cb_name, &property_dr_cb_default_value, ZEND_ACC_PRIVATE, NULL); zend_string_release(property_dr_cb_name); return class_entry; diff --git a/rdkafka_legacy_arginfo.h b/rdkafka_legacy_arginfo.h index 5da0fb84..070e2c6f 100644 --- a/rdkafka_legacy_arginfo.h +++ b/rdkafka_legacy_arginfo.h @@ -216,13 +216,13 @@ static zend_class_entry *register_class_RdKafka(void) zval property_error_cb_default_value; ZVAL_NULL(&property_error_cb_default_value); zend_string *property_error_cb_name = zend_string_init("error_cb", sizeof("error_cb") - 1, 1); - zend_declare_typed_property(class_entry, property_error_cb_name, &property_error_cb_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_NONE(0)); + zend_declare_property_ex(class_entry, property_error_cb_name, &property_error_cb_default_value, ZEND_ACC_PRIVATE, NULL); zend_string_release(property_error_cb_name); zval property_dr_cb_default_value; ZVAL_NULL(&property_dr_cb_default_value); zend_string *property_dr_cb_name = zend_string_init("dr_cb", sizeof("dr_cb") - 1, 1); - zend_declare_typed_property(class_entry, property_dr_cb_name, &property_dr_cb_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_NONE(0)); + zend_declare_property_ex(class_entry, property_dr_cb_name, &property_dr_cb_default_value, ZEND_ACC_PRIVATE, NULL); zend_string_release(property_dr_cb_name); return class_entry;