X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=perl%2FIDZebra.i;h=f00d7abf7f39002ef394964e064a5a7f6fb18ca8;hb=85d30f28b52160da8d5bb52e3977503f953624cb;hp=bbbdcff010f0f9c3ff7499f0010b66794e0b6e57;hpb=0a34a94a93dc7d594d0f6a7f359a63dbc1297775;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++; }