Skip to content

Commit

Permalink
add vcpkg support
Browse files Browse the repository at this point in the history
  • Loading branch information
plicease committed Mar 15, 2020
1 parent 1c056a6 commit 37adb16
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -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++)

Expand Down
5 changes: 3 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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";
}
15 changes: 4 additions & 11 deletions rdkafkaxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
}

0 comments on commit 37adb16

Please sign in to comment.