[Groonga-commit] groonga/groonga at 6a44306 [master] mrb: use NUL terminated string

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Thu Aug 7 12:00:01 JST 2014


Kouhei Sutou	2014-08-07 12:00:01 +0900 (Thu, 07 Aug 2014)

  New Revision: 6a4430621817192abeb59277372dea3be3053b23
  https://github.com/groonga/groonga/commit/6a4430621817192abeb59277372dea3be3053b23

  Message:
    mrb: use NUL terminated string

  Modified files:
    lib/mrb/mrb_ctx.c

  Modified: lib/mrb/mrb_ctx.c (+2 -2)
===================================================================
--- lib/mrb/mrb_ctx.c    2014-08-07 11:22:33 +0900 (863651f)
+++ lib/mrb/mrb_ctx.c    2014-08-07 12:00:01 +0900 (2c3ac68)
@@ -111,7 +111,7 @@ ctx_set_error_file(mrb_state *mrb, mrb_value self)
 
   mrb_get_args(mrb, "S", &error_file);
   mrb_iv_set(mrb, self, mrb_intern_lit(mrb, "@error_file"), error_file);
-  ctx->errfile = RSTRING_PTR(error_file);
+  ctx->errfile = mrb_string_value_cstr(mrb, &error_file);
 
   return error_file;
 }
@@ -152,7 +152,7 @@ ctx_set_error_method(mrb_state *mrb, mrb_value self)
 
   mrb_get_args(mrb, "S", &error_method);
   mrb_iv_set(mrb, self, mrb_intern_lit(mrb, "@error_method"), error_method);
-  ctx->errfunc = RSTRING_PTR(error_method);
+  ctx->errfunc = mrb_string_value_cstr(mrb, &error_method);
 
   return error_method;
 }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index