Skip to content

Commit

Permalink
Fix arginfo for getMetadata(), queryWatermarkOffsets() (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-lb authored Nov 26, 2021
1 parent 241a0b7 commit adc3f41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kafka_consumer.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ PHP_METHOD(RdKafka__KafkaConsumer, offsetsForTimes)
/* {{{ proto void RdKafka\KafkaConsumer::queryWatermarkOffsets(string $topic, int $partition, int &$low, int &$high, int $timeout_ms)
Query broker for low (oldest/beginning) or high (newest/end) offsets for partition */

ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_kafka_consumer_query_watermark_offsets, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_kafka_consumer_query_watermark_offsets, 0, 0, 5)
ZEND_ARG_INFO(0, topic)
ZEND_ARG_INFO(0, partition)
ZEND_ARG_INFO(1, low)
Expand Down
4 changes: 2 additions & 2 deletions rdkafka.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ PHP_METHOD(RdKafka__Kafka, addBrokers)

/* {{{ proto RdKafka\Metadata::getMetadata(bool $all_topics, RdKafka\Topic $only_topic, int $timeout_ms)
Request Metadata from broker */
ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_get_metadata, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_get_metadata, 0, 0, 3)
ZEND_ARG_INFO(0, all_topics)
ZEND_ARG_INFO(0, only_topic)
ZEND_ARG_INFO(0, timeout_ms)
Expand Down Expand Up @@ -608,7 +608,7 @@ PHP_METHOD(RdKafka__Kafka, purge)
/* {{{ proto void RdKafka\Kafka::queryWatermarkOffsets(string $topic, int $partition, int &$low, int &$high, int $timeout_ms)
Query broker for low (oldest/beginning) or high (newest/end) offsets for partition */

ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_query_watermark_offsets, 0, 0, 1)
ZEND_BEGIN_ARG_INFO_EX(arginfo_kafka_query_watermark_offsets, 0, 0, 5)
ZEND_ARG_INFO(0, topic)
ZEND_ARG_INFO(0, partition)
ZEND_ARG_INFO(1, low)
Expand Down
2 changes: 1 addition & 1 deletion tests/bug74.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ $topic = $consumer->newTopic("batman", null);
$producer = new RdKafka\Producer($conf);

if (class_exists('RdKafka\TopicPartition')) {
$tp = new RdKafka\TopicPartition("batman", 0, null);
$tp = new RdKafka\TopicPartition("batman", 0, 0);
}
--EXPECT--

0 comments on commit adc3f41

Please sign in to comment.