X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=ZOOM.xs;h=7c6e25775a6c20397afe2be5d567e9cfad0cdcdd;hb=9f2e02ff8f77f67f5b76fb33044e9c944cfeec8c;hp=2c2686c14b39c9ca03b3cd024ee14c27f3ef872d;hpb=6fa5e35e6c94d7f0d786b78eb680b477c1820459;p=ZOOM-Perl-moved-to-github.git diff --git a/ZOOM.xs b/ZOOM.xs index 2c2686c..7c6e257 100644 --- a/ZOOM.xs +++ b/ZOOM.xs @@ -1,4 +1,4 @@ -/* $Id: ZOOM.xs,v 1.15 2005-10-18 17:00:28 mike Exp $ */ +/* $Id: ZOOM.xs,v 1.17 2005-10-26 16:27:25 mike Exp $ */ #include "EXTERN.h" #include "perl.h" @@ -215,11 +215,11 @@ int ZOOM_connection_last_event(cs) ZOOM_connection cs -# UNTESTED +# TESTED ZOOM_resultset ZOOM_connection_search(arg0, q) ZOOM_connection arg0 - ZOOM_query q + ZOOM_query q # TESTED ZOOM_resultset @@ -298,28 +298,28 @@ ZOOM_record ZOOM_record_clone(srec) ZOOM_record srec -# UNTESTED +# TESTED ZOOM_query ZOOM_query_create() -# UNTESTED +# TESTED void ZOOM_query_destroy(s) - ZOOM_query s + ZOOM_query s -# UNTESTED +# TESTED int ZOOM_query_cql(s, str) - ZOOM_query s - const char * str + ZOOM_query s + const char* str -# UNTESTED +# TESTED int ZOOM_query_prefix(s, str) - ZOOM_query s - const char * str + ZOOM_query s + const char* str -# UNTESTED +# TESTED int ZOOM_query_sortby(s, criteria) ZOOM_query s @@ -423,11 +423,16 @@ ZOOM_options_set_callback(opt, function, handle) /* The tiny amount of memory allocated here is never * released, as options_destroy() doesn't do anything * to the callback information. Not a big deal. + * Also, I have no idea how to drive the Perl "mortal" + * reference-counting stuff, so I am just allocating + * copies which also never get released. Don't sue! */ struct callback_block *block = (struct callback_block*) xmalloc(sizeof *block); block->function = function; block->handle = handle; + SvREFCNT(block->function); + SvREFCNT(block->handle); ZOOM_options_set_callback(opt, __ZOOM_option_callback, (void*) block);