Kouhei Sutou
null+****@clear*****
Fri May 6 17:52:06 JST 2016
Kouhei Sutou 2016-05-06 17:52:06 +0900 (Fri, 06 May 2016) New Revision: e98aa120d71be1c8b0e7d9afe520c84e0f32471c https://github.com/groonga/groonga/commit/e98aa120d71be1c8b0e7d9afe520c84e0f32471c Message: Unify common code Modified files: lib/db.c Modified: lib/db.c (+2 -4) =================================================================== --- lib/db.c 2016-05-06 17:35:12 +0900 (d0ce0d5) +++ lib/db.c 2016-05-06 17:52:06 +0900 (794b9c5) @@ -655,9 +655,7 @@ grn_db_lastmod(grn_obj *s) void grn_db_touch(grn_ctx *ctx, grn_obj *s) { - grn_timeval tv; - grn_timeval_now(ctx, &tv); - grn_obj_io(s)->header->lastmod = tv.tv_sec; + grn_obj_touch(ctx, s, NULL); } #define IS_TEMP(obj) (DB_OBJ(obj)->id & GRN_OBJ_TMP_OBJECT) @@ -683,7 +681,7 @@ grn_obj_touch(grn_ctx *ctx, grn_obj *obj, grn_timeval *tv) case GRN_COLUMN_FIX_SIZE : case GRN_COLUMN_INDEX : if (!IS_TEMP(obj)) { - grn_obj_io(DB_OBJ(obj)->db)->header->lastmod = tv->tv_sec; + grn_obj_touch(ctx, DB_OBJ(obj)->db, tv); } break; } -------------- next part -------------- HTML����������������������������... Download