Kouhei Sutou
null+****@clear*****
Sun Jan 24 22:22:00 JST 2016
Kouhei Sutou 2016-01-24 22:22:00 +0900 (Sun, 24 Jan 2016) New Revision: abed874cb4090f24bef5801df336eba8145631c1 https://github.com/pgroonga/pgroonga/commit/abed874cb4090f24bef5801df336eba8145631c1 Message: Support creating anonymous table Modified files: src/pgrn_groonga.c Modified: src/pgrn_groonga.c (+9 -2) =================================================================== --- src/pgrn_groonga.c 2016-01-24 22:21:35 +0900 (c2d532b) +++ src/pgrn_groonga.c 2016-01-24 22:22:00 +0900 (c5d7788) @@ -140,10 +140,17 @@ PGrnCreateTable(const char *name, grn_obj *type) { grn_obj *table; + unsigned int nameSize = 0; + + if (name) + { + nameSize = strlen(name); + flags |= GRN_OBJ_PERSISTENT; + } table = grn_table_create(ctx, - name, strlen(name), NULL, - GRN_OBJ_PERSISTENT | flags, + name, nameSize, NULL, + flags, type, NULL); PGrnCheck("pgroonga: failed to create table"); -------------- next part -------------- HTML����������������������������...Download