[Groonga-commit] groonga/groonga at f6ca7e9 [master] mruby: use meanigful name

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 8 23:24:29 JST 2013


Kouhei Sutou	2013-10-08 23:24:29 +0900 (Tue, 08 Oct 2013)

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

  Message:
    mruby: use meanigful name

  Modified files:
    lib/mrb.c

  Modified: lib/mrb.c (+5 -5)
===================================================================
--- lib/mrb.c    2013-10-08 23:23:45 +0900 (63bc029)
+++ lib/mrb.c    2013-10-08 23:24:29 +0900 (339eebd)
@@ -102,7 +102,7 @@ grn_mrb_load(grn_ctx *ctx, const char *path)
 {
   mrb_state *mrb = ctx->impl->mrb.state;
   int n;
-  FILE *fp;
+  FILE *file;
   mrb_value result;
   struct mrb_parser_state *parser;
 
@@ -110,8 +110,8 @@ grn_mrb_load(grn_ctx *ctx, const char *path)
     return mrb_nil_value();
   }
 
-  fp = grn_mrb_open_script(ctx, path);
-  if (!fp) {
+  file = grn_mrb_open_script(ctx, path);
+  if (!file) {
     mrb_value exception;
     char message[BUFFER_SIZE];
     snprintf(message, BUFFER_SIZE - 1, "can't find script: <%s>", path);
@@ -120,13 +120,13 @@ grn_mrb_load(grn_ctx *ctx, const char *path)
     return mrb_nil_value();
   }
 
-  parser = mrb_parse_file(mrb, fp, NULL);
+  parser = mrb_parse_file(mrb, file, NULL);
   n = mrb_generate_code(mrb, parser);
   result = mrb_run(mrb,
                    mrb_proc_new(mrb, mrb->irep[n]),
                    mrb_top_self(mrb));
   mrb_parser_free(parser);
-  fclose(fp);
+  fclose(file);
 
   return result;
 }
-------------- next part --------------
HTML����������������������������...
下载 



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