Kouhei Sutou
null+****@clear*****
Mon Feb 16 17:23:26 JST 2015
Kouhei Sutou 2015-02-16 17:23:26 +0900 (Mon, 16 Feb 2015) New Revision: afd40ece6ea5ec3a19773921d0b859f64a493e71 https://github.com/groonga/groonga/commit/afd40ece6ea5ec3a19773921d0b859f64a493e71 Message: Move grn_obj_is_builtin() to obj.c Modified files: include/groonga/groonga.h include/groonga/obj.h lib/db.c lib/obj.c Modified: include/groonga/groonga.h (+0 -2) =================================================================== --- include/groonga/groonga.h 2015-02-16 17:22:01 +0900 (0107185) +++ include/groonga/groonga.h 2015-02-16 17:23:26 +0900 (16bc424) @@ -837,8 +837,6 @@ GRN_API grn_obj *grn_obj_get_element_info(grn_ctx *ctx, grn_obj *obj, grn_id id, GRN_API grn_rc grn_obj_set_element_info(grn_ctx *ctx, grn_obj *obj, grn_id id, grn_info_type type, grn_obj *value); -GRN_API grn_bool grn_obj_is_builtin(grn_ctx *ctx, grn_obj *obj); - GRN_API grn_obj *grn_obj_get_value(grn_ctx *ctx, grn_obj *obj, grn_id id, grn_obj *value); GRN_API int grn_obj_get_values(grn_ctx *ctx, grn_obj *obj, grn_id offset, void **values); Modified: include/groonga/obj.h (+1 -0) =================================================================== --- include/groonga/obj.h 2015-02-16 17:22:01 +0900 (7f1408a) +++ include/groonga/obj.h 2015-02-16 17:23:26 +0900 (2a61f8c) @@ -23,6 +23,7 @@ extern "C" { #endif +GRN_API grn_bool grn_obj_is_builtin(grn_ctx *ctx, grn_obj *obj); GRN_API grn_bool grn_obj_is_table(grn_ctx *ctx, grn_obj *obj); #ifdef __cplusplus Modified: lib/db.c (+0 -15) =================================================================== --- lib/db.c 2015-02-16 17:22:01 +0900 (e76b105) +++ lib/db.c 2015-02-16 17:23:26 +0900 (b9cea06) @@ -7805,21 +7805,6 @@ grn_obj_set_element_info(grn_ctx *ctx, grn_obj *obj, grn_id id, GRN_API_RETURN(GRN_SUCCESS); } -grn_bool -grn_obj_is_builtin(grn_ctx *ctx, grn_obj *obj) -{ - grn_id id; - - if (!obj) { return GRN_FALSE; } - - id = grn_obj_id(ctx, obj); - if (id == GRN_ID_NIL) { - return GRN_FALSE; - } else { - return id < GRN_N_RESERVED_TYPES; - } -} - static void grn_hook_free(grn_ctx *ctx, grn_hook *h) { Modified: lib/obj.c (+16 -0) =================================================================== --- lib/obj.c 2015-02-16 17:22:01 +0900 (0ff8ef9) +++ lib/obj.c 2015-02-16 17:23:26 +0900 (036eeac) @@ -16,9 +16,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "grn.h" +#include "grn_db.h" #include <groonga/obj.h> grn_bool +grn_obj_is_builtin(grn_ctx *ctx, grn_obj *obj) +{ + grn_id id; + + if (!obj) { return GRN_FALSE; } + + id = grn_obj_id(ctx, obj); + if (id == GRN_ID_NIL) { + return GRN_FALSE; + } else { + return id < GRN_N_RESERVED_TYPES; + } +} + +grn_bool grn_obj_is_table(grn_ctx *ctx, grn_obj *obj) { grn_bool is_table = GRN_FALSE; -------------- next part -------------- HTML����������������������������...Download