From: mike Date: Wed, 14 May 2008 13:31:39 +0000 (+0000) Subject: ZOOM_record_get() replaced by ZOOM_record_string() and X-Git-Tag: cpan_1_22~3 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=049a21e85f718e1d0bfa430d096d022bc30ad4d3;p=ZOOM-Perl-moved-to-github.git ZOOM_record_get() replaced by ZOOM_record_string() and ZOOM_record_binary(), with different APIs; a new ZOOM_record_get() in the Prl part of the module chooses which to call based on the value of $type. --- diff --git a/ZOOM.xs b/ZOOM.xs index f3b576c..134e94d 100644 --- a/ZOOM.xs +++ b/ZOOM.xs @@ -1,4 +1,4 @@ -/* $Id: ZOOM.xs,v 1.50 2007-11-19 12:57:16 mike Exp $ */ +/* $Id: ZOOM.xs,v 1.51 2008-05-14 13:31:39 mike Exp $ */ #include "EXTERN.h" #include "perl.h" @@ -321,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)