projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Generalize status setting (mute, etc.)
[blerg.git]
/
lib
/
perl
/
Blerg-Database
/
Database.xs
diff --git
a/lib/perl/Blerg-Database/Database.xs
b/lib/perl/Blerg-Database/Database.xs
index
a3f87a5
..
e3614db
100644
(file)
--- a/
lib/perl/Blerg-Database/Database.xs
+++ b/
lib/perl/Blerg-Database/Database.xs
@@
-32,6
+32,12
@@
MODULE = Blerg::Database PACKAGE = Blerg::Database
INCLUDE: const-xs.inc
PROTOTYPES: ENABLE
INCLUDE: const-xs.inc
PROTOTYPES: ENABLE
+int init()
+ CODE:
+ RETVAL = blerg_init();
+ OUTPUT:
+ RETVAL
+
int exists(const char *name)
CODE:
RETVAL = blerg_exists(name);
int exists(const char *name)
CODE:
RETVAL = blerg_exists(name);
@@
-111,15
+117,15
@@
const char * _get_subscription_mark(struct blerg *ptr)
n = snprintf(buf, 21, "%llu", mark);
XPUSHs(sv_2mortal(newSVpv(buf, n)));
n = snprintf(buf, 21, "%llu", mark);
XPUSHs(sv_2mortal(newSVpv(buf, n)));
-int _set_
mute(struct blerg *ptr
, int v)
+int _set_
status(struct blerg *ptr, int status
, int v)
CODE:
CODE:
- RETVAL = blerg_set_
mute(ptr
, v);
+ RETVAL = blerg_set_
status(ptr, status
, v);
OUTPUT:
RETVAL
OUTPUT:
RETVAL
-int _get_
mute(struct blerg *ptr
)
+int _get_
status(struct blerg *ptr, int status
)
CODE:
CODE:
- RETVAL = blerg_get_
mute(ptr
);
+ RETVAL = blerg_get_
status(ptr, status
);
OUTPUT:
RETVAL
OUTPUT:
RETVAL
@@
-131,6
+137,7
@@
void tag_list(const char *tag, const char *str_offset, int direction)
int count, i;
PPCODE:
offset = strtoull(str_offset, NULL, 0);
int count, i;
PPCODE:
offset = strtoull(str_offset, NULL, 0);
+ count = 50;
list = tag_list(tag, offset, &count, direction);
if (list == NULL) {
XSRETURN_EMPTY;
list = tag_list(tag, offset, &count, direction);
if (list == NULL) {
XSRETURN_EMPTY;
@@
-156,6
+163,7
@@
void _subscription_list(const char *author, const char *str_offset, int directio
int count, i;
PPCODE:
offset = strtoull(str_offset, NULL, 0);
int count, i;
PPCODE:
offset = strtoull(str_offset, NULL, 0);
+ count = 50;
list = subscription_list(author, offset, &count, direction);
if (list == NULL) {
XSRETURN_EMPTY;
list = subscription_list(author, offset, &count, direction);
if (list == NULL) {
XSRETURN_EMPTY;