rroonga 1.3.1-x86-mingw32 → 2.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/Rakefile +2 -7
- data/ext/groonga/rb-grn-column.c +34 -37
- data/ext/groonga/rb-grn-context.c +63 -2
- data/ext/groonga/rb-grn-expression.c +21 -13
- data/ext/groonga/rb-grn-object.c +2 -0
- data/ext/groonga/rb-grn-table.c +57 -51
- data/ext/groonga/rb-grn.h +10 -4
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga/schema.rb +75 -46
- data/lib/groonga.rb +9 -6
- data/rroonga-build.rb +2 -2
- data/test/run-test.rb +1 -2
- data/test/test-table-select.rb +0 -5
- data/test/test-type.rb +2 -2
- data/test/test-version.rb +40 -10
- data/vendor/local/bin/grntest.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/bin/libmecab-1.dll +0 -0
- data/vendor/local/bin/libmsgpack-3.dll +0 -0
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/bin/libstdc++-6.dll +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/include/groonga/groonga/plugin.h +113 -0
- data/vendor/local/include/groonga/groonga/tokenizer.h +146 -0
- data/vendor/local/include/groonga/groonga.h +18 -18
- data/vendor/local/include/msgpack/object.h +98 -0
- data/vendor/local/include/msgpack/object.hpp +412 -0
- data/vendor/local/include/msgpack/pack.h +143 -0
- data/vendor/local/include/msgpack/pack.hpp +318 -0
- data/vendor/local/include/msgpack/pack_define.h +26 -0
- data/vendor/local/include/msgpack/pack_template.h +766 -0
- data/vendor/local/include/msgpack/sbuffer.h +111 -0
- data/vendor/local/include/msgpack/sbuffer.hpp +112 -0
- data/vendor/local/include/msgpack/sysdep.h +195 -0
- data/vendor/local/include/msgpack/type/bool.hpp +55 -0
- data/vendor/local/include/msgpack/type/define.hpp +3279 -0
- data/vendor/local/include/msgpack/type/deque.hpp +77 -0
- data/vendor/local/include/msgpack/type/fixint.hpp +172 -0
- data/vendor/local/include/msgpack/type/float.hpp +82 -0
- data/vendor/local/include/msgpack/type/int.hpp +211 -0
- data/vendor/local/include/msgpack/type/list.hpp +77 -0
- data/vendor/local/include/msgpack/type/map.hpp +205 -0
- data/vendor/local/include/msgpack/type/nil.hpp +65 -0
- data/vendor/local/include/msgpack/type/pair.hpp +61 -0
- data/vendor/local/include/msgpack/type/raw.hpp +94 -0
- data/vendor/local/include/msgpack/type/set.hpp +122 -0
- data/vendor/local/include/msgpack/type/string.hpp +62 -0
- data/vendor/local/include/msgpack/type/tr1/unordered_map.hpp +129 -0
- data/vendor/local/include/msgpack/type/tr1/unordered_set.hpp +122 -0
- data/vendor/local/include/msgpack/type/tuple.hpp +13691 -0
- data/vendor/local/include/msgpack/type/vector.hpp +81 -0
- data/vendor/local/include/msgpack/type.hpp +16 -0
- data/vendor/local/include/msgpack/unpack.h +260 -0
- data/vendor/local/include/msgpack/unpack.hpp +374 -0
- data/vendor/local/include/msgpack/unpack_define.h +93 -0
- data/vendor/local/include/msgpack/unpack_template.h +409 -0
- data/vendor/local/include/msgpack/version.h +40 -0
- data/vendor/local/include/msgpack/vrefbuffer.h +142 -0
- data/vendor/local/include/msgpack/vrefbuffer.hpp +97 -0
- data/vendor/local/include/msgpack/zbuffer.h +207 -0
- data/vendor/local/include/msgpack/zbuffer.hpp +100 -0
- data/vendor/local/include/msgpack/zone.h +147 -0
- data/vendor/local/include/msgpack/zone.hpp +455 -0
- data/vendor/local/include/msgpack.h +30 -0
- data/vendor/local/include/msgpack.hpp +24 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.la +2 -2
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +2 -2
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +2 -2
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +41 -0
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +41 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +4 -4
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/commands/suggest.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/report.txt +6 -7
- data/vendor/local/share/doc/groonga/en/html/_sources/indexing.txt +108 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.2.x.txt +386 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +51 -385
- data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/spec/search.txt +4 -4
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/select.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/rand.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +14 -8
- data/vendor/local/share/doc/groonga/en/html/indexing.html +237 -0
- data/vendor/local/share/doc/groonga/en/html/install.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/log.html +20 -20
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +566 -0
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news.html +65 -464
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference.html +14 -8
- data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/spec.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/suggest.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/report.txt +6 -7
- data/vendor/local/share/doc/groonga/ja/html/_sources/indexing.txt +108 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.2.x.txt +386 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +51 -385
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/spec/search.txt +4 -4
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/select.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/index.html +14 -8
- data/vendor/local/share/doc/groonga/ja/html/indexing.html +215 -0
- data/vendor/local/share/doc/groonga/ja/html/install.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/log.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +528 -0
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news.html +62 -425
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference.html +14 -8
- data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/spec.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/source/commands/suggest.txt +1 -1
- data/vendor/local/share/doc/groonga/source/contribution/report.txt +6 -7
- data/vendor/local/share/doc/groonga/source/indexing.txt +108 -0
- data/vendor/local/share/doc/groonga/source/news/1.2.x.txt +386 -0
- data/vendor/local/share/doc/groonga/source/news.txt +51 -385
- data/vendor/local/share/doc/groonga/source/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/source/spec/search.txt +4 -4
- data/vendor/local/share/license/groonga/COPYING +10 -12
- data/vendor/local/share/license/msgpack/AUTHORS +1 -0
- data/vendor/local/share/license/msgpack/COPYING +14 -0
- data/vendor/local/share/license/msgpack/LICENSE +202 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +113 -5
- data/vendor/local/share/man/man1/groonga.1 +142 -11
- metadata +66 -3
- data/vendor/local/share/doc/groonga/source/update_execution_example.py +0 -141
@@ -0,0 +1,766 @@
|
|
1
|
+
/*
|
2
|
+
* MessagePack packing routine template
|
3
|
+
*
|
4
|
+
* Copyright (C) 2008-2010 FURUHASHI Sadayuki
|
5
|
+
*
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
* you may not use this file except in compliance with the License.
|
8
|
+
* You may obtain a copy of the License at
|
9
|
+
*
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
*
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
* See the License for the specific language governing permissions and
|
16
|
+
* limitations under the License.
|
17
|
+
*/
|
18
|
+
|
19
|
+
#if defined(__LITTLE_ENDIAN__)
|
20
|
+
#define TAKE8_8(d) ((uint8_t*)&d)[0]
|
21
|
+
#define TAKE8_16(d) ((uint8_t*)&d)[0]
|
22
|
+
#define TAKE8_32(d) ((uint8_t*)&d)[0]
|
23
|
+
#define TAKE8_64(d) ((uint8_t*)&d)[0]
|
24
|
+
#elif defined(__BIG_ENDIAN__)
|
25
|
+
#define TAKE8_8(d) ((uint8_t*)&d)[0]
|
26
|
+
#define TAKE8_16(d) ((uint8_t*)&d)[1]
|
27
|
+
#define TAKE8_32(d) ((uint8_t*)&d)[3]
|
28
|
+
#define TAKE8_64(d) ((uint8_t*)&d)[7]
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#ifndef msgpack_pack_inline_func
|
32
|
+
#error msgpack_pack_inline_func template is not defined
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#ifndef msgpack_pack_user
|
36
|
+
#error msgpack_pack_user type is not defined
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifndef msgpack_pack_append_buffer
|
40
|
+
#error msgpack_pack_append_buffer callback is not defined
|
41
|
+
#endif
|
42
|
+
|
43
|
+
|
44
|
+
/*
|
45
|
+
* Integer
|
46
|
+
*/
|
47
|
+
|
48
|
+
#define msgpack_pack_real_uint8(x, d) \
|
49
|
+
do { \
|
50
|
+
if(d < (1<<7)) { \
|
51
|
+
/* fixnum */ \
|
52
|
+
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1); \
|
53
|
+
} else { \
|
54
|
+
/* unsigned 8 */ \
|
55
|
+
unsigned char buf[2] = {0xcc, TAKE8_8(d)}; \
|
56
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
57
|
+
} \
|
58
|
+
} while(0)
|
59
|
+
|
60
|
+
#define msgpack_pack_real_uint16(x, d) \
|
61
|
+
do { \
|
62
|
+
if(d < (1<<7)) { \
|
63
|
+
/* fixnum */ \
|
64
|
+
msgpack_pack_append_buffer(x, &TAKE8_16(d), 1); \
|
65
|
+
} else if(d < (1<<8)) { \
|
66
|
+
/* unsigned 8 */ \
|
67
|
+
unsigned char buf[2] = {0xcc, TAKE8_16(d)}; \
|
68
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
69
|
+
} else { \
|
70
|
+
/* unsigned 16 */ \
|
71
|
+
unsigned char buf[3]; \
|
72
|
+
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
|
73
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
74
|
+
} \
|
75
|
+
} while(0)
|
76
|
+
|
77
|
+
#define msgpack_pack_real_uint32(x, d) \
|
78
|
+
do { \
|
79
|
+
if(d < (1<<8)) { \
|
80
|
+
if(d < (1<<7)) { \
|
81
|
+
/* fixnum */ \
|
82
|
+
msgpack_pack_append_buffer(x, &TAKE8_32(d), 1); \
|
83
|
+
} else { \
|
84
|
+
/* unsigned 8 */ \
|
85
|
+
unsigned char buf[2] = {0xcc, TAKE8_32(d)}; \
|
86
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
87
|
+
} \
|
88
|
+
} else { \
|
89
|
+
if(d < (1<<16)) { \
|
90
|
+
/* unsigned 16 */ \
|
91
|
+
unsigned char buf[3]; \
|
92
|
+
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
|
93
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
94
|
+
} else { \
|
95
|
+
/* unsigned 32 */ \
|
96
|
+
unsigned char buf[5]; \
|
97
|
+
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
|
98
|
+
msgpack_pack_append_buffer(x, buf, 5); \
|
99
|
+
} \
|
100
|
+
} \
|
101
|
+
} while(0)
|
102
|
+
|
103
|
+
#define msgpack_pack_real_uint64(x, d) \
|
104
|
+
do { \
|
105
|
+
if(d < (1ULL<<8)) { \
|
106
|
+
if(d < (1ULL<<7)) { \
|
107
|
+
/* fixnum */ \
|
108
|
+
msgpack_pack_append_buffer(x, &TAKE8_64(d), 1); \
|
109
|
+
} else { \
|
110
|
+
/* unsigned 8 */ \
|
111
|
+
unsigned char buf[2] = {0xcc, TAKE8_64(d)}; \
|
112
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
113
|
+
} \
|
114
|
+
} else { \
|
115
|
+
if(d < (1ULL<<16)) { \
|
116
|
+
/* unsigned 16 */ \
|
117
|
+
unsigned char buf[3]; \
|
118
|
+
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
|
119
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
120
|
+
} else if(d < (1ULL<<32)) { \
|
121
|
+
/* unsigned 32 */ \
|
122
|
+
unsigned char buf[5]; \
|
123
|
+
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
|
124
|
+
msgpack_pack_append_buffer(x, buf, 5); \
|
125
|
+
} else { \
|
126
|
+
/* unsigned 64 */ \
|
127
|
+
unsigned char buf[9]; \
|
128
|
+
buf[0] = 0xcf; _msgpack_store64(&buf[1], d); \
|
129
|
+
msgpack_pack_append_buffer(x, buf, 9); \
|
130
|
+
} \
|
131
|
+
} \
|
132
|
+
} while(0)
|
133
|
+
|
134
|
+
#define msgpack_pack_real_int8(x, d) \
|
135
|
+
do { \
|
136
|
+
if(d < -(1<<5)) { \
|
137
|
+
/* signed 8 */ \
|
138
|
+
unsigned char buf[2] = {0xd0, TAKE8_8(d)}; \
|
139
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
140
|
+
} else { \
|
141
|
+
/* fixnum */ \
|
142
|
+
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1); \
|
143
|
+
} \
|
144
|
+
} while(0)
|
145
|
+
|
146
|
+
#define msgpack_pack_real_int16(x, d) \
|
147
|
+
do { \
|
148
|
+
if(d < -(1<<5)) { \
|
149
|
+
if(d < -(1<<7)) { \
|
150
|
+
/* signed 16 */ \
|
151
|
+
unsigned char buf[3]; \
|
152
|
+
buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
|
153
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
154
|
+
} else { \
|
155
|
+
/* signed 8 */ \
|
156
|
+
unsigned char buf[2] = {0xd0, TAKE8_16(d)}; \
|
157
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
158
|
+
} \
|
159
|
+
} else if(d < (1<<7)) { \
|
160
|
+
/* fixnum */ \
|
161
|
+
msgpack_pack_append_buffer(x, &TAKE8_16(d), 1); \
|
162
|
+
} else { \
|
163
|
+
if(d < (1<<8)) { \
|
164
|
+
/* unsigned 8 */ \
|
165
|
+
unsigned char buf[2] = {0xcc, TAKE8_16(d)}; \
|
166
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
167
|
+
} else { \
|
168
|
+
/* unsigned 16 */ \
|
169
|
+
unsigned char buf[3]; \
|
170
|
+
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
|
171
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
172
|
+
} \
|
173
|
+
} \
|
174
|
+
} while(0)
|
175
|
+
|
176
|
+
#define msgpack_pack_real_int32(x, d) \
|
177
|
+
do { \
|
178
|
+
if(d < -(1<<5)) { \
|
179
|
+
if(d < -(1<<15)) { \
|
180
|
+
/* signed 32 */ \
|
181
|
+
unsigned char buf[5]; \
|
182
|
+
buf[0] = 0xd2; _msgpack_store32(&buf[1], (int32_t)d); \
|
183
|
+
msgpack_pack_append_buffer(x, buf, 5); \
|
184
|
+
} else if(d < -(1<<7)) { \
|
185
|
+
/* signed 16 */ \
|
186
|
+
unsigned char buf[3]; \
|
187
|
+
buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
|
188
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
189
|
+
} else { \
|
190
|
+
/* signed 8 */ \
|
191
|
+
unsigned char buf[2] = {0xd0, TAKE8_32(d)}; \
|
192
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
193
|
+
} \
|
194
|
+
} else if(d < (1<<7)) { \
|
195
|
+
/* fixnum */ \
|
196
|
+
msgpack_pack_append_buffer(x, &TAKE8_32(d), 1); \
|
197
|
+
} else { \
|
198
|
+
if(d < (1<<8)) { \
|
199
|
+
/* unsigned 8 */ \
|
200
|
+
unsigned char buf[2] = {0xcc, TAKE8_32(d)}; \
|
201
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
202
|
+
} else if(d < (1<<16)) { \
|
203
|
+
/* unsigned 16 */ \
|
204
|
+
unsigned char buf[3]; \
|
205
|
+
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
|
206
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
207
|
+
} else { \
|
208
|
+
/* unsigned 32 */ \
|
209
|
+
unsigned char buf[5]; \
|
210
|
+
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
|
211
|
+
msgpack_pack_append_buffer(x, buf, 5); \
|
212
|
+
} \
|
213
|
+
} \
|
214
|
+
} while(0)
|
215
|
+
|
216
|
+
#define msgpack_pack_real_int64(x, d) \
|
217
|
+
do { \
|
218
|
+
if(d < -(1LL<<5)) { \
|
219
|
+
if(d < -(1LL<<15)) { \
|
220
|
+
if(d < -(1LL<<31)) { \
|
221
|
+
/* signed 64 */ \
|
222
|
+
unsigned char buf[9]; \
|
223
|
+
buf[0] = 0xd3; _msgpack_store64(&buf[1], d); \
|
224
|
+
msgpack_pack_append_buffer(x, buf, 9); \
|
225
|
+
} else { \
|
226
|
+
/* signed 32 */ \
|
227
|
+
unsigned char buf[5]; \
|
228
|
+
buf[0] = 0xd2; _msgpack_store32(&buf[1], (int32_t)d); \
|
229
|
+
msgpack_pack_append_buffer(x, buf, 5); \
|
230
|
+
} \
|
231
|
+
} else { \
|
232
|
+
if(d < -(1<<7)) { \
|
233
|
+
/* signed 16 */ \
|
234
|
+
unsigned char buf[3]; \
|
235
|
+
buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
|
236
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
237
|
+
} else { \
|
238
|
+
/* signed 8 */ \
|
239
|
+
unsigned char buf[2] = {0xd0, TAKE8_64(d)}; \
|
240
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
241
|
+
} \
|
242
|
+
} \
|
243
|
+
} else if(d < (1<<7)) { \
|
244
|
+
/* fixnum */ \
|
245
|
+
msgpack_pack_append_buffer(x, &TAKE8_64(d), 1); \
|
246
|
+
} else { \
|
247
|
+
if(d < (1LL<<16)) { \
|
248
|
+
if(d < (1<<8)) { \
|
249
|
+
/* unsigned 8 */ \
|
250
|
+
unsigned char buf[2] = {0xcc, TAKE8_64(d)}; \
|
251
|
+
msgpack_pack_append_buffer(x, buf, 2); \
|
252
|
+
} else { \
|
253
|
+
/* unsigned 16 */ \
|
254
|
+
unsigned char buf[3]; \
|
255
|
+
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
|
256
|
+
msgpack_pack_append_buffer(x, buf, 3); \
|
257
|
+
} \
|
258
|
+
} else { \
|
259
|
+
if(d < (1LL<<32)) { \
|
260
|
+
/* unsigned 32 */ \
|
261
|
+
unsigned char buf[5]; \
|
262
|
+
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
|
263
|
+
msgpack_pack_append_buffer(x, buf, 5); \
|
264
|
+
} else { \
|
265
|
+
/* unsigned 64 */ \
|
266
|
+
unsigned char buf[9]; \
|
267
|
+
buf[0] = 0xcf; _msgpack_store64(&buf[1], d); \
|
268
|
+
msgpack_pack_append_buffer(x, buf, 9); \
|
269
|
+
} \
|
270
|
+
} \
|
271
|
+
} \
|
272
|
+
} while(0)
|
273
|
+
|
274
|
+
|
275
|
+
#ifdef msgpack_pack_inline_func_fixint
|
276
|
+
|
277
|
+
msgpack_pack_inline_func_fixint(_uint8)(msgpack_pack_user x, uint8_t d)
|
278
|
+
{
|
279
|
+
unsigned char buf[2] = {0xcc, TAKE8_8(d)};
|
280
|
+
msgpack_pack_append_buffer(x, buf, 2);
|
281
|
+
}
|
282
|
+
|
283
|
+
msgpack_pack_inline_func_fixint(_uint16)(msgpack_pack_user x, uint16_t d)
|
284
|
+
{
|
285
|
+
unsigned char buf[3];
|
286
|
+
buf[0] = 0xcd; _msgpack_store16(&buf[1], d);
|
287
|
+
msgpack_pack_append_buffer(x, buf, 3);
|
288
|
+
}
|
289
|
+
|
290
|
+
msgpack_pack_inline_func_fixint(_uint32)(msgpack_pack_user x, uint32_t d)
|
291
|
+
{
|
292
|
+
unsigned char buf[5];
|
293
|
+
buf[0] = 0xce; _msgpack_store32(&buf[1], d);
|
294
|
+
msgpack_pack_append_buffer(x, buf, 5);
|
295
|
+
}
|
296
|
+
|
297
|
+
msgpack_pack_inline_func_fixint(_uint64)(msgpack_pack_user x, uint64_t d)
|
298
|
+
{
|
299
|
+
unsigned char buf[9];
|
300
|
+
buf[0] = 0xcf; _msgpack_store64(&buf[1], d);
|
301
|
+
msgpack_pack_append_buffer(x, buf, 9);
|
302
|
+
}
|
303
|
+
|
304
|
+
msgpack_pack_inline_func_fixint(_int8)(msgpack_pack_user x, int8_t d)
|
305
|
+
{
|
306
|
+
unsigned char buf[2] = {0xd0, TAKE8_8(d)};
|
307
|
+
msgpack_pack_append_buffer(x, buf, 2);
|
308
|
+
}
|
309
|
+
|
310
|
+
msgpack_pack_inline_func_fixint(_int16)(msgpack_pack_user x, int16_t d)
|
311
|
+
{
|
312
|
+
unsigned char buf[3];
|
313
|
+
buf[0] = 0xd1; _msgpack_store16(&buf[1], d);
|
314
|
+
msgpack_pack_append_buffer(x, buf, 3);
|
315
|
+
}
|
316
|
+
|
317
|
+
msgpack_pack_inline_func_fixint(_int32)(msgpack_pack_user x, int32_t d)
|
318
|
+
{
|
319
|
+
unsigned char buf[5];
|
320
|
+
buf[0] = 0xd2; _msgpack_store32(&buf[1], d);
|
321
|
+
msgpack_pack_append_buffer(x, buf, 5);
|
322
|
+
}
|
323
|
+
|
324
|
+
msgpack_pack_inline_func_fixint(_int64)(msgpack_pack_user x, int64_t d)
|
325
|
+
{
|
326
|
+
unsigned char buf[9];
|
327
|
+
buf[0] = 0xd3; _msgpack_store64(&buf[1], d);
|
328
|
+
msgpack_pack_append_buffer(x, buf, 9);
|
329
|
+
}
|
330
|
+
|
331
|
+
#undef msgpack_pack_inline_func_fixint
|
332
|
+
#endif
|
333
|
+
|
334
|
+
|
335
|
+
msgpack_pack_inline_func(_uint8)(msgpack_pack_user x, uint8_t d)
|
336
|
+
{
|
337
|
+
msgpack_pack_real_uint8(x, d);
|
338
|
+
}
|
339
|
+
|
340
|
+
msgpack_pack_inline_func(_uint16)(msgpack_pack_user x, uint16_t d)
|
341
|
+
{
|
342
|
+
msgpack_pack_real_uint16(x, d);
|
343
|
+
}
|
344
|
+
|
345
|
+
msgpack_pack_inline_func(_uint32)(msgpack_pack_user x, uint32_t d)
|
346
|
+
{
|
347
|
+
msgpack_pack_real_uint32(x, d);
|
348
|
+
}
|
349
|
+
|
350
|
+
msgpack_pack_inline_func(_uint64)(msgpack_pack_user x, uint64_t d)
|
351
|
+
{
|
352
|
+
msgpack_pack_real_uint64(x, d);
|
353
|
+
}
|
354
|
+
|
355
|
+
msgpack_pack_inline_func(_int8)(msgpack_pack_user x, int8_t d)
|
356
|
+
{
|
357
|
+
msgpack_pack_real_int8(x, d);
|
358
|
+
}
|
359
|
+
|
360
|
+
msgpack_pack_inline_func(_int16)(msgpack_pack_user x, int16_t d)
|
361
|
+
{
|
362
|
+
msgpack_pack_real_int16(x, d);
|
363
|
+
}
|
364
|
+
|
365
|
+
msgpack_pack_inline_func(_int32)(msgpack_pack_user x, int32_t d)
|
366
|
+
{
|
367
|
+
msgpack_pack_real_int32(x, d);
|
368
|
+
}
|
369
|
+
|
370
|
+
msgpack_pack_inline_func(_int64)(msgpack_pack_user x, int64_t d)
|
371
|
+
{
|
372
|
+
msgpack_pack_real_int64(x, d);
|
373
|
+
}
|
374
|
+
|
375
|
+
|
376
|
+
#ifdef msgpack_pack_inline_func_cint
|
377
|
+
|
378
|
+
msgpack_pack_inline_func_cint(_short)(msgpack_pack_user x, short d)
|
379
|
+
{
|
380
|
+
#if defined(SIZEOF_SHORT)
|
381
|
+
#if SIZEOF_SHORT == 2
|
382
|
+
msgpack_pack_real_int16(x, d);
|
383
|
+
#elif SIZEOF_SHORT == 4
|
384
|
+
msgpack_pack_real_int32(x, d);
|
385
|
+
#else
|
386
|
+
msgpack_pack_real_int64(x, d);
|
387
|
+
#endif
|
388
|
+
|
389
|
+
#elif defined(SHRT_MAX)
|
390
|
+
#if SHRT_MAX == 0x7fff
|
391
|
+
msgpack_pack_real_int16(x, d);
|
392
|
+
#elif SHRT_MAX == 0x7fffffff
|
393
|
+
msgpack_pack_real_int32(x, d);
|
394
|
+
#else
|
395
|
+
msgpack_pack_real_int64(x, d);
|
396
|
+
#endif
|
397
|
+
|
398
|
+
#else
|
399
|
+
if(sizeof(short) == 2) {
|
400
|
+
msgpack_pack_real_int16(x, d);
|
401
|
+
} else if(sizeof(short) == 4) {
|
402
|
+
msgpack_pack_real_int32(x, d);
|
403
|
+
} else {
|
404
|
+
msgpack_pack_real_int64(x, d);
|
405
|
+
}
|
406
|
+
#endif
|
407
|
+
}
|
408
|
+
|
409
|
+
msgpack_pack_inline_func_cint(_int)(msgpack_pack_user x, int d)
|
410
|
+
{
|
411
|
+
#if defined(SIZEOF_INT)
|
412
|
+
#if SIZEOF_INT == 2
|
413
|
+
msgpack_pack_real_int16(x, d);
|
414
|
+
#elif SIZEOF_INT == 4
|
415
|
+
msgpack_pack_real_int32(x, d);
|
416
|
+
#else
|
417
|
+
msgpack_pack_real_int64(x, d);
|
418
|
+
#endif
|
419
|
+
|
420
|
+
#elif defined(INT_MAX)
|
421
|
+
#if INT_MAX == 0x7fff
|
422
|
+
msgpack_pack_real_int16(x, d);
|
423
|
+
#elif INT_MAX == 0x7fffffff
|
424
|
+
msgpack_pack_real_int32(x, d);
|
425
|
+
#else
|
426
|
+
msgpack_pack_real_int64(x, d);
|
427
|
+
#endif
|
428
|
+
|
429
|
+
#else
|
430
|
+
if(sizeof(int) == 2) {
|
431
|
+
msgpack_pack_real_int16(x, d);
|
432
|
+
} else if(sizeof(int) == 4) {
|
433
|
+
msgpack_pack_real_int32(x, d);
|
434
|
+
} else {
|
435
|
+
msgpack_pack_real_int64(x, d);
|
436
|
+
}
|
437
|
+
#endif
|
438
|
+
}
|
439
|
+
|
440
|
+
msgpack_pack_inline_func_cint(_long)(msgpack_pack_user x, long d)
|
441
|
+
{
|
442
|
+
#if defined(SIZEOF_LONG)
|
443
|
+
#if SIZEOF_LONG == 2
|
444
|
+
msgpack_pack_real_int16(x, d);
|
445
|
+
#elif SIZEOF_LONG == 4
|
446
|
+
msgpack_pack_real_int32(x, d);
|
447
|
+
#else
|
448
|
+
msgpack_pack_real_int64(x, d);
|
449
|
+
#endif
|
450
|
+
|
451
|
+
#elif defined(LONG_MAX)
|
452
|
+
#if LONG_MAX == 0x7fffL
|
453
|
+
msgpack_pack_real_int16(x, d);
|
454
|
+
#elif LONG_MAX == 0x7fffffffL
|
455
|
+
msgpack_pack_real_int32(x, d);
|
456
|
+
#else
|
457
|
+
msgpack_pack_real_int64(x, d);
|
458
|
+
#endif
|
459
|
+
|
460
|
+
#else
|
461
|
+
if(sizeof(long) == 2) {
|
462
|
+
msgpack_pack_real_int16(x, d);
|
463
|
+
} else if(sizeof(long) == 4) {
|
464
|
+
msgpack_pack_real_int32(x, d);
|
465
|
+
} else {
|
466
|
+
msgpack_pack_real_int64(x, d);
|
467
|
+
}
|
468
|
+
#endif
|
469
|
+
}
|
470
|
+
|
471
|
+
msgpack_pack_inline_func_cint(_long_long)(msgpack_pack_user x, long long d)
|
472
|
+
{
|
473
|
+
#if defined(SIZEOF_LONG_LONG)
|
474
|
+
#if SIZEOF_LONG_LONG == 2
|
475
|
+
msgpack_pack_real_int16(x, d);
|
476
|
+
#elif SIZEOF_LONG_LONG == 4
|
477
|
+
msgpack_pack_real_int32(x, d);
|
478
|
+
#else
|
479
|
+
msgpack_pack_real_int64(x, d);
|
480
|
+
#endif
|
481
|
+
|
482
|
+
#elif defined(LLONG_MAX)
|
483
|
+
#if LLONG_MAX == 0x7fffL
|
484
|
+
msgpack_pack_real_int16(x, d);
|
485
|
+
#elif LLONG_MAX == 0x7fffffffL
|
486
|
+
msgpack_pack_real_int32(x, d);
|
487
|
+
#else
|
488
|
+
msgpack_pack_real_int64(x, d);
|
489
|
+
#endif
|
490
|
+
|
491
|
+
#else
|
492
|
+
if(sizeof(long long) == 2) {
|
493
|
+
msgpack_pack_real_int16(x, d);
|
494
|
+
} else if(sizeof(long long) == 4) {
|
495
|
+
msgpack_pack_real_int32(x, d);
|
496
|
+
} else {
|
497
|
+
msgpack_pack_real_int64(x, d);
|
498
|
+
}
|
499
|
+
#endif
|
500
|
+
}
|
501
|
+
|
502
|
+
msgpack_pack_inline_func_cint(_unsigned_short)(msgpack_pack_user x, unsigned short d)
|
503
|
+
{
|
504
|
+
#if defined(SIZEOF_SHORT)
|
505
|
+
#if SIZEOF_SHORT == 2
|
506
|
+
msgpack_pack_real_uint16(x, d);
|
507
|
+
#elif SIZEOF_SHORT == 4
|
508
|
+
msgpack_pack_real_uint32(x, d);
|
509
|
+
#else
|
510
|
+
msgpack_pack_real_uint64(x, d);
|
511
|
+
#endif
|
512
|
+
|
513
|
+
#elif defined(USHRT_MAX)
|
514
|
+
#if USHRT_MAX == 0xffffU
|
515
|
+
msgpack_pack_real_uint16(x, d);
|
516
|
+
#elif USHRT_MAX == 0xffffffffU
|
517
|
+
msgpack_pack_real_uint32(x, d);
|
518
|
+
#else
|
519
|
+
msgpack_pack_real_uint64(x, d);
|
520
|
+
#endif
|
521
|
+
|
522
|
+
#else
|
523
|
+
if(sizeof(unsigned short) == 2) {
|
524
|
+
msgpack_pack_real_uint16(x, d);
|
525
|
+
} else if(sizeof(unsigned short) == 4) {
|
526
|
+
msgpack_pack_real_uint32(x, d);
|
527
|
+
} else {
|
528
|
+
msgpack_pack_real_uint64(x, d);
|
529
|
+
}
|
530
|
+
#endif
|
531
|
+
}
|
532
|
+
|
533
|
+
msgpack_pack_inline_func_cint(_unsigned_int)(msgpack_pack_user x, unsigned int d)
|
534
|
+
{
|
535
|
+
#if defined(SIZEOF_INT)
|
536
|
+
#if SIZEOF_INT == 2
|
537
|
+
msgpack_pack_real_uint16(x, d);
|
538
|
+
#elif SIZEOF_INT == 4
|
539
|
+
msgpack_pack_real_uint32(x, d);
|
540
|
+
#else
|
541
|
+
msgpack_pack_real_uint64(x, d);
|
542
|
+
#endif
|
543
|
+
|
544
|
+
#elif defined(UINT_MAX)
|
545
|
+
#if UINT_MAX == 0xffffU
|
546
|
+
msgpack_pack_real_uint16(x, d);
|
547
|
+
#elif UINT_MAX == 0xffffffffU
|
548
|
+
msgpack_pack_real_uint32(x, d);
|
549
|
+
#else
|
550
|
+
msgpack_pack_real_uint64(x, d);
|
551
|
+
#endif
|
552
|
+
|
553
|
+
#else
|
554
|
+
if(sizeof(unsigned int) == 2) {
|
555
|
+
msgpack_pack_real_uint16(x, d);
|
556
|
+
} else if(sizeof(unsigned int) == 4) {
|
557
|
+
msgpack_pack_real_uint32(x, d);
|
558
|
+
} else {
|
559
|
+
msgpack_pack_real_uint64(x, d);
|
560
|
+
}
|
561
|
+
#endif
|
562
|
+
}
|
563
|
+
|
564
|
+
msgpack_pack_inline_func_cint(_unsigned_long)(msgpack_pack_user x, unsigned long d)
|
565
|
+
{
|
566
|
+
#if defined(SIZEOF_LONG)
|
567
|
+
#if SIZEOF_LONG == 2
|
568
|
+
msgpack_pack_real_uint16(x, d);
|
569
|
+
#elif SIZEOF_LONG == 4
|
570
|
+
msgpack_pack_real_uint32(x, d);
|
571
|
+
#else
|
572
|
+
msgpack_pack_real_uint64(x, d);
|
573
|
+
#endif
|
574
|
+
|
575
|
+
#elif defined(ULONG_MAX)
|
576
|
+
#if ULONG_MAX == 0xffffUL
|
577
|
+
msgpack_pack_real_uint16(x, d);
|
578
|
+
#elif ULONG_MAX == 0xffffffffUL
|
579
|
+
msgpack_pack_real_uint32(x, d);
|
580
|
+
#else
|
581
|
+
msgpack_pack_real_uint64(x, d);
|
582
|
+
#endif
|
583
|
+
|
584
|
+
#else
|
585
|
+
if(sizeof(unsigned long) == 2) {
|
586
|
+
msgpack_pack_real_uint16(x, d);
|
587
|
+
} else if(sizeof(unsigned long) == 4) {
|
588
|
+
msgpack_pack_real_uint32(x, d);
|
589
|
+
} else {
|
590
|
+
msgpack_pack_real_uint64(x, d);
|
591
|
+
}
|
592
|
+
#endif
|
593
|
+
}
|
594
|
+
|
595
|
+
msgpack_pack_inline_func_cint(_unsigned_long_long)(msgpack_pack_user x, unsigned long long d)
|
596
|
+
{
|
597
|
+
#if defined(SIZEOF_LONG_LONG)
|
598
|
+
#if SIZEOF_LONG_LONG == 2
|
599
|
+
msgpack_pack_real_uint16(x, d);
|
600
|
+
#elif SIZEOF_LONG_LONG == 4
|
601
|
+
msgpack_pack_real_uint32(x, d);
|
602
|
+
#else
|
603
|
+
msgpack_pack_real_uint64(x, d);
|
604
|
+
#endif
|
605
|
+
|
606
|
+
#elif defined(ULLONG_MAX)
|
607
|
+
#if ULLONG_MAX == 0xffffUL
|
608
|
+
msgpack_pack_real_uint16(x, d);
|
609
|
+
#elif ULLONG_MAX == 0xffffffffUL
|
610
|
+
msgpack_pack_real_uint32(x, d);
|
611
|
+
#else
|
612
|
+
msgpack_pack_real_uint64(x, d);
|
613
|
+
#endif
|
614
|
+
|
615
|
+
#else
|
616
|
+
if(sizeof(unsigned long long) == 2) {
|
617
|
+
msgpack_pack_real_uint16(x, d);
|
618
|
+
} else if(sizeof(unsigned long long) == 4) {
|
619
|
+
msgpack_pack_real_uint32(x, d);
|
620
|
+
} else {
|
621
|
+
msgpack_pack_real_uint64(x, d);
|
622
|
+
}
|
623
|
+
#endif
|
624
|
+
}
|
625
|
+
|
626
|
+
#undef msgpack_pack_inline_func_cint
|
627
|
+
#endif
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
/*
|
632
|
+
* Float
|
633
|
+
*/
|
634
|
+
|
635
|
+
msgpack_pack_inline_func(_float)(msgpack_pack_user x, float d)
|
636
|
+
{
|
637
|
+
union { float f; uint32_t i; } mem;
|
638
|
+
mem.f = d;
|
639
|
+
unsigned char buf[5];
|
640
|
+
buf[0] = 0xca; _msgpack_store32(&buf[1], mem.i);
|
641
|
+
msgpack_pack_append_buffer(x, buf, 5);
|
642
|
+
}
|
643
|
+
|
644
|
+
msgpack_pack_inline_func(_double)(msgpack_pack_user x, double d)
|
645
|
+
{
|
646
|
+
union { double f; uint64_t i; } mem;
|
647
|
+
mem.f = d;
|
648
|
+
unsigned char buf[9];
|
649
|
+
buf[0] = 0xcb; _msgpack_store64(&buf[1], mem.i);
|
650
|
+
msgpack_pack_append_buffer(x, buf, 9);
|
651
|
+
}
|
652
|
+
|
653
|
+
|
654
|
+
/*
|
655
|
+
* Nil
|
656
|
+
*/
|
657
|
+
|
658
|
+
msgpack_pack_inline_func(_nil)(msgpack_pack_user x)
|
659
|
+
{
|
660
|
+
static const unsigned char d = 0xc0;
|
661
|
+
msgpack_pack_append_buffer(x, &d, 1);
|
662
|
+
}
|
663
|
+
|
664
|
+
|
665
|
+
/*
|
666
|
+
* Boolean
|
667
|
+
*/
|
668
|
+
|
669
|
+
msgpack_pack_inline_func(_true)(msgpack_pack_user x)
|
670
|
+
{
|
671
|
+
static const unsigned char d = 0xc3;
|
672
|
+
msgpack_pack_append_buffer(x, &d, 1);
|
673
|
+
}
|
674
|
+
|
675
|
+
msgpack_pack_inline_func(_false)(msgpack_pack_user x)
|
676
|
+
{
|
677
|
+
static const unsigned char d = 0xc2;
|
678
|
+
msgpack_pack_append_buffer(x, &d, 1);
|
679
|
+
}
|
680
|
+
|
681
|
+
|
682
|
+
/*
|
683
|
+
* Array
|
684
|
+
*/
|
685
|
+
|
686
|
+
msgpack_pack_inline_func(_array)(msgpack_pack_user x, unsigned int n)
|
687
|
+
{
|
688
|
+
if(n < 16) {
|
689
|
+
unsigned char d = 0x90 | n;
|
690
|
+
msgpack_pack_append_buffer(x, &d, 1);
|
691
|
+
} else if(n < 65536) {
|
692
|
+
unsigned char buf[3];
|
693
|
+
buf[0] = 0xdc; _msgpack_store16(&buf[1], (uint16_t)n);
|
694
|
+
msgpack_pack_append_buffer(x, buf, 3);
|
695
|
+
} else {
|
696
|
+
unsigned char buf[5];
|
697
|
+
buf[0] = 0xdd; _msgpack_store32(&buf[1], (uint32_t)n);
|
698
|
+
msgpack_pack_append_buffer(x, buf, 5);
|
699
|
+
}
|
700
|
+
}
|
701
|
+
|
702
|
+
|
703
|
+
/*
|
704
|
+
* Map
|
705
|
+
*/
|
706
|
+
|
707
|
+
msgpack_pack_inline_func(_map)(msgpack_pack_user x, unsigned int n)
|
708
|
+
{
|
709
|
+
if(n < 16) {
|
710
|
+
unsigned char d = 0x80 | n;
|
711
|
+
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
|
712
|
+
} else if(n < 65536) {
|
713
|
+
unsigned char buf[3];
|
714
|
+
buf[0] = 0xde; _msgpack_store16(&buf[1], (uint16_t)n);
|
715
|
+
msgpack_pack_append_buffer(x, buf, 3);
|
716
|
+
} else {
|
717
|
+
unsigned char buf[5];
|
718
|
+
buf[0] = 0xdf; _msgpack_store32(&buf[1], (uint32_t)n);
|
719
|
+
msgpack_pack_append_buffer(x, buf, 5);
|
720
|
+
}
|
721
|
+
}
|
722
|
+
|
723
|
+
|
724
|
+
/*
|
725
|
+
* Raw
|
726
|
+
*/
|
727
|
+
|
728
|
+
msgpack_pack_inline_func(_raw)(msgpack_pack_user x, size_t l)
|
729
|
+
{
|
730
|
+
if(l < 32) {
|
731
|
+
unsigned char d = 0xa0 | (uint8_t)l;
|
732
|
+
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
|
733
|
+
} else if(l < 65536) {
|
734
|
+
unsigned char buf[3];
|
735
|
+
buf[0] = 0xda; _msgpack_store16(&buf[1], (uint16_t)l);
|
736
|
+
msgpack_pack_append_buffer(x, buf, 3);
|
737
|
+
} else {
|
738
|
+
unsigned char buf[5];
|
739
|
+
buf[0] = 0xdb; _msgpack_store32(&buf[1], (uint32_t)l);
|
740
|
+
msgpack_pack_append_buffer(x, buf, 5);
|
741
|
+
}
|
742
|
+
}
|
743
|
+
|
744
|
+
msgpack_pack_inline_func(_raw_body)(msgpack_pack_user x, const void* b, size_t l)
|
745
|
+
{
|
746
|
+
msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
|
747
|
+
}
|
748
|
+
|
749
|
+
#undef msgpack_pack_inline_func
|
750
|
+
#undef msgpack_pack_user
|
751
|
+
#undef msgpack_pack_append_buffer
|
752
|
+
|
753
|
+
#undef TAKE8_8
|
754
|
+
#undef TAKE8_16
|
755
|
+
#undef TAKE8_32
|
756
|
+
#undef TAKE8_64
|
757
|
+
|
758
|
+
#undef msgpack_pack_real_uint8
|
759
|
+
#undef msgpack_pack_real_uint16
|
760
|
+
#undef msgpack_pack_real_uint32
|
761
|
+
#undef msgpack_pack_real_uint64
|
762
|
+
#undef msgpack_pack_real_int8
|
763
|
+
#undef msgpack_pack_real_int16
|
764
|
+
#undef msgpack_pack_real_int32
|
765
|
+
#undef msgpack_pack_real_int64
|
766
|
+
|