rroonga 5.0.1-x86-mingw32 → 5.0.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -1
- data/ext/groonga/rb-grn-logger.c +159 -3
- data/ext/groonga/rb-grn-plugin.c +17 -1
- data/ext/groonga/rb-grn-query-logger.c +129 -3
- data/ext/groonga/rb-grn.h +1 -1
- data/lib/1.9/groonga.so +0 -0
- data/lib/2.0/groonga.so +0 -0
- data/lib/2.1/groonga.so +0 -0
- data/lib/2.2/groonga.so +0 -0
- data/lib/groonga/query-logger.rb +48 -3
- data/lib/groonga/schema.rb +16 -3
- data/rroonga-build.rb +3 -3
- data/test/test-logger.rb +97 -2
- data/test/test-plugin.rb +5 -1
- data/test/test-query-logger.rb +149 -0
- data/test/test-schema.rb +19 -0
- data/vendor/local/bin/grndb.exe +0 -0
- data/vendor/local/bin/groonga-benchmark.exe +0 -0
- data/vendor/local/bin/groonga.exe +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-4.dll +0 -0
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/bin/libonig-5.dll +0 -0
- data/vendor/local/bin/lz4.exe +0 -0
- data/vendor/local/bin/lz4c.exe +0 -0
- data/vendor/local/bin/lz4cat +0 -0
- data/vendor/local/bin/mecab-config +2 -2
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/bin/onig-config +1 -1
- data/vendor/local/bin/zlib1.dll +0 -0
- data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +2 -2
- data/vendor/local/include/groonga/groonga.h +1 -0
- data/vendor/local/include/groonga/groonga/groonga.h +12 -6
- data/vendor/local/include/groonga/groonga/portability.h +158 -0
- data/vendor/local/include/msgpack.h +1 -0
- data/vendor/local/include/msgpack.hpp +2 -1
- data/vendor/local/include/msgpack/adaptor/bool.hpp +58 -0
- data/vendor/local/include/msgpack/{type/bool.hpp → adaptor/bool_fwd.hpp} +11 -27
- data/vendor/local/include/msgpack/adaptor/char_ptr.hpp +78 -0
- data/vendor/local/include/msgpack/adaptor/char_ptr_fwd.hpp +43 -0
- data/vendor/local/include/msgpack/adaptor/check_container_size.hpp +61 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/array.hpp +76 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/array_char.hpp +84 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/array_char_fwd.hpp +45 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/array_fwd.hpp +44 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/forward_list.hpp +75 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/forward_list_fwd.hpp +44 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/tuple.hpp +152 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/tuple_fwd.hpp +62 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_map.hpp +142 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_map_fwd.hpp +53 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_set.hpp +134 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_set_fwd.hpp +52 -0
- data/vendor/local/include/msgpack/adaptor/define.hpp +29 -0
- data/vendor/local/include/msgpack/adaptor/deque.hpp +83 -0
- data/vendor/local/include/msgpack/adaptor/deque_fwd.hpp +40 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp03_define.hpp +3475 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp03_msgpack_tuple.hpp +13918 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp03_msgpack_tuple_fwd.hpp +4341 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp11_define.hpp +184 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp11_msgpack_tuple.hpp +212 -0
- data/vendor/local/include/msgpack/adaptor/detail/cpp11_msgpack_tuple_fwd.hpp +84 -0
- data/vendor/local/include/msgpack/adaptor/fixint.hpp +212 -0
- data/vendor/local/include/msgpack/adaptor/fixint_fwd.hpp +100 -0
- data/vendor/local/include/msgpack/adaptor/float.hpp +105 -0
- data/vendor/local/include/msgpack/adaptor/float_fwd.hpp +44 -0
- data/vendor/local/include/msgpack/adaptor/int.hpp +308 -0
- data/vendor/local/include/msgpack/adaptor/int_fwd.hpp +100 -0
- data/vendor/local/include/msgpack/adaptor/list.hpp +83 -0
- data/vendor/local/include/msgpack/adaptor/list_fwd.hpp +40 -0
- data/vendor/local/include/msgpack/adaptor/map.hpp +219 -0
- data/vendor/local/include/msgpack/adaptor/map_fwd.hpp +69 -0
- data/vendor/local/include/msgpack/adaptor/msgpack_tuple.hpp +29 -0
- data/vendor/local/include/msgpack/adaptor/msgpack_tuple_fwd.hpp +29 -0
- data/vendor/local/include/msgpack/adaptor/nil.hpp +68 -0
- data/vendor/local/include/msgpack/adaptor/nil_fwd.hpp +51 -0
- data/vendor/local/include/msgpack/adaptor/pair.hpp +63 -0
- data/vendor/local/include/msgpack/{type/pair.hpp → adaptor/pair_fwd.hpp} +10 -29
- data/vendor/local/include/msgpack/adaptor/raw.hpp +98 -0
- data/vendor/local/include/msgpack/{type/nil.hpp → adaptor/raw_fwd.hpp} +15 -30
- data/vendor/local/include/msgpack/adaptor/set.hpp +134 -0
- data/vendor/local/include/msgpack/adaptor/set_fwd.hpp +52 -0
- data/vendor/local/include/msgpack/adaptor/string.hpp +78 -0
- data/vendor/local/include/msgpack/adaptor/string_fwd.hpp +42 -0
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_map.hpp +164 -0
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_map_fwd.hpp +75 -0
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_set.hpp +157 -0
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_set_fwd.hpp +75 -0
- data/vendor/local/include/msgpack/adaptor/vector.hpp +87 -0
- data/vendor/local/include/msgpack/adaptor/vector_bool.hpp +80 -0
- data/vendor/local/include/msgpack/adaptor/vector_bool_fwd.hpp +40 -0
- data/vendor/local/include/msgpack/adaptor/vector_char.hpp +81 -0
- data/vendor/local/include/msgpack/adaptor/vector_char_fwd.hpp +42 -0
- data/vendor/local/include/msgpack/adaptor/vector_fwd.hpp +42 -0
- data/vendor/local/include/msgpack/cpp_config.hpp +109 -0
- data/vendor/local/include/msgpack/detail/cpp03_zone.hpp +662 -0
- data/vendor/local/include/msgpack/detail/cpp11_zone.hpp +368 -0
- data/vendor/local/include/msgpack/fbuffer.h +3 -4
- data/vendor/local/include/msgpack/fbuffer.hpp +24 -16
- data/vendor/local/include/msgpack/gcc_atomic.h +33 -0
- data/vendor/local/include/msgpack/iterator.hpp +42 -0
- data/vendor/local/include/msgpack/object.h +51 -30
- data/vendor/local/include/msgpack/object.hpp +564 -273
- data/vendor/local/include/msgpack/object_fwd.hpp +182 -0
- data/vendor/local/include/msgpack/pack.h +23 -17
- data/vendor/local/include/msgpack/pack.hpp +889 -164
- data/vendor/local/include/msgpack/pack_define.h +2 -2
- data/vendor/local/include/msgpack/pack_template.h +452 -356
- data/vendor/local/include/msgpack/sbuffer.h +43 -37
- data/vendor/local/include/msgpack/sbuffer.hpp +98 -76
- data/vendor/local/include/msgpack/sysdep.h +48 -53
- data/vendor/local/include/msgpack/type.hpp +35 -17
- data/vendor/local/include/msgpack/unpack.h +62 -44
- data/vendor/local/include/msgpack/unpack.hpp +1578 -217
- data/vendor/local/include/msgpack/unpack_define.h +49 -47
- data/vendor/local/include/msgpack/unpack_template.h +344 -284
- data/vendor/local/include/msgpack/util.h +23 -0
- data/vendor/local/include/msgpack/version.h +12 -6
- data/vendor/local/include/msgpack/version.hpp +44 -0
- data/vendor/local/include/msgpack/version_master.h +3 -0
- data/vendor/local/include/msgpack/versioning.hpp +77 -0
- data/vendor/local/include/msgpack/vrefbuffer.h +40 -34
- data/vendor/local/include/msgpack/vrefbuffer.hpp +261 -64
- data/vendor/local/include/msgpack/zbuffer.h +79 -79
- data/vendor/local/include/msgpack/zbuffer.hpp +136 -67
- data/vendor/local/include/msgpack/zone.h +65 -42
- data/vendor/local/include/msgpack/zone.hpp +10 -445
- data/vendor/local/include/msgpack_fwd.hpp +28 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/vector.la +41 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +2 -2
- data/vendor/local/lib/groonga/plugins/ruby/eval.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.dll +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.la +2 -2
- data/vendor/local/lib/groonga/plugins/ruby/load.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.dll +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.la +2 -2
- data/vendor/local/lib/groonga/plugins/sharding.rb +1 -0
- data/vendor/local/lib/groonga/plugins/sharding/logical_count.rb +17 -45
- data/vendor/local/lib/groonga/plugins/sharding/logical_enumerator.rb +15 -6
- data/vendor/local/lib/groonga/plugins/sharding/logical_range_filter.rb +63 -75
- data/vendor/local/lib/groonga/plugins/sharding/range_expression_builder.rb +65 -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/table/table.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.la +2 -2
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/token_filters/stop_word.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/groonga/scripts/ruby/expression_size_estimator.rb +38 -41
- data/vendor/local/lib/groonga/scripts/ruby/scan_info_data.rb +3 -0
- 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/liblz4.a +0 -0
- data/vendor/local/lib/liblz4.dll +0 -0
- data/vendor/local/lib/liblz4.dll.1 +0 -0
- data/vendor/local/lib/liblz4.dll.1.5.0 +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmecab.la +2 -2
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +4 -4
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +2 -2
- data/vendor/local/lib/libonig.a +0 -0
- data/vendor/local/lib/libonig.dll.a +0 -0
- data/vendor/local/lib/libonig.la +2 -2
- data/vendor/local/lib/libz.a +0 -0
- data/vendor/local/lib/libz.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +3 -3
- data/vendor/local/lib/pkgconfig/liblz4.pc +5 -5
- data/vendor/local/lib/pkgconfig/msgpack.pc +2 -2
- data/vendor/local/lib/pkgconfig/oniguruma.pc +6 -6
- data/vendor/local/lib/pkgconfig/zlib.pc +3 -3
- 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/sbin/groonga-httpd-restart +1 -1
- data/vendor/local/sbin/groonga-httpd.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/release.txt +69 -52
- data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +6 -6
- data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +56 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +4 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +7 -7
- data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +6 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +14 -14
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +93 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/news/0.x.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.0.x.txt +9 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.1.x.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.2.x.txt +10 -10
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.3.x.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/news/2.x.txt +13 -13
- data/vendor/local/share/doc/groonga/en/html/_sources/news/3.x.txt +13 -13
- data/vendor/local/share/doc/groonga/en/html/_sources/news/4.x.txt +9 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/news/senna.txt +13 -13
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/dump.txt +135 -27
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/request_cancel.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga.txt +148 -7
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/vector_size.txt +76 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/scorer.txt +2 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/server/gqtp.txt +38 -6
- data/vendor/local/share/doc/groonga/en/html/_sources/spec/gqtp.txt +2 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +6 -4
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/client.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution.html +14 -13
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +58 -42
- data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/index.html +15 -9
- data/vendor/local/share/doc/groonga/en/html/install.html +8 -7
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +70 -13
- data/vendor/local/share/doc/groonga/en/html/install/fedora.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/install/others.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/install/solaris.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +12 -11
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +21 -21
- data/vendor/local/share/doc/groonga/en/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news.html +200 -103
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/news/2.x.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/news/3.x.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/news/4.x.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference.html +8 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/column.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +141 -34
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +146 -14
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +7 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +248 -0
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/operations.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +8 -7
- data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/scoring_note.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/tables.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/types.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/server.html +11 -7
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +53 -8
- data/vendor/local/share/doc/groonga/en/html/server/http.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/memcached.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/package.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/spec.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +10 -7
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +15 -11
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +69 -52
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +6 -6
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +56 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +4 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +7 -7
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +6 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +14 -14
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +93 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/0.x.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.0.x.txt +9 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.1.x.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.2.x.txt +10 -10
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.3.x.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/2.x.txt +13 -13
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/3.x.txt +13 -13
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/4.x.txt +9 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/senna.txt +13 -13
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/dump.txt +135 -27
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/request_cancel.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga.txt +148 -7
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/vector_size.txt +76 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/scorer.txt +2 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/server/gqtp.txt +38 -6
- data/vendor/local/share/doc/groonga/ja/html/_sources/spec/gqtp.txt +2 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +6 -4
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/client.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +14 -13
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +58 -42
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/index.html +15 -9
- data/vendor/local/share/doc/groonga/ja/html/install.html +8 -7
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +63 -11
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +21 -18
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +10 -9
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news.html +234 -106
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +8 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/column.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +141 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +25 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +23 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +146 -14
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +7 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +249 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/scoring_note.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/types.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/server.html +11 -7
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +53 -8
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/spec.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +10 -7
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +15 -11
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +6 -6
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/groonga-admin.css +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-icons_217bc0_256x240.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-icons_469bdd_256x240.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/css/redmond/jquery-ui-1.8.18.custom.css +0 -0
- data/vendor/local/share/groonga/html/admin.old/favicon.ico +0 -0
- data/vendor/local/share/groonga/html/admin.old/favicon.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/favicon.svg +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/images/groonga.png +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/images/groonga.svg +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/images/loading.gif +0 -0
- data/vendor/local/share/groonga/html/admin.old/index.html +297 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/index.ja.html +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/js/groonga-admin.ja.js +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/js/groonga-admin.js +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/js/jquery-1.7.2.js +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/js/jquery-ui-1.8.18.custom.js +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/js/jquery.flot-0.7.js +0 -0
- data/vendor/local/share/groonga/html/{admin → admin.old}/js/jquery.flot.license.txt +0 -0
- data/vendor/local/share/groonga/html/admin/.htaccess +543 -0
- data/vendor/local/share/groonga/html/admin/404.html +133 -0
- data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +229 -0
- data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/vendor/local/share/groonga/html/admin/images/yeoman.d2754b85.png +0 -0
- data/vendor/local/share/groonga/html/admin/index.html +9 -297
- data/vendor/local/share/groonga/html/admin/robots.txt +3 -0
- data/vendor/local/share/groonga/html/admin/scripts/oldieshim.a466b7b1.js +1 -0
- data/vendor/local/share/groonga/html/admin/scripts/scripts.87083bfd.js +1 -0
- data/vendor/local/share/groonga/html/admin/scripts/vendor.fa48c0ac.js +13 -0
- data/vendor/local/share/groonga/html/admin/styles/main.0390285b.css +1 -0
- data/vendor/local/share/groonga/html/admin/styles/vendor.f4ae649a.css +10 -0
- data/vendor/local/share/groonga/html/admin/views/columns/new.html +1 -0
- data/vendor/local/share/groonga/html/admin/views/columns/show.html +1 -0
- data/vendor/local/share/groonga/html/admin/views/tables/index.html +1 -0
- data/vendor/local/share/groonga/html/admin/views/tables/new.html +29 -0
- data/vendor/local/share/groonga/html/admin/views/tables/search.html +1 -0
- data/vendor/local/share/groonga/html/admin/views/tables/show.html +1 -0
- data/vendor/local/share/groonga/html/admin/views/top.html +1 -0
- data/vendor/local/share/license/groonga-admin/LICENSE +502 -0
- data/vendor/local/share/license/groonga-admin/README.md +79 -0
- data/vendor/local/share/license/msgpack/AUTHORS +0 -1
- data/vendor/local/share/man/ja/man1/groonga.1 +826 -147
- data/vendor/local/share/man/man1/groonga.1 +812 -99
- metadata +138 -55
- data/doc/text/install.textile +0 -145
- data/doc/text/tutorial.textile +0 -510
- data/vendor/local/bin/libmsgpack-3.dll +0 -0
- data/vendor/local/include/msgpack/type/define.hpp +0 -3465
- data/vendor/local/include/msgpack/type/deque.hpp +0 -77
- data/vendor/local/include/msgpack/type/fixint.hpp +0 -172
- data/vendor/local/include/msgpack/type/float.hpp +0 -102
- data/vendor/local/include/msgpack/type/int.hpp +0 -276
- data/vendor/local/include/msgpack/type/list.hpp +0 -77
- data/vendor/local/include/msgpack/type/map.hpp +0 -205
- data/vendor/local/include/msgpack/type/raw.hpp +0 -94
- data/vendor/local/include/msgpack/type/set.hpp +0 -122
- data/vendor/local/include/msgpack/type/string.hpp +0 -62
- data/vendor/local/include/msgpack/type/tr1/unordered_map.hpp +0 -150
- data/vendor/local/include/msgpack/type/tr1/unordered_set.hpp +0 -142
- data/vendor/local/include/msgpack/type/tuple.hpp +0 -13691
- data/vendor/local/include/msgpack/type/vector.hpp +0 -81
- data/vendor/local/share/doc/groonga/en/html/_static/jp.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/us.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/jp.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/us.png +0 -0
@@ -0,0 +1,182 @@
|
|
1
|
+
//
|
2
|
+
// MessagePack for C++ static resolution routine
|
3
|
+
//
|
4
|
+
// Copyright (C) 2008-2014 FURUHASHI Sadayuki and KONDO Takatoshi
|
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
|
+
#ifndef MSGPACK_OBJECT_FWD_HPP
|
20
|
+
#define MSGPACK_OBJECT_FWD_HPP
|
21
|
+
|
22
|
+
#include "msgpack/versioning.hpp"
|
23
|
+
#include "msgpack/zone.hpp"
|
24
|
+
#include "msgpack/object.h"
|
25
|
+
|
26
|
+
#include <typeinfo>
|
27
|
+
|
28
|
+
namespace msgpack {
|
29
|
+
|
30
|
+
MSGPACK_API_VERSION_NAMESPACE(v1) {
|
31
|
+
|
32
|
+
|
33
|
+
namespace type {
|
34
|
+
enum object_type {
|
35
|
+
NIL = MSGPACK_OBJECT_NIL,
|
36
|
+
BOOLEAN = MSGPACK_OBJECT_BOOLEAN,
|
37
|
+
POSITIVE_INTEGER = MSGPACK_OBJECT_POSITIVE_INTEGER,
|
38
|
+
NEGATIVE_INTEGER = MSGPACK_OBJECT_NEGATIVE_INTEGER,
|
39
|
+
FLOAT = MSGPACK_OBJECT_FLOAT,
|
40
|
+
#if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
|
41
|
+
DOUBLE = MSGPACK_OBJECT_DOUBLE, // obsolete
|
42
|
+
#endif // MSGPACK_USE_LEGACY_NAME_AS_FLOAT
|
43
|
+
STR = MSGPACK_OBJECT_STR,
|
44
|
+
BIN = MSGPACK_OBJECT_BIN,
|
45
|
+
ARRAY = MSGPACK_OBJECT_ARRAY,
|
46
|
+
MAP = MSGPACK_OBJECT_MAP,
|
47
|
+
EXT = MSGPACK_OBJECT_EXT
|
48
|
+
};
|
49
|
+
}
|
50
|
+
|
51
|
+
|
52
|
+
struct object;
|
53
|
+
struct object_kv;
|
54
|
+
|
55
|
+
struct object_array {
|
56
|
+
uint32_t size;
|
57
|
+
msgpack::object* ptr;
|
58
|
+
};
|
59
|
+
|
60
|
+
struct object_map {
|
61
|
+
uint32_t size;
|
62
|
+
msgpack::object_kv* ptr;
|
63
|
+
};
|
64
|
+
|
65
|
+
struct object_str {
|
66
|
+
uint32_t size;
|
67
|
+
const char* ptr;
|
68
|
+
};
|
69
|
+
|
70
|
+
struct object_bin {
|
71
|
+
uint32_t size;
|
72
|
+
const char* ptr;
|
73
|
+
};
|
74
|
+
|
75
|
+
struct object_ext {
|
76
|
+
int8_t type() const { return ptr[0]; }
|
77
|
+
const char* data() const { return &ptr[1]; }
|
78
|
+
uint32_t size;
|
79
|
+
const char* ptr;
|
80
|
+
};
|
81
|
+
|
82
|
+
struct object {
|
83
|
+
union union_type {
|
84
|
+
bool boolean;
|
85
|
+
uint64_t u64;
|
86
|
+
int64_t i64;
|
87
|
+
#if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
|
88
|
+
double dec; // obsolete
|
89
|
+
#endif // MSGPACK_USE_LEGACY_NAME_AS_FLOAT
|
90
|
+
double f64;
|
91
|
+
msgpack::object_array array;
|
92
|
+
msgpack::object_map map;
|
93
|
+
msgpack::object_str str;
|
94
|
+
msgpack::object_bin bin;
|
95
|
+
msgpack::object_ext ext;
|
96
|
+
};
|
97
|
+
|
98
|
+
msgpack::type::object_type type;
|
99
|
+
union_type via;
|
100
|
+
|
101
|
+
bool is_nil() const { return type == msgpack::type::NIL; }
|
102
|
+
|
103
|
+
template <typename T>
|
104
|
+
T as() const;
|
105
|
+
|
106
|
+
template <typename T>
|
107
|
+
void convert(T& v) const;
|
108
|
+
template <typename T>
|
109
|
+
void convert(T* v) const;
|
110
|
+
|
111
|
+
object();
|
112
|
+
|
113
|
+
object(const msgpack_object& o);
|
114
|
+
|
115
|
+
template <typename T>
|
116
|
+
explicit object(const T& v);
|
117
|
+
|
118
|
+
template <typename T>
|
119
|
+
object(const T& v, msgpack::zone& z);
|
120
|
+
|
121
|
+
// obsolete
|
122
|
+
template <typename T>
|
123
|
+
object(const T& v, msgpack::zone* z);
|
124
|
+
|
125
|
+
template <typename T>
|
126
|
+
object& operator=(const T& v);
|
127
|
+
|
128
|
+
operator msgpack_object() const;
|
129
|
+
|
130
|
+
struct with_zone;
|
131
|
+
|
132
|
+
private:
|
133
|
+
struct implicit_type;
|
134
|
+
|
135
|
+
public:
|
136
|
+
implicit_type convert() const;
|
137
|
+
};
|
138
|
+
|
139
|
+
class type_error : public std::bad_cast { };
|
140
|
+
|
141
|
+
struct object_kv {
|
142
|
+
msgpack::object key;
|
143
|
+
msgpack::object val;
|
144
|
+
};
|
145
|
+
|
146
|
+
namespace detail {
|
147
|
+
template <typename Stream, typename T>
|
148
|
+
struct packer_serializer;
|
149
|
+
} // namespace detail
|
150
|
+
|
151
|
+
msgpack::object const& operator>> (msgpack::object const& o, msgpack::object& v);
|
152
|
+
|
153
|
+
template <typename T>
|
154
|
+
msgpack::object const& operator>> (msgpack::object const& o, T& v);
|
155
|
+
|
156
|
+
template <typename T>
|
157
|
+
void operator<< (msgpack::object::with_zone& o, const T& v);
|
158
|
+
|
159
|
+
void operator<< (msgpack::object::with_zone& o, const msgpack::object& v);
|
160
|
+
|
161
|
+
void operator<< (msgpack::object::with_zone& o, const msgpack::object::with_zone& v);
|
162
|
+
|
163
|
+
template <typename Stream>
|
164
|
+
class packer;
|
165
|
+
|
166
|
+
template <typename Stream>
|
167
|
+
msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object& v);
|
168
|
+
|
169
|
+
template <typename Stream>
|
170
|
+
msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object::with_zone& v);
|
171
|
+
|
172
|
+
template <typename Stream, typename T>
|
173
|
+
msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const T& v);
|
174
|
+
|
175
|
+
template <typename T>
|
176
|
+
void operator<< (msgpack::object::with_zone& o, const T& v);
|
177
|
+
|
178
|
+
} // MSGPACK_API_VERSION_NAMESPACE(v1)
|
179
|
+
|
180
|
+
} // namespace msgpack
|
181
|
+
|
182
|
+
#endif // MSGPACK_OBJECT_FWD_HPP
|
@@ -15,8 +15,8 @@
|
|
15
15
|
* See the License for the specific language governing permissions and
|
16
16
|
* limitations under the License.
|
17
17
|
*/
|
18
|
-
#ifndef
|
19
|
-
#define
|
18
|
+
#ifndef MSGPACK_PACK_H
|
19
|
+
#define MSGPACK_PACK_H
|
20
20
|
|
21
21
|
#include "pack_define.h"
|
22
22
|
#include "object.h"
|
@@ -43,8 +43,8 @@ extern "C" {
|
|
43
43
|
typedef int (*msgpack_packer_write)(void* data, const char* buf, size_t len);
|
44
44
|
|
45
45
|
typedef struct msgpack_packer {
|
46
|
-
|
47
|
-
|
46
|
+
void* data;
|
47
|
+
msgpack_packer_write callback;
|
48
48
|
} msgpack_packer;
|
49
49
|
|
50
50
|
static void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_packer_write callback);
|
@@ -94,8 +94,14 @@ static int msgpack_pack_array(msgpack_packer* pk, size_t n);
|
|
94
94
|
|
95
95
|
static int msgpack_pack_map(msgpack_packer* pk, size_t n);
|
96
96
|
|
97
|
-
static int
|
98
|
-
static int
|
97
|
+
static int msgpack_pack_str(msgpack_packer* pk, size_t l);
|
98
|
+
static int msgpack_pack_str_body(msgpack_packer* pk, const void* b, size_t l);
|
99
|
+
|
100
|
+
static int msgpack_pack_bin(msgpack_packer* pk, size_t l);
|
101
|
+
static int msgpack_pack_bin_body(msgpack_packer* pk, const void* b, size_t l);
|
102
|
+
|
103
|
+
static int msgpack_pack_ext(msgpack_packer* pk, size_t l, int8_t type);
|
104
|
+
static int msgpack_pack_ext_body(msgpack_packer* pk, const void* b, size_t l);
|
99
105
|
|
100
106
|
int msgpack_pack_object(msgpack_packer* pk, msgpack_object d);
|
101
107
|
|
@@ -104,38 +110,38 @@ int msgpack_pack_object(msgpack_packer* pk, msgpack_object d);
|
|
104
110
|
|
105
111
|
|
106
112
|
#define msgpack_pack_inline_func(name) \
|
107
|
-
|
113
|
+
inline int msgpack_pack ## name
|
108
114
|
|
109
115
|
#define msgpack_pack_inline_func_cint(name) \
|
110
|
-
|
116
|
+
inline int msgpack_pack ## name
|
111
117
|
|
112
118
|
#define msgpack_pack_inline_func_fixint(name) \
|
113
|
-
|
119
|
+
inline int msgpack_pack_fix ## name
|
114
120
|
|
115
121
|
#define msgpack_pack_user msgpack_packer*
|
116
122
|
|
117
123
|
#define msgpack_pack_append_buffer(user, buf, len) \
|
118
|
-
|
124
|
+
return (*(user)->callback)((user)->data, (const char*)buf, len)
|
119
125
|
|
120
126
|
#include "pack_template.h"
|
121
127
|
|
122
128
|
inline void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_packer_write callback)
|
123
129
|
{
|
124
|
-
|
125
|
-
|
130
|
+
pk->data = data;
|
131
|
+
pk->callback = callback;
|
126
132
|
}
|
127
133
|
|
128
134
|
inline msgpack_packer* msgpack_packer_new(void* data, msgpack_packer_write callback)
|
129
135
|
{
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
136
|
+
msgpack_packer* pk = (msgpack_packer*)calloc(1, sizeof(msgpack_packer));
|
137
|
+
if(!pk) { return NULL; }
|
138
|
+
msgpack_packer_init(pk, data, callback);
|
139
|
+
return pk;
|
134
140
|
}
|
135
141
|
|
136
142
|
inline void msgpack_packer_free(msgpack_packer* pk)
|
137
143
|
{
|
138
|
-
|
144
|
+
free(pk);
|
139
145
|
}
|
140
146
|
|
141
147
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//
|
2
2
|
// MessagePack for C++ serializing routine
|
3
3
|
//
|
4
|
-
// Copyright (C) 2008-
|
4
|
+
// Copyright (C) 2008-2013 FURUHASHI Sadayuki and KONDO Takatoshi
|
5
5
|
//
|
6
6
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
// you may not use this file except in compliance with the License.
|
@@ -15,323 +15,1048 @@
|
|
15
15
|
// See the License for the specific language governing permissions and
|
16
16
|
// limitations under the License.
|
17
17
|
//
|
18
|
-
#ifndef
|
19
|
-
#define
|
18
|
+
#ifndef MSGPACK_PACK_HPP
|
19
|
+
#define MSGPACK_PACK_HPP
|
20
|
+
|
21
|
+
#include "msgpack/versioning.hpp"
|
20
22
|
|
21
|
-
#include "pack_define.h"
|
22
23
|
#include <stdexcept>
|
23
|
-
#include <limits
|
24
|
+
#include <limits>
|
25
|
+
#include <cstring>
|
26
|
+
#include <climits>
|
27
|
+
|
28
|
+
#include "sysdep.h"
|
24
29
|
|
25
30
|
namespace msgpack {
|
26
31
|
|
32
|
+
MSGPACK_API_VERSION_NAMESPACE(v1) {
|
27
33
|
|
28
34
|
template <typename Stream>
|
29
35
|
class packer {
|
30
36
|
public:
|
31
|
-
|
32
|
-
|
33
|
-
~packer();
|
37
|
+
packer(Stream* s);
|
38
|
+
packer(Stream& s);
|
34
39
|
|
35
40
|
public:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
packer<Stream>& pack_map(
|
79
|
-
|
80
|
-
packer<Stream>&
|
81
|
-
packer<Stream>&
|
41
|
+
template <typename T>
|
42
|
+
packer<Stream>& pack(const T& v);
|
43
|
+
|
44
|
+
packer<Stream>& pack_uint8(uint8_t d);
|
45
|
+
packer<Stream>& pack_uint16(uint16_t d);
|
46
|
+
packer<Stream>& pack_uint32(uint32_t d);
|
47
|
+
packer<Stream>& pack_uint64(uint64_t d);
|
48
|
+
packer<Stream>& pack_int8(int8_t d);
|
49
|
+
packer<Stream>& pack_int16(int16_t d);
|
50
|
+
packer<Stream>& pack_int32(int32_t d);
|
51
|
+
packer<Stream>& pack_int64(int64_t d);
|
52
|
+
|
53
|
+
packer<Stream>& pack_fix_uint8(uint8_t d);
|
54
|
+
packer<Stream>& pack_fix_uint16(uint16_t d);
|
55
|
+
packer<Stream>& pack_fix_uint32(uint32_t d);
|
56
|
+
packer<Stream>& pack_fix_uint64(uint64_t d);
|
57
|
+
packer<Stream>& pack_fix_int8(int8_t d);
|
58
|
+
packer<Stream>& pack_fix_int16(int16_t d);
|
59
|
+
packer<Stream>& pack_fix_int32(int32_t d);
|
60
|
+
packer<Stream>& pack_fix_int64(int64_t d);
|
61
|
+
|
62
|
+
packer<Stream>& pack_char(char d);
|
63
|
+
packer<Stream>& pack_signed_char(signed char d);
|
64
|
+
packer<Stream>& pack_short(short d);
|
65
|
+
packer<Stream>& pack_int(int d);
|
66
|
+
packer<Stream>& pack_long(long d);
|
67
|
+
packer<Stream>& pack_long_long(long long d);
|
68
|
+
packer<Stream>& pack_unsigned_char(unsigned char d);
|
69
|
+
packer<Stream>& pack_unsigned_short(unsigned short d);
|
70
|
+
packer<Stream>& pack_unsigned_int(unsigned int d);
|
71
|
+
packer<Stream>& pack_unsigned_long(unsigned long d);
|
72
|
+
packer<Stream>& pack_unsigned_long_long(unsigned long long d);
|
73
|
+
|
74
|
+
packer<Stream>& pack_float(float d);
|
75
|
+
packer<Stream>& pack_double(double d);
|
76
|
+
|
77
|
+
packer<Stream>& pack_nil();
|
78
|
+
packer<Stream>& pack_true();
|
79
|
+
packer<Stream>& pack_false();
|
80
|
+
|
81
|
+
packer<Stream>& pack_array(uint32_t n);
|
82
|
+
|
83
|
+
packer<Stream>& pack_map(uint32_t n);
|
84
|
+
|
85
|
+
packer<Stream>& pack_str(uint32_t l);
|
86
|
+
packer<Stream>& pack_str_body(const char* b, uint32_t l);
|
87
|
+
|
88
|
+
packer<Stream>& pack_bin(uint32_t l);
|
89
|
+
packer<Stream>& pack_bin_body(const char* b, uint32_t l);
|
90
|
+
|
91
|
+
packer<Stream>& pack_ext(size_t l, int8_t type);
|
92
|
+
packer<Stream>& pack_ext_body(const char* b, uint32_t l);
|
82
93
|
|
83
94
|
private:
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
static void _pack_signed_char(Stream& x, signed char d);
|
105
|
-
static void _pack_short(Stream& x, short d);
|
106
|
-
static void _pack_int(Stream& x, int d);
|
107
|
-
static void _pack_long(Stream& x, long d);
|
108
|
-
static void _pack_long_long(Stream& x, long long d);
|
109
|
-
static void _pack_unsigned_char(Stream& x, unsigned char d);
|
110
|
-
static void _pack_unsigned_short(Stream& x, unsigned short d);
|
111
|
-
static void _pack_unsigned_int(Stream& x, unsigned int d);
|
112
|
-
static void _pack_unsigned_long(Stream& x, unsigned long d);
|
113
|
-
static void _pack_unsigned_long_long(Stream& x, unsigned long long d);
|
114
|
-
|
115
|
-
static void _pack_float(Stream& x, float d);
|
116
|
-
static void _pack_double(Stream& x, double d);
|
117
|
-
|
118
|
-
static void _pack_nil(Stream& x);
|
119
|
-
static void _pack_true(Stream& x);
|
120
|
-
static void _pack_false(Stream& x);
|
121
|
-
|
122
|
-
static void _pack_array(Stream& x, size_t n);
|
123
|
-
|
124
|
-
static void _pack_map(Stream& x, size_t n);
|
125
|
-
|
126
|
-
static void _pack_raw(Stream& x, size_t l);
|
127
|
-
static void _pack_raw_body(Stream& x, const void* b, size_t l);
|
128
|
-
|
129
|
-
static void append_buffer(Stream& x, const unsigned char* buf, size_t len)
|
130
|
-
{ x.write((const char*)buf, len); }
|
95
|
+
template <typename T>
|
96
|
+
void pack_imp_uint8(T d);
|
97
|
+
template <typename T>
|
98
|
+
void pack_imp_uint16(T d);
|
99
|
+
template <typename T>
|
100
|
+
void pack_imp_uint32(T d);
|
101
|
+
template <typename T>
|
102
|
+
void pack_imp_uint64(T d);
|
103
|
+
template <typename T>
|
104
|
+
void pack_imp_int8(T d);
|
105
|
+
template <typename T>
|
106
|
+
void pack_imp_int16(T d);
|
107
|
+
template <typename T>
|
108
|
+
void pack_imp_int32(T d);
|
109
|
+
template <typename T>
|
110
|
+
void pack_imp_int64(T d);
|
111
|
+
|
112
|
+
void append_buffer(const char* buf, size_t len)
|
113
|
+
{ m_stream.write(buf, len); }
|
131
114
|
|
132
115
|
private:
|
133
|
-
|
116
|
+
Stream& m_stream;
|
134
117
|
|
118
|
+
#if defined(MSGPACK_USE_CPP03)
|
135
119
|
private:
|
136
|
-
|
120
|
+
packer(const packer&);
|
121
|
+
packer& operator=(const packer&);
|
122
|
+
#else // defined(MSGPACK_USE_CPP03)
|
123
|
+
packer(const packer&) = delete;
|
124
|
+
packer& operator=(const packer&) = delete;
|
125
|
+
#endif // defined(MSGPACK_USE_CPP03)
|
126
|
+
packer();
|
137
127
|
};
|
138
128
|
|
139
129
|
|
140
130
|
template <typename Stream, typename T>
|
141
131
|
inline void pack(Stream* s, const T& v)
|
142
132
|
{
|
143
|
-
|
133
|
+
packer<Stream>(*s).pack(v);
|
144
134
|
}
|
145
135
|
|
146
136
|
template <typename Stream, typename T>
|
147
137
|
inline void pack(Stream& s, const T& v)
|
148
138
|
{
|
149
|
-
|
139
|
+
packer<Stream>(s).pack(v);
|
150
140
|
}
|
151
141
|
|
142
|
+
// serialize operator
|
143
|
+
template <typename Stream, typename T>
|
144
|
+
inline msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const T& v)
|
145
|
+
{
|
146
|
+
return detail::packer_serializer<Stream, T>::pack(o, v);
|
147
|
+
}
|
152
148
|
|
153
|
-
#define msgpack_pack_inline_func(name) \
|
154
|
-
template <typename Stream> \
|
155
|
-
inline void packer<Stream>::_pack ## name
|
156
|
-
|
157
|
-
#define msgpack_pack_inline_func_cint(name) \
|
158
|
-
template <typename Stream> \
|
159
|
-
inline void packer<Stream>::_pack ## name
|
160
|
-
|
161
|
-
#define msgpack_pack_inline_func_fixint(name) \
|
162
|
-
template <typename Stream> \
|
163
|
-
inline void packer<Stream>::_pack_fix ## name
|
164
149
|
|
165
|
-
#define msgpack_pack_user Stream&
|
166
150
|
|
167
|
-
#
|
151
|
+
#if defined(__LITTLE_ENDIAN__)
|
152
|
+
template <typename T>
|
153
|
+
inline char take8_8(T d) {
|
154
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[0]);
|
155
|
+
}
|
156
|
+
template <typename T>
|
157
|
+
inline char take8_16(T d) {
|
158
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[0]);
|
159
|
+
}
|
160
|
+
template <typename T>
|
161
|
+
inline char take8_32(T d) {
|
162
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[0]);
|
163
|
+
}
|
164
|
+
template <typename T>
|
165
|
+
inline char take8_64(T d) {
|
166
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[0]);
|
167
|
+
}
|
168
168
|
|
169
|
-
#
|
169
|
+
#elif defined(__BIG_ENDIAN__)
|
170
170
|
|
171
|
+
template <typename T>
|
172
|
+
inline char take8_8(T d) {
|
173
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[0]);
|
174
|
+
}
|
175
|
+
template <typename T>
|
176
|
+
inline char take8_16(T d) {
|
177
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[1]);
|
178
|
+
}
|
179
|
+
template <typename T>
|
180
|
+
inline char take8_32(T d) {
|
181
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[3]);
|
182
|
+
}
|
183
|
+
template <typename T>
|
184
|
+
inline char take8_64(T d) {
|
185
|
+
return static_cast<char>(reinterpret_cast<uint8_t*>(&d)[7]);
|
186
|
+
}
|
171
187
|
|
172
|
-
|
173
|
-
packer<Stream>::packer(Stream* s) : m_stream(*s) { }
|
188
|
+
#endif
|
174
189
|
|
175
190
|
template <typename Stream>
|
176
|
-
packer<Stream>::packer(Stream
|
191
|
+
inline packer<Stream>::packer(Stream* s) : m_stream(*s) { }
|
177
192
|
|
178
193
|
template <typename Stream>
|
179
|
-
packer<Stream
|
194
|
+
inline packer<Stream>::packer(Stream& s) : m_stream(s) { }
|
180
195
|
|
181
196
|
|
182
197
|
template <typename Stream>
|
183
198
|
inline packer<Stream>& packer<Stream>::pack_uint8(uint8_t d)
|
184
|
-
{
|
199
|
+
{ pack_imp_uint8(d); return *this; }
|
185
200
|
|
186
201
|
template <typename Stream>
|
187
202
|
inline packer<Stream>& packer<Stream>::pack_uint16(uint16_t d)
|
188
|
-
{
|
203
|
+
{ pack_imp_uint16(d); return *this; }
|
189
204
|
|
190
205
|
template <typename Stream>
|
191
206
|
inline packer<Stream>& packer<Stream>::pack_uint32(uint32_t d)
|
192
|
-
{
|
207
|
+
{ pack_imp_uint32(d); return *this; }
|
193
208
|
|
194
209
|
template <typename Stream>
|
195
210
|
inline packer<Stream>& packer<Stream>::pack_uint64(uint64_t d)
|
196
|
-
{
|
211
|
+
{ pack_imp_uint64(d); return *this; }
|
197
212
|
|
198
213
|
template <typename Stream>
|
199
214
|
inline packer<Stream>& packer<Stream>::pack_int8(int8_t d)
|
200
|
-
{
|
215
|
+
{ pack_imp_int8(d); return *this; }
|
201
216
|
|
202
217
|
template <typename Stream>
|
203
218
|
inline packer<Stream>& packer<Stream>::pack_int16(int16_t d)
|
204
|
-
{
|
219
|
+
{ pack_imp_int16(d); return *this; }
|
205
220
|
|
206
221
|
template <typename Stream>
|
207
222
|
inline packer<Stream>& packer<Stream>::pack_int32(int32_t d)
|
208
|
-
{
|
223
|
+
{ pack_imp_int32(d); return *this; }
|
209
224
|
|
210
225
|
template <typename Stream>
|
211
226
|
inline packer<Stream>& packer<Stream>::pack_int64(int64_t d)
|
212
|
-
{
|
227
|
+
{ pack_imp_int64(d); return *this;}
|
213
228
|
|
214
229
|
|
215
230
|
template <typename Stream>
|
216
231
|
inline packer<Stream>& packer<Stream>::pack_fix_uint8(uint8_t d)
|
217
|
-
{
|
232
|
+
{
|
233
|
+
char buf[2] = {static_cast<char>(0xccu), take8_8(d)};
|
234
|
+
append_buffer(buf, 2);
|
235
|
+
return *this;
|
236
|
+
}
|
218
237
|
|
219
238
|
template <typename Stream>
|
220
239
|
inline packer<Stream>& packer<Stream>::pack_fix_uint16(uint16_t d)
|
221
|
-
{
|
240
|
+
{
|
241
|
+
char buf[3];
|
242
|
+
buf[0] = static_cast<char>(0xcdu); _msgpack_store16(&buf[1], d);
|
243
|
+
append_buffer(buf, 3);
|
244
|
+
return *this;
|
245
|
+
}
|
222
246
|
|
223
247
|
template <typename Stream>
|
224
248
|
inline packer<Stream>& packer<Stream>::pack_fix_uint32(uint32_t d)
|
225
|
-
{
|
249
|
+
{
|
250
|
+
char buf[5];
|
251
|
+
buf[0] = static_cast<char>(0xceu); _msgpack_store32(&buf[1], d);
|
252
|
+
append_buffer(buf, 5);
|
253
|
+
return *this;
|
254
|
+
}
|
226
255
|
|
227
256
|
template <typename Stream>
|
228
257
|
inline packer<Stream>& packer<Stream>::pack_fix_uint64(uint64_t d)
|
229
|
-
{
|
258
|
+
{
|
259
|
+
char buf[9];
|
260
|
+
buf[0] = static_cast<char>(0xcfu); _msgpack_store64(&buf[1], d);
|
261
|
+
append_buffer(buf, 9);
|
262
|
+
return *this;
|
263
|
+
}
|
230
264
|
|
231
265
|
template <typename Stream>
|
232
266
|
inline packer<Stream>& packer<Stream>::pack_fix_int8(int8_t d)
|
233
|
-
{
|
267
|
+
{
|
268
|
+
char buf[2] = {static_cast<char>(0xd0u), take8_8(d)};
|
269
|
+
append_buffer(buf, 2);
|
270
|
+
return *this;
|
271
|
+
}
|
234
272
|
|
235
273
|
template <typename Stream>
|
236
274
|
inline packer<Stream>& packer<Stream>::pack_fix_int16(int16_t d)
|
237
|
-
{
|
275
|
+
{
|
276
|
+
char buf[3];
|
277
|
+
buf[0] = static_cast<char>(0xd1u); _msgpack_store16(&buf[1], d);
|
278
|
+
append_buffer(buf, 3);
|
279
|
+
return *this;
|
280
|
+
}
|
238
281
|
|
239
282
|
template <typename Stream>
|
240
283
|
inline packer<Stream>& packer<Stream>::pack_fix_int32(int32_t d)
|
241
|
-
{
|
284
|
+
{
|
285
|
+
char buf[5];
|
286
|
+
buf[0] = static_cast<char>(0xd2u); _msgpack_store32(&buf[1], d);
|
287
|
+
append_buffer(buf, 5);
|
288
|
+
return *this;
|
289
|
+
}
|
242
290
|
|
243
291
|
template <typename Stream>
|
244
292
|
inline packer<Stream>& packer<Stream>::pack_fix_int64(int64_t d)
|
245
|
-
{
|
293
|
+
{
|
294
|
+
char buf[9];
|
295
|
+
buf[0] = static_cast<char>(0xd3u); _msgpack_store64(&buf[1], d);
|
296
|
+
append_buffer(buf, 9);
|
297
|
+
return *this;
|
298
|
+
}
|
246
299
|
|
247
300
|
|
248
301
|
template <typename Stream>
|
249
302
|
inline packer<Stream>& packer<Stream>::pack_char(char d)
|
250
|
-
{
|
303
|
+
{
|
304
|
+
#if defined(CHAR_MIN)
|
305
|
+
#if CHAR_MIN < 0
|
306
|
+
pack_imp_int8(d);
|
307
|
+
#else
|
308
|
+
pack_imp_uint8(d);
|
309
|
+
#endif
|
310
|
+
#else
|
311
|
+
#error CHAR_MIN is not defined
|
312
|
+
#endif
|
313
|
+
return *this;
|
314
|
+
}
|
251
315
|
|
252
316
|
template <typename Stream>
|
253
317
|
inline packer<Stream>& packer<Stream>::pack_signed_char(signed char d)
|
254
|
-
{
|
318
|
+
{
|
319
|
+
pack_imp_int8(d);
|
320
|
+
return *this;
|
321
|
+
}
|
255
322
|
|
256
323
|
template <typename Stream>
|
257
324
|
inline packer<Stream>& packer<Stream>::pack_short(short d)
|
258
|
-
{
|
325
|
+
{
|
326
|
+
#if defined(SIZEOF_SHORT)
|
327
|
+
#if SIZEOF_SHORT == 2
|
328
|
+
pack_imp_int16(d);
|
329
|
+
#elif SIZEOF_SHORT == 4
|
330
|
+
pack_imp_int32(d);
|
331
|
+
#else
|
332
|
+
pack_imp_int64(d);
|
333
|
+
#endif
|
334
|
+
|
335
|
+
#elif defined(SHRT_MAX)
|
336
|
+
#if SHRT_MAX == 0x7fff
|
337
|
+
pack_imp_int16(d);
|
338
|
+
#elif SHRT_MAX == 0x7fffffff
|
339
|
+
pack_imp_int32(d);
|
340
|
+
#else
|
341
|
+
pack_imp_int64(d);
|
342
|
+
#endif
|
343
|
+
|
344
|
+
#else
|
345
|
+
if(sizeof(short) == 2) {
|
346
|
+
pack_imp_int16(d);
|
347
|
+
} else if(sizeof(short) == 4) {
|
348
|
+
pack_imp_int32(d);
|
349
|
+
} else {
|
350
|
+
pack_imp_int64(d);
|
351
|
+
}
|
352
|
+
#endif
|
353
|
+
return *this;
|
354
|
+
}
|
259
355
|
|
260
356
|
template <typename Stream>
|
261
357
|
inline packer<Stream>& packer<Stream>::pack_int(int d)
|
262
|
-
{
|
358
|
+
{
|
359
|
+
#if defined(SIZEOF_INT)
|
360
|
+
#if SIZEOF_INT == 2
|
361
|
+
pack_imp_int16(d);
|
362
|
+
#elif SIZEOF_INT == 4
|
363
|
+
pack_imp_int32(d);
|
364
|
+
#else
|
365
|
+
pack_imp_int64(d);
|
366
|
+
#endif
|
367
|
+
|
368
|
+
#elif defined(INT_MAX)
|
369
|
+
#if INT_MAX == 0x7fff
|
370
|
+
pack_imp_int16(d);
|
371
|
+
#elif INT_MAX == 0x7fffffff
|
372
|
+
pack_imp_int32(d);
|
373
|
+
#else
|
374
|
+
pack_imp_int64(d);
|
375
|
+
#endif
|
376
|
+
|
377
|
+
#else
|
378
|
+
if(sizeof(int) == 2) {
|
379
|
+
pack_imp_int16(d);
|
380
|
+
} else if(sizeof(int) == 4) {
|
381
|
+
pack_imp_int32(d);
|
382
|
+
} else {
|
383
|
+
pack_imp_int64(d);
|
384
|
+
}
|
385
|
+
#endif
|
386
|
+
return *this;
|
387
|
+
}
|
263
388
|
|
264
389
|
template <typename Stream>
|
265
390
|
inline packer<Stream>& packer<Stream>::pack_long(long d)
|
266
|
-
{
|
391
|
+
{
|
392
|
+
#if defined(SIZEOF_LONG)
|
393
|
+
#if SIZEOF_LONG == 2
|
394
|
+
pack_imp_int16(d);
|
395
|
+
#elif SIZEOF_LONG == 4
|
396
|
+
pack_imp_int32(d);
|
397
|
+
#else
|
398
|
+
pack_imp_int64(d);
|
399
|
+
#endif
|
400
|
+
|
401
|
+
#elif defined(LONG_MAX)
|
402
|
+
#if LONG_MAX == 0x7fffL
|
403
|
+
pack_imp_int16(d);
|
404
|
+
#elif LONG_MAX == 0x7fffffffL
|
405
|
+
pack_imp_int32(d);
|
406
|
+
#else
|
407
|
+
pack_imp_int64(d);
|
408
|
+
#endif
|
409
|
+
|
410
|
+
#else
|
411
|
+
if(sizeof(long) == 2) {
|
412
|
+
pack_imp_int16(d);
|
413
|
+
} else if(sizeof(long) == 4) {
|
414
|
+
pack_imp_int32(d);
|
415
|
+
} else {
|
416
|
+
pack_imp_int64(d);
|
417
|
+
}
|
418
|
+
#endif
|
419
|
+
return *this;
|
420
|
+
}
|
267
421
|
|
268
422
|
template <typename Stream>
|
269
423
|
inline packer<Stream>& packer<Stream>::pack_long_long(long long d)
|
270
|
-
{
|
424
|
+
{
|
425
|
+
#if defined(SIZEOF_LONG_LONG)
|
426
|
+
#if SIZEOF_LONG_LONG == 2
|
427
|
+
pack_imp_int16(d);
|
428
|
+
#elif SIZEOF_LONG_LONG == 4
|
429
|
+
pack_imp_int32(d);
|
430
|
+
#else
|
431
|
+
pack_imp_int64(d);
|
432
|
+
#endif
|
433
|
+
|
434
|
+
#elif defined(LLONG_MAX)
|
435
|
+
#if LLONG_MAX == 0x7fffL
|
436
|
+
pack_imp_int16(d);
|
437
|
+
#elif LLONG_MAX == 0x7fffffffL
|
438
|
+
pack_imp_int32(d);
|
439
|
+
#else
|
440
|
+
pack_imp_int64(d);
|
441
|
+
#endif
|
442
|
+
|
443
|
+
#else
|
444
|
+
if(sizeof(long long) == 2) {
|
445
|
+
pack_imp_int16(d);
|
446
|
+
} else if(sizeof(long long) == 4) {
|
447
|
+
pack_imp_int32(d);
|
448
|
+
} else {
|
449
|
+
pack_imp_int64(d);
|
450
|
+
}
|
451
|
+
#endif
|
452
|
+
return *this;
|
453
|
+
}
|
454
|
+
|
271
455
|
|
272
456
|
template <typename Stream>
|
273
457
|
inline packer<Stream>& packer<Stream>::pack_unsigned_char(unsigned char d)
|
274
|
-
{
|
458
|
+
{
|
459
|
+
pack_imp_uint8(d);
|
460
|
+
return *this;
|
461
|
+
}
|
275
462
|
|
276
463
|
template <typename Stream>
|
277
464
|
inline packer<Stream>& packer<Stream>::pack_unsigned_short(unsigned short d)
|
278
|
-
{
|
465
|
+
{
|
466
|
+
#if defined(SIZEOF_SHORT)
|
467
|
+
#if SIZEOF_SHORT == 2
|
468
|
+
pack_imp_uint16(d);
|
469
|
+
#elif SIZEOF_SHORT == 4
|
470
|
+
pack_imp_uint32(d);
|
471
|
+
#else
|
472
|
+
pack_imp_uint64(d);
|
473
|
+
#endif
|
474
|
+
|
475
|
+
#elif defined(USHRT_MAX)
|
476
|
+
#if USHRT_MAX == 0xffffU
|
477
|
+
pack_imp_uint16(d);
|
478
|
+
#elif USHRT_MAX == 0xffffffffU
|
479
|
+
pack_imp_uint32(d);
|
480
|
+
#else
|
481
|
+
pack_imp_uint64(d);
|
482
|
+
#endif
|
483
|
+
|
484
|
+
#else
|
485
|
+
if(sizeof(unsigned short) == 2) {
|
486
|
+
pack_imp_uint16(d);
|
487
|
+
} else if(sizeof(unsigned short) == 4) {
|
488
|
+
pack_imp_uint32(d);
|
489
|
+
} else {
|
490
|
+
pack_imp_uint64(d);
|
491
|
+
}
|
492
|
+
#endif
|
493
|
+
return *this;
|
494
|
+
}
|
279
495
|
|
280
496
|
template <typename Stream>
|
281
497
|
inline packer<Stream>& packer<Stream>::pack_unsigned_int(unsigned int d)
|
282
|
-
{
|
498
|
+
{
|
499
|
+
#if defined(SIZEOF_INT)
|
500
|
+
#if SIZEOF_INT == 2
|
501
|
+
pack_imp_uint16(d);
|
502
|
+
#elif SIZEOF_INT == 4
|
503
|
+
pack_imp_uint32(d);
|
504
|
+
#else
|
505
|
+
pack_imp_uint64(d);
|
506
|
+
#endif
|
507
|
+
|
508
|
+
#elif defined(UINT_MAX)
|
509
|
+
#if UINT_MAX == 0xffffU
|
510
|
+
pack_imp_uint16(d);
|
511
|
+
#elif UINT_MAX == 0xffffffffU
|
512
|
+
pack_imp_uint32(d);
|
513
|
+
#else
|
514
|
+
pack_imp_uint64(d);
|
515
|
+
#endif
|
516
|
+
|
517
|
+
#else
|
518
|
+
if(sizeof(unsigned int) == 2) {
|
519
|
+
pack_imp_uint16(d);
|
520
|
+
} else if(sizeof(unsigned int) == 4) {
|
521
|
+
pack_imp_uint32(d);
|
522
|
+
} else {
|
523
|
+
pack_imp_uint64(d);
|
524
|
+
}
|
525
|
+
#endif
|
526
|
+
return *this;
|
527
|
+
}
|
283
528
|
|
284
529
|
template <typename Stream>
|
285
530
|
inline packer<Stream>& packer<Stream>::pack_unsigned_long(unsigned long d)
|
286
|
-
{
|
531
|
+
{
|
532
|
+
#if defined(SIZEOF_LONG)
|
533
|
+
#if SIZEOF_LONG == 2
|
534
|
+
pack_imp_uint16(d);
|
535
|
+
#elif SIZEOF_LONG == 4
|
536
|
+
pack_imp_uint32(d);
|
537
|
+
#else
|
538
|
+
pack_imp_uint64(d);
|
539
|
+
#endif
|
540
|
+
|
541
|
+
#elif defined(ULONG_MAX)
|
542
|
+
#if ULONG_MAX == 0xffffUL
|
543
|
+
pack_imp_uint16(d);
|
544
|
+
#elif ULONG_MAX == 0xffffffffUL
|
545
|
+
pack_imp_uint32(d);
|
546
|
+
#else
|
547
|
+
pack_imp_uint64(d);
|
548
|
+
#endif
|
549
|
+
|
550
|
+
#else
|
551
|
+
if(sizeof(unsigned long) == 2) {
|
552
|
+
pack_imp_uint16(d);
|
553
|
+
} else if(sizeof(unsigned long) == 4) {
|
554
|
+
pack_imp_uint32(d);
|
555
|
+
} else {
|
556
|
+
pack_imp_uint64(d);
|
557
|
+
}
|
558
|
+
#endif
|
559
|
+
return *this;
|
560
|
+
}
|
287
561
|
|
288
562
|
template <typename Stream>
|
289
563
|
inline packer<Stream>& packer<Stream>::pack_unsigned_long_long(unsigned long long d)
|
290
|
-
{
|
564
|
+
{
|
565
|
+
#if defined(SIZEOF_LONG_LONG)
|
566
|
+
#if SIZEOF_LONG_LONG == 2
|
567
|
+
pack_imp_uint16(d);
|
568
|
+
#elif SIZEOF_LONG_LONG == 4
|
569
|
+
pack_imp_uint32(d);
|
570
|
+
#else
|
571
|
+
pack_imp_uint64(d);
|
572
|
+
#endif
|
573
|
+
|
574
|
+
#elif defined(ULLONG_MAX)
|
575
|
+
#if ULLONG_MAX == 0xffffUL
|
576
|
+
pack_imp_uint16(d);
|
577
|
+
#elif ULLONG_MAX == 0xffffffffUL
|
578
|
+
pack_imp_uint32(d);
|
579
|
+
#else
|
580
|
+
pack_imp_uint64(d);
|
581
|
+
#endif
|
582
|
+
|
583
|
+
#else
|
584
|
+
if(sizeof(unsigned long long) == 2) {
|
585
|
+
pack_imp_uint16(d);
|
586
|
+
} else if(sizeof(unsigned long long) == 4) {
|
587
|
+
pack_imp_uint32(d);
|
588
|
+
} else {
|
589
|
+
pack_imp_uint64(d);
|
590
|
+
}
|
591
|
+
#endif
|
592
|
+
return *this;
|
593
|
+
}
|
291
594
|
|
292
595
|
|
293
596
|
template <typename Stream>
|
294
597
|
inline packer<Stream>& packer<Stream>::pack_float(float d)
|
295
|
-
{
|
598
|
+
{
|
599
|
+
union { float f; uint32_t i; } mem;
|
600
|
+
mem.f = d;
|
601
|
+
char buf[5];
|
602
|
+
buf[0] = static_cast<char>(0xcau); _msgpack_store32(&buf[1], mem.i);
|
603
|
+
append_buffer(buf, 5);
|
604
|
+
return *this;
|
605
|
+
}
|
296
606
|
|
297
607
|
template <typename Stream>
|
298
608
|
inline packer<Stream>& packer<Stream>::pack_double(double d)
|
299
|
-
{
|
609
|
+
{
|
610
|
+
union { double f; uint64_t i; } mem;
|
611
|
+
mem.f = d;
|
612
|
+
char buf[9];
|
613
|
+
buf[0] = static_cast<char>(0xcbu);
|
614
|
+
#if defined(__arm__) && !(__ARM_EABI__) // arm-oabi
|
615
|
+
// https://github.com/msgpack/msgpack-perl/pull/1
|
616
|
+
mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL);
|
617
|
+
#endif
|
618
|
+
_msgpack_store64(&buf[1], mem.i);
|
619
|
+
append_buffer(buf, 9);
|
620
|
+
return *this;
|
621
|
+
}
|
300
622
|
|
301
623
|
|
302
624
|
template <typename Stream>
|
303
625
|
inline packer<Stream>& packer<Stream>::pack_nil()
|
304
|
-
{
|
626
|
+
{
|
627
|
+
const char d = static_cast<char>(0xc0u);
|
628
|
+
append_buffer(&d, 1);
|
629
|
+
return *this;
|
630
|
+
}
|
305
631
|
|
306
632
|
template <typename Stream>
|
307
633
|
inline packer<Stream>& packer<Stream>::pack_true()
|
308
|
-
{
|
634
|
+
{
|
635
|
+
const char d = static_cast<char>(0xc3u);
|
636
|
+
append_buffer(&d, 1);
|
637
|
+
return *this;
|
638
|
+
}
|
309
639
|
|
310
640
|
template <typename Stream>
|
311
641
|
inline packer<Stream>& packer<Stream>::pack_false()
|
312
|
-
{
|
642
|
+
{
|
643
|
+
const char d = static_cast<char>(0xc2u);
|
644
|
+
append_buffer(&d, 1);
|
645
|
+
return *this;
|
646
|
+
}
|
647
|
+
|
648
|
+
|
649
|
+
template <typename Stream>
|
650
|
+
inline packer<Stream>& packer<Stream>::pack_array(uint32_t n)
|
651
|
+
{
|
652
|
+
if(n < 16) {
|
653
|
+
char d = static_cast<char>(0x90u | n);
|
654
|
+
append_buffer(&d, 1);
|
655
|
+
} else if(n < 65536) {
|
656
|
+
char buf[3];
|
657
|
+
buf[0] = static_cast<char>(0xdcu); _msgpack_store16(&buf[1], static_cast<uint16_t>(n));
|
658
|
+
append_buffer(buf, 3);
|
659
|
+
} else {
|
660
|
+
char buf[5];
|
661
|
+
buf[0] = static_cast<char>(0xddu); _msgpack_store32(&buf[1], static_cast<uint32_t>(n));
|
662
|
+
append_buffer(buf, 5);
|
663
|
+
}
|
664
|
+
return *this;
|
665
|
+
}
|
666
|
+
|
667
|
+
template <typename Stream>
|
668
|
+
inline packer<Stream>& packer<Stream>::pack_map(uint32_t n)
|
669
|
+
{
|
670
|
+
if(n < 16) {
|
671
|
+
unsigned char d = static_cast<unsigned char>(0x80u | n);
|
672
|
+
char buf = take8_8(d);
|
673
|
+
append_buffer(&buf, 1);
|
674
|
+
} else if(n < 65536) {
|
675
|
+
char buf[3];
|
676
|
+
buf[0] = static_cast<char>(0xdeu); _msgpack_store16(&buf[1], static_cast<uint16_t>(n));
|
677
|
+
append_buffer(buf, 3);
|
678
|
+
} else {
|
679
|
+
char buf[5];
|
680
|
+
buf[0] = static_cast<char>(0xdfu); _msgpack_store32(&buf[1], static_cast<uint32_t>(n));
|
681
|
+
append_buffer(buf, 5);
|
682
|
+
}
|
683
|
+
return *this;
|
684
|
+
}
|
685
|
+
|
686
|
+
template <typename Stream>
|
687
|
+
inline packer<Stream>& packer<Stream>::pack_str(uint32_t l)
|
688
|
+
{
|
689
|
+
if(l < 32) {
|
690
|
+
unsigned char d = 0xa0u | static_cast<uint8_t>(l);
|
691
|
+
char buf = take8_8(d);
|
692
|
+
append_buffer(&buf, 1);
|
693
|
+
} else if(l < 256) {
|
694
|
+
char buf[2];
|
695
|
+
buf[0] = static_cast<char>(0xd9u); buf[1] = static_cast<uint8_t>(l);
|
696
|
+
append_buffer(buf, 2);
|
697
|
+
} else if(l < 65536) {
|
698
|
+
char buf[3];
|
699
|
+
buf[0] = static_cast<char>(0xdau); _msgpack_store16(&buf[1], static_cast<uint16_t>(l));
|
700
|
+
append_buffer(buf, 3);
|
701
|
+
} else {
|
702
|
+
char buf[5];
|
703
|
+
buf[0] = static_cast<char>(0xdbu); _msgpack_store32(&buf[1], static_cast<uint32_t>(l));
|
704
|
+
append_buffer(buf, 5);
|
705
|
+
}
|
706
|
+
return *this;
|
707
|
+
}
|
708
|
+
|
709
|
+
template <typename Stream>
|
710
|
+
inline packer<Stream>& packer<Stream>::pack_str_body(const char* b, uint32_t l)
|
711
|
+
{
|
712
|
+
append_buffer(b, l);
|
713
|
+
return *this;
|
714
|
+
}
|
715
|
+
|
716
|
+
template <typename Stream>
|
717
|
+
inline packer<Stream>& packer<Stream>::pack_bin(uint32_t l)
|
718
|
+
{
|
719
|
+
if(l < 256) {
|
720
|
+
char buf[2];
|
721
|
+
buf[0] = static_cast<char>(0xc4u); buf[1] = static_cast<uint8_t>(l);
|
722
|
+
append_buffer(buf, 2);
|
723
|
+
} else if(l < 65536) {
|
724
|
+
char buf[3];
|
725
|
+
buf[0] = static_cast<char>(0xc5u); _msgpack_store16(&buf[1], static_cast<uint16_t>(l));
|
726
|
+
append_buffer(buf, 3);
|
727
|
+
} else {
|
728
|
+
char buf[5];
|
729
|
+
buf[0] = static_cast<char>(0xc6u); _msgpack_store32(&buf[1], static_cast<uint32_t>(l));
|
730
|
+
append_buffer(buf, 5);
|
731
|
+
}
|
732
|
+
return *this;
|
733
|
+
}
|
734
|
+
|
735
|
+
template <typename Stream>
|
736
|
+
inline packer<Stream>& packer<Stream>::pack_bin_body(const char* b, uint32_t l)
|
737
|
+
{
|
738
|
+
append_buffer(b, l);
|
739
|
+
return *this;
|
740
|
+
}
|
313
741
|
|
742
|
+
template <typename Stream>
|
743
|
+
inline packer<Stream>& packer<Stream>::pack_ext(size_t l, int8_t type)
|
744
|
+
{
|
745
|
+
switch(l) {
|
746
|
+
case 1: {
|
747
|
+
char buf[2];
|
748
|
+
buf[0] = static_cast<char>(0xd4u);
|
749
|
+
buf[1] = static_cast<char>(type);
|
750
|
+
append_buffer(buf, 2);
|
751
|
+
} break;
|
752
|
+
case 2: {
|
753
|
+
char buf[2];
|
754
|
+
buf[0] = static_cast<char>(0xd5u);
|
755
|
+
buf[1] = static_cast<char>(type);
|
756
|
+
append_buffer(buf, 2);
|
757
|
+
} break;
|
758
|
+
case 4: {
|
759
|
+
char buf[2];
|
760
|
+
buf[0] = static_cast<char>(0xd6u);
|
761
|
+
buf[1] = static_cast<char>(type);
|
762
|
+
append_buffer(buf, 2);
|
763
|
+
} break;
|
764
|
+
case 8: {
|
765
|
+
char buf[2];
|
766
|
+
buf[0] = static_cast<char>(0xd7u);
|
767
|
+
buf[1] = static_cast<char>(type);
|
768
|
+
append_buffer(buf, 2);
|
769
|
+
} break;
|
770
|
+
case 16: {
|
771
|
+
char buf[2];
|
772
|
+
buf[0] = static_cast<char>(0xd8u);
|
773
|
+
buf[1] = static_cast<char>(type);
|
774
|
+
append_buffer(buf, 2);
|
775
|
+
} break;
|
776
|
+
default:
|
777
|
+
if(l < 256) {
|
778
|
+
char buf[3];
|
779
|
+
buf[0] = static_cast<char>(0xc7u);
|
780
|
+
buf[1] = static_cast<char>(l);
|
781
|
+
buf[2] = static_cast<char>(type);
|
782
|
+
append_buffer(buf, 3);
|
783
|
+
} else if(l < 65536) {
|
784
|
+
char buf[4];
|
785
|
+
buf[0] = static_cast<char>(0xc8u);
|
786
|
+
_msgpack_store16(&buf[1], static_cast<uint16_t>(l));
|
787
|
+
buf[3] = static_cast<char>(type);
|
788
|
+
append_buffer(buf, 4);
|
789
|
+
} else {
|
790
|
+
char buf[6];
|
791
|
+
buf[0] = static_cast<char>(0xc9u);
|
792
|
+
_msgpack_store32(&buf[1], static_cast<uint32_t>(l));
|
793
|
+
buf[5] = static_cast<char>(type);
|
794
|
+
append_buffer(buf, 6);
|
795
|
+
}
|
796
|
+
break;
|
797
|
+
}
|
798
|
+
return *this;
|
799
|
+
}
|
800
|
+
|
801
|
+
template <typename Stream>
|
802
|
+
inline packer<Stream>& packer<Stream>::pack_ext_body(const char* b, uint32_t l)
|
803
|
+
{
|
804
|
+
append_buffer(b, l);
|
805
|
+
return *this;
|
806
|
+
}
|
807
|
+
|
808
|
+
template <typename Stream>
|
809
|
+
template <typename T>
|
810
|
+
inline void packer<Stream>::pack_imp_uint8(T d)
|
811
|
+
{
|
812
|
+
if(d < (1<<7)) {
|
813
|
+
/* fixnum */
|
814
|
+
char buf = take8_8(d);
|
815
|
+
append_buffer(&buf, 1);
|
816
|
+
} else {
|
817
|
+
/* unsigned 8 */
|
818
|
+
char buf[2] = {static_cast<char>(0xccu), take8_8(d)};
|
819
|
+
append_buffer(buf, 2);
|
820
|
+
}
|
821
|
+
}
|
822
|
+
|
823
|
+
template <typename Stream>
|
824
|
+
template <typename T>
|
825
|
+
inline void packer<Stream>::pack_imp_uint16(T d)
|
826
|
+
{
|
827
|
+
if(d < (1<<7)) {
|
828
|
+
/* fixnum */
|
829
|
+
char buf = take8_16(d);
|
830
|
+
append_buffer(&buf, 1);
|
831
|
+
} else if(d < (1<<8)) {
|
832
|
+
/* unsigned 8 */
|
833
|
+
char buf[2] = {static_cast<char>(0xccu), take8_16(d)};
|
834
|
+
append_buffer(buf, 2);
|
835
|
+
} else {
|
836
|
+
/* unsigned 16 */
|
837
|
+
char buf[3];
|
838
|
+
buf[0] = static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
|
839
|
+
append_buffer(buf, 3);
|
840
|
+
}
|
841
|
+
}
|
314
842
|
|
315
843
|
template <typename Stream>
|
316
|
-
|
317
|
-
|
844
|
+
template <typename T>
|
845
|
+
inline void packer<Stream>::pack_imp_uint32(T d)
|
846
|
+
{
|
847
|
+
if(d < (1<<8)) {
|
848
|
+
if(d < (1<<7)) {
|
849
|
+
/* fixnum */
|
850
|
+
char buf = take8_32(d);
|
851
|
+
append_buffer(&buf, 1);
|
852
|
+
} else {
|
853
|
+
/* unsigned 8 */
|
854
|
+
char buf[2] = {static_cast<char>(0xccu), take8_32(d)};
|
855
|
+
append_buffer(buf, 2);
|
856
|
+
}
|
857
|
+
} else {
|
858
|
+
if(d < (1<<16)) {
|
859
|
+
/* unsigned 16 */
|
860
|
+
char buf[3];
|
861
|
+
buf[0] = static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
|
862
|
+
append_buffer(buf, 3);
|
863
|
+
} else {
|
864
|
+
/* unsigned 32 */
|
865
|
+
char buf[5];
|
866
|
+
buf[0] = static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
|
867
|
+
append_buffer(buf, 5);
|
868
|
+
}
|
869
|
+
}
|
870
|
+
}
|
318
871
|
|
872
|
+
template <typename Stream>
|
873
|
+
template <typename T>
|
874
|
+
inline void packer<Stream>::pack_imp_uint64(T d)
|
875
|
+
{
|
876
|
+
if(d < (1ULL<<8)) {
|
877
|
+
if(d < (1ULL<<7)) {
|
878
|
+
/* fixnum */
|
879
|
+
char buf = take8_64(d);
|
880
|
+
append_buffer(&buf, 1);
|
881
|
+
} else {
|
882
|
+
/* unsigned 8 */
|
883
|
+
char buf[2] = {static_cast<char>(0xccu), take8_64(d)};
|
884
|
+
append_buffer(buf, 2);
|
885
|
+
}
|
886
|
+
} else {
|
887
|
+
if(d < (1ULL<<16)) {
|
888
|
+
/* unsigned 16 */
|
889
|
+
char buf[3];
|
890
|
+
buf[0] = static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
|
891
|
+
append_buffer(buf, 3);
|
892
|
+
} else if(d < (1ULL<<32)) {
|
893
|
+
/* unsigned 32 */
|
894
|
+
char buf[5];
|
895
|
+
buf[0] = static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
|
896
|
+
append_buffer(buf, 5);
|
897
|
+
} else {
|
898
|
+
/* unsigned 64 */
|
899
|
+
char buf[9];
|
900
|
+
buf[0] = static_cast<char>(0xcfu); _msgpack_store64(&buf[1], d);
|
901
|
+
append_buffer(buf, 9);
|
902
|
+
}
|
903
|
+
}
|
904
|
+
}
|
319
905
|
|
320
906
|
template <typename Stream>
|
321
|
-
|
322
|
-
|
907
|
+
template <typename T>
|
908
|
+
inline void packer<Stream>::pack_imp_int8(T d)
|
909
|
+
{
|
910
|
+
if(d < -(1<<5)) {
|
911
|
+
/* signed 8 */
|
912
|
+
char buf[2] = {static_cast<char>(0xd0u), take8_8(d)};
|
913
|
+
append_buffer(buf, 2);
|
914
|
+
} else {
|
915
|
+
/* fixnum */
|
916
|
+
char buf = take8_8(d);
|
917
|
+
append_buffer(&buf, 1);
|
918
|
+
}
|
919
|
+
}
|
323
920
|
|
921
|
+
template <typename Stream>
|
922
|
+
template <typename T>
|
923
|
+
inline void packer<Stream>::pack_imp_int16(T d)
|
924
|
+
{
|
925
|
+
if(d < -(1<<5)) {
|
926
|
+
if(d < -(1<<7)) {
|
927
|
+
/* signed 16 */
|
928
|
+
char buf[3];
|
929
|
+
buf[0] = static_cast<char>(0xd1u); _msgpack_store16(&buf[1], static_cast<int16_t>(d));
|
930
|
+
append_buffer(buf, 3);
|
931
|
+
} else {
|
932
|
+
/* signed 8 */
|
933
|
+
char buf[2] = {static_cast<char>(0xd0u), take8_16(d)};
|
934
|
+
append_buffer(buf, 2);
|
935
|
+
}
|
936
|
+
} else if(d < (1<<7)) {
|
937
|
+
/* fixnum */
|
938
|
+
char buf = take8_16(d);
|
939
|
+
append_buffer(&buf, 1);
|
940
|
+
} else {
|
941
|
+
if(d < (1<<8)) {
|
942
|
+
/* unsigned 8 */
|
943
|
+
char buf[2] = {static_cast<char>(0xccu), take8_16(d)};
|
944
|
+
append_buffer(buf, 2);
|
945
|
+
} else {
|
946
|
+
/* unsigned 16 */
|
947
|
+
char buf[3];
|
948
|
+
buf[0] = static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
|
949
|
+
append_buffer(buf, 3);
|
950
|
+
}
|
951
|
+
}
|
952
|
+
}
|
324
953
|
|
325
954
|
template <typename Stream>
|
326
|
-
|
327
|
-
|
955
|
+
template <typename T>
|
956
|
+
inline void packer<Stream>::pack_imp_int32(T d)
|
957
|
+
{
|
958
|
+
if(d < -(1<<5)) {
|
959
|
+
if(d < -(1<<15)) {
|
960
|
+
/* signed 32 */
|
961
|
+
char buf[5];
|
962
|
+
buf[0] = static_cast<char>(0xd2u); _msgpack_store32(&buf[1], static_cast<int32_t>(d));
|
963
|
+
append_buffer(buf, 5);
|
964
|
+
} else if(d < -(1<<7)) {
|
965
|
+
/* signed 16 */
|
966
|
+
char buf[3];
|
967
|
+
buf[0] = static_cast<char>(0xd1u); _msgpack_store16(&buf[1], static_cast<int16_t>(d));
|
968
|
+
append_buffer(buf, 3);
|
969
|
+
} else {
|
970
|
+
/* signed 8 */
|
971
|
+
char buf[2] = { static_cast<char>(0xd0u), take8_32(d)};
|
972
|
+
append_buffer(buf, 2);
|
973
|
+
}
|
974
|
+
} else if(d < (1<<7)) {
|
975
|
+
/* fixnum */
|
976
|
+
char buf = take8_32(d);
|
977
|
+
append_buffer(&buf, 1);
|
978
|
+
} else {
|
979
|
+
if(d < (1<<8)) {
|
980
|
+
/* unsigned 8 */
|
981
|
+
char buf[2] = { static_cast<char>(0xccu), take8_32(d)};
|
982
|
+
append_buffer(buf, 2);
|
983
|
+
} else if(d < (1<<16)) {
|
984
|
+
/* unsigned 16 */
|
985
|
+
char buf[3];
|
986
|
+
buf[0] = static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
|
987
|
+
append_buffer(buf, 3);
|
988
|
+
} else {
|
989
|
+
/* unsigned 32 */
|
990
|
+
char buf[5];
|
991
|
+
buf[0] = static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
|
992
|
+
append_buffer(buf, 5);
|
993
|
+
}
|
994
|
+
}
|
995
|
+
}
|
328
996
|
|
329
997
|
template <typename Stream>
|
330
|
-
|
331
|
-
|
998
|
+
template <typename T>
|
999
|
+
inline void packer<Stream>::pack_imp_int64(T d)
|
1000
|
+
{
|
1001
|
+
if(d < -(1LL<<5)) {
|
1002
|
+
if(d < -(1LL<<15)) {
|
1003
|
+
if(d < -(1LL<<31)) {
|
1004
|
+
/* signed 64 */
|
1005
|
+
char buf[9];
|
1006
|
+
buf[0] = static_cast<char>(0xd3u); _msgpack_store64(&buf[1], d);
|
1007
|
+
append_buffer(buf, 9);
|
1008
|
+
} else {
|
1009
|
+
/* signed 32 */
|
1010
|
+
char buf[5];
|
1011
|
+
buf[0] = static_cast<char>(0xd2u); _msgpack_store32(&buf[1], static_cast<int32_t>(d));
|
1012
|
+
append_buffer(buf, 5);
|
1013
|
+
}
|
1014
|
+
} else {
|
1015
|
+
if(d < -(1<<7)) {
|
1016
|
+
/* signed 16 */
|
1017
|
+
char buf[3];
|
1018
|
+
buf[0] = static_cast<char>(0xd1u); _msgpack_store16(&buf[1], static_cast<int16_t>(d));
|
1019
|
+
append_buffer(buf, 3);
|
1020
|
+
} else {
|
1021
|
+
/* signed 8 */
|
1022
|
+
char buf[2] = {static_cast<char>(0xd0u), take8_64(d)};
|
1023
|
+
append_buffer(buf, 2);
|
1024
|
+
}
|
1025
|
+
}
|
1026
|
+
} else if(d < (1<<7)) {
|
1027
|
+
/* fixnum */
|
1028
|
+
char buf = take8_64(d);
|
1029
|
+
append_buffer(&buf, 1);
|
1030
|
+
} else {
|
1031
|
+
if(d < (1LL<<16)) {
|
1032
|
+
if(d < (1<<8)) {
|
1033
|
+
/* unsigned 8 */
|
1034
|
+
char buf[2] = {static_cast<char>(0xccu), take8_64(d)};
|
1035
|
+
append_buffer(buf, 2);
|
1036
|
+
} else {
|
1037
|
+
/* unsigned 16 */
|
1038
|
+
char buf[3];
|
1039
|
+
buf[0] = static_cast<char>(0xcdu); _msgpack_store16(&buf[1], static_cast<uint16_t>(d));
|
1040
|
+
append_buffer(buf, 3);
|
1041
|
+
}
|
1042
|
+
} else {
|
1043
|
+
if(d < (1LL<<32)) {
|
1044
|
+
/* unsigned 32 */
|
1045
|
+
char buf[5];
|
1046
|
+
buf[0] = static_cast<char>(0xceu); _msgpack_store32(&buf[1], static_cast<uint32_t>(d));
|
1047
|
+
append_buffer(buf, 5);
|
1048
|
+
} else {
|
1049
|
+
/* unsigned 64 */
|
1050
|
+
char buf[9];
|
1051
|
+
buf[0] = static_cast<char>(0xcfu); _msgpack_store64(&buf[1], d);
|
1052
|
+
append_buffer(buf, 9);
|
1053
|
+
}
|
1054
|
+
}
|
1055
|
+
}
|
1056
|
+
}
|
332
1057
|
|
1058
|
+
} // MSGPACK_API_VERSION_NAMESPACE(v1)
|
333
1059
|
|
334
1060
|
} // namespace msgpack
|
335
1061
|
|
336
1062
|
#endif /* msgpack/pack.hpp */
|
337
|
-
|