projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add auth counter to perl library
[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
e3614db
..
536bbe1
100644
(file)
--- a/
lib/perl/Blerg-Database/Database.xs
+++ b/
lib/perl/Blerg-Database/Database.xs
@@
-200,3
+200,13
@@
char * auth_login(const char *username, const char *password)
int auth_logout(const char *username, const char *token)
int auth_check_token(const char *username, const char *given_token)
int auth_logout(const char *username, const char *token)
int auth_check_token(const char *username, const char *given_token)
+
+void auth_get_counter(const char *username)
+ INIT:
+ uint32_t counter = 0;
+ PPCODE:
+ if (auth_get_counter(username, &counter)) {
+ XPUSHs(sv_2mortal(newSVuv(counter)));
+ } else {
+ XSRETURN_UNDEF;
+ }