Navigation Menu

Skip to content

Commit

Permalink
mysql57: follow String::free() -> String::mem_free() change
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 14, 2015
1 parent 8d2ec62 commit 090212c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions mrn_mysql_compat.h
Expand Up @@ -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_ */
3 changes: 2 additions & 1 deletion udf/mrn_udf_command.cpp
Expand Up @@ -25,6 +25,7 @@
#include <mrn_windows.hpp>
#include <mrn_macro.hpp>
#include <mrn_database_manager.hpp>
#include <mrn_variables.hpp>

MRN_BEGIN_DECLS

Expand Down Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion udf/mrn_udf_snippet.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 090212c

Please sign in to comment.