Kouhei Sutou
null+****@clear*****
Fri Feb 6 10:21:56 JST 2015
Kouhei Sutou 2015-02-06 10:21:56 +0900 (Fri, 06 Feb 2015) New Revision: 76ed2034456237fad86054745ebb72c94b736060 https://github.com/groonga/groonga/commit/76ed2034456237fad86054745ebb72c94b736060 Message: Export table columns output function Modified files: include/groonga/output.h lib/ctx.c lib/grn_output.h lib/output.c Modified: include/groonga/output.h (+3 -0) =================================================================== --- include/groonga/output.h 2015-02-06 10:17:51 +0900 (ccdc252) +++ include/groonga/output.h 2015-02-06 10:21:56 +0900 (6f01b9a) @@ -85,6 +85,9 @@ GRN_API void grn_ctx_output_str(grn_ctx *ctx, GRN_API void grn_ctx_output_bool(grn_ctx *ctx, grn_bool value); GRN_API void grn_ctx_output_obj(grn_ctx *ctx, grn_obj *value, grn_obj_format *format); +GRN_API void grn_ctx_output_table_columns(grn_ctx *ctx, + grn_obj *table, + grn_obj_format *format); GRN_API grn_content_type grn_ctx_get_output_type(grn_ctx *ctx); Modified: lib/ctx.c (+11 -0) =================================================================== --- lib/ctx.c 2015-02-06 10:17:51 +0900 (80691cf) +++ lib/ctx.c 2015-02-06 10:21:56 +0900 (d437fac) @@ -3097,3 +3097,14 @@ grn_ctx_output_obj(grn_ctx *ctx, grn_obj *value, grn_obj_format *format) grn_output_obj(ctx, ctx->impl->outbuf, ctx->impl->output_type, value, format); } + +void +grn_ctx_output_table_columns(grn_ctx *ctx, grn_obj *table, + grn_obj_format *format) +{ + grn_output_table_columns(ctx, + ctx->impl->outbuf, + ctx->impl->output_type, + table, + format); +} Modified: lib/grn_output.h (+8 -0) =================================================================== --- lib/grn_output.h 2015-02-06 10:17:51 +0900 (7602ca7) +++ lib/grn_output.h 2015-02-06 10:21:56 +0900 (ffa71ba) @@ -48,6 +48,12 @@ GRN_API void grn_output_bool(grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, grn_bool value); +GRN_API void grn_output_table_columns(grn_ctx *ctx, + grn_obj *outbuf, + grn_content_type output_type, + grn_obj *table, + grn_obj_format *format); + #define GRN_OUTPUT_ARRAY_OPEN(name,nelements) \ (grn_ctx_output_array_open(ctx, name, nelements)) #define GRN_OUTPUT_ARRAY_CLOSE() \ @@ -70,6 +76,8 @@ GRN_API void grn_output_bool(grn_ctx *ctx, grn_obj *outbuf, (grn_ctx_output_bool(ctx, value)) #define GRN_OUTPUT_OBJ(obj,format)\ (grn_ctx_output_obj(ctx, obj, format)) +#define GRN_OUTPUT_TABLE_COLUMNS(table,format)\ + (grn_ctx_output_table_column(ctx, table, format)) #ifdef __cplusplus } Modified: lib/output.c (+1 -1) =================================================================== --- lib/output.c 2015-02-06 10:17:51 +0900 (9dc3147) +++ lib/output.c 2015-02-06 10:21:56 +0900 (e1070ec) @@ -1294,7 +1294,7 @@ grn_output_table_columns_by_columns(grn_ctx *ctx, grn_obj *outbuf, grn_output_array_close(ctx, outbuf, output_type); } -static inline void +void grn_output_table_columns(grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, grn_obj *table, grn_obj_format *format) -------------- next part -------------- HTML����������������������������... Download