X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ZOOM.xs;h=4e5de767769699c2bf094d765829de6b69a2dbb6;hb=123278da41585ec0d1c5a923695f570115ae9350;hp=4d80dbad9942ab4764726a4cce15bdef2c0babec;hpb=be9b36d9673ee8feb02201f4c741778143ae6c67;p=ZOOM-Perl-moved-to-github.git diff --git a/ZOOM.xs b/ZOOM.xs index 4d80dba..4e5de76 100644 --- a/ZOOM.xs +++ b/ZOOM.xs @@ -1,5 +1,3 @@ -/* $Id: ZOOM.xs,v 1.49 2007-10-29 12:06:57 mike Exp $ */ - #include "EXTERN.h" #include "perl.h" #include "XSUB.h" @@ -8,6 +6,7 @@ #include #include #include +#include /* Used by the *_setl() functions */ typedef char opaquechar; @@ -320,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) @@ -395,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 @@ -406,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 @@ -563,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);*/