예제 #1
0
static void
bench_geo_distance(gpointer user_data)
{
  BenchmarkData *data = user_data;

  grn_proc_call(data->context, data->geo_distance_proc,
                2, data->expression);
}
예제 #2
0
파일: command.c 프로젝트: AkioKanno/groonga
grn_rc
grn_command_run(grn_ctx *ctx,
                grn_obj *command,
                grn_command_input *input)
{
  grn_proc *proc;

  GRN_API_ENTER;

  proc = (grn_proc *)command;
  if (proc->callbacks.command.run) {
    proc->callbacks.command.run(ctx, command, input, proc->user_data);
  } else {
    /* TODO: REMOVE ME. For backward compatibility. */
    uint32_t stack_curr = ctx->impl->stack_curr;
    grn_proc_call(ctx, command, 0, command);
    if (ctx->impl->stack_curr > stack_curr) {
      grn_ctx_pop(ctx);
    }
  }

  GRN_API_RETURN(ctx->rc);
}