X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=ZOOM.xs;h=67c130de4ce8027a7fcd0ed6265653d241f53283;hb=b5baf23f02e980a501dcc4dbcf656f73c49e3212;hp=0184b1ddc3761c333640dad41e1cfe76ce914f4a;hpb=fc11c3c61b1b23962666e1acfeb46242d4836497;p=ZOOM-Perl-moved-to-github.git diff --git a/ZOOM.xs b/ZOOM.xs index 0184b1d..67c130d 100644 --- a/ZOOM.xs +++ b/ZOOM.xs @@ -1,4 +1,4 @@ -/* $Id: ZOOM.xs,v 1.6 2005-10-11 11:36:08 mike Exp $ */ +/* $Id: ZOOM.xs,v 1.9 2005-10-12 09:45:36 mike Exp $ */ #include "EXTERN.h" #include "perl.h" @@ -7,11 +7,13 @@ #include -MODULE = Net::Z3950::ZOOM PACKAGE = Net::Z3950::ZOOM +MODULE = Net::Z3950::ZOOM PACKAGE = Net::Z3950::ZOOM PREFIX=ZOOM_ PROTOTYPES: ENABLE +# TESTED +# # It seems that when one of these functions is called from Perl with # a string-constant argument, that is not recognised as suitable to # be mapped onto a "const char*" argument. The only fix I can find is @@ -34,20 +36,26 @@ ZOOM_connection_connect(c, host, portnum) const char * host int portnum +# TESTED +# void ZOOM_connection_destroy(c) ZOOM_connection c +# TESTED +# const char * ZOOM_connection_option_get(c, key) ZOOM_connection c - const char * key + const char *key +# TESTED +# void ZOOM_connection_option_set(c, key, val) ZOOM_connection c - const char * key - const char * val + const char *key + const char *val void ZOOM_connection_option_setl(c, key, val, len) @@ -56,6 +64,8 @@ ZOOM_connection_option_setl(c, key, val, len) const char * val int len +# TESTED +# # The reference parameters, `cp' and `addinfo', need to already have # values when this function is called, otherwise an "uninitialised # value" warning is generated. As far as I can see, there is no way @@ -115,15 +125,19 @@ ZOOM_connection_search(arg0, q) ZOOM_connection arg0 ZOOM_query q +# TESTED +# # "const" discarded from type of `q' ZOOM_resultset ZOOM_connection_search_pqf(c, q) - ZOOM_connection c + ZOOM_connection c char *q +# TESTED +# void ZOOM_resultset_destroy(r) - ZOOM_resultset r + ZOOM_resultset r const char * ZOOM_resultset_option_get(r, key) @@ -136,9 +150,11 @@ ZOOM_resultset_option_set(r, key, val) const char * key const char * val +# TESTED +# size_t ZOOM_resultset_size(r) - ZOOM_resultset r + ZOOM_resultset r void ZOOM_resultset_records(r, recs, start, count) @@ -147,6 +163,8 @@ ZOOM_resultset_records(r, recs, start, count) size_t start size_t count +# TESTED +# ZOOM_record ZOOM_resultset_record(s, pos) ZOOM_resultset s @@ -161,11 +179,18 @@ void ZOOM_resultset_cache_reset(r) ZOOM_resultset r +# TESTED +# +# "const" discarded from type of `type' +# See "typemap" for discussion of the "const char *" return-type. const char * ZOOM_record_get(rec, type, len) - ZOOM_record rec - const char * type - int * len + ZOOM_record rec + char* type + int &len + OUTPUT: + RETVAL + len void ZOOM_record_destroy(rec)