[Groonga-commit] groonga/groonga at e3e7603 [master] Use meaningful name for variable name

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Tue May 17 21:59:12 JST 2016


Kouhei Sutou	2016-05-17 21:59:12 +0900 (Tue, 17 May 2016)

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

  Message:
    Use meaningful name for variable name

  Modified files:
    include/groonga/scorer.h
    lib/scorer.c

  Modified: include/groonga/scorer.h (+3 -3)
===================================================================
--- include/groonga/scorer.h    2016-05-17 17:43:51 +0900 (6247afd)
+++ include/groonga/scorer.h    2016-05-17 21:59:12 +0900 (7ee3f92)
@@ -74,7 +74,7 @@ typedef double grn_scorer_score_func(grn_ctx *ctx,
 
 /*
   grn_scorer_register() registers a plugin to the database which is
-  associated with `ctx'. `plugin_name_ptr' and `plugin_name_length' specify the
+  associated with `ctx'. `scorer_name_ptr' and `scorer_name_length' specify the
   plugin name. Alphabetic letters ('A'-'Z' and 'a'-'z'), digits ('0'-'9') and
   an underscore ('_') are capable characters.
 
@@ -84,8 +84,8 @@ typedef double grn_scorer_score_func(grn_ctx *ctx,
   code on failure.
  */
 GRN_PLUGIN_EXPORT grn_rc grn_scorer_register(grn_ctx *ctx,
-                                             const char *plugin_name_ptr,
-                                             int plugin_name_length,
+                                             const char *scorer_name_ptr,
+                                             int scorer_name_length,
                                              grn_scorer_score_func *score);
 
 #ifdef __cplusplus

  Modified: lib/scorer.c (+7 -7)
===================================================================
--- lib/scorer.c    2016-05-17 17:43:51 +0900 (2670bb3)
+++ lib/scorer.c    2016-05-17 21:59:12 +0900 (f1c110d)
@@ -157,24 +157,24 @@ grn_scorer_matched_record_get_n_args(grn_ctx *ctx,
 
 grn_rc
 grn_scorer_register(grn_ctx *ctx,
-                    const char *plugin_name_ptr,
-                    int plugin_name_length,
+                    const char *scorer_name_ptr,
+                    int scorer_name_length,
                     grn_scorer_score_func *score)
 {
-  if (plugin_name_length == -1) {
-    plugin_name_length = strlen(plugin_name_ptr);
+  if (scorer_name_length == -1) {
+    scorer_name_length = strlen(scorer_name_ptr);
   }
 
   {
     grn_obj *scorer_object = grn_proc_create(ctx,
-                                             plugin_name_ptr,
-                                             plugin_name_length,
+                                             scorer_name_ptr,
+                                             scorer_name_length,
                                              GRN_PROC_SCORER,
                                              NULL, NULL, NULL, 0, NULL);
     if (scorer_object == NULL) {
       GRN_PLUGIN_ERROR(ctx, GRN_SCORER_ERROR,
                        "[scorer][%.*s] failed to grn_proc_create()",
-                       plugin_name_length, plugin_name_ptr);
+                       scorer_name_length, scorer_name_ptr);
       return ctx->rc;
     }
 
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る