From: mike Date: Tue, 28 Nov 2006 17:32:54 +0000 (+0000) Subject: Initialise error strings to "" in ZOOM_record_error(). Since the X-Git-Tag: cpan_1_22~97 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=2651e8f396b49af095ea505778498c3e711d9370;p=ZOOM-Perl-moved-to-github.git Initialise error strings to "" in ZOOM_record_error(). Since the underlying ZOOM-C function doesn't set the strings when there's no error (unlike ZOOM_connection_error()), this situation leaves the Perl/C interface code trying to marshal junk pointers. --- diff --git a/ZOOM.xs b/ZOOM.xs index 96e0548..12e463c 100644 --- a/ZOOM.xs +++ b/ZOOM.xs @@ -1,4 +1,4 @@ -/* $Id: ZOOM.xs,v 1.44 2006-11-28 16:47:19 mike Exp $ */ +/* $Id: ZOOM.xs,v 1.45 2006-11-28 17:32:54 mike Exp $ */ #include "EXTERN.h" #include "perl.h" @@ -297,7 +297,7 @@ ZOOM_record_error(rec, cp, addinfo, diagset) const char* &diagset CODE: { - const char *ccp, *caddinfo, *cdset; + const char *ccp = "", *caddinfo = "", *cdset = ""; RETVAL = ZOOM_record_error(rec, &ccp, &caddinfo, &cdset); cp = (char*) ccp; addinfo = (char*) caddinfo;