[Groonga-commit] groonga/groonga [master] Use GRN_PROC_ALLOC instead of grn_expr_alloc from cast.c

Back to archive index

null+****@clear***** null+****@clear*****
2010年 6月 15日 (火) 09:06:26 JST


Daijiro MORI	2010-06-15 00:06:26 +0000 (Tue, 15 Jun 2010)

  New Revision: 2cb24a69cb4c1d3f0e3fcc8be7cc04c01b271cba

  Log:
    Use GRN_PROC_ALLOC instead of grn_expr_alloc from cast.c

  Modified files:
    modules/functions/cast.c

  Modified: modules/functions/cast.c (+3 -6)
===================================================================
--- modules/functions/cast.c    2010-06-14 23:58:06 +0000 (d5aa1f6)
+++ modules/functions/cast.c    2010-06-15 00:06:26 +0000 (5aa590d)
@@ -23,15 +23,12 @@
 static grn_obj *
 func_cast(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
 {
-  grn_obj *obj, *caller;
-  uint32_t nvars;
-  grn_expr_var *vars;
-  grn_proc_get_info(ctx, user_data, &vars, &nvars, &caller);
+  grn_obj *obj;
   if (nargs == 2 && GRN_DB_OBJP(args[1])) {
-    obj = grn_expr_alloc(ctx, caller, DB_OBJ(args[1])->id, 0);
+    obj = GRN_PROC_ALLOC(DB_OBJ(args[1])->id, 0);
     grn_obj_cast(ctx, args[0], obj, 0);
   } else {
-    obj = grn_expr_alloc(ctx, caller, GRN_DB_INT32, 0);
+    obj = GRN_PROC_ALLOC(GRN_DB_INT32, 0);
   }
   return obj;
 }




Groonga-commit メーリングリストの案内
Back to archive index