Navigation Menu

Skip to content

Commit

Permalink
doc:add grn_plugin_expr_var_init and grn_plugin_command_create
Browse files Browse the repository at this point in the history
TODO:

Translate it in doc/locale/ja/LC_MESSAGES/reference.po
Translate it in doc/locale/en/LC_MESSAGES/reference.po
  • Loading branch information
naoa committed Jun 20, 2014
1 parent da3d36a commit a6a5311
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/source/reference/api/plugin.rst
Expand Up @@ -32,3 +32,22 @@ Reference
:param offset: The offset position of the variable.
:return: A variable value on success, NULL otherwise.
.. c:function:: grn_rc grn_plugin_expr_var_init(grn_ctx *ctx, grn_expr_var *var, const char *name, int name_size);
It initializes a `grn_expr_var`.
:param var: The pointer of `grn_expr_var` object to initialize.
:param name: The name of `grn_expr_var` object to initialize.
:param name_size: The number of bytes of name. If `name_size` is negative, `name` must be NUL-terminated. `name_size` is computed by `strlen(name)` for the case.
:return: ``GRN_SUCCESS``. It doesn't fail.
.. c:function:: grn_obj * grn_plugin_command_create(grn_ctx *ctx, const char *name, int name_size, grn_proc_func func, unsigned int n_vars, grn_expr_var *vars);
It creates a command.
:param name: The `proc` name of the command to create.
:param name_size: The number of bytes of name. If `name_size` is negative, `name` must be NUL-terminated. `name_size` is computed by `strlen(name)` for the case.
:param func: The function name to be called by the created command.
:param n_vars: The number of the variables of the command to create.
:param vars: The pointer of initialized `grn_expr_var` object.
:return: ``GRN_SUCCESS``. It doesn't fail.

0 comments on commit a6a5311

Please sign in to comment.