diff --git a/Changes b/Changes index af2d8f1..38576d6 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for Kafka-Librd + - Added support for Visual C++ + vcpkg (gh#21) + 0.14 2019-10-20 19:50:39 -0600 - Aded flush and destroy methods (gh#19, miket++) diff --git a/Makefile.PL b/Makefile.PL index 6b90b29..b7ee66b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,6 +5,7 @@ use Config; use ExtUtils::MakeMaker 6.64; use Alien::Librdkafka 0.9.3; use Alien::Base::Wrapper qw( Alien::Librdkafka !export ); +use File::Spec (); WriteMakefile( NAME => 'Kafka::Librd', @@ -44,6 +45,6 @@ WriteMakefile( ); sub MY::postamble { - "const_xs.inc : utils/generate_const.pl\n" . - "\t\$(FULLPERL) utils/generate_const.pl\n"; + "const_xs.inc : @{[ File::Spec->catfile(qw( utils generate_const.pl )) ]}\n" . + "\t\$(FULLPERL) @{[ File::Spec->catfile(qw( utils generate_const.pl )) ]}\n"; } diff --git a/rdkafkaxs.c b/rdkafkaxs.c index aeb890a..d202a7e 100644 --- a/rdkafkaxs.c +++ b/rdkafkaxs.c @@ -63,7 +63,6 @@ krd_parse_topic_partition_list(pTHX_ AV* tplist) { } AV* krd_expand_topic_partition_list(pTHX_ rd_kafka_topic_partition_list_t* tpar) { - char errstr[ERRSTR_SIZE]; AV* tplist = newAV(); int i; for (i = 0; i < tpar->cnt; i++) { @@ -78,10 +77,6 @@ AV* krd_expand_topic_partition_list(pTHX_ rd_kafka_topic_partition_list_t* tpar) av_push(tplist, newRV_noinc((SV*)tp)); } return tplist; - -CROAK: - croak("%s", errstr); - return NULL; } rd_kafka_conf_t* krd_parse_config(pTHX_ rdkafka_t *krd, HV* params) { @@ -144,13 +139,11 @@ rd_kafka_topic_conf_t* krd_parse_topic_config(pTHX_ HV *params, char* errstr) { strval, errstr, ERRSTR_SIZE); - if (res != RD_KAFKA_CONF_OK) - goto ERROR; + if (res != RD_KAFKA_CONF_OK) { + rd_kafka_topic_conf_destroy(topconf); + return NULL; + } } return topconf; - -ERROR: - rd_kafka_topic_conf_destroy(topconf); - return NULL; }