Kouhei Sutou
null+****@clear*****
Wed Jul 13 15:15:26 JST 2016
Kouhei Sutou 2016-07-13 15:15:26 +0900 (Wed, 13 Jul 2016) New Revision: 571725b18041c76fcba357d50f03c0740f274e8d https://github.com/groonga/groonga/commit/571725b18041c76fcba357d50f03c0740f274e8d Message: Use llround() instead of round() Because time value is a signed 64bit integer. Modified files: lib/db.c Modified: lib/db.c (+2 -1) =================================================================== --- lib/db.c 2016-07-13 14:23:25 +0900 (85b1842) +++ lib/db.c 2016-07-13 15:15:26 +0900 (f8f1cb8) @@ -38,6 +38,7 @@ #include "grn_cache.h" #include "grn_window_functions.h" #include <string.h> +#include <math.h> typedef struct { grn_id id; @@ -6189,7 +6190,7 @@ grn_obj_cast_bool(grn_ctx *ctx, grn_obj *src, grn_obj *dest, #define TIME2TIME(ctx, dest, value)\ GRN_TIME_SET(ctx, dest, value); #define FLOAT2TIME(ctx, dest, value) do {\ - double usec = round(value * GRN_TIME_USEC_PER_SEC);\ + int64_t usec = llround(value * GRN_TIME_USEC_PER_SEC);\ GRN_TIME_SET(ctx, dest, usec);\ } while (0) -------------- next part -------------- HTML����������������������������... 下載