Kouhei Sutou
null+****@clear*****
Tue May 10 15:40:40 JST 2016
Kouhei Sutou 2016-05-10 15:40:40 +0900 (Tue, 10 May 2016) New Revision: 8dcbd35ccdda8fbb85619a8603a49e9331770404 https://github.com/groonga/groonga/commit/8dcbd35ccdda8fbb85619a8603a49e9331770404 Message: Extract code for touching DB Modified files: lib/db.c Modified: lib/db.c (+7 -1) =================================================================== --- lib/db.c 2016-05-10 14:51:52 +0900 (2d76156) +++ lib/db.c 2016-05-10 15:40:40 +0900 (0558bb2) @@ -661,6 +661,12 @@ grn_db_touch(grn_ctx *ctx, grn_obj *s) #define IS_TEMP(obj) (DB_OBJ(obj)->id & GRN_OBJ_TMP_OBJECT) +static inline void +grn_obj_touch_db(grn_ctx *ctx, grn_obj *obj, grn_timeval *tv) +{ + grn_obj_io(obj)->header->lastmod = tv->tv_sec; +} + void grn_obj_touch(grn_ctx *ctx, grn_obj *obj, grn_timeval *tv) { @@ -672,7 +678,7 @@ grn_obj_touch(grn_ctx *ctx, grn_obj *obj, grn_timeval *tv) if (obj) { switch (obj->header.type) { case GRN_DB : - grn_obj_io(obj)->header->lastmod = tv->tv_sec; + grn_obj_touch_db(ctx, obj, tv); break; case GRN_TABLE_HASH_KEY : case GRN_TABLE_PAT_KEY : -------------- next part -------------- HTML����������������������������...Download