rroonga 6.0.5-x86-mingw32 → 6.0.7-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +15 -0
- data/ext/groonga/rb-grn-column.c +23 -17
- data/ext/groonga/rb-grn-context.c +24 -22
- data/ext/groonga/rb-grn-exception.c +2 -256
- data/ext/groonga/rb-grn-index-column.c +21 -9
- data/ext/groonga/rb-grn-object.c +98 -62
- data/ext/groonga/rb-grn-table-sort-keys.c +1 -1
- data/ext/groonga/rb-grn-table.c +2 -2
- data/ext/groonga/rb-grn-variable-size-column.c +13 -7
- data/ext/groonga/rb-grn.h +1 -2
- data/ext/groonga/rb-groonga.c +3 -2
- data/lib/2.1/groonga.so +0 -0
- data/lib/2.2/groonga.so +0 -0
- data/lib/2.3/groonga.so +0 -0
- data/rroonga-build.rb +3 -3
- data/test/test-fix-size-column.rb +1 -1
- data/test/test-schema.rb +1 -1
- data/test/test-variable-size-column.rb +1 -1
- data/vendor/local/bin/grndb.exe +0 -0
- data/vendor/local/bin/groonga-benchmark.exe +0 -0
- data/vendor/local/bin/groonga-suggest-create-dataset.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-2.dll +0 -0
- data/vendor/local/bin/{libmsgpack-4.dll → libmsgpackc.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.exe +0 -0
- data/vendor/local/bin/zlib1.dll +0 -0
- data/vendor/local/include/groonga/groonga.h +2 -0
- data/vendor/local/include/groonga/groonga/column.h +29 -0
- data/vendor/local/include/groonga/groonga/dump.h +1 -1
- data/vendor/local/include/groonga/groonga/error.h +29 -0
- data/vendor/local/include/groonga/groonga/groonga.h +6 -1
- data/vendor/local/include/msgpack/adaptor/adaptor_base.hpp +4 -70
- data/vendor/local/include/msgpack/adaptor/adaptor_base_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/array_ref.hpp +4 -161
- data/vendor/local/include/msgpack/adaptor/array_ref_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/bool.hpp +2 -53
- data/vendor/local/include/msgpack/adaptor/boost/fusion.hpp +1 -146
- data/vendor/local/include/msgpack/adaptor/boost/msgpack_variant.hpp +4 -416
- data/vendor/local/include/msgpack/adaptor/boost/msgpack_variant_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/boost/optional.hpp +2 -83
- data/vendor/local/include/msgpack/adaptor/boost/string_ref.hpp +2 -74
- data/vendor/local/include/msgpack/adaptor/carray.hpp +15 -0
- data/vendor/local/include/msgpack/adaptor/char_ptr.hpp +2 -144
- data/vendor/local/include/msgpack/adaptor/check_container_size.hpp +3 -53
- data/vendor/local/include/msgpack/adaptor/check_container_size_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/cpp11/array.hpp +5 -127
- data/vendor/local/include/msgpack/adaptor/cpp11/array_char.hpp +5 -78
- data/vendor/local/include/msgpack/adaptor/cpp11/array_unsigned_char.hpp +5 -78
- data/vendor/local/include/msgpack/adaptor/cpp11/forward_list.hpp +5 -83
- data/vendor/local/include/msgpack/adaptor/cpp11/reference_wrapper.hpp +5 -57
- data/vendor/local/include/msgpack/adaptor/cpp11/shared_ptr.hpp +5 -71
- data/vendor/local/include/msgpack/adaptor/cpp11/tuple.hpp +5 -165
- data/vendor/local/include/msgpack/adaptor/cpp11/unique_ptr.hpp +5 -71
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_map.hpp +5 -171
- data/vendor/local/include/msgpack/adaptor/cpp11/unordered_set.hpp +5 -161
- data/vendor/local/include/msgpack/adaptor/define.hpp +3 -17
- data/vendor/local/include/msgpack/adaptor/define_decl.hpp +142 -0
- data/vendor/local/include/msgpack/adaptor/deque.hpp +3 -96
- data/vendor/local/include/msgpack/adaptor/ext.hpp +3 -223
- data/vendor/local/include/msgpack/adaptor/ext_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/fixint.hpp +4 -285
- data/vendor/local/include/msgpack/adaptor/fixint_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/float.hpp +2 -110
- data/vendor/local/include/msgpack/adaptor/int.hpp +4 -415
- data/vendor/local/include/msgpack/adaptor/int_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/list.hpp +2 -93
- data/vendor/local/include/msgpack/adaptor/map.hpp +3 -291
- data/vendor/local/include/msgpack/adaptor/map_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/msgpack_tuple.hpp +2 -6
- data/vendor/local/include/msgpack/adaptor/msgpack_tuple_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/nil.hpp +3 -70
- data/vendor/local/include/msgpack/adaptor/nil_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/pair.hpp +2 -70
- data/vendor/local/include/msgpack/adaptor/raw.hpp +3 -92
- data/vendor/local/include/msgpack/adaptor/raw_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/set.hpp +2 -175
- data/vendor/local/include/msgpack/adaptor/size_equal_only.hpp +17 -0
- data/vendor/local/include/msgpack/adaptor/size_equal_only_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/string.hpp +2 -73
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_map.hpp +2 -2
- data/vendor/local/include/msgpack/adaptor/tr1/unordered_set.hpp +2 -2
- data/vendor/local/include/msgpack/adaptor/v4raw.hpp +3 -92
- data/vendor/local/include/msgpack/adaptor/v4raw_decl.hpp +16 -0
- data/vendor/local/include/msgpack/adaptor/vector.hpp +2 -108
- data/vendor/local/include/msgpack/adaptor/vector_bool.hpp +2 -75
- data/vendor/local/include/msgpack/adaptor/vector_char.hpp +2 -76
- data/vendor/local/include/msgpack/adaptor/vector_unsigned_char.hpp +2 -76
- data/vendor/local/include/msgpack/cpp_config.hpp +4 -111
- data/vendor/local/include/msgpack/cpp_config_decl.hpp +16 -0
- data/vendor/local/include/msgpack/fbuffer.h +1 -1
- data/vendor/local/include/msgpack/fbuffer.hpp +5 -48
- data/vendor/local/include/msgpack/fbuffer_decl.hpp +16 -0
- data/vendor/local/include/msgpack/gcc_atomic.hpp +33 -0
- data/vendor/local/include/msgpack/iterator.hpp +3 -23
- data/vendor/local/include/msgpack/iterator_decl.hpp +17 -0
- data/vendor/local/include/msgpack/meta.hpp +3 -36
- data/vendor/local/include/msgpack/meta_decl.hpp +17 -0
- data/vendor/local/include/msgpack/object.hpp +5 -799
- data/vendor/local/include/msgpack/object_decl.hpp +17 -0
- data/vendor/local/include/msgpack/object_fwd.hpp +4 -180
- data/vendor/local/include/msgpack/object_fwd_decl.hpp +17 -0
- data/vendor/local/include/msgpack/pack.hpp +4 -1077
- data/vendor/local/include/msgpack/pack_decl.hpp +16 -0
- data/vendor/local/include/msgpack/predef.h +6 -1
- data/vendor/local/include/msgpack/predef/architecture.h +3 -1
- data/vendor/local/include/msgpack/predef/architecture/alpha.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/arm.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/blackfin.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/convex.h +3 -5
- data/vendor/local/include/msgpack/predef/architecture/ia64.h +3 -3
- data/vendor/local/include/msgpack/predef/architecture/m68k.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/mips.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/parisc.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/ppc.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/pyramid.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/rs6k.h +4 -4
- data/vendor/local/include/msgpack/predef/architecture/sparc.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/superh.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/sys370.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/sys390.h +3 -4
- data/vendor/local/include/msgpack/predef/architecture/x86.h +6 -6
- data/vendor/local/include/msgpack/predef/architecture/x86/32.h +4 -4
- data/vendor/local/include/msgpack/predef/architecture/x86/64.h +4 -4
- data/vendor/local/include/msgpack/predef/architecture/z.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler.h +3 -1
- data/vendor/local/include/msgpack/predef/compiler/borland.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/clang.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/comeau.h +4 -5
- data/vendor/local/include/msgpack/predef/compiler/compaq.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/diab.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/digitalmars.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/dignus.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/edg.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/ekopath.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/gcc.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/gcc_xml.h +3 -3
- data/vendor/local/include/msgpack/predef/compiler/greenhills.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/hp_acc.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/iar.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/ibm.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/intel.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/kai.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/llvm.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/metaware.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/metrowerks.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/microtec.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/mpw.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/palm.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/pgi.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/sgi_mipspro.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/sunpro.h +17 -8
- data/vendor/local/include/msgpack/predef/compiler/tendra.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/visualc.h +3 -4
- data/vendor/local/include/msgpack/predef/compiler/watcom.h +3 -4
- data/vendor/local/include/msgpack/predef/detail/_cassert.h +1 -1
- data/vendor/local/include/msgpack/predef/detail/_exception.h +1 -1
- data/vendor/local/include/msgpack/predef/detail/test_def.h +71 -0
- data/vendor/local/include/msgpack/predef/hardware.h +16 -0
- data/vendor/local/include/msgpack/predef/hardware/simd.h +119 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/arm.h +57 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/arm/versions.h +32 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/ppc.h +69 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/ppc/versions.h +51 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/x86.h +123 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/x86/versions.h +129 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/x86_amd.h +87 -0
- data/vendor/local/include/msgpack/predef/hardware/simd/x86_amd/versions.h +51 -0
- data/vendor/local/include/msgpack/predef/language.h +3 -1
- data/vendor/local/include/msgpack/predef/language/objc.h +3 -4
- data/vendor/local/include/msgpack/predef/language/stdc.h +3 -4
- data/vendor/local/include/msgpack/predef/language/stdcpp.h +8 -11
- data/vendor/local/include/msgpack/predef/library.h +3 -1
- data/vendor/local/include/msgpack/predef/library/c.h +3 -1
- data/vendor/local/include/msgpack/predef/library/c/gnu.h +3 -4
- data/vendor/local/include/msgpack/predef/library/c/uc.h +3 -4
- data/vendor/local/include/msgpack/predef/library/c/vms.h +3 -4
- data/vendor/local/include/msgpack/predef/library/c/zos.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std.h +3 -1
- data/vendor/local/include/msgpack/predef/library/std/cxx.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/dinkumware.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/libcomo.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/modena.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/msl.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/roguewave.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/sgi.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/stdcpp3.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/stlport.h +3 -4
- data/vendor/local/include/msgpack/predef/library/std/vacpp.h +3 -4
- data/vendor/local/include/msgpack/predef/make.h +2 -2
- data/vendor/local/include/msgpack/predef/os.h +3 -1
- data/vendor/local/include/msgpack/predef/os/aix.h +3 -4
- data/vendor/local/include/msgpack/predef/os/amigaos.h +3 -4
- data/vendor/local/include/msgpack/predef/os/android.h +3 -4
- data/vendor/local/include/msgpack/predef/os/beos.h +3 -4
- data/vendor/local/include/msgpack/predef/os/bsd.h +11 -3
- data/vendor/local/include/msgpack/predef/os/bsd/bsdi.h +3 -3
- data/vendor/local/include/msgpack/predef/os/bsd/dragonfly.h +3 -3
- data/vendor/local/include/msgpack/predef/os/bsd/free.h +3 -3
- data/vendor/local/include/msgpack/predef/os/bsd/net.h +3 -3
- data/vendor/local/include/msgpack/predef/os/bsd/open.h +3 -3
- data/vendor/local/include/msgpack/predef/os/cygwin.h +4 -5
- data/vendor/local/include/msgpack/predef/os/haiku.h +3 -4
- data/vendor/local/include/msgpack/predef/os/hpux.h +3 -4
- data/vendor/local/include/msgpack/predef/os/ios.h +3 -3
- data/vendor/local/include/msgpack/predef/os/irix.h +3 -4
- data/vendor/local/include/msgpack/predef/os/linux.h +3 -4
- data/vendor/local/include/msgpack/predef/os/macos.h +3 -4
- data/vendor/local/include/msgpack/predef/os/os400.h +3 -4
- data/vendor/local/include/msgpack/predef/os/qnxnto.h +3 -4
- data/vendor/local/include/msgpack/predef/os/solaris.h +3 -4
- data/vendor/local/include/msgpack/predef/os/unix.h +3 -3
- data/vendor/local/include/msgpack/predef/os/vms.h +3 -4
- data/vendor/local/include/msgpack/predef/os/windows.h +3 -3
- data/vendor/local/include/msgpack/predef/other.h +3 -1
- data/vendor/local/include/msgpack/predef/other/endian.h +4 -5
- data/vendor/local/include/msgpack/predef/platform.h +3 -1
- data/vendor/local/include/msgpack/predef/platform/mingw.h +3 -4
- data/vendor/local/include/msgpack/predef/platform/windows_desktop.h +4 -3
- data/vendor/local/include/msgpack/predef/platform/windows_phone.h +4 -3
- data/vendor/local/include/msgpack/predef/platform/windows_runtime.h +4 -3
- data/vendor/local/include/msgpack/predef/platform/windows_store.h +4 -3
- data/vendor/local/include/msgpack/predef/version.h +2 -2
- data/vendor/local/include/msgpack/predef/version_number.h +1 -2
- data/vendor/local/include/msgpack/preprocessor/arithmetic/dec.hpp +1 -0
- data/vendor/local/include/msgpack/preprocessor/config/config.hpp +5 -2
- data/vendor/local/include/msgpack/preprocessor/facilities/identity.hpp +4 -0
- data/vendor/local/include/msgpack/preprocessor/library.hpp +1 -0
- data/vendor/local/include/msgpack/preprocessor/repetition/for.hpp +19 -1
- data/vendor/local/include/msgpack/preprocessor/seq/detail/is_empty.hpp +49 -0
- data/vendor/local/include/msgpack/preprocessor/seq/for_each.hpp +57 -10
- data/vendor/local/include/msgpack/preprocessor/seq/for_each_i.hpp +58 -10
- data/vendor/local/include/msgpack/preprocessor/seq/replace.hpp +18 -2
- data/vendor/local/include/msgpack/preprocessor/seq/rest_n.hpp +18 -2
- data/vendor/local/include/msgpack/preprocessor/seq/size.hpp +1 -0
- data/vendor/local/include/msgpack/preprocessor/tuple/eat.hpp +10 -1
- data/vendor/local/include/msgpack/sbuffer.hpp +4 -139
- data/vendor/local/include/msgpack/sbuffer_decl.hpp +17 -0
- data/vendor/local/include/msgpack/sysdep.h +9 -5
- data/vendor/local/include/msgpack/type.hpp +2 -0
- data/vendor/local/include/msgpack/unpack.hpp +5 -1698
- data/vendor/local/include/msgpack/unpack_decl.hpp +16 -0
- data/vendor/local/include/msgpack/v1/adaptor/adaptor_base.hpp +116 -0
- data/vendor/local/include/msgpack/v1/adaptor/adaptor_base_decl.hpp +86 -0
- data/vendor/local/include/msgpack/v1/adaptor/array_ref.hpp +305 -0
- data/vendor/local/include/msgpack/v1/adaptor/array_ref_decl.hpp +55 -0
- data/vendor/local/include/msgpack/v1/adaptor/bool.hpp +66 -0
- data/vendor/local/include/msgpack/v1/adaptor/boost/fusion.hpp +160 -0
- data/vendor/local/include/msgpack/v1/adaptor/boost/msgpack_variant.hpp +441 -0
- data/vendor/local/include/msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp +62 -0
- data/vendor/local/include/msgpack/v1/adaptor/boost/optional.hpp +96 -0
- data/vendor/local/include/msgpack/v1/adaptor/boost/string_ref.hpp +87 -0
- data/vendor/local/include/msgpack/v1/adaptor/carray.hpp +253 -0
- data/vendor/local/include/msgpack/v1/adaptor/char_ptr.hpp +92 -0
- data/vendor/local/include/msgpack/v1/adaptor/check_container_size.hpp +67 -0
- data/vendor/local/include/msgpack/v1/adaptor/check_container_size_decl.hpp +44 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/array.hpp +138 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/array_char.hpp +90 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp +90 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/forward_list.hpp +94 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/reference_wrapper.hpp +68 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/shared_ptr.hpp +82 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/tuple.hpp +175 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/unique_ptr.hpp +82 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/unordered_map.hpp +182 -0
- data/vendor/local/include/msgpack/v1/adaptor/cpp11/unordered_set.hpp +172 -0
- data/vendor/local/include/msgpack/v1/adaptor/define.hpp +21 -0
- data/vendor/local/include/msgpack/v1/adaptor/define_decl.hpp +23 -0
- data/vendor/local/include/msgpack/v1/adaptor/deque.hpp +108 -0
- data/vendor/local/include/msgpack/{adaptor → v1/adaptor}/detail/cpp03_define_array.hpp +6 -71
- data/vendor/local/include/msgpack/v1/adaptor/detail/cpp03_define_array_decl.hpp +135 -0
- data/vendor/local/include/msgpack/{adaptor → v1/adaptor}/detail/cpp03_define_map.hpp +7 -61
- data/vendor/local/include/msgpack/v1/adaptor/detail/cpp03_define_map_decl.hpp +135 -0
- data/vendor/local/include/msgpack/{adaptor → v1/adaptor}/detail/cpp03_msgpack_tuple.hpp +1095 -579
- data/vendor/local/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +317 -0
- data/vendor/local/include/msgpack/{adaptor → v1/adaptor}/detail/cpp11_define_array.hpp +5 -71
- data/vendor/local/include/msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp +39 -0
- data/vendor/local/include/msgpack/{adaptor → v1/adaptor}/detail/cpp11_define_map.hpp +7 -62
- data/vendor/local/include/msgpack/v1/adaptor/detail/cpp11_define_map_decl.hpp +37 -0
- data/vendor/local/include/msgpack/{adaptor → v1/adaptor}/detail/cpp11_msgpack_tuple.hpp +30 -85
- data/vendor/local/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +120 -0
- data/vendor/local/include/msgpack/v1/adaptor/ext.hpp +236 -0
- data/vendor/local/include/msgpack/v1/adaptor/ext_decl.hpp +38 -0
- data/vendor/local/include/msgpack/v1/adaptor/fixint.hpp +283 -0
- data/vendor/local/include/msgpack/v1/adaptor/fixint_decl.hpp +46 -0
- data/vendor/local/include/msgpack/v1/adaptor/float.hpp +123 -0
- data/vendor/local/include/msgpack/v1/adaptor/int.hpp +426 -0
- data/vendor/local/include/msgpack/v1/adaptor/int_decl.hpp +49 -0
- data/vendor/local/include/msgpack/v1/adaptor/list.hpp +106 -0
- data/vendor/local/include/msgpack/v1/adaptor/map.hpp +314 -0
- data/vendor/local/include/msgpack/v1/adaptor/map_decl.hpp +36 -0
- data/vendor/local/include/msgpack/v1/adaptor/msgpack_tuple.hpp +21 -0
- data/vendor/local/include/msgpack/v1/adaptor/msgpack_tuple_decl.hpp +21 -0
- data/vendor/local/include/msgpack/v1/adaptor/nil.hpp +76 -0
- data/vendor/local/include/msgpack/v1/adaptor/nil_decl.hpp +44 -0
- data/vendor/local/include/msgpack/v1/adaptor/pair.hpp +83 -0
- data/vendor/local/include/msgpack/v1/adaptor/raw.hpp +106 -0
- data/vendor/local/include/msgpack/v1/adaptor/raw_decl.hpp +36 -0
- data/vendor/local/include/msgpack/v1/adaptor/set.hpp +188 -0
- data/vendor/local/include/msgpack/v1/adaptor/size_equal_only.hpp +118 -0
- data/vendor/local/include/msgpack/v1/adaptor/size_equal_only_decl.hpp +52 -0
- data/vendor/local/include/msgpack/v1/adaptor/string.hpp +87 -0
- data/vendor/local/include/msgpack/v1/adaptor/tr1/unordered_map.hpp +171 -0
- data/vendor/local/include/msgpack/v1/adaptor/tr1/unordered_set.hpp +165 -0
- data/vendor/local/include/msgpack/v1/adaptor/v4raw.hpp +105 -0
- data/vendor/local/include/msgpack/v1/adaptor/v4raw_decl.hpp +34 -0
- data/vendor/local/include/msgpack/v1/adaptor/vector.hpp +121 -0
- data/vendor/local/include/msgpack/v1/adaptor/vector_bool.hpp +90 -0
- data/vendor/local/include/msgpack/v1/adaptor/vector_char.hpp +114 -0
- data/vendor/local/include/msgpack/v1/adaptor/vector_unsigned_char.hpp +114 -0
- data/vendor/local/include/msgpack/v1/cpp_config.hpp +129 -0
- data/vendor/local/include/msgpack/v1/cpp_config_decl.hpp +131 -0
- data/vendor/local/include/msgpack/{detail → v1/detail}/cpp03_zone.hpp +10 -21
- data/vendor/local/include/msgpack/v1/detail/cpp03_zone_decl.hpp +46 -0
- data/vendor/local/include/msgpack/{detail → v1/detail}/cpp11_zone.hpp +10 -18
- data/vendor/local/include/msgpack/v1/detail/cpp11_zone_decl.hpp +47 -0
- data/vendor/local/include/msgpack/v1/fbuffer.hpp +60 -0
- data/vendor/local/include/msgpack/v1/fbuffer_decl.hpp +32 -0
- data/vendor/local/include/msgpack/v1/iterator.hpp +40 -0
- data/vendor/local/include/msgpack/v1/iterator_decl.hpp +40 -0
- data/vendor/local/include/msgpack/v1/meta.hpp +47 -0
- data/vendor/local/include/msgpack/v1/meta_decl.hpp +52 -0
- data/vendor/local/include/msgpack/v1/object.hpp +865 -0
- data/vendor/local/include/msgpack/v1/object_decl.hpp +112 -0
- data/vendor/local/include/msgpack/v1/object_fwd.hpp +252 -0
- data/vendor/local/include/msgpack/v1/object_fwd_decl.hpp +76 -0
- data/vendor/local/include/msgpack/v1/pack.hpp +1602 -0
- data/vendor/local/include/msgpack/v1/pack_decl.hpp +91 -0
- data/vendor/local/include/msgpack/v1/preprocessor.hpp +19 -0
- data/vendor/local/include/msgpack/v1/sbuffer.hpp +149 -0
- data/vendor/local/include/msgpack/v1/sbuffer_decl.hpp +33 -0
- data/vendor/local/include/msgpack/v1/unpack.hpp +1672 -0
- data/vendor/local/include/msgpack/v1/unpack_decl.hpp +461 -0
- data/vendor/local/include/msgpack/v1/version.hpp +36 -0
- data/vendor/local/include/msgpack/v1/versioning.hpp +69 -0
- data/vendor/local/include/msgpack/v1/vrefbuffer.hpp +292 -0
- data/vendor/local/include/msgpack/v1/vrefbuffer_decl.hpp +39 -0
- data/vendor/local/include/msgpack/v1/zbuffer.hpp +159 -0
- data/vendor/local/include/msgpack/v1/zbuffer_decl.hpp +37 -0
- data/vendor/local/include/msgpack/v1/zone.hpp +21 -0
- data/vendor/local/include/msgpack/v1/zone_decl.hpp +21 -0
- data/vendor/local/include/msgpack/v2/adaptor/adaptor_base.hpp +58 -0
- data/vendor/local/include/msgpack/v2/adaptor/adaptor_base_decl.hpp +52 -0
- data/vendor/local/include/msgpack/v2/adaptor/array_ref_decl.hpp +36 -0
- data/vendor/local/include/msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp +42 -0
- data/vendor/local/include/msgpack/v2/adaptor/check_container_size_decl.hpp +39 -0
- data/vendor/local/include/msgpack/v2/adaptor/define_decl.hpp +23 -0
- data/vendor/local/include/msgpack/v2/adaptor/detail/cpp03_define_array_decl.hpp +31 -0
- data/vendor/local/include/msgpack/v2/adaptor/detail/cpp03_define_map_decl.hpp +31 -0
- data/vendor/local/include/msgpack/v2/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +43 -0
- data/vendor/local/include/msgpack/v2/adaptor/detail/cpp11_define_array_decl.hpp +32 -0
- data/vendor/local/include/msgpack/v2/adaptor/detail/cpp11_define_map_decl.hpp +31 -0
- data/vendor/local/include/msgpack/v2/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +59 -0
- data/vendor/local/include/msgpack/v2/adaptor/ext_decl.hpp +34 -0
- data/vendor/local/include/msgpack/v2/adaptor/fixint_decl.hpp +43 -0
- data/vendor/local/include/msgpack/v2/adaptor/int_decl.hpp +54 -0
- data/vendor/local/include/msgpack/v2/adaptor/map_decl.hpp +33 -0
- data/vendor/local/include/msgpack/v2/adaptor/msgpack_tuple_decl.hpp +21 -0
- data/vendor/local/include/msgpack/v2/adaptor/nil_decl.hpp +42 -0
- data/vendor/local/include/msgpack/v2/adaptor/raw_decl.hpp +33 -0
- data/vendor/local/include/msgpack/v2/adaptor/size_equal_only_decl.hpp +35 -0
- data/vendor/local/include/msgpack/v2/adaptor/v4raw_decl.hpp +34 -0
- data/vendor/local/include/msgpack/v2/cpp_config_decl.hpp +84 -0
- data/vendor/local/include/msgpack/v2/detail/cpp03_zone_decl.hpp +31 -0
- data/vendor/local/include/msgpack/v2/detail/cpp11_zone_decl.hpp +31 -0
- data/vendor/local/include/msgpack/v2/fbuffer_decl.hpp +32 -0
- data/vendor/local/include/msgpack/v2/iterator_decl.hpp +33 -0
- data/vendor/local/include/msgpack/v2/meta_decl.hpp +46 -0
- data/vendor/local/include/msgpack/v2/object.hpp +33 -0
- data/vendor/local/include/msgpack/v2/object_decl.hpp +49 -0
- data/vendor/local/include/msgpack/v2/object_fwd.hpp +109 -0
- data/vendor/local/include/msgpack/v2/object_fwd_decl.hpp +73 -0
- data/vendor/local/include/msgpack/v2/pack_decl.hpp +55 -0
- data/vendor/local/include/msgpack/v2/sbuffer_decl.hpp +33 -0
- data/vendor/local/include/msgpack/v2/unpack.hpp +1625 -0
- data/vendor/local/include/msgpack/v2/unpack_decl.hpp +348 -0
- data/vendor/local/include/msgpack/v2/vrefbuffer_decl.hpp +29 -0
- data/vendor/local/include/msgpack/v2/zbuffer_decl.hpp +29 -0
- data/vendor/local/include/msgpack/v2/zone_decl.hpp +21 -0
- data/vendor/local/include/msgpack/version_master.h +2 -2
- data/vendor/local/include/msgpack/versioning.hpp +3 -3
- data/vendor/local/include/msgpack/vrefbuffer.hpp +4 -279
- data/vendor/local/include/msgpack/vrefbuffer_decl.hpp +16 -0
- data/vendor/local/include/msgpack/zbuffer.hpp +3 -153
- data/vendor/local/include/msgpack/zbuffer_decl.hpp +16 -0
- data/vendor/local/include/msgpack/zone.hpp +3 -7
- data/vendor/local/include/msgpack/zone_decl.hpp +16 -0
- data/vendor/local/lib/groonga/plugins/functions/number.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/number.dll +0 -0
- data/vendor/local/lib/groonga/plugins/functions/number.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/number.la +3 -3
- data/vendor/local/lib/groonga/plugins/functions/string.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/string.dll +0 -0
- data/vendor/local/lib/groonga/plugins/functions/string.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/string.la +3 -3
- data/vendor/local/lib/groonga/plugins/functions/time.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/time.dll +0 -0
- data/vendor/local/lib/groonga/plugins/functions/time.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/functions/time.la +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- data/vendor/local/lib/groonga/scripts/ruby/expression.rb +1 -0
- data/vendor/local/lib/groonga/scripts/ruby/expression_rewriters.rb +10 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +3 -3
- 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/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- 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 +2 -2
- data/vendor/local/lib/pkgconfig/msgpack.pc +2 -2
- 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.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 +0 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +3 -3
- 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 +3 -3
- 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 +3 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +82 -1244
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.2.x.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.3.x.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/2.x.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/3.x.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/4.x.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/5.x.txt +1250 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/object_list.txt +393 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/string_substring.txt +27 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/vector_slice.txt +27 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/normalizers.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/basic.css +0 -4
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +25 -1
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/client.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/community.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +7 -8
- data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/development.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/genindex.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/index.html +44 -41
- data/vendor/local/share/doc/groonga/en/html/install.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +10 -10
- 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 +10 -10
- data/vendor/local/share/doc/groonga/en/html/install/others.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/install/solaris.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +10 -11
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/limitations.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news.html +257 -1703
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +54 -48
- data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +18 -12
- data/vendor/local/share/doc/groonga/en/html/news/2.x.html +65 -59
- data/vendor/local/share/doc/groonga/en/html/news/3.x.html +64 -58
- data/vendor/local/share/doc/groonga/en/html/news/4.x.html +61 -55
- data/vendor/local/share/doc/groonga/en/html/news/5.x.html +1426 -0
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference.html +44 -41
- data/vendor/local/share/doc/groonga/en/html/reference/alias.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/column.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +33 -32
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/pretty_print.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/request_timeout.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/config_delete.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/config_get.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/config_set.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_acquire.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_release.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/object_inspect.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/reference/commands/object_list.html +991 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/object_remove.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/query_expand.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/reindex.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/commands/schema.html +69 -69
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +113 -113
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +53 -53
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +43 -43
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +43 -43
- data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +45 -45
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/configuration.html +7 -7
- 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 +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +18 -16
- data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/fuzzy_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/number_classify.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/prefix_rk_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/record_number.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/reference/functions/string_substring.html +162 -0
- data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_day.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_hour.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_minute.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_month.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_second.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_week.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_year.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_slice.html +162 -0
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +7 -7
- 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 +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/operations.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/operations/prefix_rk_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/tables.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/types.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/server.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/server/http.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/server/memcached.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/server/package.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/spec.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +0 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +3 -3
- 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 +3 -3
- 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 +3 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +82 -1244
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.2.x.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.3.x.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/2.x.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/3.x.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/4.x.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/5.x.txt +1250 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/object_list.txt +393 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/string_substring.txt +27 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/vector_slice.txt +27 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/normalizers.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +0 -4
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +25 -1
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/client.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/community.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +7 -8
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/development.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/index.html +44 -41
- data/vendor/local/share/doc/groonga/ja/html/install.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +10 -11
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news.html +248 -1638
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +54 -48
- data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +18 -12
- data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +65 -59
- data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +64 -58
- data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +61 -55
- data/vendor/local/share/doc/groonga/ja/html/news/5.x.html +1368 -0
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +44 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/alias.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/column.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +33 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command/pretty_print.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command/request_timeout.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_delete.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_get.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_set.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_acquire.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_release.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_inspect.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_list.html +1014 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_remove.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/query_expand.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/reindex.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/schema.html +69 -69
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +113 -113
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +53 -53
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +43 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +43 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +33 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +45 -45
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/configuration.html +7 -7
- 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 +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +18 -16
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/fuzzy_search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/number_classify.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/prefix_rk_search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/record_number.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/string_substring.html +163 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_day.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_hour.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_minute.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_month.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_second.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_week.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_year.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_slice.html +163 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +7 -7
- 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 +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/operations/prefix_rk_search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +7 -7
- 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 +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/types.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/server.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/spec.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +7 -7
- data/vendor/local/share/groonga/examples/dictionary/edict/edict-import.sh +7 -1
- data/vendor/local/share/groonga/examples/dictionary/html/index.html +1 -1
- data/vendor/local/share/license/msgpack/README.md +6 -7
- metadata +200 -16
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +0 -41
- data/vendor/local/lib/libmsgpackc.la +0 -41
@@ -0,0 +1,91 @@
|
|
1
|
+
//
|
2
|
+
// MessagePack for C++ serializing routine
|
3
|
+
//
|
4
|
+
// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
|
5
|
+
//
|
6
|
+
// Distributed under the Boost Software License, Version 1.0.
|
7
|
+
// (See accompanying file LICENSE_1_0.txt or copy at
|
8
|
+
// http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
//
|
10
|
+
#ifndef MSGPACK_V1_PACK_DECL_HPP
|
11
|
+
#define MSGPACK_V1_PACK_DECL_HPP
|
12
|
+
|
13
|
+
#include "msgpack/versioning.hpp"
|
14
|
+
#include "msgpack/cpp_config.hpp"
|
15
|
+
#include "msgpack/sysdep.h"
|
16
|
+
|
17
|
+
namespace msgpack {
|
18
|
+
|
19
|
+
/// @cond
|
20
|
+
MSGPACK_API_VERSION_NAMESPACE(v1) {
|
21
|
+
/// @endcond
|
22
|
+
|
23
|
+
/// The class template that supports continuous packing.
|
24
|
+
/**
|
25
|
+
* @tparam Stream Any type that have a member function `Stream write(const char*, size_t s)`
|
26
|
+
*
|
27
|
+
*/
|
28
|
+
template <typename Stream>
|
29
|
+
class packer;
|
30
|
+
|
31
|
+
/// Pack the value as MessagePack format into the stream
|
32
|
+
/**
|
33
|
+
* This function template is left for compatibility.
|
34
|
+
* Use `void pack(Stream& s, const T& v)` instead of the function template.
|
35
|
+
*
|
36
|
+
* @tparam Stream Any type that have a member function `Stream write(const char*, size_t s)`
|
37
|
+
* @tparam T Any type that is adapted to MessagePack
|
38
|
+
* @param s The pointer to packing destination stream
|
39
|
+
* @param v Packing value
|
40
|
+
*/
|
41
|
+
template <typename Stream, typename T>
|
42
|
+
void pack(Stream* s, const T& v);
|
43
|
+
|
44
|
+
/// Pack the value as MessagePack format into the stream
|
45
|
+
/**
|
46
|
+
* @tparam Stream Any type that have a member function `Stream write(const char*, size_t s)`
|
47
|
+
* @tparam T Any type that is adapted to MessagePack
|
48
|
+
* @param s Packing destination stream
|
49
|
+
* @param v Packing value
|
50
|
+
*/
|
51
|
+
template <typename Stream, typename T>
|
52
|
+
void pack(Stream& s, const T& v);
|
53
|
+
|
54
|
+
#if MSGPACK_ENDIAN_LITTLE_BYTE
|
55
|
+
template <typename T>
|
56
|
+
char take8_8(T d);
|
57
|
+
|
58
|
+
template <typename T>
|
59
|
+
char take8_16(T d);
|
60
|
+
|
61
|
+
template <typename T>
|
62
|
+
char take8_32(T d);
|
63
|
+
|
64
|
+
template <typename T>
|
65
|
+
char take8_64(T d);
|
66
|
+
|
67
|
+
#elif MSGPACK_ENDIAN_BIG_BYTE
|
68
|
+
|
69
|
+
template <typename T>
|
70
|
+
char take8_8(T d);
|
71
|
+
|
72
|
+
template <typename T>
|
73
|
+
char take8_16(T d);
|
74
|
+
|
75
|
+
template <typename T>
|
76
|
+
char take8_32(T d);
|
77
|
+
|
78
|
+
template <typename T>
|
79
|
+
char take8_64(T d);
|
80
|
+
|
81
|
+
#else
|
82
|
+
#error msgpack-c supports only big endian and little endian
|
83
|
+
#endif
|
84
|
+
|
85
|
+
/// @cond
|
86
|
+
} // MSGPACK_API_VERSION_NAMESPACE(v1)
|
87
|
+
/// @endcond
|
88
|
+
|
89
|
+
} // namespace msgpack
|
90
|
+
|
91
|
+
#endif // MSGPACK_V1_PACK_DECL_HPP
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# /* Copyright (C) 2001
|
2
|
+
# * Housemarque Oy
|
3
|
+
# * http://www.housemarque.com
|
4
|
+
# *
|
5
|
+
# * Distributed under the Boost Software License, Version 1.0. (See
|
6
|
+
# * accompanying file LICENSE_1_0.txt or copy at
|
7
|
+
# * http://www.boost.org/LICENSE_1_0.txt)
|
8
|
+
# */
|
9
|
+
#
|
10
|
+
# /* Revised by Paul Mensonides (2002) */
|
11
|
+
#
|
12
|
+
# /* See http://www.boost.org/libs/preprocessor for documentation. */
|
13
|
+
#
|
14
|
+
# ifndef MSGPACK_PREPROCESSOR_HPP
|
15
|
+
# define MSGPACK_PREPROCESSOR_HPP
|
16
|
+
#
|
17
|
+
# include <msgpack/preprocessor/library.hpp>
|
18
|
+
#
|
19
|
+
# endif
|
@@ -0,0 +1,149 @@
|
|
1
|
+
//
|
2
|
+
// MessagePack for C++ simple buffer implementation
|
3
|
+
//
|
4
|
+
// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
|
5
|
+
//
|
6
|
+
// Distributed under the Boost Software License, Version 1.0.
|
7
|
+
// (See accompanying file LICENSE_1_0.txt or copy at
|
8
|
+
// http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
//
|
10
|
+
#ifndef MSGPACK_V1_SBUFFER_HPP
|
11
|
+
#define MSGPACK_V1_SBUFFER_HPP
|
12
|
+
|
13
|
+
#include "msgpack/v1/sbuffer_decl.hpp"
|
14
|
+
|
15
|
+
#include <stdexcept>
|
16
|
+
#include <cstring>
|
17
|
+
|
18
|
+
namespace msgpack {
|
19
|
+
|
20
|
+
/// @cond
|
21
|
+
MSGPACK_API_VERSION_NAMESPACE(v1) {
|
22
|
+
/// @endcond
|
23
|
+
|
24
|
+
class sbuffer {
|
25
|
+
public:
|
26
|
+
sbuffer(size_t initsz = MSGPACK_SBUFFER_INIT_SIZE):m_size(0), m_alloc(initsz)
|
27
|
+
{
|
28
|
+
if(initsz == 0) {
|
29
|
+
m_data = MSGPACK_NULLPTR;
|
30
|
+
} else {
|
31
|
+
m_data = (char*)::malloc(initsz);
|
32
|
+
if(!m_data) {
|
33
|
+
throw std::bad_alloc();
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
~sbuffer()
|
39
|
+
{
|
40
|
+
::free(m_data);
|
41
|
+
}
|
42
|
+
|
43
|
+
#if !defined(MSGPACK_USE_CPP03)
|
44
|
+
sbuffer(const sbuffer&) = delete;
|
45
|
+
sbuffer& operator=(const sbuffer&) = delete;
|
46
|
+
|
47
|
+
sbuffer(sbuffer&& other) :
|
48
|
+
m_size(other.m_size), m_data(other.m_data), m_alloc(other.m_alloc)
|
49
|
+
{
|
50
|
+
other.m_size = other.m_alloc = 0;
|
51
|
+
other.m_data = MSGPACK_NULLPTR;
|
52
|
+
}
|
53
|
+
|
54
|
+
sbuffer& operator=(sbuffer&& other)
|
55
|
+
{
|
56
|
+
::free(m_data);
|
57
|
+
|
58
|
+
m_size = other.m_size;
|
59
|
+
m_alloc = other.m_alloc;
|
60
|
+
m_data = other.m_data;
|
61
|
+
|
62
|
+
other.m_size = other.m_alloc = 0;
|
63
|
+
other.m_data = MSGPACK_NULLPTR;
|
64
|
+
|
65
|
+
return *this;
|
66
|
+
}
|
67
|
+
#endif // !defined(MSGPACK_USE_CPP03)
|
68
|
+
|
69
|
+
void write(const char* buf, size_t len)
|
70
|
+
{
|
71
|
+
if(m_alloc - m_size < len) {
|
72
|
+
expand_buffer(len);
|
73
|
+
}
|
74
|
+
std::memcpy(m_data + m_size, buf, len);
|
75
|
+
m_size += len;
|
76
|
+
}
|
77
|
+
|
78
|
+
char* data()
|
79
|
+
{
|
80
|
+
return m_data;
|
81
|
+
}
|
82
|
+
|
83
|
+
const char* data() const
|
84
|
+
{
|
85
|
+
return m_data;
|
86
|
+
}
|
87
|
+
|
88
|
+
size_t size() const
|
89
|
+
{
|
90
|
+
return m_size;
|
91
|
+
}
|
92
|
+
|
93
|
+
char* release()
|
94
|
+
{
|
95
|
+
char* tmp = m_data;
|
96
|
+
m_size = 0;
|
97
|
+
m_data = MSGPACK_NULLPTR;
|
98
|
+
m_alloc = 0;
|
99
|
+
return tmp;
|
100
|
+
}
|
101
|
+
|
102
|
+
void clear()
|
103
|
+
{
|
104
|
+
m_size = 0;
|
105
|
+
}
|
106
|
+
|
107
|
+
private:
|
108
|
+
void expand_buffer(size_t len)
|
109
|
+
{
|
110
|
+
size_t nsize = (m_alloc > 0) ?
|
111
|
+
m_alloc * 2 : MSGPACK_SBUFFER_INIT_SIZE;
|
112
|
+
|
113
|
+
while(nsize < m_size + len) {
|
114
|
+
size_t tmp_nsize = nsize * 2;
|
115
|
+
if (tmp_nsize <= nsize) {
|
116
|
+
nsize = m_size + len;
|
117
|
+
break;
|
118
|
+
}
|
119
|
+
nsize = tmp_nsize;
|
120
|
+
}
|
121
|
+
|
122
|
+
void* tmp = ::realloc(m_data, nsize);
|
123
|
+
if(!tmp) {
|
124
|
+
throw std::bad_alloc();
|
125
|
+
}
|
126
|
+
|
127
|
+
m_data = static_cast<char*>(tmp);
|
128
|
+
m_alloc = nsize;
|
129
|
+
}
|
130
|
+
|
131
|
+
#if defined(MSGPACK_USE_CPP03)
|
132
|
+
private:
|
133
|
+
sbuffer(const sbuffer&);
|
134
|
+
sbuffer& operator=(const sbuffer&);
|
135
|
+
#endif // defined(MSGPACK_USE_CPP03)
|
136
|
+
|
137
|
+
private:
|
138
|
+
size_t m_size;
|
139
|
+
char* m_data;
|
140
|
+
size_t m_alloc;
|
141
|
+
};
|
142
|
+
|
143
|
+
/// @cond
|
144
|
+
} // MSGPACK_API_VERSION_NAMESPACE(v1)
|
145
|
+
/// @endcond
|
146
|
+
|
147
|
+
} // namespace msgpack
|
148
|
+
|
149
|
+
#endif // MSGPACK_V1_SBUFFER_HPP
|
@@ -0,0 +1,33 @@
|
|
1
|
+
//
|
2
|
+
// MessagePack for C++ simple buffer implementation
|
3
|
+
//
|
4
|
+
// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
|
5
|
+
//
|
6
|
+
// Distributed under the Boost Software License, Version 1.0.
|
7
|
+
// (See accompanying file LICENSE_1_0.txt or copy at
|
8
|
+
// http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
//
|
10
|
+
#ifndef MSGPACK_V1_SBUFFER_DECL_HPP
|
11
|
+
#define MSGPACK_V1_SBUFFER_DECL_HPP
|
12
|
+
|
13
|
+
#include "msgpack/versioning.hpp"
|
14
|
+
|
15
|
+
#ifndef MSGPACK_SBUFFER_INIT_SIZE
|
16
|
+
#define MSGPACK_SBUFFER_INIT_SIZE 8192
|
17
|
+
#endif
|
18
|
+
|
19
|
+
namespace msgpack {
|
20
|
+
|
21
|
+
/// @cond
|
22
|
+
MSGPACK_API_VERSION_NAMESPACE(v1) {
|
23
|
+
/// @endcond
|
24
|
+
|
25
|
+
class sbuffer;
|
26
|
+
|
27
|
+
/// @cond
|
28
|
+
} // MSGPACK_API_VERSION_NAMESPACE(v1)
|
29
|
+
/// @endcond
|
30
|
+
|
31
|
+
} // namespace msgpack
|
32
|
+
|
33
|
+
#endif // MSGPACK_V1_SBUFFER_DECL_HPP
|
@@ -0,0 +1,1672 @@
|
|
1
|
+
//
|
2
|
+
// MessagePack for C++ deserializing routine
|
3
|
+
//
|
4
|
+
// Copyright (C) 2008-2016 FURUHASHI Sadayuki and KONDO Takatoshi
|
5
|
+
//
|
6
|
+
// Distributed under the Boost Software License, Version 1.0.
|
7
|
+
// (See accompanying file LICENSE_1_0.txt or copy at
|
8
|
+
// http://www.boost.org/LICENSE_1_0.txt)
|
9
|
+
//
|
10
|
+
#ifndef MSGPACK_V1_UNPACK_HPP
|
11
|
+
#define MSGPACK_V1_UNPACK_HPP
|
12
|
+
|
13
|
+
#include "msgpack/versioning.hpp"
|
14
|
+
#include "msgpack/unpack_decl.hpp"
|
15
|
+
#include "msgpack/object.hpp"
|
16
|
+
#include "msgpack/zone.hpp"
|
17
|
+
#include "msgpack/unpack_define.h"
|
18
|
+
#include "msgpack/cpp_config.hpp"
|
19
|
+
#include "msgpack/sysdep.h"
|
20
|
+
|
21
|
+
#include <memory>
|
22
|
+
#include <stdexcept>
|
23
|
+
|
24
|
+
#if !defined(MSGPACK_USE_CPP03)
|
25
|
+
#include <atomic>
|
26
|
+
#endif
|
27
|
+
|
28
|
+
|
29
|
+
#if defined(_MSC_VER)
|
30
|
+
// avoiding confliction std::max, std::min, and macro in windows.h
|
31
|
+
#ifndef NOMINMAX
|
32
|
+
#define NOMINMAX
|
33
|
+
#endif
|
34
|
+
#endif // defined(_MSC_VER)
|
35
|
+
|
36
|
+
namespace msgpack {
|
37
|
+
|
38
|
+
/// @cond
|
39
|
+
MSGPACK_API_VERSION_NAMESPACE(v1) {
|
40
|
+
/// @endcond
|
41
|
+
|
42
|
+
struct unpack_error : public std::runtime_error {
|
43
|
+
explicit unpack_error(const std::string& msg)
|
44
|
+
:std::runtime_error(msg) {}
|
45
|
+
#if !defined(MSGPACK_USE_CPP03)
|
46
|
+
explicit unpack_error(const char* msg):
|
47
|
+
std::runtime_error(msg) {}
|
48
|
+
#endif // !defined(MSGPACK_USE_CPP03)
|
49
|
+
};
|
50
|
+
|
51
|
+
struct parse_error : public unpack_error {
|
52
|
+
explicit parse_error(const std::string& msg)
|
53
|
+
:unpack_error(msg) {}
|
54
|
+
#if !defined(MSGPACK_USE_CPP03)
|
55
|
+
explicit parse_error(const char* msg)
|
56
|
+
:unpack_error(msg) {}
|
57
|
+
#endif // !defined(MSGPACK_USE_CPP03)
|
58
|
+
};
|
59
|
+
|
60
|
+
struct insufficient_bytes : public unpack_error {
|
61
|
+
explicit insufficient_bytes(const std::string& msg)
|
62
|
+
:unpack_error(msg) {}
|
63
|
+
#if !defined(MSGPACK_USE_CPP03)
|
64
|
+
explicit insufficient_bytes(const char* msg)
|
65
|
+
:unpack_error(msg) {}
|
66
|
+
#endif // !defined(MSGPACK_USE_CPP03)
|
67
|
+
};
|
68
|
+
|
69
|
+
struct size_overflow : public unpack_error {
|
70
|
+
explicit size_overflow(const std::string& msg)
|
71
|
+
:unpack_error(msg) {}
|
72
|
+
#if !defined(MSGPACK_USE_CPP03)
|
73
|
+
explicit size_overflow(const char* msg)
|
74
|
+
:unpack_error(msg) {}
|
75
|
+
#endif
|
76
|
+
};
|
77
|
+
|
78
|
+
struct array_size_overflow : public size_overflow {
|
79
|
+
array_size_overflow(const std::string& msg)
|
80
|
+
:size_overflow(msg) {}
|
81
|
+
#if !defined(MSGPACK_USE_CPP03)
|
82
|
+
array_size_overflow(const char* msg)
|
83
|
+
:size_overflow(msg) {}
|
84
|
+
#endif
|
85
|
+
};
|
86
|
+
|
87
|
+
struct map_size_overflow : public size_overflow {
|
88
|
+
map_size_overflow(const std::string& msg)
|
89
|
+
:size_overflow(msg) {}
|
90
|
+
#if !defined(MSGPACK_USE_CPP03)
|
91
|
+
map_size_overflow(const char* msg)
|
92
|
+
:size_overflow(msg) {}
|
93
|
+
#endif
|
94
|
+
};
|
95
|
+
|
96
|
+
struct str_size_overflow : public size_overflow {
|
97
|
+
str_size_overflow(const std::string& msg)
|
98
|
+
:size_overflow(msg) {}
|
99
|
+
#if !defined(MSGPACK_USE_CPP03)
|
100
|
+
str_size_overflow(const char* msg)
|
101
|
+
:size_overflow(msg) {}
|
102
|
+
#endif
|
103
|
+
};
|
104
|
+
|
105
|
+
struct bin_size_overflow : public size_overflow {
|
106
|
+
bin_size_overflow(const std::string& msg)
|
107
|
+
:size_overflow(msg) {}
|
108
|
+
#if !defined(MSGPACK_USE_CPP03)
|
109
|
+
bin_size_overflow(const char* msg)
|
110
|
+
:size_overflow(msg) {}
|
111
|
+
#endif
|
112
|
+
};
|
113
|
+
|
114
|
+
struct ext_size_overflow : public size_overflow {
|
115
|
+
ext_size_overflow(const std::string& msg)
|
116
|
+
:size_overflow(msg) {}
|
117
|
+
#if !defined(MSGPACK_USE_CPP03)
|
118
|
+
ext_size_overflow(const char* msg)
|
119
|
+
:size_overflow(msg) {}
|
120
|
+
#endif
|
121
|
+
};
|
122
|
+
|
123
|
+
struct depth_size_overflow : public size_overflow {
|
124
|
+
depth_size_overflow(const std::string& msg)
|
125
|
+
:size_overflow(msg) {}
|
126
|
+
#if !defined(MSGPACK_USE_CPP03)
|
127
|
+
depth_size_overflow(const char* msg)
|
128
|
+
:size_overflow(msg) {}
|
129
|
+
#endif
|
130
|
+
};
|
131
|
+
|
132
|
+
namespace detail {
|
133
|
+
|
134
|
+
class unpack_user {
|
135
|
+
public:
|
136
|
+
unpack_user(unpack_reference_func f = MSGPACK_NULLPTR,
|
137
|
+
void* user_data = MSGPACK_NULLPTR,
|
138
|
+
unpack_limit const& limit = unpack_limit())
|
139
|
+
:m_func(f), m_user_data(user_data), m_limit(limit) {}
|
140
|
+
msgpack::zone const& zone() const { return *m_zone; }
|
141
|
+
msgpack::zone& zone() { return *m_zone; }
|
142
|
+
void set_zone(msgpack::zone& zone) { m_zone = &zone; }
|
143
|
+
bool referenced() const { return m_referenced; }
|
144
|
+
void set_referenced(bool referenced) { m_referenced = referenced; }
|
145
|
+
unpack_reference_func reference_func() const { return m_func; }
|
146
|
+
void* user_data() const { return m_user_data; }
|
147
|
+
unpack_limit const& limit() const { return m_limit; }
|
148
|
+
unpack_limit& limit() { return m_limit; }
|
149
|
+
|
150
|
+
private:
|
151
|
+
msgpack::zone* m_zone;
|
152
|
+
bool m_referenced;
|
153
|
+
unpack_reference_func m_func;
|
154
|
+
void* m_user_data;
|
155
|
+
unpack_limit m_limit;
|
156
|
+
};
|
157
|
+
|
158
|
+
inline void unpack_uint8(uint8_t d, msgpack::object& o)
|
159
|
+
{ o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
160
|
+
|
161
|
+
inline void unpack_uint16(uint16_t d, msgpack::object& o)
|
162
|
+
{ o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
163
|
+
|
164
|
+
inline void unpack_uint32(uint32_t d, msgpack::object& o)
|
165
|
+
{ o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
166
|
+
|
167
|
+
inline void unpack_uint64(uint64_t d, msgpack::object& o)
|
168
|
+
{ o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
169
|
+
|
170
|
+
inline void unpack_int8(int8_t d, msgpack::object& o)
|
171
|
+
{ if(d >= 0) { o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
172
|
+
else { o.type = msgpack::type::NEGATIVE_INTEGER; o.via.i64 = d; } }
|
173
|
+
|
174
|
+
inline void unpack_int16(int16_t d, msgpack::object& o)
|
175
|
+
{ if(d >= 0) { o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
176
|
+
else { o.type = msgpack::type::NEGATIVE_INTEGER; o.via.i64 = d; } }
|
177
|
+
|
178
|
+
inline void unpack_int32(int32_t d, msgpack::object& o)
|
179
|
+
{ if(d >= 0) { o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
180
|
+
else { o.type = msgpack::type::NEGATIVE_INTEGER; o.via.i64 = d; } }
|
181
|
+
|
182
|
+
inline void unpack_int64(int64_t d, msgpack::object& o)
|
183
|
+
{ if(d >= 0) { o.type = msgpack::type::POSITIVE_INTEGER; o.via.u64 = d; }
|
184
|
+
else { o.type = msgpack::type::NEGATIVE_INTEGER; o.via.i64 = d; } }
|
185
|
+
|
186
|
+
inline void unpack_float(float d, msgpack::object& o)
|
187
|
+
{ o.type = msgpack::type::FLOAT; o.via.f64 = d; }
|
188
|
+
|
189
|
+
inline void unpack_double(double d, msgpack::object& o)
|
190
|
+
{ o.type = msgpack::type::FLOAT; o.via.f64 = d; }
|
191
|
+
|
192
|
+
inline void unpack_nil(msgpack::object& o)
|
193
|
+
{ o.type = msgpack::type::NIL; }
|
194
|
+
|
195
|
+
inline void unpack_true(msgpack::object& o)
|
196
|
+
{ o.type = msgpack::type::BOOLEAN; o.via.boolean = true; }
|
197
|
+
|
198
|
+
inline void unpack_false(msgpack::object& o)
|
199
|
+
{ o.type = msgpack::type::BOOLEAN; o.via.boolean = false; }
|
200
|
+
|
201
|
+
struct unpack_array {
|
202
|
+
void operator()(unpack_user& u, uint32_t n, msgpack::object& o) const {
|
203
|
+
if (n > u.limit().array()) throw msgpack::array_size_overflow("array size overflow");
|
204
|
+
o.type = msgpack::type::ARRAY;
|
205
|
+
o.via.array.size = 0;
|
206
|
+
o.via.array.ptr = static_cast<msgpack::object*>(u.zone().allocate_align(n*sizeof(msgpack::object)));
|
207
|
+
}
|
208
|
+
};
|
209
|
+
|
210
|
+
inline void unpack_array_item(msgpack::object& c, msgpack::object const& o)
|
211
|
+
{
|
212
|
+
#if defined(__GNUC__) && !defined(__clang__)
|
213
|
+
std::memcpy(&c.via.array.ptr[c.via.array.size++], &o, sizeof(msgpack::object));
|
214
|
+
#else /* __GNUC__ && !__clang__ */
|
215
|
+
c.via.array.ptr[c.via.array.size++] = o;
|
216
|
+
#endif /* __GNUC__ && !__clang__ */
|
217
|
+
}
|
218
|
+
|
219
|
+
struct unpack_map {
|
220
|
+
void operator()(unpack_user& u, uint32_t n, msgpack::object& o) const {
|
221
|
+
if (n > u.limit().map()) throw msgpack::map_size_overflow("map size overflow");
|
222
|
+
o.type = msgpack::type::MAP;
|
223
|
+
o.via.map.size = 0;
|
224
|
+
o.via.map.ptr = static_cast<msgpack::object_kv*>(u.zone().allocate_align(n*sizeof(msgpack::object_kv)));
|
225
|
+
}
|
226
|
+
};
|
227
|
+
|
228
|
+
inline void unpack_map_item(msgpack::object& c, msgpack::object const& k, msgpack::object const& v)
|
229
|
+
{
|
230
|
+
#if defined(__GNUC__) && !defined(__clang__)
|
231
|
+
std::memcpy(&c.via.map.ptr[c.via.map.size].key, &k, sizeof(msgpack::object));
|
232
|
+
std::memcpy(&c.via.map.ptr[c.via.map.size].val, &v, sizeof(msgpack::object));
|
233
|
+
#else /* __GNUC__ && !__clang__ */
|
234
|
+
c.via.map.ptr[c.via.map.size].key = k;
|
235
|
+
c.via.map.ptr[c.via.map.size].val = v;
|
236
|
+
#endif /* __GNUC__ && !__clang__ */
|
237
|
+
++c.via.map.size;
|
238
|
+
}
|
239
|
+
|
240
|
+
inline void unpack_str(unpack_user& u, const char* p, uint32_t l, msgpack::object& o)
|
241
|
+
{
|
242
|
+
o.type = msgpack::type::STR;
|
243
|
+
if (u.reference_func() && u.reference_func()(o.type, l, u.user_data())) {
|
244
|
+
o.via.str.ptr = p;
|
245
|
+
u.set_referenced(true);
|
246
|
+
}
|
247
|
+
else {
|
248
|
+
if (l > u.limit().str()) throw msgpack::str_size_overflow("str size overflow");
|
249
|
+
char* tmp = static_cast<char*>(u.zone().allocate_align(l));
|
250
|
+
std::memcpy(tmp, p, l);
|
251
|
+
o.via.str.ptr = tmp;
|
252
|
+
}
|
253
|
+
o.via.str.size = l;
|
254
|
+
}
|
255
|
+
|
256
|
+
inline void unpack_bin(unpack_user& u, const char* p, uint32_t l, msgpack::object& o)
|
257
|
+
{
|
258
|
+
o.type = msgpack::type::BIN;
|
259
|
+
if (u.reference_func() && u.reference_func()(o.type, l, u.user_data())) {
|
260
|
+
o.via.bin.ptr = p;
|
261
|
+
u.set_referenced(true);
|
262
|
+
}
|
263
|
+
else {
|
264
|
+
if (l > u.limit().bin()) throw msgpack::bin_size_overflow("bin size overflow");
|
265
|
+
char* tmp = static_cast<char*>(u.zone().allocate_align(l));
|
266
|
+
std::memcpy(tmp, p, l);
|
267
|
+
o.via.bin.ptr = tmp;
|
268
|
+
}
|
269
|
+
o.via.bin.size = l;
|
270
|
+
}
|
271
|
+
|
272
|
+
inline void unpack_ext(unpack_user& u, const char* p, std::size_t l, msgpack::object& o)
|
273
|
+
{
|
274
|
+
o.type = msgpack::type::EXT;
|
275
|
+
if (u.reference_func() && u.reference_func()(o.type, l, u.user_data())) {
|
276
|
+
o.via.ext.ptr = p;
|
277
|
+
u.set_referenced(true);
|
278
|
+
}
|
279
|
+
else {
|
280
|
+
if (l > u.limit().ext()) throw msgpack::ext_size_overflow("ext size overflow");
|
281
|
+
char* tmp = static_cast<char*>(u.zone().allocate_align(l));
|
282
|
+
std::memcpy(tmp, p, l);
|
283
|
+
o.via.ext.ptr = tmp;
|
284
|
+
}
|
285
|
+
o.via.ext.size = static_cast<uint32_t>(l - 1);
|
286
|
+
}
|
287
|
+
|
288
|
+
|
289
|
+
class unpack_stack {
|
290
|
+
public:
|
291
|
+
msgpack::object const& obj() const { return m_obj; }
|
292
|
+
msgpack::object& obj() { return m_obj; }
|
293
|
+
void set_obj(msgpack::object const& obj) { m_obj = obj; }
|
294
|
+
std::size_t count() const { return m_count; }
|
295
|
+
void set_count(std::size_t count) { m_count = count; }
|
296
|
+
std::size_t decr_count() { return --m_count; }
|
297
|
+
uint32_t container_type() const { return m_container_type; }
|
298
|
+
void set_container_type(uint32_t container_type) { m_container_type = container_type; }
|
299
|
+
msgpack::object const& map_key() const { return m_map_key; }
|
300
|
+
void set_map_key(msgpack::object const& map_key) { m_map_key = map_key; }
|
301
|
+
private:
|
302
|
+
msgpack::object m_obj;
|
303
|
+
std::size_t m_count;
|
304
|
+
uint32_t m_container_type;
|
305
|
+
msgpack::object m_map_key;
|
306
|
+
};
|
307
|
+
|
308
|
+
inline void init_count(void* buffer)
|
309
|
+
{
|
310
|
+
#if defined(MSGPACK_USE_CPP03)
|
311
|
+
*reinterpret_cast<volatile _msgpack_atomic_counter_t*>(buffer) = 1;
|
312
|
+
#else // defined(MSGPACK_USE_CPP03)
|
313
|
+
new (buffer) std::atomic<unsigned int>(1);
|
314
|
+
#endif // defined(MSGPACK_USE_CPP03)
|
315
|
+
}
|
316
|
+
|
317
|
+
inline void decr_count(void* buffer)
|
318
|
+
{
|
319
|
+
#if defined(MSGPACK_USE_CPP03)
|
320
|
+
if(_msgpack_sync_decr_and_fetch(reinterpret_cast<volatile _msgpack_atomic_counter_t*>(buffer)) == 0) {
|
321
|
+
free(buffer);
|
322
|
+
}
|
323
|
+
#else // defined(MSGPACK_USE_CPP03)
|
324
|
+
if (--*reinterpret_cast<std::atomic<unsigned int>*>(buffer) == 0) {
|
325
|
+
free(buffer);
|
326
|
+
}
|
327
|
+
#endif // defined(MSGPACK_USE_CPP03)
|
328
|
+
}
|
329
|
+
|
330
|
+
inline void incr_count(void* buffer)
|
331
|
+
{
|
332
|
+
#if defined(MSGPACK_USE_CPP03)
|
333
|
+
_msgpack_sync_incr_and_fetch(reinterpret_cast<volatile _msgpack_atomic_counter_t*>(buffer));
|
334
|
+
#else // defined(MSGPACK_USE_CPP03)
|
335
|
+
++*reinterpret_cast<std::atomic<unsigned int>*>(buffer);
|
336
|
+
#endif // defined(MSGPACK_USE_CPP03)
|
337
|
+
}
|
338
|
+
|
339
|
+
#if defined(MSGPACK_USE_CPP03)
|
340
|
+
inline _msgpack_atomic_counter_t get_count(void* buffer)
|
341
|
+
{
|
342
|
+
return *reinterpret_cast<volatile _msgpack_atomic_counter_t*>(buffer);
|
343
|
+
}
|
344
|
+
#else // defined(MSGPACK_USE_CPP03)
|
345
|
+
inline std::atomic<unsigned int> const& get_count(void* buffer)
|
346
|
+
{
|
347
|
+
return *reinterpret_cast<std::atomic<unsigned int>*>(buffer);
|
348
|
+
}
|
349
|
+
#endif // defined(MSGPACK_USE_CPP03)
|
350
|
+
|
351
|
+
template <typename T>
|
352
|
+
struct value {
|
353
|
+
typedef T type;
|
354
|
+
};
|
355
|
+
template <>
|
356
|
+
struct value<fix_tag> {
|
357
|
+
typedef uint32_t type;
|
358
|
+
};
|
359
|
+
|
360
|
+
template <typename T>
|
361
|
+
inline typename msgpack::enable_if<sizeof(T) == sizeof(fix_tag)>::type load(uint32_t& dst, const char* n) {
|
362
|
+
dst = static_cast<uint32_t>(*reinterpret_cast<const uint8_t*>(n)) & 0x0f;
|
363
|
+
}
|
364
|
+
|
365
|
+
template <typename T>
|
366
|
+
inline typename msgpack::enable_if<sizeof(T) == 1>::type load(T& dst, const char* n) {
|
367
|
+
dst = static_cast<T>(*reinterpret_cast<const uint8_t*>(n));
|
368
|
+
}
|
369
|
+
|
370
|
+
template <typename T>
|
371
|
+
inline typename msgpack::enable_if<sizeof(T) == 2>::type load(T& dst, const char* n) {
|
372
|
+
_msgpack_load16(T, n, &dst);
|
373
|
+
}
|
374
|
+
|
375
|
+
template <typename T>
|
376
|
+
inline typename msgpack::enable_if<sizeof(T) == 4>::type load(T& dst, const char* n) {
|
377
|
+
_msgpack_load32(T, n, &dst);
|
378
|
+
}
|
379
|
+
|
380
|
+
template <typename T>
|
381
|
+
inline typename msgpack::enable_if<sizeof(T) == 8>::type load(T& dst, const char* n) {
|
382
|
+
_msgpack_load64(T, n, &dst);
|
383
|
+
}
|
384
|
+
|
385
|
+
class context {
|
386
|
+
public:
|
387
|
+
context(unpack_reference_func f, void* user_data, unpack_limit const& limit)
|
388
|
+
:m_trail(0), m_user(f, user_data, limit), m_cs(MSGPACK_CS_HEADER)
|
389
|
+
{
|
390
|
+
m_stack.reserve(MSGPACK_EMBED_STACK_SIZE);
|
391
|
+
m_stack.push_back(unpack_stack());
|
392
|
+
}
|
393
|
+
|
394
|
+
void init()
|
395
|
+
{
|
396
|
+
m_cs = MSGPACK_CS_HEADER;
|
397
|
+
m_trail = 0;
|
398
|
+
m_stack.resize(1);
|
399
|
+
m_stack[0].set_obj(msgpack::object());
|
400
|
+
}
|
401
|
+
|
402
|
+
msgpack::object const& data() const
|
403
|
+
{
|
404
|
+
return m_stack[0].obj();
|
405
|
+
}
|
406
|
+
|
407
|
+
unpack_user& user()
|
408
|
+
{
|
409
|
+
return m_user;
|
410
|
+
}
|
411
|
+
|
412
|
+
unpack_user const& user() const
|
413
|
+
{
|
414
|
+
return m_user;
|
415
|
+
}
|
416
|
+
|
417
|
+
int execute(const char* data, std::size_t len, std::size_t& off);
|
418
|
+
|
419
|
+
private:
|
420
|
+
template <typename T>
|
421
|
+
static uint32_t next_cs(T p)
|
422
|
+
{
|
423
|
+
return static_cast<uint32_t>(*p) & 0x1f;
|
424
|
+
}
|
425
|
+
|
426
|
+
template <typename T, typename Func>
|
427
|
+
int push_aggregate(
|
428
|
+
Func const& f,
|
429
|
+
uint32_t container_type,
|
430
|
+
msgpack::object& obj,
|
431
|
+
const char* load_pos,
|
432
|
+
std::size_t& off) {
|
433
|
+
typename value<T>::type tmp;
|
434
|
+
load<T>(tmp, load_pos);
|
435
|
+
f(m_user, tmp, m_stack.back().obj());
|
436
|
+
if(tmp == 0) {
|
437
|
+
obj = m_stack.back().obj();
|
438
|
+
int ret = push_proc(obj, off);
|
439
|
+
if (ret != 0) return ret;
|
440
|
+
}
|
441
|
+
else {
|
442
|
+
m_stack.back().set_container_type(container_type);
|
443
|
+
m_stack.back().set_count(tmp);
|
444
|
+
if (m_stack.size() <= m_user.limit().depth()) {
|
445
|
+
m_stack.push_back(unpack_stack());
|
446
|
+
}
|
447
|
+
else {
|
448
|
+
throw msgpack::depth_size_overflow("depth size overflow");
|
449
|
+
}
|
450
|
+
m_cs = MSGPACK_CS_HEADER;
|
451
|
+
++m_current;
|
452
|
+
}
|
453
|
+
return 0;
|
454
|
+
}
|
455
|
+
|
456
|
+
int push_item(msgpack::object& obj) {
|
457
|
+
bool finish = false;
|
458
|
+
while (!finish) {
|
459
|
+
if(m_stack.size() == 1) {
|
460
|
+
return 1;
|
461
|
+
}
|
462
|
+
unpack_stack& sp = *(m_stack.end() - 2);
|
463
|
+
switch(sp.container_type()) {
|
464
|
+
case MSGPACK_CT_ARRAY_ITEM:
|
465
|
+
unpack_array_item(sp.obj(), obj);
|
466
|
+
if(sp.decr_count() == 0) {
|
467
|
+
obj = sp.obj();
|
468
|
+
m_stack.pop_back();
|
469
|
+
}
|
470
|
+
else {
|
471
|
+
finish = true;
|
472
|
+
}
|
473
|
+
break;
|
474
|
+
case MSGPACK_CT_MAP_KEY:
|
475
|
+
sp.set_map_key(obj);
|
476
|
+
sp.set_container_type(MSGPACK_CT_MAP_VALUE);
|
477
|
+
finish = true;
|
478
|
+
break;
|
479
|
+
case MSGPACK_CT_MAP_VALUE:
|
480
|
+
unpack_map_item(sp.obj(), sp.map_key(), obj);
|
481
|
+
if(sp.decr_count() == 0) {
|
482
|
+
obj = sp.obj();
|
483
|
+
m_stack.pop_back();
|
484
|
+
}
|
485
|
+
else {
|
486
|
+
sp.set_container_type(MSGPACK_CT_MAP_KEY);
|
487
|
+
finish = true;
|
488
|
+
}
|
489
|
+
break;
|
490
|
+
default:
|
491
|
+
return -1;
|
492
|
+
}
|
493
|
+
}
|
494
|
+
return 0;
|
495
|
+
}
|
496
|
+
|
497
|
+
int push_proc(msgpack::object& obj, std::size_t& off) {
|
498
|
+
int ret = push_item(obj);
|
499
|
+
if (ret > 0) {
|
500
|
+
m_stack[0].set_obj(obj);
|
501
|
+
++m_current;
|
502
|
+
/*printf("-- finish --\n"); */
|
503
|
+
off = m_current - m_start;
|
504
|
+
}
|
505
|
+
else if (ret < 0) {
|
506
|
+
off = m_current - m_start;
|
507
|
+
}
|
508
|
+
else {
|
509
|
+
m_cs = MSGPACK_CS_HEADER;
|
510
|
+
++m_current;
|
511
|
+
}
|
512
|
+
return ret;
|
513
|
+
}
|
514
|
+
|
515
|
+
template <std::size_t N>
|
516
|
+
static void check_ext_size(std::size_t /*size*/) {
|
517
|
+
}
|
518
|
+
|
519
|
+
private:
|
520
|
+
char const* m_start;
|
521
|
+
char const* m_current;
|
522
|
+
|
523
|
+
std::size_t m_trail;
|
524
|
+
unpack_user m_user;
|
525
|
+
uint32_t m_cs;
|
526
|
+
std::vector<unpack_stack> m_stack;
|
527
|
+
};
|
528
|
+
|
529
|
+
template <>
|
530
|
+
inline void context::check_ext_size<4>(std::size_t size) {
|
531
|
+
if (size == 0xffffffff) throw msgpack::ext_size_overflow("ext size overflow");
|
532
|
+
}
|
533
|
+
|
534
|
+
inline int context::execute(const char* data, std::size_t len, std::size_t& off)
|
535
|
+
{
|
536
|
+
assert(len >= off);
|
537
|
+
|
538
|
+
m_start = data;
|
539
|
+
m_current = data + off;
|
540
|
+
const char* const pe = data + len;
|
541
|
+
const char* n = MSGPACK_NULLPTR;
|
542
|
+
|
543
|
+
msgpack::object obj;
|
544
|
+
|
545
|
+
if(m_current == pe) {
|
546
|
+
off = m_current - m_start;
|
547
|
+
return 0;
|
548
|
+
}
|
549
|
+
bool fixed_trail_again = false;
|
550
|
+
do {
|
551
|
+
if (m_cs == MSGPACK_CS_HEADER) {
|
552
|
+
fixed_trail_again = false;
|
553
|
+
int selector = *reinterpret_cast<const unsigned char*>(m_current);
|
554
|
+
if (0x00 <= selector && selector <= 0x7f) { // Positive Fixnum
|
555
|
+
unpack_uint8(*reinterpret_cast<const uint8_t*>(m_current), obj);
|
556
|
+
int ret = push_proc(obj, off);
|
557
|
+
if (ret != 0) return ret;
|
558
|
+
} else if(0xe0 <= selector && selector <= 0xff) { // Negative Fixnum
|
559
|
+
unpack_int8(*reinterpret_cast<const int8_t*>(m_current), obj);
|
560
|
+
int ret = push_proc(obj, off);
|
561
|
+
if (ret != 0) return ret;
|
562
|
+
} else if (0xc4 <= selector && selector <= 0xdf) {
|
563
|
+
const uint32_t trail[] = {
|
564
|
+
1, // bin 8 0xc4
|
565
|
+
2, // bin 16 0xc5
|
566
|
+
4, // bin 32 0xc6
|
567
|
+
1, // ext 8 0xc7
|
568
|
+
2, // ext 16 0xc8
|
569
|
+
4, // ext 32 0xc9
|
570
|
+
4, // float 32 0xca
|
571
|
+
8, // float 64 0xcb
|
572
|
+
1, // uint 8 0xcc
|
573
|
+
2, // uint 16 0xcd
|
574
|
+
4, // uint 32 0xce
|
575
|
+
8, // uint 64 0xcf
|
576
|
+
1, // int 8 0xd0
|
577
|
+
2, // int 16 0xd1
|
578
|
+
4, // int 32 0xd2
|
579
|
+
8, // int 64 0xd3
|
580
|
+
2, // fixext 1 0xd4
|
581
|
+
3, // fixext 2 0xd5
|
582
|
+
5, // fixext 4 0xd6
|
583
|
+
9, // fixext 8 0xd7
|
584
|
+
17,// fixext 16 0xd8
|
585
|
+
1, // str 8 0xd9
|
586
|
+
2, // str 16 0xda
|
587
|
+
4, // str 32 0xdb
|
588
|
+
2, // array 16 0xdc
|
589
|
+
4, // array 32 0xdd
|
590
|
+
2, // map 16 0xde
|
591
|
+
4, // map 32 0xdf
|
592
|
+
};
|
593
|
+
m_trail = trail[selector - 0xc4];
|
594
|
+
m_cs = next_cs(m_current);
|
595
|
+
fixed_trail_again = true;
|
596
|
+
} else if(0xa0 <= selector && selector <= 0xbf) { // FixStr
|
597
|
+
m_trail = static_cast<uint32_t>(*m_current) & 0x1f;
|
598
|
+
if(m_trail == 0) {
|
599
|
+
unpack_str(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
600
|
+
int ret = push_proc(obj, off);
|
601
|
+
if (ret != 0) return ret;
|
602
|
+
}
|
603
|
+
else {
|
604
|
+
m_cs = MSGPACK_ACS_STR_VALUE;
|
605
|
+
fixed_trail_again = true;
|
606
|
+
}
|
607
|
+
|
608
|
+
} else if(0x90 <= selector && selector <= 0x9f) { // FixArray
|
609
|
+
int ret = push_aggregate<fix_tag>(
|
610
|
+
unpack_array(), MSGPACK_CT_ARRAY_ITEM, obj, m_current, off);
|
611
|
+
if (ret != 0) return ret;
|
612
|
+
} else if(0x80 <= selector && selector <= 0x8f) { // FixMap
|
613
|
+
int ret = push_aggregate<fix_tag>(
|
614
|
+
unpack_map(), MSGPACK_CT_MAP_KEY, obj, m_current, off);
|
615
|
+
if (ret != 0) return ret;
|
616
|
+
} else if(selector == 0xc2) { // false
|
617
|
+
unpack_false(obj);
|
618
|
+
int ret = push_proc(obj, off);
|
619
|
+
if (ret != 0) return ret;
|
620
|
+
} else if(selector == 0xc3) { // true
|
621
|
+
unpack_true(obj);
|
622
|
+
int ret = push_proc(obj, off);
|
623
|
+
if (ret != 0) return ret;
|
624
|
+
} else if(selector == 0xc0) { // nil
|
625
|
+
unpack_nil(obj);
|
626
|
+
int ret = push_proc(obj, off);
|
627
|
+
if (ret != 0) return ret;
|
628
|
+
} else {
|
629
|
+
off = m_current - m_start;
|
630
|
+
return -1;
|
631
|
+
}
|
632
|
+
// end MSGPACK_CS_HEADER
|
633
|
+
}
|
634
|
+
if (m_cs != MSGPACK_CS_HEADER || fixed_trail_again) {
|
635
|
+
if (fixed_trail_again) {
|
636
|
+
++m_current;
|
637
|
+
fixed_trail_again = false;
|
638
|
+
}
|
639
|
+
if(static_cast<std::size_t>(pe - m_current) < m_trail) {
|
640
|
+
off = m_current - m_start;
|
641
|
+
return 0;
|
642
|
+
}
|
643
|
+
n = m_current;
|
644
|
+
m_current += m_trail - 1;
|
645
|
+
switch(m_cs) {
|
646
|
+
//case MSGPACK_CS_
|
647
|
+
//case MSGPACK_CS_
|
648
|
+
case MSGPACK_CS_FLOAT: {
|
649
|
+
union { uint32_t i; float f; } mem;
|
650
|
+
load<uint32_t>(mem.i, n);
|
651
|
+
unpack_float(mem.f, obj);
|
652
|
+
int ret = push_proc(obj, off);
|
653
|
+
if (ret != 0) return ret;
|
654
|
+
} break;
|
655
|
+
case MSGPACK_CS_DOUBLE: {
|
656
|
+
union { uint64_t i; double f; } mem;
|
657
|
+
load<uint64_t>(mem.i, n);
|
658
|
+
#if defined(TARGET_OS_IPHONE)
|
659
|
+
// ok
|
660
|
+
#elif defined(__arm__) && !(__ARM_EABI__) // arm-oabi
|
661
|
+
// https://github.com/msgpack/msgpack-perl/pull/1
|
662
|
+
mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL);
|
663
|
+
#endif
|
664
|
+
unpack_double(mem.f, obj);
|
665
|
+
int ret = push_proc(obj, off);
|
666
|
+
if (ret != 0) return ret;
|
667
|
+
} break;
|
668
|
+
case MSGPACK_CS_UINT_8: {
|
669
|
+
uint8_t tmp;
|
670
|
+
load<uint8_t>(tmp, n);
|
671
|
+
unpack_uint8(tmp, obj);
|
672
|
+
int ret = push_proc(obj, off);
|
673
|
+
if (ret != 0) return ret;
|
674
|
+
} break;
|
675
|
+
case MSGPACK_CS_UINT_16: {
|
676
|
+
uint16_t tmp;
|
677
|
+
load<uint16_t>(tmp, n);
|
678
|
+
unpack_uint16(tmp, obj);
|
679
|
+
int ret = push_proc(obj, off);
|
680
|
+
if (ret != 0) return ret;
|
681
|
+
} break;
|
682
|
+
case MSGPACK_CS_UINT_32: {
|
683
|
+
uint32_t tmp;
|
684
|
+
load<uint32_t>(tmp, n);
|
685
|
+
unpack_uint32(tmp, obj);
|
686
|
+
int ret = push_proc(obj, off);
|
687
|
+
if (ret != 0) return ret;
|
688
|
+
} break;
|
689
|
+
case MSGPACK_CS_UINT_64: {
|
690
|
+
uint64_t tmp;
|
691
|
+
load<uint64_t>(tmp, n);
|
692
|
+
unpack_uint64(tmp, obj);
|
693
|
+
int ret = push_proc(obj, off);
|
694
|
+
if (ret != 0) return ret;
|
695
|
+
} break;
|
696
|
+
case MSGPACK_CS_INT_8: {
|
697
|
+
int8_t tmp;
|
698
|
+
load<int8_t>(tmp, n);
|
699
|
+
unpack_int8(tmp, obj);
|
700
|
+
int ret = push_proc(obj, off);
|
701
|
+
if (ret != 0) return ret;
|
702
|
+
} break;
|
703
|
+
case MSGPACK_CS_INT_16: {
|
704
|
+
int16_t tmp;
|
705
|
+
load<int16_t>(tmp, n);
|
706
|
+
unpack_int16(tmp, obj);
|
707
|
+
int ret = push_proc(obj, off);
|
708
|
+
if (ret != 0) return ret;
|
709
|
+
} break;
|
710
|
+
case MSGPACK_CS_INT_32: {
|
711
|
+
int32_t tmp;
|
712
|
+
load<int32_t>(tmp, n);
|
713
|
+
unpack_int32(tmp, obj);
|
714
|
+
int ret = push_proc(obj, off);
|
715
|
+
if (ret != 0) return ret;
|
716
|
+
} break;
|
717
|
+
case MSGPACK_CS_INT_64: {
|
718
|
+
int64_t tmp;
|
719
|
+
load<int64_t>(tmp, n);
|
720
|
+
unpack_int64(tmp, obj);
|
721
|
+
int ret = push_proc(obj, off);
|
722
|
+
if (ret != 0) return ret;
|
723
|
+
} break;
|
724
|
+
case MSGPACK_CS_FIXEXT_1: {
|
725
|
+
unpack_ext(m_user, n, 1+1, obj);
|
726
|
+
int ret = push_proc(obj, off);
|
727
|
+
if (ret != 0) return ret;
|
728
|
+
} break;
|
729
|
+
case MSGPACK_CS_FIXEXT_2: {
|
730
|
+
unpack_ext(m_user, n, 2+1, obj);
|
731
|
+
int ret = push_proc(obj, off);
|
732
|
+
if (ret != 0) return ret;
|
733
|
+
} break;
|
734
|
+
case MSGPACK_CS_FIXEXT_4: {
|
735
|
+
unpack_ext(m_user, n, 4+1, obj);
|
736
|
+
int ret = push_proc(obj, off);
|
737
|
+
if (ret != 0) return ret;
|
738
|
+
} break;
|
739
|
+
case MSGPACK_CS_FIXEXT_8: {
|
740
|
+
unpack_ext(m_user, n, 8+1, obj);
|
741
|
+
int ret = push_proc(obj, off);
|
742
|
+
if (ret != 0) return ret;
|
743
|
+
} break;
|
744
|
+
case MSGPACK_CS_FIXEXT_16: {
|
745
|
+
unpack_ext(m_user, n, 16+1, obj);
|
746
|
+
int ret = push_proc(obj, off);
|
747
|
+
if (ret != 0) return ret;
|
748
|
+
} break;
|
749
|
+
case MSGPACK_CS_STR_8: {
|
750
|
+
uint8_t tmp;
|
751
|
+
load<uint8_t>(tmp, n);
|
752
|
+
m_trail = tmp;
|
753
|
+
if(m_trail == 0) {
|
754
|
+
unpack_str(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
755
|
+
int ret = push_proc(obj, off);
|
756
|
+
if (ret != 0) return ret;
|
757
|
+
}
|
758
|
+
else {
|
759
|
+
m_cs = MSGPACK_ACS_STR_VALUE;
|
760
|
+
fixed_trail_again = true;
|
761
|
+
}
|
762
|
+
} break;
|
763
|
+
case MSGPACK_CS_BIN_8: {
|
764
|
+
uint8_t tmp;
|
765
|
+
load<uint8_t>(tmp, n);
|
766
|
+
m_trail = tmp;
|
767
|
+
if(m_trail == 0) {
|
768
|
+
unpack_bin(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
769
|
+
int ret = push_proc(obj, off);
|
770
|
+
if (ret != 0) return ret;
|
771
|
+
}
|
772
|
+
else {
|
773
|
+
m_cs = MSGPACK_ACS_BIN_VALUE;
|
774
|
+
fixed_trail_again = true;
|
775
|
+
}
|
776
|
+
} break;
|
777
|
+
case MSGPACK_CS_EXT_8: {
|
778
|
+
uint8_t tmp;
|
779
|
+
load<uint8_t>(tmp, n);
|
780
|
+
m_trail = tmp + 1;
|
781
|
+
if(m_trail == 0) {
|
782
|
+
unpack_ext(m_user, n, m_trail, obj);
|
783
|
+
int ret = push_proc(obj, off);
|
784
|
+
if (ret != 0) return ret;
|
785
|
+
}
|
786
|
+
else {
|
787
|
+
m_cs = MSGPACK_ACS_EXT_VALUE;
|
788
|
+
fixed_trail_again = true;
|
789
|
+
}
|
790
|
+
} break;
|
791
|
+
case MSGPACK_CS_STR_16: {
|
792
|
+
uint16_t tmp;
|
793
|
+
load<uint16_t>(tmp, n);
|
794
|
+
m_trail = tmp;
|
795
|
+
if(m_trail == 0) {
|
796
|
+
unpack_str(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
797
|
+
int ret = push_proc(obj, off);
|
798
|
+
if (ret != 0) return ret;
|
799
|
+
}
|
800
|
+
else {
|
801
|
+
m_cs = MSGPACK_ACS_STR_VALUE;
|
802
|
+
fixed_trail_again = true;
|
803
|
+
}
|
804
|
+
} break;
|
805
|
+
case MSGPACK_CS_BIN_16: {
|
806
|
+
uint16_t tmp;
|
807
|
+
load<uint16_t>(tmp, n);
|
808
|
+
m_trail = tmp;
|
809
|
+
if(m_trail == 0) {
|
810
|
+
unpack_bin(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
811
|
+
int ret = push_proc(obj, off);
|
812
|
+
if (ret != 0) return ret;
|
813
|
+
}
|
814
|
+
else {
|
815
|
+
m_cs = MSGPACK_ACS_BIN_VALUE;
|
816
|
+
fixed_trail_again = true;
|
817
|
+
}
|
818
|
+
} break;
|
819
|
+
case MSGPACK_CS_EXT_16: {
|
820
|
+
uint16_t tmp;
|
821
|
+
load<uint16_t>(tmp, n);
|
822
|
+
m_trail = tmp + 1;
|
823
|
+
if(m_trail == 0) {
|
824
|
+
unpack_ext(m_user, n, m_trail, obj);
|
825
|
+
int ret = push_proc(obj, off);
|
826
|
+
if (ret != 0) return ret;
|
827
|
+
}
|
828
|
+
else {
|
829
|
+
m_cs = MSGPACK_ACS_EXT_VALUE;
|
830
|
+
fixed_trail_again = true;
|
831
|
+
}
|
832
|
+
} break;
|
833
|
+
case MSGPACK_CS_STR_32: {
|
834
|
+
uint32_t tmp;
|
835
|
+
load<uint32_t>(tmp, n);
|
836
|
+
m_trail = tmp;
|
837
|
+
if(m_trail == 0) {
|
838
|
+
unpack_str(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
839
|
+
int ret = push_proc(obj, off);
|
840
|
+
if (ret != 0) return ret;
|
841
|
+
}
|
842
|
+
else {
|
843
|
+
m_cs = MSGPACK_ACS_STR_VALUE;
|
844
|
+
fixed_trail_again = true;
|
845
|
+
}
|
846
|
+
} break;
|
847
|
+
case MSGPACK_CS_BIN_32: {
|
848
|
+
uint32_t tmp;
|
849
|
+
load<uint32_t>(tmp, n);
|
850
|
+
m_trail = tmp;
|
851
|
+
if(m_trail == 0) {
|
852
|
+
unpack_bin(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
853
|
+
int ret = push_proc(obj, off);
|
854
|
+
if (ret != 0) return ret;
|
855
|
+
}
|
856
|
+
else {
|
857
|
+
m_cs = MSGPACK_ACS_BIN_VALUE;
|
858
|
+
fixed_trail_again = true;
|
859
|
+
}
|
860
|
+
} break;
|
861
|
+
case MSGPACK_CS_EXT_32: {
|
862
|
+
uint32_t tmp;
|
863
|
+
load<uint32_t>(tmp, n);
|
864
|
+
check_ext_size<sizeof(std::size_t)>(tmp);
|
865
|
+
m_trail = tmp;
|
866
|
+
++m_trail;
|
867
|
+
if(m_trail == 0) {
|
868
|
+
unpack_ext(m_user, n, m_trail, obj);
|
869
|
+
int ret = push_proc(obj, off);
|
870
|
+
if (ret != 0) return ret;
|
871
|
+
}
|
872
|
+
else {
|
873
|
+
m_cs = MSGPACK_ACS_EXT_VALUE;
|
874
|
+
fixed_trail_again = true;
|
875
|
+
}
|
876
|
+
} break;
|
877
|
+
case MSGPACK_ACS_STR_VALUE: {
|
878
|
+
unpack_str(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
879
|
+
int ret = push_proc(obj, off);
|
880
|
+
if (ret != 0) return ret;
|
881
|
+
} break;
|
882
|
+
case MSGPACK_ACS_BIN_VALUE: {
|
883
|
+
unpack_bin(m_user, n, static_cast<uint32_t>(m_trail), obj);
|
884
|
+
int ret = push_proc(obj, off);
|
885
|
+
if (ret != 0) return ret;
|
886
|
+
} break;
|
887
|
+
case MSGPACK_ACS_EXT_VALUE: {
|
888
|
+
unpack_ext(m_user, n, m_trail, obj);
|
889
|
+
int ret = push_proc(obj, off);
|
890
|
+
if (ret != 0) return ret;
|
891
|
+
} break;
|
892
|
+
case MSGPACK_CS_ARRAY_16: {
|
893
|
+
int ret = push_aggregate<uint16_t>(
|
894
|
+
unpack_array(), MSGPACK_CT_ARRAY_ITEM, obj, n, off);
|
895
|
+
if (ret != 0) return ret;
|
896
|
+
} break;
|
897
|
+
case MSGPACK_CS_ARRAY_32: {
|
898
|
+
/* FIXME security guard */
|
899
|
+
int ret = push_aggregate<uint32_t>(
|
900
|
+
unpack_array(), MSGPACK_CT_ARRAY_ITEM, obj, n, off);
|
901
|
+
if (ret != 0) return ret;
|
902
|
+
} break;
|
903
|
+
case MSGPACK_CS_MAP_16: {
|
904
|
+
int ret = push_aggregate<uint16_t>(
|
905
|
+
unpack_map(), MSGPACK_CT_MAP_KEY, obj, n, off);
|
906
|
+
if (ret != 0) return ret;
|
907
|
+
} break;
|
908
|
+
case MSGPACK_CS_MAP_32: {
|
909
|
+
/* FIXME security guard */
|
910
|
+
int ret = push_aggregate<uint32_t>(
|
911
|
+
unpack_map(), MSGPACK_CT_MAP_KEY, obj, n, off);
|
912
|
+
if (ret != 0) return ret;
|
913
|
+
} break;
|
914
|
+
default:
|
915
|
+
off = m_current - m_start;
|
916
|
+
return -1;
|
917
|
+
}
|
918
|
+
}
|
919
|
+
} while(m_current != pe);
|
920
|
+
|
921
|
+
off = m_current - m_start;
|
922
|
+
return 0;
|
923
|
+
}
|
924
|
+
|
925
|
+
} // detail
|
926
|
+
|
927
|
+
|
928
|
+
/// Unpacking class for a stream deserialization.
|
929
|
+
class unpacker {
|
930
|
+
public:
|
931
|
+
/// Constructor
|
932
|
+
/**
|
933
|
+
* @param referenced If the unpacked object contains reference of the buffer, then set as true, otherwise false.
|
934
|
+
* @param f A judging function that msgpack::object refer to the buffer.
|
935
|
+
* @param user_data This parameter is passed to f.
|
936
|
+
* @param initial_buffer_size The memory size to allocate when unpacker is constructed.
|
937
|
+
* @param limit The size limit information of msgpack::object.
|
938
|
+
*
|
939
|
+
*/
|
940
|
+
unpacker(unpack_reference_func f = &unpacker::default_reference_func,
|
941
|
+
void* user_data = MSGPACK_NULLPTR,
|
942
|
+
std::size_t initial_buffer_size = MSGPACK_UNPACKER_INIT_BUFFER_SIZE,
|
943
|
+
unpack_limit const& limit = unpack_limit());
|
944
|
+
|
945
|
+
#if !defined(MSGPACK_USE_CPP03)
|
946
|
+
unpacker(unpacker&& other);
|
947
|
+
unpacker& operator=(unpacker&& other);
|
948
|
+
#endif // !defined(MSGPACK_USE_CPP03)
|
949
|
+
|
950
|
+
~unpacker();
|
951
|
+
|
952
|
+
public:
|
953
|
+
/// Reserve a buffer memory.
|
954
|
+
/**
|
955
|
+
* @param size The size of allocating memory.
|
956
|
+
*
|
957
|
+
* After returning this function, buffer_capacity() returns at least 'size'.
|
958
|
+
* See:
|
959
|
+
* https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_unpacker#msgpack-controls-a-buffer
|
960
|
+
*/
|
961
|
+
void reserve_buffer(std::size_t size = MSGPACK_UNPACKER_RESERVE_SIZE);
|
962
|
+
|
963
|
+
/// Get buffer pointer.
|
964
|
+
/**
|
965
|
+
* You need to care about the memory is enable between buffer() and buffer() + buffer_capacity()
|
966
|
+
* See:
|
967
|
+
* https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_unpacker#msgpack-controls-a-buffer
|
968
|
+
*/
|
969
|
+
char* buffer();
|
970
|
+
|
971
|
+
/// Get buffer capacity.
|
972
|
+
/**
|
973
|
+
* @return The memory size that you can write.
|
974
|
+
*
|
975
|
+
* See:
|
976
|
+
* https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_unpacker#msgpack-controls-a-buffer
|
977
|
+
*/
|
978
|
+
std::size_t buffer_capacity() const;
|
979
|
+
|
980
|
+
/// Notify a buffer consumed information to msgpack::unpacker.
|
981
|
+
/**
|
982
|
+
* @param size The size of memory that you consumed.
|
983
|
+
*
|
984
|
+
* After copying the data to the memory that is pointed by buffer(), you need to call the
|
985
|
+
* function to notify how many bytes are consumed. Then you can call next() functions.
|
986
|
+
*
|
987
|
+
* See:
|
988
|
+
* https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_unpacker#msgpack-controls-a-buffer
|
989
|
+
*/
|
990
|
+
void buffer_consumed(std::size_t size);
|
991
|
+
|
992
|
+
/// Unpack one msgpack::object. [obsolete]
|
993
|
+
/**
|
994
|
+
*
|
995
|
+
* @param result The object that contains unpacked data.
|
996
|
+
*
|
997
|
+
* @return If one msgpack::object is unpacked, then return true, if msgpack::object is incomplete
|
998
|
+
* and additional data is required, then return false. If data format is invalid, throw
|
999
|
+
* msgpack::parse_error.
|
1000
|
+
*
|
1001
|
+
* See:
|
1002
|
+
* https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_unpacker#msgpack-controls-a-buffer
|
1003
|
+
* This function is obsolete. Use the reference inteface version of next() function instead of
|
1004
|
+
* the pointer interface version.
|
1005
|
+
*/
|
1006
|
+
bool next(msgpack::object_handle* result);
|
1007
|
+
|
1008
|
+
/// Unpack one msgpack::object.
|
1009
|
+
/**
|
1010
|
+
*
|
1011
|
+
* @param result The object that contains unpacked data.
|
1012
|
+
* @param referenced If the unpacked object contains reference of the buffer,
|
1013
|
+
* then set as true, otherwise false.
|
1014
|
+
*
|
1015
|
+
* @return If one msgpack::object is unpacked, then return true, if msgpack::object is incomplete
|
1016
|
+
* and additional data is required, then return false. If data format is invalid, throw
|
1017
|
+
* msgpack::parse_error.
|
1018
|
+
*
|
1019
|
+
* See:
|
1020
|
+
* https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_unpacker#msgpack-controls-a-buffer
|
1021
|
+
*/
|
1022
|
+
bool next(msgpack::object_handle& result, bool& referenced);
|
1023
|
+
|
1024
|
+
/// Unpack one msgpack::object.
|
1025
|
+
/**
|
1026
|
+
*
|
1027
|
+
* @param result The object that contains unpacked data.
|
1028
|
+
*
|
1029
|
+
* @return If one msgpack::object is unpacked, then return true, if msgpack::object is incomplete
|
1030
|
+
* and additional data is required, then return false. If data format is invalid, throw
|
1031
|
+
* msgpack::parse_error.
|
1032
|
+
*
|
1033
|
+
* See:
|
1034
|
+
* https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_unpacker#msgpack-controls-a-buffer
|
1035
|
+
*/
|
1036
|
+
bool next(msgpack::object_handle& result);
|
1037
|
+
|
1038
|
+
/// Get message size.
|
1039
|
+
/**
|
1040
|
+
* @return Returns parsed_size() + nonparsed_size()
|
1041
|
+
*/
|
1042
|
+
std::size_t message_size() const;
|
1043
|
+
|
1044
|
+
/*! for backward compatibility */
|
1045
|
+
bool execute();
|
1046
|
+
|
1047
|
+
/*! for backward compatibility */
|
1048
|
+
msgpack::object const& data();
|
1049
|
+
|
1050
|
+
/*! for backward compatibility */
|
1051
|
+
msgpack::zone* release_zone();
|
1052
|
+
|
1053
|
+
/*! for backward compatibility */
|
1054
|
+
void reset_zone();
|
1055
|
+
|
1056
|
+
/*! for backward compatibility */
|
1057
|
+
void reset();
|
1058
|
+
|
1059
|
+
public:
|
1060
|
+
/// Get parsed message size.
|
1061
|
+
/**
|
1062
|
+
* @return Parsed message size.
|
1063
|
+
*
|
1064
|
+
* This function is usable when non-MessagePack message follows after
|
1065
|
+
* MessagePack message.
|
1066
|
+
*/
|
1067
|
+
std::size_t parsed_size() const;
|
1068
|
+
|
1069
|
+
/// Get the address that is not parsed in the buffer.
|
1070
|
+
/**
|
1071
|
+
* @return Address of the buffer that is not parsed
|
1072
|
+
*
|
1073
|
+
* This function is usable when non-MessagePack message follows after
|
1074
|
+
* MessagePack message.
|
1075
|
+
*/
|
1076
|
+
char* nonparsed_buffer();
|
1077
|
+
|
1078
|
+
/// Get the size of the buffer that is not parsed.
|
1079
|
+
/**
|
1080
|
+
* @return Size of the buffer that is not parsed
|
1081
|
+
*
|
1082
|
+
* This function is usable when non-MessagePack message follows after
|
1083
|
+
* MessagePack message.
|
1084
|
+
*/
|
1085
|
+
std::size_t nonparsed_size() const;
|
1086
|
+
|
1087
|
+
/// Skip the specified size of non-parsed buffer.
|
1088
|
+
/**
|
1089
|
+
* @param size to skip
|
1090
|
+
*
|
1091
|
+
* Note that the `size' argument must be smaller than nonparsed_size().
|
1092
|
+
* This function is usable when non-MessagePack message follows after
|
1093
|
+
* MessagePack message.
|
1094
|
+
*/
|
1095
|
+
void skip_nonparsed_buffer(std::size_t size);
|
1096
|
+
|
1097
|
+
/// Remove nonparsed buffer and reset the current position as a new start point.
|
1098
|
+
/**
|
1099
|
+
* This function is usable when non-MessagePack message follows after
|
1100
|
+
* MessagePack message.
|
1101
|
+
*/
|
1102
|
+
void remove_nonparsed_buffer();
|
1103
|
+
|
1104
|
+
private:
|
1105
|
+
void expand_buffer(std::size_t size);
|
1106
|
+
int execute_imp();
|
1107
|
+
bool flush_zone();
|
1108
|
+
static bool default_reference_func(msgpack::type::object_type type, std::size_t len, void*);
|
1109
|
+
|
1110
|
+
private:
|
1111
|
+
char* m_buffer;
|
1112
|
+
std::size_t m_used;
|
1113
|
+
std::size_t m_free;
|
1114
|
+
std::size_t m_off;
|
1115
|
+
std::size_t m_parsed;
|
1116
|
+
msgpack::unique_ptr<msgpack::zone> m_z;
|
1117
|
+
std::size_t m_initial_buffer_size;
|
1118
|
+
detail::context m_ctx;
|
1119
|
+
|
1120
|
+
#if defined(MSGPACK_USE_CPP03)
|
1121
|
+
private:
|
1122
|
+
unpacker(const unpacker&);
|
1123
|
+
unpacker& operator=(const unpacker&);
|
1124
|
+
#else // defined(MSGPACK_USE_CPP03)
|
1125
|
+
unpacker(const unpacker&) = delete;
|
1126
|
+
unpacker& operator=(const unpacker&) = delete;
|
1127
|
+
#endif // defined(MSGPACK_USE_CPP03)
|
1128
|
+
};
|
1129
|
+
|
1130
|
+
inline unpacker::unpacker(unpack_reference_func f,
|
1131
|
+
void* user_data,
|
1132
|
+
std::size_t initial_buffer_size,
|
1133
|
+
unpack_limit const& limit)
|
1134
|
+
:m_z(new msgpack::zone), m_ctx(f, user_data, limit)
|
1135
|
+
{
|
1136
|
+
if(initial_buffer_size < COUNTER_SIZE) {
|
1137
|
+
initial_buffer_size = COUNTER_SIZE;
|
1138
|
+
}
|
1139
|
+
|
1140
|
+
char* buffer = static_cast<char*>(::malloc(initial_buffer_size));
|
1141
|
+
if(!buffer) {
|
1142
|
+
throw std::bad_alloc();
|
1143
|
+
}
|
1144
|
+
|
1145
|
+
m_buffer = buffer;
|
1146
|
+
m_used = COUNTER_SIZE;
|
1147
|
+
m_free = initial_buffer_size - m_used;
|
1148
|
+
m_off = COUNTER_SIZE;
|
1149
|
+
m_parsed = 0;
|
1150
|
+
m_initial_buffer_size = initial_buffer_size;
|
1151
|
+
|
1152
|
+
detail::init_count(m_buffer);
|
1153
|
+
|
1154
|
+
m_ctx.init();
|
1155
|
+
m_ctx.user().set_zone(*m_z);
|
1156
|
+
m_ctx.user().set_referenced(false);
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
#if !defined(MSGPACK_USE_CPP03)
|
1160
|
+
// Move constructor and move assignment operator
|
1161
|
+
|
1162
|
+
inline unpacker::unpacker(unpacker&& other)
|
1163
|
+
:m_buffer(other.m_buffer),
|
1164
|
+
m_used(other.m_used),
|
1165
|
+
m_free(other.m_free),
|
1166
|
+
m_off(other.m_off),
|
1167
|
+
m_parsed(other.m_parsed),
|
1168
|
+
m_z(std::move(other.m_z)),
|
1169
|
+
m_initial_buffer_size(other.m_initial_buffer_size),
|
1170
|
+
m_ctx(other.m_ctx) {
|
1171
|
+
other.m_buffer = MSGPACK_NULLPTR;
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
inline unpacker& unpacker::operator=(unpacker&& other) {
|
1175
|
+
this->~unpacker();
|
1176
|
+
new (this) unpacker(std::move(other));
|
1177
|
+
return *this;
|
1178
|
+
}
|
1179
|
+
|
1180
|
+
#endif // !defined(MSGPACK_USE_CPP03)
|
1181
|
+
|
1182
|
+
|
1183
|
+
inline unpacker::~unpacker()
|
1184
|
+
{
|
1185
|
+
// These checks are required for move operations.
|
1186
|
+
if (m_buffer) detail::decr_count(m_buffer);
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
|
1190
|
+
inline void unpacker::reserve_buffer(std::size_t size)
|
1191
|
+
{
|
1192
|
+
if(m_free >= size) return;
|
1193
|
+
expand_buffer(size);
|
1194
|
+
}
|
1195
|
+
|
1196
|
+
inline void unpacker::expand_buffer(std::size_t size)
|
1197
|
+
{
|
1198
|
+
if(m_used == m_off && detail::get_count(m_buffer) == 1
|
1199
|
+
&& !m_ctx.user().referenced()) {
|
1200
|
+
// rewind buffer
|
1201
|
+
m_free += m_used - COUNTER_SIZE;
|
1202
|
+
m_used = COUNTER_SIZE;
|
1203
|
+
m_off = COUNTER_SIZE;
|
1204
|
+
|
1205
|
+
if(m_free >= size) return;
|
1206
|
+
}
|
1207
|
+
|
1208
|
+
if(m_off == COUNTER_SIZE) {
|
1209
|
+
std::size_t next_size = (m_used + m_free) * 2; // include COUNTER_SIZE
|
1210
|
+
while(next_size < size + m_used) {
|
1211
|
+
std::size_t tmp_next_size = next_size * 2;
|
1212
|
+
if (tmp_next_size <= next_size) {
|
1213
|
+
next_size = size + m_used;
|
1214
|
+
break;
|
1215
|
+
}
|
1216
|
+
next_size = tmp_next_size;
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
char* tmp = static_cast<char*>(::realloc(m_buffer, next_size));
|
1220
|
+
if(!tmp) {
|
1221
|
+
throw std::bad_alloc();
|
1222
|
+
}
|
1223
|
+
|
1224
|
+
m_buffer = tmp;
|
1225
|
+
m_free = next_size - m_used;
|
1226
|
+
|
1227
|
+
} else {
|
1228
|
+
std::size_t next_size = m_initial_buffer_size; // include COUNTER_SIZE
|
1229
|
+
std::size_t not_parsed = m_used - m_off;
|
1230
|
+
while(next_size < size + not_parsed + COUNTER_SIZE) {
|
1231
|
+
std::size_t tmp_next_size = next_size * 2;
|
1232
|
+
if (tmp_next_size <= next_size) {
|
1233
|
+
next_size = size + not_parsed + COUNTER_SIZE;
|
1234
|
+
break;
|
1235
|
+
}
|
1236
|
+
next_size = tmp_next_size;
|
1237
|
+
}
|
1238
|
+
|
1239
|
+
char* tmp = static_cast<char*>(::malloc(next_size));
|
1240
|
+
if(!tmp) {
|
1241
|
+
throw std::bad_alloc();
|
1242
|
+
}
|
1243
|
+
|
1244
|
+
detail::init_count(tmp);
|
1245
|
+
|
1246
|
+
std::memcpy(tmp+COUNTER_SIZE, m_buffer + m_off, not_parsed);
|
1247
|
+
|
1248
|
+
if(m_ctx.user().referenced()) {
|
1249
|
+
try {
|
1250
|
+
m_z->push_finalizer(&detail::decr_count, m_buffer);
|
1251
|
+
}
|
1252
|
+
catch (...) {
|
1253
|
+
::free(tmp);
|
1254
|
+
throw;
|
1255
|
+
}
|
1256
|
+
m_ctx.user().set_referenced(false);
|
1257
|
+
} else {
|
1258
|
+
detail::decr_count(m_buffer);
|
1259
|
+
}
|
1260
|
+
|
1261
|
+
m_buffer = tmp;
|
1262
|
+
m_used = not_parsed + COUNTER_SIZE;
|
1263
|
+
m_free = next_size - m_used;
|
1264
|
+
m_off = COUNTER_SIZE;
|
1265
|
+
}
|
1266
|
+
}
|
1267
|
+
|
1268
|
+
inline char* unpacker::buffer()
|
1269
|
+
{
|
1270
|
+
return m_buffer + m_used;
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
inline std::size_t unpacker::buffer_capacity() const
|
1274
|
+
{
|
1275
|
+
return m_free;
|
1276
|
+
}
|
1277
|
+
|
1278
|
+
inline void unpacker::buffer_consumed(std::size_t size)
|
1279
|
+
{
|
1280
|
+
m_used += size;
|
1281
|
+
m_free -= size;
|
1282
|
+
}
|
1283
|
+
|
1284
|
+
inline bool unpacker::next(msgpack::object_handle& result, bool& referenced)
|
1285
|
+
{
|
1286
|
+
referenced = false;
|
1287
|
+
int ret = execute_imp();
|
1288
|
+
if(ret < 0) {
|
1289
|
+
throw msgpack::parse_error("parse error");
|
1290
|
+
}
|
1291
|
+
|
1292
|
+
if(ret == 0) {
|
1293
|
+
result.zone().reset();
|
1294
|
+
result.set(msgpack::object());
|
1295
|
+
return false;
|
1296
|
+
|
1297
|
+
} else {
|
1298
|
+
referenced = m_ctx.user().referenced();
|
1299
|
+
result.zone().reset( release_zone() );
|
1300
|
+
result.set(data());
|
1301
|
+
reset();
|
1302
|
+
return true;
|
1303
|
+
}
|
1304
|
+
}
|
1305
|
+
|
1306
|
+
inline bool unpacker::next(msgpack::object_handle& result)
|
1307
|
+
{
|
1308
|
+
bool referenced;
|
1309
|
+
return next(result, referenced);
|
1310
|
+
}
|
1311
|
+
|
1312
|
+
inline bool unpacker::next(msgpack::object_handle* result)
|
1313
|
+
{
|
1314
|
+
return next(*result);
|
1315
|
+
}
|
1316
|
+
|
1317
|
+
|
1318
|
+
inline bool unpacker::execute()
|
1319
|
+
{
|
1320
|
+
int ret = execute_imp();
|
1321
|
+
if(ret < 0) {
|
1322
|
+
throw msgpack::parse_error("parse error");
|
1323
|
+
} else if(ret == 0) {
|
1324
|
+
return false;
|
1325
|
+
} else {
|
1326
|
+
return true;
|
1327
|
+
}
|
1328
|
+
}
|
1329
|
+
|
1330
|
+
inline int unpacker::execute_imp()
|
1331
|
+
{
|
1332
|
+
std::size_t off = m_off;
|
1333
|
+
int ret = m_ctx.execute(m_buffer, m_used, m_off);
|
1334
|
+
if(m_off > off) {
|
1335
|
+
m_parsed += m_off - off;
|
1336
|
+
}
|
1337
|
+
return ret;
|
1338
|
+
}
|
1339
|
+
|
1340
|
+
inline msgpack::object const& unpacker::data()
|
1341
|
+
{
|
1342
|
+
return m_ctx.data();
|
1343
|
+
}
|
1344
|
+
|
1345
|
+
inline msgpack::zone* unpacker::release_zone()
|
1346
|
+
{
|
1347
|
+
if(!flush_zone()) {
|
1348
|
+
return MSGPACK_NULLPTR;
|
1349
|
+
}
|
1350
|
+
|
1351
|
+
msgpack::zone* r = new msgpack::zone;
|
1352
|
+
msgpack::zone* old = m_z.release();
|
1353
|
+
m_z.reset(r);
|
1354
|
+
m_ctx.user().set_zone(*m_z);
|
1355
|
+
|
1356
|
+
return old;
|
1357
|
+
}
|
1358
|
+
|
1359
|
+
inline void unpacker::reset_zone()
|
1360
|
+
{
|
1361
|
+
m_z->clear();
|
1362
|
+
}
|
1363
|
+
|
1364
|
+
inline bool unpacker::flush_zone()
|
1365
|
+
{
|
1366
|
+
if(m_ctx.user().referenced()) {
|
1367
|
+
try {
|
1368
|
+
m_z->push_finalizer(&detail::decr_count, m_buffer);
|
1369
|
+
} catch (...) {
|
1370
|
+
return false;
|
1371
|
+
}
|
1372
|
+
m_ctx.user().set_referenced(false);
|
1373
|
+
|
1374
|
+
detail::incr_count(m_buffer);
|
1375
|
+
}
|
1376
|
+
|
1377
|
+
return true;
|
1378
|
+
}
|
1379
|
+
|
1380
|
+
inline void unpacker::reset()
|
1381
|
+
{
|
1382
|
+
m_ctx.init();
|
1383
|
+
// don't reset referenced flag
|
1384
|
+
m_parsed = 0;
|
1385
|
+
}
|
1386
|
+
|
1387
|
+
inline std::size_t unpacker::message_size() const
|
1388
|
+
{
|
1389
|
+
return m_parsed - m_off + m_used;
|
1390
|
+
}
|
1391
|
+
|
1392
|
+
inline std::size_t unpacker::parsed_size() const
|
1393
|
+
{
|
1394
|
+
return m_parsed;
|
1395
|
+
}
|
1396
|
+
|
1397
|
+
inline char* unpacker::nonparsed_buffer()
|
1398
|
+
{
|
1399
|
+
return m_buffer + m_off;
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
inline std::size_t unpacker::nonparsed_size() const
|
1403
|
+
{
|
1404
|
+
return m_used - m_off;
|
1405
|
+
}
|
1406
|
+
|
1407
|
+
inline void unpacker::skip_nonparsed_buffer(std::size_t size)
|
1408
|
+
{
|
1409
|
+
m_off += size;
|
1410
|
+
}
|
1411
|
+
|
1412
|
+
inline void unpacker::remove_nonparsed_buffer()
|
1413
|
+
{
|
1414
|
+
m_used = m_off;
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
namespace detail {
|
1418
|
+
|
1419
|
+
inline unpack_return
|
1420
|
+
unpack_imp(const char* data, std::size_t len, std::size_t& off,
|
1421
|
+
msgpack::zone& result_zone, msgpack::object& result, bool& referenced,
|
1422
|
+
unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR,
|
1423
|
+
unpack_limit const& limit = unpack_limit())
|
1424
|
+
{
|
1425
|
+
std::size_t noff = off;
|
1426
|
+
|
1427
|
+
if(len <= noff) {
|
1428
|
+
// FIXME
|
1429
|
+
return UNPACK_CONTINUE;
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
detail::context ctx(f, user_data, limit);
|
1433
|
+
ctx.init();
|
1434
|
+
|
1435
|
+
ctx.user().set_zone(result_zone);
|
1436
|
+
ctx.user().set_referenced(false);
|
1437
|
+
referenced = false;
|
1438
|
+
|
1439
|
+
int e = ctx.execute(data, len, noff);
|
1440
|
+
if(e < 0) {
|
1441
|
+
return UNPACK_PARSE_ERROR;
|
1442
|
+
}
|
1443
|
+
|
1444
|
+
referenced = ctx.user().referenced();
|
1445
|
+
off = noff;
|
1446
|
+
|
1447
|
+
if(e == 0) {
|
1448
|
+
return UNPACK_CONTINUE;
|
1449
|
+
}
|
1450
|
+
|
1451
|
+
result = ctx.data();
|
1452
|
+
|
1453
|
+
if(noff < len) {
|
1454
|
+
return UNPACK_EXTRA_BYTES;
|
1455
|
+
}
|
1456
|
+
|
1457
|
+
return UNPACK_SUCCESS;
|
1458
|
+
}
|
1459
|
+
|
1460
|
+
} // detail
|
1461
|
+
|
1462
|
+
// reference version
|
1463
|
+
|
1464
|
+
inline msgpack::object_handle unpack(
|
1465
|
+
const char* data, std::size_t len, std::size_t& off, bool& referenced,
|
1466
|
+
unpack_reference_func f, void* user_data,
|
1467
|
+
unpack_limit const& limit
|
1468
|
+
)
|
1469
|
+
{
|
1470
|
+
msgpack::object obj;
|
1471
|
+
msgpack::unique_ptr<msgpack::zone> z(new msgpack::zone);
|
1472
|
+
referenced = false;
|
1473
|
+
std::size_t noff = off;
|
1474
|
+
unpack_return ret = detail::unpack_imp(
|
1475
|
+
data, len, noff, *z, obj, referenced, f, user_data, limit);
|
1476
|
+
|
1477
|
+
switch(ret) {
|
1478
|
+
case UNPACK_SUCCESS:
|
1479
|
+
off = noff;
|
1480
|
+
return msgpack::object_handle(obj, msgpack::move(z));
|
1481
|
+
case UNPACK_EXTRA_BYTES:
|
1482
|
+
off = noff;
|
1483
|
+
return msgpack::object_handle(obj, msgpack::move(z));
|
1484
|
+
case UNPACK_CONTINUE:
|
1485
|
+
throw msgpack::insufficient_bytes("insufficient bytes");
|
1486
|
+
case UNPACK_PARSE_ERROR:
|
1487
|
+
default:
|
1488
|
+
throw msgpack::parse_error("parse error");
|
1489
|
+
}
|
1490
|
+
return msgpack::object_handle();
|
1491
|
+
}
|
1492
|
+
|
1493
|
+
inline msgpack::object_handle unpack(
|
1494
|
+
const char* data, std::size_t len, std::size_t& off,
|
1495
|
+
unpack_reference_func f, void* user_data,
|
1496
|
+
unpack_limit const& limit)
|
1497
|
+
{
|
1498
|
+
bool referenced;
|
1499
|
+
return unpack(data, len, off, referenced, f, user_data, limit);
|
1500
|
+
}
|
1501
|
+
|
1502
|
+
inline msgpack::object_handle unpack(
|
1503
|
+
const char* data, std::size_t len, bool& referenced,
|
1504
|
+
unpack_reference_func f, void* user_data,
|
1505
|
+
unpack_limit const& limit)
|
1506
|
+
{
|
1507
|
+
std::size_t off = 0;
|
1508
|
+
return unpack(data, len, off, referenced, f, user_data, limit);
|
1509
|
+
}
|
1510
|
+
|
1511
|
+
inline msgpack::object_handle unpack(
|
1512
|
+
const char* data, std::size_t len,
|
1513
|
+
unpack_reference_func f, void* user_data,
|
1514
|
+
unpack_limit const& limit)
|
1515
|
+
{
|
1516
|
+
bool referenced;
|
1517
|
+
std::size_t off = 0;
|
1518
|
+
return unpack(data, len, off, referenced, f, user_data, limit);
|
1519
|
+
}
|
1520
|
+
|
1521
|
+
inline void unpack(
|
1522
|
+
msgpack::object_handle& result,
|
1523
|
+
const char* data, std::size_t len, std::size_t& off, bool& referenced,
|
1524
|
+
unpack_reference_func f, void* user_data,
|
1525
|
+
unpack_limit const& limit)
|
1526
|
+
{
|
1527
|
+
msgpack::object obj;
|
1528
|
+
msgpack::unique_ptr<msgpack::zone> z(new msgpack::zone);
|
1529
|
+
referenced = false;
|
1530
|
+
std::size_t noff = off;
|
1531
|
+
unpack_return ret = detail::unpack_imp(
|
1532
|
+
data, len, noff, *z, obj, referenced, f, user_data, limit);
|
1533
|
+
|
1534
|
+
switch(ret) {
|
1535
|
+
case UNPACK_SUCCESS:
|
1536
|
+
off = noff;
|
1537
|
+
result.set(obj);
|
1538
|
+
result.zone() = msgpack::move(z);
|
1539
|
+
return;
|
1540
|
+
case UNPACK_EXTRA_BYTES:
|
1541
|
+
off = noff;
|
1542
|
+
result.set(obj);
|
1543
|
+
result.zone() = msgpack::move(z);
|
1544
|
+
return;
|
1545
|
+
case UNPACK_CONTINUE:
|
1546
|
+
throw msgpack::insufficient_bytes("insufficient bytes");
|
1547
|
+
case UNPACK_PARSE_ERROR:
|
1548
|
+
default:
|
1549
|
+
throw msgpack::parse_error("parse error");
|
1550
|
+
}
|
1551
|
+
}
|
1552
|
+
|
1553
|
+
inline void unpack(
|
1554
|
+
msgpack::object_handle& result,
|
1555
|
+
const char* data, std::size_t len, std::size_t& off,
|
1556
|
+
unpack_reference_func f, void* user_data,
|
1557
|
+
unpack_limit const& limit)
|
1558
|
+
{
|
1559
|
+
bool referenced;
|
1560
|
+
unpack(result, data, len, off, referenced, f, user_data, limit);
|
1561
|
+
}
|
1562
|
+
|
1563
|
+
inline void unpack(
|
1564
|
+
msgpack::object_handle& result,
|
1565
|
+
const char* data, std::size_t len, bool& referenced,
|
1566
|
+
unpack_reference_func f, void* user_data,
|
1567
|
+
unpack_limit const& limit)
|
1568
|
+
{
|
1569
|
+
std::size_t off = 0;
|
1570
|
+
unpack(result, data, len, off, referenced, f, user_data, limit);
|
1571
|
+
}
|
1572
|
+
|
1573
|
+
inline void unpack(
|
1574
|
+
msgpack::object_handle& result,
|
1575
|
+
const char* data, std::size_t len,
|
1576
|
+
unpack_reference_func f, void* user_data,
|
1577
|
+
unpack_limit const& limit)
|
1578
|
+
{
|
1579
|
+
bool referenced;
|
1580
|
+
std::size_t off = 0;
|
1581
|
+
unpack(result, data, len, off, referenced, f, user_data, limit);
|
1582
|
+
}
|
1583
|
+
|
1584
|
+
|
1585
|
+
inline msgpack::object unpack(
|
1586
|
+
msgpack::zone& z,
|
1587
|
+
const char* data, std::size_t len, std::size_t& off, bool& referenced,
|
1588
|
+
unpack_reference_func f, void* user_data,
|
1589
|
+
unpack_limit const& limit)
|
1590
|
+
{
|
1591
|
+
msgpack::object obj;
|
1592
|
+
std::size_t noff = off;
|
1593
|
+
referenced = false;
|
1594
|
+
unpack_return ret = detail::unpack_imp(
|
1595
|
+
data, len, noff, z, obj, referenced, f, user_data, limit);
|
1596
|
+
|
1597
|
+
switch(ret) {
|
1598
|
+
case UNPACK_SUCCESS:
|
1599
|
+
off = noff;
|
1600
|
+
return obj;
|
1601
|
+
case UNPACK_EXTRA_BYTES:
|
1602
|
+
off = noff;
|
1603
|
+
return obj;
|
1604
|
+
case UNPACK_CONTINUE:
|
1605
|
+
throw msgpack::insufficient_bytes("insufficient bytes");
|
1606
|
+
case UNPACK_PARSE_ERROR:
|
1607
|
+
default:
|
1608
|
+
throw msgpack::parse_error("parse error");
|
1609
|
+
}
|
1610
|
+
return obj;
|
1611
|
+
}
|
1612
|
+
|
1613
|
+
inline msgpack::object unpack(
|
1614
|
+
msgpack::zone& z,
|
1615
|
+
const char* data, std::size_t len, std::size_t& off,
|
1616
|
+
unpack_reference_func f, void* user_data,
|
1617
|
+
unpack_limit const& limit)
|
1618
|
+
{
|
1619
|
+
bool referenced;
|
1620
|
+
return unpack(z, data, len, off, referenced, f, user_data, limit);
|
1621
|
+
}
|
1622
|
+
|
1623
|
+
inline msgpack::object unpack(
|
1624
|
+
msgpack::zone& z,
|
1625
|
+
const char* data, std::size_t len, bool& referenced,
|
1626
|
+
unpack_reference_func f, void* user_data,
|
1627
|
+
unpack_limit const& limit)
|
1628
|
+
{
|
1629
|
+
std::size_t off = 0;
|
1630
|
+
return unpack(z, data, len, off, referenced, f, user_data, limit);
|
1631
|
+
}
|
1632
|
+
|
1633
|
+
inline msgpack::object unpack(
|
1634
|
+
msgpack::zone& z,
|
1635
|
+
const char* data, std::size_t len,
|
1636
|
+
unpack_reference_func f, void* user_data,
|
1637
|
+
unpack_limit const& limit)
|
1638
|
+
{
|
1639
|
+
bool referenced;
|
1640
|
+
std::size_t off = 0;
|
1641
|
+
return unpack(z, data, len, off, referenced, f, user_data, limit);
|
1642
|
+
}
|
1643
|
+
|
1644
|
+
// obsolete
|
1645
|
+
// pointer version
|
1646
|
+
inline void unpack(
|
1647
|
+
msgpack::object_handle* result,
|
1648
|
+
const char* data, std::size_t len, std::size_t* off, bool* referenced,
|
1649
|
+
unpack_reference_func f, void* user_data,
|
1650
|
+
unpack_limit const& limit)
|
1651
|
+
{
|
1652
|
+
if (off)
|
1653
|
+
if (referenced) unpack(*result, data, len, *off, *referenced, f, user_data, limit);
|
1654
|
+
else unpack(*result, data, len, *off, f, user_data, limit);
|
1655
|
+
else
|
1656
|
+
if (referenced) unpack(*result, data, len, *referenced, f, user_data, limit);
|
1657
|
+
else unpack(*result, data, len, f, user_data, limit);
|
1658
|
+
}
|
1659
|
+
|
1660
|
+
inline bool unpacker::default_reference_func(msgpack::type::object_type /*type*/, std::size_t /*len*/, void*)
|
1661
|
+
{
|
1662
|
+
return true;
|
1663
|
+
}
|
1664
|
+
|
1665
|
+
/// @cond
|
1666
|
+
} // MSGPACK_API_VERSION_NAMESPACE(v1)
|
1667
|
+
/// @endcond
|
1668
|
+
|
1669
|
+
} // namespace msgpack
|
1670
|
+
|
1671
|
+
|
1672
|
+
#endif // MSGPACK_V1_UNPACK_HPP
|