Ignore
[ZOOM-Perl-moved-to-github.git] / ZOOM.xs
diff --git a/ZOOM.xs b/ZOOM.xs
index 885db0e..134e94d 100644 (file)
--- a/ZOOM.xs
+++ b/ZOOM.xs
@@ -1,4 +1,4 @@
-/* $Id: ZOOM.xs,v 1.48 2007-09-14 10:33:16 mike Exp $ */
+/* $Id: ZOOM.xs,v 1.51 2008-05-14 13:31:39 mike Exp $ */
 
 #include "EXTERN.h"
 #include "perl.h"
@@ -7,6 +7,8 @@
 #include <yaz/zoom.h>
 #include <yaz/diagsrw.h>
 #include <yaz/xmalloc.h>
+#include <yaz/log.h>
+#include <yaz/yaz-version.h>
 
 /* Used by the *_setl() functions */
 typedef char opaquechar;
@@ -319,16 +321,25 @@ ZOOM_record_error(rec, cp, addinfo, diagset)
                diagset
 
 # See "typemap" for discussion of the "const char *" return-type.
-#
-### but should use datachunk for in some (not all!) cases.
 const char *
-ZOOM_record_get(rec, type, len)
+ZOOM_record_get_string(rec, type)
        ZOOM_record rec
        const char* type
-       int &len
+       INIT:
+               int len;
+       CODE:
+               RETVAL = ZOOM_record_get(rec, type, &len);
+       OUTPUT:
+               RETVAL
+
+struct datachunk
+ZOOM_record_get_binary(rec, type)
+       ZOOM_record rec
+       const char* type
+       CODE:
+               RETVAL.data = (char*) ZOOM_record_get(rec, type, &RETVAL.len);
        OUTPUT:
                RETVAL
-               len
 
 void
 ZOOM_record_destroy(rec)
@@ -562,7 +573,6 @@ ZOOM_event(conns)
        INIT:
                SV *realconns;
                I32 n, i;
-               int res;
                ZOOM_connection *cs;
        CODE:
                /*printf("* in ZOOM_event(%p)\n", conns);*/