[Groonga-mysql-commit] mroonga/mroonga at 46649c3 [master] Use my_strndup()

Back to archive index

Kouhei Sutou null+****@clear*****
Sun May 19 22:22:34 JST 2013


Kouhei Sutou	2013-05-19 22:22:34 +0900 (Sun, 19 May 2013)

  New Revision: 46649c3f6bf66a91c61507eb8d2a6b7bff358621
  https://github.com/mroonga/mroonga/commit/46649c3f6bf66a91c61507eb8d2a6b7bff358621

  Message:
    Use my_strndup()
    
    Because strndup() doesn't exit on Windows.

  Modified files:
    lib/mrn_parameters_parser.cpp

  Modified: lib/mrn_parameters_parser.cpp (+4 -4)
===================================================================
--- lib/mrn_parameters_parser.cpp    2013-05-19 13:44:19 +0900 (668f6a0)
+++ lib/mrn_parameters_parser.cpp    2013-05-19 22:22:34 +0900 (a194845)
@@ -28,12 +28,12 @@ namespace mrn {
 
     Parameter(const char *key, unsigned int key_length,
               const char *value, unsigned int value_length)
-      : key_(strndup(key, key_length)),
-        value_(strndup(value, value_length)) {
+      : key_(my_strndup(key, key_length, MYF(0))),
+        value_(my_strndup(value, value_length, MYF(0))) {
     };
     ~Parameter() {
-      delete key_;
-      delete value_;
+      my_free(key_);
+      my_free(value_);
     };
   };
 
-------------- next part --------------
HTML����������������������������...
Download 



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