Initialise error strings to "" in ZOOM_record_error(). Since the
authormike <mike>
Tue, 28 Nov 2006 17:32:54 +0000 (17:32 +0000)
committermike <mike>
Tue, 28 Nov 2006 17:32:54 +0000 (17:32 +0000)
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.

ZOOM.xs

diff --git a/ZOOM.xs b/ZOOM.xs
index 96e0548..12e463c 100644 (file)
--- 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;