null+****@clear*****
null+****@clear*****
2011年 8月 28日 (日) 18:51:51 JST
Kouhei Sutou 2011-08-28 09:51:51 +0000 (Sun, 28 Aug 2011)
New Revision: 267db97f82abf0844e2f973a15b0c2ebdff962a1
Log:
export grn_ctx_close(). fixes #1035
Modified files:
include/groonga.h
Modified: include/groonga.h (+16 -4)
===================================================================
--- include/groonga.h 2011-08-28 09:19:54 +0000 (314dd26)
+++ include/groonga.h 2011-08-28 09:51:51 +0000 (1c4146a)
@@ -211,6 +211,17 @@ struct _grn_ctx {
GRN_API grn_rc grn_ctx_init(grn_ctx *ctx, int flags);
/**
+ * grn_ctx_fin:
+ * @ctx: 解放するctx構造体へのポインタを指定します。
+ *
+ * ctxの管理するメモリを解放し、使用を終了します。
+ *
+ * If @ctx is initialized by grn_ctx_open() not
+ * grn_ctx_init(). You need also to call grn_ctx_close().
+ **/
+GRN_API grn_rc grn_ctx_fin(grn_ctx *ctx);
+
+/**
* grn_ctx_open:
* @flags: 初期化するctxのオプションを指定します。
*
@@ -226,12 +237,13 @@ GRN_API grn_rc grn_ctx_init(grn_ctx *ctx, int flags);
GRN_API grn_ctx *grn_ctx_open(int flags);
/**
- * grn_ctx_fin:
- * @ctx: 解放するctx構造体へのポインタを指定します。
+ * grn_ctx_close:
+ * @ctx: no longer needed grn_ctx.
*
- * ctxの管理するメモリを解放し、使用を終了します。
+ * It calls grn_ctx_fin() and frees allocated memory for
+ * @ctx by grn_ctx_open().
**/
-GRN_API grn_rc grn_ctx_fin(grn_ctx *ctx);
+GRN_API grn_rc grn_ctx_close(grn_ctx *ctx);
/**
* grn_ctx_set_finalizer: