mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
New functions object_ctime() and object_ctime_by_md5().
This commit is contained in:
parent
93008cfc3e
commit
5046531d43
14
data.c
14
data.c
@ -658,6 +658,20 @@ int object_del_if_unref(const char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double object_ctime_by_md5(const char *md5)
|
||||||
|
{
|
||||||
|
xs *fn = _object_fn_by_md5(md5);
|
||||||
|
return f_ctime(fn);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double object_ctime(const char *id)
|
||||||
|
{
|
||||||
|
xs *md5 = xs_md5_hex(id, strlen(id));
|
||||||
|
return object_ctime_by_md5(md5);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
d_char *_object_index_fn(const char *id, const char *idxsfx)
|
d_char *_object_index_fn(const char *id, const char *idxsfx)
|
||||||
/* returns the filename of an object's index */
|
/* returns the filename of an object's index */
|
||||||
{
|
{
|
||||||
|
2
snac.h
2
snac.h
@ -77,6 +77,8 @@ int object_get_by_md5(const char *md5, xs_dict **obj);
|
|||||||
int object_get(const char *id, xs_dict **obj);
|
int object_get(const char *id, xs_dict **obj);
|
||||||
int object_del(const char *id);
|
int object_del(const char *id);
|
||||||
int object_del_if_unref(const char *id);
|
int object_del_if_unref(const char *id);
|
||||||
|
double object_ctime_by_md5(const char *md5);
|
||||||
|
double object_ctime(const char *id);
|
||||||
int object_admire(const char *id, const char *actor, int like);
|
int object_admire(const char *id, const char *actor, int like);
|
||||||
|
|
||||||
int object_likes_len(const char *id);
|
int object_likes_len(const char *id);
|
||||||
|
Loading…
Reference in New Issue
Block a user