X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=lib%2Fperl%2FBlerg-Database%2FDatabase.xs;h=536bbe153dc5a4c9f884ea555ce9008d23314c37;hb=657e96693fb11ec6f451a683e2862e1be239beab;hp=e3614dbb5953309317e5c6246531fcd25299adf7;hpb=d2173f61bc14f8eabe133fdea13ba6bfc1b5d1bc;p=blerg.git diff --git a/lib/perl/Blerg-Database/Database.xs b/lib/perl/Blerg-Database/Database.xs index e3614db..536bbe1 100644 --- 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) + +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; + }