[Groonga-mysql-commit] mroonga/mroonga [master] Add const to unmodified string

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 16 00:34:25 JST 2013


Kouhei Sutou	2013-04-16 00:34:25 +0900 (Tue, 16 Apr 2013)

  New Revision: 65e6222777bd39b6f000a2e4eccefdf531d06154
  https://github.com/mroonga/mroonga/commit/65e6222777bd39b6f000a2e4eccefdf531d06154

  Message:
    Add const to unmodified string

  Modified files:
    mrn_table.cpp

  Modified: mrn_table.cpp (+3 -3)
===================================================================
--- mrn_table.cpp    2013-04-16 00:33:40 +0900 (3c414fc)
+++ mrn_table.cpp    2013-04-16 00:34:25 +0900 (26f9d9c)
@@ -57,9 +57,9 @@ extern handlerton *mrn_hton_ptr;
 extern HASH mrn_allocated_thds;
 extern pthread_mutex_t mrn_allocated_thds_mutex;
 
-static char *mrn_get_string_between_quote(char *ptr)
+static char *mrn_get_string_between_quote(const char *ptr)
 {
-  char *start_ptr, *end_ptr, *tmp_ptr, *esc_ptr;
+  const char *start_ptr, *end_ptr, *tmp_ptr, *esc_ptr;
   bool find_flg = FALSE, esc_flg = FALSE;
   MRN_DBUG_ENTER_FUNCTION();
 
@@ -121,7 +121,7 @@ static char *mrn_get_string_between_quote(char *ptr)
   char *extracted_string = (char *)my_malloc(length + 1, MYF(MY_WME));
   if (esc_flg) {
     size_t extracted_index = 0;
-    char *current_ptr = start_ptr;
+    const char *current_ptr = start_ptr;
     while (current_ptr < end_ptr) {
       if (*current_ptr != '\\') {
         extracted_string[extracted_index] = *current_ptr;
-------------- next part --------------
HTML����������������������������...
Download 



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