projects
/
ZOOM-Perl-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tested resultset_record_immediate() and resultset_cache_reset().
[ZOOM-Perl-moved-to-github.git]
/
ZOOM.xs
diff --git
a/ZOOM.xs
b/ZOOM.xs
index
2c2686c
..
c33cfa0
100644
(file)
--- 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.19 2005-11-02 17:23:50 mike Exp $ */
#include "EXTERN.h"
#include "perl.h"
#include "EXTERN.h"
#include "perl.h"
@@
-215,11
+215,11
@@
int
ZOOM_connection_last_event(cs)
ZOOM_connection cs
ZOOM_connection_last_event(cs)
ZOOM_connection cs
-# UNTESTED
+# TESTED
ZOOM_resultset
ZOOM_connection_search(arg0, q)
ZOOM_connection arg0
ZOOM_resultset
ZOOM_connection_search(arg0, q)
ZOOM_connection arg0
- ZOOM_query q
+ ZOOM_query q
# TESTED
ZOOM_resultset
# TESTED
ZOOM_resultset
@@
-232,31
+232,31
@@
void
ZOOM_resultset_destroy(r)
ZOOM_resultset r
ZOOM_resultset_destroy(r)
ZOOM_resultset r
-# UNTESTED
+# TESTED
const char *
ZOOM_resultset_option_get(r, key)
const char *
ZOOM_resultset_option_get(r, key)
- ZOOM_resultset r
- const char * key
+ ZOOM_resultset r
+ const char* key
-# UNTESTED
+# TESTED
void
ZOOM_resultset_option_set(r, key, val)
void
ZOOM_resultset_option_set(r, key, val)
- ZOOM_resultset r
- const char * key
- const char * val
+ ZOOM_resultset r
+ const char* key
+ const char* val
# TESTED
size_t
ZOOM_resultset_size(r)
ZOOM_resultset r
# TESTED
size_t
ZOOM_resultset_size(r)
ZOOM_resultset r
-# UNTESTED
+# TESTING
void
ZOOM_resultset_records(r, recs, start, count)
void
ZOOM_resultset_records(r, recs, start, count)
- ZOOM_resultset r
- ZOOM_record * recs
- size_t start
- size_t count
+ ZOOM_resultset r
+ ZOOM_record* recs
+ size_t start
+ size_t count
# TESTED
ZOOM_record
# TESTED
ZOOM_record
@@
-264,16
+264,16
@@
ZOOM_resultset_record(s, pos)
ZOOM_resultset s
size_t pos
ZOOM_resultset s
size_t pos
-# UNTESTED
+# TESTED
ZOOM_record
ZOOM_resultset_record_immediate(s, pos)
ZOOM_record
ZOOM_resultset_record_immediate(s, pos)
- ZOOM_resultset s
- size_t pos
+ ZOOM_resultset s
+ size_t pos
-# UNTESTED
+# TESTED
void
ZOOM_resultset_cache_reset(r)
void
ZOOM_resultset_cache_reset(r)
- ZOOM_resultset r
+ ZOOM_resultset r
# See "typemap" for discussion of the "const char *" return-type.
#
# See "typemap" for discussion of the "const char *" return-type.
#
@@
-298,28
+298,28
@@
ZOOM_record
ZOOM_record_clone(srec)
ZOOM_record srec
ZOOM_record_clone(srec)
ZOOM_record srec
-# UNTESTED
+# TESTED
ZOOM_query
ZOOM_query_create()
ZOOM_query
ZOOM_query_create()
-# UNTESTED
+# TESTED
void
ZOOM_query_destroy(s)
void
ZOOM_query_destroy(s)
- ZOOM_query s
+ ZOOM_query s
-# UNTESTED
+# TESTED
int
ZOOM_query_cql(s, str)
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)
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
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.
/* 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;
*/
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);
ZOOM_options_set_callback(opt, __ZOOM_option_callback,
(void*) block);