X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=perl%2FIDZebra.i;h=f00d7abf7f39002ef394964e064a5a7f6fb18ca8;hb=dfa73b7f3e4991f95e868da0ea7e2a9bbf18784a;hp=bbbdcff010f0f9c3ff7499f0010b66794e0b6e57;hpb=5a7df12ffccaa5f7d1b32b7158eb4a9c0babde2b;p=idzebra-moved-to-github.git diff --git a/perl/IDZebra.i b/perl/IDZebra.i index bbbdcff..f00d7ab 100644 --- a/perl/IDZebra.i +++ b/perl/IDZebra.i @@ -15,7 +15,11 @@ /* RetrievalRecordBuff is a special construct, to allow to map a char * buf to non-null terminated perl string scalar value (SVpv). */ %typemap(out) RetrievalRecordBuf * { - $result = newSVpv($1->buf,$1->len); + if ($1->len) { + $result = newSVpv($1->buf,$1->len); + } else { + $result = newSVpv("",0); + } sv_2mortal($result); argvi++; }