Skip to content

Commit 92f3cf9

Browse files
author
Andrea Guzzo
committed
complain only if really necessary + version bump
1 parent 60e28ff commit 92f3cf9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

perl/p5-Shardcache-Client-Fast/Fast.xs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ shardcache_client_get_multi(c, keys, results = &PL_sv_undef)
368368
items_array[num_items] = NULL; // null-terminate it
369369

370370
int rc = shardcache_client_get_multi(c, items_array);
371-
if (rc == 0) {
371+
if (rc >= 0) { // 0 means OK, 1 means that some keys failed and some succeeded
372372
AV *out_array;
373373
if (!SvROK(results) || SvTYPE(SvRV(results)) != SVt_PVAV) {
374374
out_array = newAV();
@@ -385,7 +385,7 @@ shardcache_client_get_multi(c, keys, results = &PL_sv_undef)
385385
if (items_array[i]->data)
386386
item_sv = newSVpv(items_array[i]->data, items_array[i]->dlen);
387387

388-
if (!av_store(out_array, i, item_sv))
388+
if (!av_store(out_array, i, item_sv) && item_sv != &PL_sv_undef)
389389
SvREFCNT_dec(item_sv);
390390

391391
shc_multi_item_destroy(items_array[i]);

perl/p5-Shardcache-Client-Fast/lib/Shardcache/Client/Fast.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ our @EXPORT = qw(
4646
4747
);
4848

49-
our $VERSION = '0.12';
49+
our $VERSION = '0.13';
5050

5151
sub AUTOLOAD {
5252
# This AUTOLOAD is used to 'autoload' constants from the constant()

0 commit comments

Comments
 (0)