[Groonga-commit] groonga/groonga [master] Cast UInt32 to Int64 for -X

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Mar 5 00:02:30 JST 2013


Kouhei Sutou	2013-03-05 00:02:30 +0900 (Tue, 05 Mar 2013)

  New Revision: ac661e148a103229a8d7fb1f8f0c95f3d1dd87f3
  https://github.com/groonga/groonga/commit/ac661e148a103229a8d7fb1f8f0c95f3d1dd87f3

  Log:
    Cast UInt32 to Int64 for -X
    
    Because -X must be negative.

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+2 -1)
===================================================================
--- lib/expr.c    2013-03-05 00:01:10 +0900 (0d96123)
+++ lib/expr.c    2013-03-05 00:02:30 +0900 (e7aa765)
@@ -2263,7 +2263,8 @@ grn_proc_call(grn_ctx *ctx, grn_obj *proc, int nargs, grn_obj *caller)
       unsigned int x_;                                                  \
       x_ = GRN_UINT32_VALUE(x);                                         \
       left_expression_check(x_);                                        \
-      GRN_UINT32_SET(ctx, res, integer_operation(x_));                  \
+      GRN_INT64_SET(ctx, res, integer_operation(x_));                   \
+      res->header.domain = GRN_DB_INT64;                                \
     }                                                                   \
     break;                                                              \
   case GRN_DB_INT64 :                                                   \
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index