Add simple CLI program
[yaz4j-moved-to-github.git] / src / main / swig / libyaz4j.i
index 61e4693..97a74cb 100644 (file)
@@ -9,12 +9,13 @@
        %include "cpointer.i"
        %pointer_functions(int, intp);
        %pointer_functions(size_t, size_tp);
+       %include "carrays.i"
+       %array_functions(ZOOM_record, zoomRecordArray);
        %typemap(jni) CharStarByteArray "jbyteArray"
        %typemap(jtype) CharStarByteArray "byte[]"
        %typemap(jstype) CharStarByteArray "byte[]"
        %typemap(out) CharStarByteArray {
                $result = SWIG_JavaArrayOutSchar(jenv, (signed char*) $1.data, $1.length);
-               free((void*)$1.data);
        }
        %typemap(javaout) CharStarByteArray { return $jnicall; }
        %define YAZ_BEGIN_CDECL %enddef