X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ZOOM.xs;h=4e5de767769699c2bf094d765829de6b69a2dbb6;hb=8e01210e8b9e3db2ec7bd004bf17dbaca1f69c83;hp=885db0e762dc45f400c0de7139e18ae68981e7b7;hpb=e28476c2caddb588f2e2f038d0fcefaea2243421;p=ZOOM-Perl-moved-to-github.git diff --git a/ZOOM.xs b/ZOOM.xs index 885db0e..4e5de76 100644 --- a/ZOOM.xs +++ b/ZOOM.xs @@ -1,5 +1,3 @@ -/* $Id: ZOOM.xs,v 1.48 2007-09-14 10:33:16 mike Exp $ */ - #include "EXTERN.h" #include "perl.h" #include "XSUB.h" @@ -7,6 +5,8 @@ #include #include #include +#include +#include /* Used by the *_setl() functions */ typedef char opaquechar; @@ -319,16 +319,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) @@ -394,8 +403,8 @@ const char * ZOOM_scanset_term(scan, pos, occ, len) ZOOM_scanset scan size_t pos - int& occ - int& len + size_t& occ + size_t& len OUTPUT: RETVAL occ @@ -405,8 +414,8 @@ const char * ZOOM_scanset_display_term(scan, pos, occ, len) ZOOM_scanset scan size_t pos - int& occ - int& len + size_t& occ + size_t& len OUTPUT: RETVAL occ @@ -562,7 +571,6 @@ ZOOM_event(conns) INIT: SV *realconns; I32 n, i; - int res; ZOOM_connection *cs; CODE: /*printf("* in ZOOM_event(%p)\n", conns);*/