Kouhei Sutou
null+****@clear*****
Sat Mar 14 23:33:13 JST 2015
Kouhei Sutou 2015-03-14 23:33:13 +0900 (Sat, 14 Mar 2015) New Revision: 090212caa0a8537b92e492b06fbbf80c4fe1374f https://github.com/mroonga/mroonga/commit/090212caa0a8537b92e492b06fbbf80c4fe1374f Message: mysql57: follow String::free() -> String::mem_free() change Modified files: mrn_mysql_compat.h udf/mrn_udf_command.cpp udf/mrn_udf_snippet.cpp Modified: mrn_mysql_compat.h (+6 -0) =================================================================== --- mrn_mysql_compat.h 2015-03-14 23:26:22 +0900 (ceb9ca5) +++ mrn_mysql_compat.h 2015-03-14 23:33:13 +0900 (6d4bb54) @@ -152,4 +152,10 @@ # define mrn_my_malloc(size, flags) my_malloc(size, flags) #endif +#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) +# define MRN_STRING_FREE(string) string.mem_free(); +#else +# define MRN_STRING_FREE(string) string.free(); +#endif + #endif /* MRN_MYSQL_COMPAT_H_ */ Modified: udf/mrn_udf_command.cpp (+2 -1) =================================================================== --- udf/mrn_udf_command.cpp 2015-03-14 23:26:22 +0900 (9568748) +++ udf/mrn_udf_command.cpp 2015-03-14 23:33:13 +0900 (ddf3e4e) @@ -25,6 +25,7 @@ #include <mrn_windows.hpp> #include <mrn_macro.hpp> #include <mrn_database_manager.hpp> +#include <mrn_variables.hpp> MRN_BEGIN_DECLS @@ -163,7 +164,7 @@ MRN_API void mroonga_command_deinit(UDF_INIT *initid) grn_obj_close(&(info->ctx), info->db); } grn_ctx_fin(&(info->ctx)); - info->result.free(); + MRN_STRING_FREE(info->result); my_free(info); } } Modified: udf/mrn_udf_snippet.cpp (+1 -1) =================================================================== --- udf/mrn_udf_snippet.cpp 2015-03-14 23:26:22 +0900 (80d8080) +++ udf/mrn_udf_snippet.cpp 2015-03-14 23:33:13 +0900 (22ec088) @@ -293,7 +293,7 @@ MRN_API void mroonga_snippet_deinit(UDF_INIT *initid) if (snip_info->snippet) { grn_obj_close(&snip_info->ctx, snip_info->snippet); } - snip_info->result_str.free(); + MRN_STRING_FREE(snip_info->result_str); grn_obj_close(&snip_info->ctx, grn_ctx_db(&snip_info->ctx)); grn_ctx_fin(&snip_info->ctx); my_free(snip_info); -------------- next part -------------- HTML����������������������������... 下载