Kouhei Sutou
null+****@clear*****
Thu May 9 19:04:03 JST 2013
Kouhei Sutou 2013-05-09 19:04:03 +0900 (Thu, 09 May 2013) New Revision: 369f407d96c9dd9a8cf9149af8f134b20729c007 https://github.com/groonga/groonga/commit/369f407d96c9dd9a8cf9149af8f134b20729c007 Message: Start moving documents in Japanese in .h to doc/source/ Added files: doc/source/reference/api/grn_ctx.txt Modified files: doc/files.am doc/source/reference/api.txt include/groonga.h Modified: doc/files.am (+2 -0) =================================================================== --- doc/files.am 2013-05-09 18:22:57 +0900 (3a165f1) +++ doc/files.am 2013-05-09 19:04:03 +0900 (c01aee9) @@ -336,6 +336,7 @@ absolute_source_files = \ $(top_srcdir)/doc/source/rdoc.py \ $(top_srcdir)/doc/source/reference.txt \ $(top_srcdir)/doc/source/reference/api.txt \ + $(top_srcdir)/doc/source/reference/api/grn_ctx.txt \ $(top_srcdir)/doc/source/reference/api/grn_expr.txt \ $(top_srcdir)/doc/source/reference/cast.txt \ $(top_srcdir)/doc/source/reference/command.txt \ @@ -784,6 +785,7 @@ source_files_relative_from_doc_dir = \ source/rdoc.py \ source/reference.txt \ source/reference/api.txt \ + source/reference/api/grn_ctx.txt \ source/reference/api/grn_expr.txt \ source/reference/cast.txt \ source/reference/command.txt \ Modified: doc/source/reference/api.txt (+8 -1) =================================================================== --- doc/source/reference/api.txt 2013-05-09 18:22:57 +0900 (dff7394) +++ doc/source/reference/api.txt 2013-05-09 19:04:03 +0900 (b209e70) @@ -5,4 +5,11 @@ API === -TODO... +Groonga can be used as a fulltext search library. This section +describes APIs that are provided by groonga. + +.. toctree:: + :maxdepth: 1 + :glob: + + api/* Added: doc/source/reference/api/grn_ctx.txt (+49 -0) 100644 =================================================================== --- /dev/null +++ doc/source/reference/api/grn_ctx.txt 2013-05-09 19:04:03 +0900 (19279ee) @@ -0,0 +1,49 @@ +.. -*- rst -*- + +.. highlightlang:: none + +``grn_ctx`` +=========== + +Summary +------- + +:c:type:`grn_ctx` is the most important object. :c:type:`grn_ctx` +keeps the current infomation such as: + +* The last occurred error. +* The current encoding. +* The default thresholds. (e.g. :ref:`match-escalation-threshold`) +* The default command version. (See :doc:`/reference/command/command_version`) + +:c:type:`grn_ctx` provides platform features such as: + +* Memory management. +* Logging. + +Most APIs receive :c:type:`grn_ctx` as the first argument. + +You can't use the same :c:type:`grn_ctx` from two or more threads. You +need to create a :c:type:`grn_ctx` for a thread. You can use two or +more :c:type:`grn_ctx` in a thread but it is not needed for usual +use-case. + +Example +------- + +TODO... + +Reference +--------- + +.. c:type:: grn_ctx + + TODO... + +.. c:function:: grn_rc grn_ctx_init(grn_ctx *ctx, int flags) + + ctxを初期化します。 + + :param ctx: 初期化するctx構造体へのポインタを指定します。 + :param flags: 初期化する ``ctx`` のオプションを指定します。 + :return: ``GRN_SUCCESS`` on success, not ``GRN_SUCCESS`` on error. Modified: include/groonga.h (+0 -8) =================================================================== --- include/groonga.h 2013-05-09 18:22:57 +0900 (b0fe5f4) +++ include/groonga.h 2013-05-09 19:04:03 +0900 (336111b) @@ -215,14 +215,6 @@ struct _grn_ctx { #define GRN_CTX_USER_DATA(ctx) (&((ctx)->user_data)) -/** - * grn_ctx_init: - * @ctx: 初期化するctx構造体へのポインタを指定します。 - * @flags: 初期化するctxのオプションを指定します。 - * - * ctxを初期化します。 - **/ - #define GRN_CTX_USE_QL (0x03) #define GRN_CTX_BATCH_MODE (0x04) #define GRN_CTX_PER_DB (0x08) -------------- next part -------------- HTML����������������������������... Download