script_core 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +8 -6
- data/.ruby-version +1 -1
- data/Gemfile +2 -1
- data/bin/sandbox +1 -1
- data/ext/enterprise_script_service/Rakefile +1 -1
- data/ext/enterprise_script_service/flags.rb +5 -0
- data/ext/enterprise_script_service/libseccomp/CHANGELOG +15 -0
- data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
- data/ext/enterprise_script_service/libseccomp/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/README.md +1 -1
- data/ext/enterprise_script_service/libseccomp/SECURITY.md +45 -0
- data/ext/enterprise_script_service/libseccomp/configure.ac +3 -3
- data/ext/enterprise_script_service/libseccomp/doc/admin/MAINTAINER_PROCESS.md +95 -0
- data/ext/enterprise_script_service/libseccomp/{RELEASE_PROCESS.md → doc/admin/RELEASE_PROCESS.md} +9 -1
- data/ext/enterprise_script_service/libseccomp/include/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +2292 -0
- data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +3 -1065
- data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +34 -2
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +44 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +46 -14
- data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +142 -18
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +47 -15
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +143 -17
- data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +94 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +142 -19
- data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/db.c +1 -0
- data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +10 -3
- data/ext/enterprise_script_service/libseccomp/src/python/Makefile.am +4 -4
- data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +2 -0
- data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.c +98 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.py +61 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.tests +18 -0
- data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
- data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -2
- data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -0
- data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
- data/ext/enterprise_script_service/mruby-mpdecimal/src/ext.c +1 -1
- data/ext/enterprise_script_service/mruby/.gitignore +2 -2
- data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +10 -3
- data/ext/enterprise_script_service/mruby/Doxyfile +2408 -0
- data/ext/enterprise_script_service/mruby/README.md +21 -8
- data/ext/enterprise_script_service/mruby/Rakefile +4 -13
- data/ext/enterprise_script_service/mruby/appveyor_config.rb +1 -1
- data/ext/enterprise_script_service/mruby/build_config.rb +3 -3
- data/ext/enterprise_script_service/mruby/doc/guides/compile.md +42 -42
- data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
- data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +45 -6
- data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +5 -0
- data/ext/enterprise_script_service/mruby/doc/limitations.md +88 -38
- data/ext/enterprise_script_service/mruby/doc/mruby_logo_red_icon.png +0 -0
- data/ext/enterprise_script_service/mruby/doc/opcode.md +94 -94
- data/ext/enterprise_script_service/mruby/include/mrbconf.h +74 -11
- data/ext/enterprise_script_service/mruby/include/mruby.h +242 -146
- data/ext/enterprise_script_service/mruby/include/mruby/array.h +7 -7
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +2 -9
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +11 -10
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +104 -69
- data/ext/enterprise_script_service/mruby/include/mruby/class.h +7 -5
- data/ext/enterprise_script_service/mruby/include/mruby/common.h +9 -7
- data/ext/enterprise_script_service/mruby/include/mruby/compile.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/data.h +5 -5
- data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/dump.h +3 -7
- data/ext/enterprise_script_service/mruby/include/mruby/error.h +34 -6
- data/ext/enterprise_script_service/mruby/include/mruby/gc.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/hash.h +4 -11
- data/ext/enterprise_script_service/mruby/include/mruby/irep.h +16 -4
- data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -4
- data/ext/enterprise_script_service/mruby/include/mruby/khash.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +41 -7
- data/ext/enterprise_script_service/mruby/include/mruby/object.h +8 -9
- data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/ops.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/proc.h +19 -13
- data/ext/enterprise_script_service/mruby/include/mruby/range.h +10 -4
- data/ext/enterprise_script_service/mruby/include/mruby/re.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/string.h +130 -107
- data/ext/enterprise_script_service/mruby/include/mruby/throw.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/value.h +137 -49
- data/ext/enterprise_script_service/mruby/include/mruby/variable.h +3 -5
- data/ext/enterprise_script_service/mruby/include/mruby/version.h +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby-core-ext.rb +2 -39
- data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +32 -15
- data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +63 -17
- data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +11 -7
- data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +81 -0
- data/ext/enterprise_script_service/mruby/minirake +27 -11
- data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +47 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +50 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +28 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +1 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +75 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +134 -90
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +69 -46
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +0 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +51 -59
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +430 -241
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrbgem.rake +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +122 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +249 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +153 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/mrblib/chain.rb +19 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/test/enum_chain.rb +41 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +30 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/test/enum.rb +8 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +46 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +51 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +47 -44
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c +9 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +16 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/test/fiber.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +3 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +24 -38
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/kernel.rb +16 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +19 -18
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +5 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +54 -42
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +24 -20
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file_test.rb +4 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +41 -35
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +9 -36
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +9 -27
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +2 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +5 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +39 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +48 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/method.rb +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +134 -101
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +9 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +17 -37
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +0 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +15 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +35 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/test/nil.rb +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +28 -23
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/test/pack.rb +43 -49
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +3 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +6 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.rb +21 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +157 -124
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +72 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +38 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +26 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +111 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrbgem.rake +5 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +117 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +209 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +308 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +10 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +22 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +8 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +116 -117
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/numeric.rb +29 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/range.rb +26 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/string.rb +32 -50
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +43 -57
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/test/struct.rb +16 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +152 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +4 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +200 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/include/mruby/time.h +2 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +199 -68
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/test/time.rb +81 -46
- data/ext/enterprise_script_service/mruby/mrblib/array.rb +14 -16
- data/ext/enterprise_script_service/mruby/mrblib/enum.rb +13 -9
- data/ext/enterprise_script_service/mruby/mrblib/hash.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrblib/kernel.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +4 -4
- data/ext/enterprise_script_service/mruby/mrblib/range.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/string.rb +55 -112
- data/ext/enterprise_script_service/mruby/mruby-source.gemspec +1 -1
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby.dict +105 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_fuzzer.options +5 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_proto_fuzzer.options +4 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_fuzzer.c +18 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +44 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.cpp +455 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +55 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/ruby.proto +201 -0
- data/ext/enterprise_script_service/mruby/src/array.c +95 -46
- data/ext/enterprise_script_service/mruby/src/backtrace.c +6 -8
- data/ext/enterprise_script_service/mruby/src/class.c +370 -278
- data/ext/enterprise_script_service/mruby/src/codedump.c +34 -34
- data/ext/enterprise_script_service/mruby/src/debug.c +2 -2
- data/ext/enterprise_script_service/mruby/src/dump.c +8 -6
- data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
- data/ext/enterprise_script_service/mruby/src/error.c +157 -55
- data/ext/enterprise_script_service/mruby/src/etc.c +13 -46
- data/ext/enterprise_script_service/mruby/src/fmt_fp.c +2 -2
- data/ext/enterprise_script_service/mruby/src/gc.c +30 -11
- data/ext/enterprise_script_service/mruby/src/hash.c +23 -14
- data/ext/enterprise_script_service/mruby/src/kernel.c +16 -54
- data/ext/enterprise_script_service/mruby/src/load.c +40 -76
- data/ext/enterprise_script_service/mruby/src/numeric.c +164 -94
- data/ext/enterprise_script_service/mruby/src/object.c +16 -39
- data/ext/enterprise_script_service/mruby/src/pool.c +0 -2
- data/ext/enterprise_script_service/mruby/src/proc.c +47 -48
- data/ext/enterprise_script_service/mruby/src/range.c +22 -35
- data/ext/enterprise_script_service/mruby/src/state.c +5 -94
- data/ext/enterprise_script_service/mruby/src/string.c +874 -710
- data/ext/enterprise_script_service/mruby/src/symbol.c +73 -48
- data/ext/enterprise_script_service/mruby/src/variable.c +58 -38
- data/ext/enterprise_script_service/mruby/src/vm.c +133 -304
- data/ext/enterprise_script_service/mruby/tasks/doc.rake +48 -0
- data/ext/enterprise_script_service/mruby/tasks/toolchains/clang.rake +3 -4
- data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +20 -19
- data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +0 -12
- data/ext/enterprise_script_service/mruby/test/assert.rb +186 -25
- data/ext/enterprise_script_service/mruby/test/t/array.rb +34 -6
- data/ext/enterprise_script_service/mruby/test/t/class.rb +26 -0
- data/ext/enterprise_script_service/mruby/test/t/enumerable.rb +2 -2
- data/ext/enterprise_script_service/mruby/test/t/float.rb +17 -17
- data/ext/enterprise_script_service/mruby/test/t/hash.rb +2 -0
- data/ext/enterprise_script_service/mruby/test/t/integer.rb +14 -6
- data/ext/enterprise_script_service/mruby/test/t/kernel.rb +38 -19
- data/ext/enterprise_script_service/mruby/test/t/module.rb +87 -14
- data/ext/enterprise_script_service/mruby/test/t/numeric.rb +65 -23
- data/ext/enterprise_script_service/mruby/test/t/range.rb +4 -4
- data/ext/enterprise_script_service/mruby/test/t/string.rb +211 -49
- data/ext/enterprise_script_service/mruby/test/t/syntax.rb +19 -2
- data/ext/enterprise_script_service/mruby/test/t/vformat.rb +92 -0
- data/ext/enterprise_script_service/mruby/travis_config.rb +2 -2
- data/ext/enterprise_script_service/mruby_config.rb +10 -0
- data/ext/enterprise_script_service/mruby_engine.cpp +2 -2
- data/ext/enterprise_script_service/mruby_engine.gembox +1 -0
- data/ext/enterprise_script_service/msgpack/CHANGELOG.md +14 -0
- data/ext/enterprise_script_service/msgpack/Files.cmake +4 -0
- data/ext/enterprise_script_service/msgpack/README.md +1 -1
- data/ext/enterprise_script_service/msgpack/appveyor.yml +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_zone.hpp.erb +3 -3
- data/ext/enterprise_script_service/msgpack/example/boost/asio_send_recv.cpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/cpp11/timespec.hpp +16 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/wstring.hpp +15 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/object.h +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/pack_template.h +17 -9
- data/ext/enterprise_script_service/msgpack/include/msgpack/sysdep.h +27 -16
- data/ext/enterprise_script_service/msgpack/include/msgpack/type.hpp +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/unpack_template.h +5 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +0 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/check_container_size.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/chrono.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/timespec.hpp +140 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +10 -10
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/ext.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/fixint.hpp +5 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int.hpp +40 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int_decl.hpp +3 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +121 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp03_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp11_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object_fwd.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/pack.hpp +40 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/unpack.hpp +11 -11
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/vrefbuffer.hpp +7 -7
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/zbuffer.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/create_object_visitor.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/x3_parse.hpp +28 -26
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/zone.h +1 -1
- data/ext/enterprise_script_service/msgpack/src/objectc.c +83 -148
- data/ext/enterprise_script_service/msgpack/src/unpack.c +73 -47
- data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +1 -1
- data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +15 -9
- data/ext/enterprise_script_service/msgpack/test/buffer.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/carray.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/cases.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/convert.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/fixint.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +6 -1
- data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +8 -2
- data/ext/enterprise_script_service/msgpack/test/json.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/limit.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +128 -6
- data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +7 -2
- data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +20 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +159 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +8 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +23 -18
- data/ext/enterprise_script_service/msgpack/test/object.cpp +77 -45
- data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +28 -10
- data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +25 -18
- data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/raw.cpp +17 -12
- data/ext/enterprise_script_service/msgpack/test/reference.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +6 -2
- data/ext/enterprise_script_service/msgpack/test/streaming.cpp +10 -3
- data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/user_class.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/version.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/visitor.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/zone.cpp +6 -0
- data/lib/script_core/version.rb +1 -1
- data/lib/tasks/mruby/engine.gembox.example +1 -0
- data/lib/tasks/script_core.rake +21 -3
- data/spec/dummy/app/helpers/fields_helper.rb +2 -2
- data/spec/dummy/mruby/engine.gembox +1 -0
- data/spec/script_core_spec.rb +1 -1
- metadata +38 -22
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.gitignore +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrblib/kernel.rb +0 -15
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/unbound_method.rb +0 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.gitignore +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/packtest.rb +0 -157
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.c +0 -224
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.h +0 -80
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.h +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.gitignore +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis.yml +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis_build_config.rb +0 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/Rakefile +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/.travis.yml +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/run_test.rb +0 -28
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
#if __GNUC__ >= 4
|
|
23
23
|
#pragma GCC diagnostic push
|
|
24
24
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
|
25
|
+
#pragma GCC diagnostic ignored "-Wconversion"
|
|
25
26
|
#endif // __GNUC__ >= 4
|
|
26
27
|
|
|
27
28
|
#include <boost/config/warning_disable.hpp>
|
|
@@ -202,7 +203,7 @@ const auto mp_object_def =
|
|
|
202
203
|
(
|
|
203
204
|
[](auto& ctx){
|
|
204
205
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
205
|
-
std::int8_t val = _attr(ctx);
|
|
206
|
+
std::int8_t val = static_cast<std::int8_t>(_attr(ctx));
|
|
206
207
|
app_specific.vis.visit_negative_integer(val);
|
|
207
208
|
}
|
|
208
209
|
)
|
|
@@ -253,7 +254,7 @@ const auto mp_object_def =
|
|
|
253
254
|
(
|
|
254
255
|
[](auto& ctx){
|
|
255
256
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
256
|
-
std::int8_t val = _attr(ctx);
|
|
257
|
+
std::int8_t val = static_cast<std::int8_t>(_attr(ctx));
|
|
257
258
|
app_specific.vis.visit_negative_integer(val);
|
|
258
259
|
}
|
|
259
260
|
)
|
|
@@ -264,7 +265,7 @@ const auto mp_object_def =
|
|
|
264
265
|
(
|
|
265
266
|
[](auto& ctx){
|
|
266
267
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
267
|
-
std::int16_t val = _attr(ctx);
|
|
268
|
+
std::int16_t val = static_cast<std::int16_t>(_attr(ctx));
|
|
268
269
|
app_specific.vis.visit_negative_integer(val);
|
|
269
270
|
}
|
|
270
271
|
)
|
|
@@ -275,7 +276,7 @@ const auto mp_object_def =
|
|
|
275
276
|
(
|
|
276
277
|
[](auto& ctx){
|
|
277
278
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
278
|
-
std::int32_t val = _attr(ctx);
|
|
279
|
+
std::int32_t val = static_cast<std::int32_t>(_attr(ctx));
|
|
279
280
|
app_specific.vis.visit_negative_integer(val);
|
|
280
281
|
}
|
|
281
282
|
)
|
|
@@ -286,7 +287,7 @@ const auto mp_object_def =
|
|
|
286
287
|
(
|
|
287
288
|
[](auto& ctx){
|
|
288
289
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
289
|
-
std::int64_t val = _attr(ctx);
|
|
290
|
+
std::int64_t val = static_cast<std::int64_t>(_attr(ctx));
|
|
290
291
|
app_specific.vis.visit_negative_integer(val);
|
|
291
292
|
}
|
|
292
293
|
)
|
|
@@ -339,7 +340,7 @@ const auto mp_object_def =
|
|
|
339
340
|
[](auto& ctx){
|
|
340
341
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
341
342
|
auto const& str = _attr(ctx);
|
|
342
|
-
|
|
343
|
+
auto size = static_cast<uint32_t>(std::distance(str.begin(), str.end()));
|
|
343
344
|
app_specific.vis.visit_str(size ? &str.front() : nullptr, size);
|
|
344
345
|
}
|
|
345
346
|
)
|
|
@@ -363,7 +364,7 @@ const auto mp_object_def =
|
|
|
363
364
|
[](auto& ctx){
|
|
364
365
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
365
366
|
auto const& str = _attr(ctx);
|
|
366
|
-
|
|
367
|
+
auto size = static_cast<uint32_t>(std::distance(str.begin(), str.end()));
|
|
367
368
|
app_specific.vis.visit_str(size ? &str.front() : nullptr, size);
|
|
368
369
|
}
|
|
369
370
|
)
|
|
@@ -387,7 +388,7 @@ const auto mp_object_def =
|
|
|
387
388
|
[](auto& ctx){
|
|
388
389
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
389
390
|
auto const& str = _attr(ctx);
|
|
390
|
-
|
|
391
|
+
auto size = static_cast<uint32_t>(std::distance(str.begin(), str.end()));
|
|
391
392
|
app_specific.vis.visit_str(size ? &str.front() : nullptr, size);
|
|
392
393
|
}
|
|
393
394
|
)
|
|
@@ -411,7 +412,7 @@ const auto mp_object_def =
|
|
|
411
412
|
[](auto& ctx){
|
|
412
413
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
413
414
|
auto const& str = _attr(ctx);
|
|
414
|
-
|
|
415
|
+
auto size = static_cast<uint32_t>(std::distance(str.begin(), str.end()));
|
|
415
416
|
app_specific.vis.visit_str(size ? &str.front() : nullptr, size);
|
|
416
417
|
}
|
|
417
418
|
)
|
|
@@ -435,7 +436,7 @@ const auto mp_object_def =
|
|
|
435
436
|
[](auto& ctx){
|
|
436
437
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
437
438
|
auto const& bin = _attr(ctx);
|
|
438
|
-
|
|
439
|
+
auto size = static_cast<uint32_t>(std::distance(bin.begin(), bin.end()));
|
|
439
440
|
app_specific.vis.visit_bin(size ? &bin.front() : nullptr, size);
|
|
440
441
|
}
|
|
441
442
|
)
|
|
@@ -459,7 +460,7 @@ const auto mp_object_def =
|
|
|
459
460
|
[](auto& ctx){
|
|
460
461
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
461
462
|
auto const& bin = _attr(ctx);
|
|
462
|
-
|
|
463
|
+
auto size = static_cast<uint32_t>(std::distance(bin.begin(), bin.end()));
|
|
463
464
|
app_specific.vis.visit_bin(size ? &bin.front() : nullptr, size);
|
|
464
465
|
}
|
|
465
466
|
)
|
|
@@ -483,7 +484,7 @@ const auto mp_object_def =
|
|
|
483
484
|
[](auto& ctx){
|
|
484
485
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
485
486
|
auto const& bin = _attr(ctx);
|
|
486
|
-
|
|
487
|
+
auto size = static_cast<uint32_t>(std::distance(bin.begin(), bin.end()));
|
|
487
488
|
app_specific.vis.visit_bin(size ? &bin.front() : nullptr, size);
|
|
488
489
|
}
|
|
489
490
|
)
|
|
@@ -494,7 +495,7 @@ const auto mp_object_def =
|
|
|
494
495
|
(
|
|
495
496
|
[](auto& ctx){
|
|
496
497
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
497
|
-
|
|
498
|
+
uint32_t size = _attr(ctx) & 0b00001111;
|
|
498
499
|
app_specific.index_sizes.emplace_back(size, index_size::type_t::array);
|
|
499
500
|
app_specific.vis.start_array(size);
|
|
500
501
|
}
|
|
@@ -508,7 +509,7 @@ const auto mp_object_def =
|
|
|
508
509
|
(
|
|
509
510
|
[](auto& ctx){
|
|
510
511
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
511
|
-
|
|
512
|
+
uint32_t size = _attr(ctx);
|
|
512
513
|
app_specific.index_sizes.emplace_back(size, index_size::type_t::array);
|
|
513
514
|
app_specific.vis.start_array(size);
|
|
514
515
|
}
|
|
@@ -522,7 +523,7 @@ const auto mp_object_def =
|
|
|
522
523
|
(
|
|
523
524
|
[](auto& ctx){
|
|
524
525
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
525
|
-
|
|
526
|
+
uint32_t size = _attr(ctx);
|
|
526
527
|
app_specific.index_sizes.emplace_back(size, index_size::type_t::array);
|
|
527
528
|
app_specific.vis.start_array(size);
|
|
528
529
|
}
|
|
@@ -536,7 +537,7 @@ const auto mp_object_def =
|
|
|
536
537
|
(
|
|
537
538
|
[](auto& ctx){
|
|
538
539
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
539
|
-
|
|
540
|
+
uint32_t size = _attr(ctx) & 0b00001111;
|
|
540
541
|
app_specific.index_sizes.emplace_back(size, index_size::type_t::map);
|
|
541
542
|
app_specific.vis.start_map(size);
|
|
542
543
|
}
|
|
@@ -550,7 +551,7 @@ const auto mp_object_def =
|
|
|
550
551
|
(
|
|
551
552
|
[](auto& ctx){
|
|
552
553
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
553
|
-
|
|
554
|
+
uint32_t size = _attr(ctx);
|
|
554
555
|
app_specific.index_sizes.emplace_back(size, index_size::type_t::map);
|
|
555
556
|
app_specific.vis.start_map(size);
|
|
556
557
|
}
|
|
@@ -564,7 +565,7 @@ const auto mp_object_def =
|
|
|
564
565
|
(
|
|
565
566
|
[](auto& ctx){
|
|
566
567
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
567
|
-
|
|
568
|
+
uint32_t size = _attr(ctx);
|
|
568
569
|
app_specific.index_sizes.emplace_back(size, index_size::type_t::map);
|
|
569
570
|
app_specific.vis.start_map(size);
|
|
570
571
|
}
|
|
@@ -591,7 +592,7 @@ const auto mp_object_def =
|
|
|
591
592
|
[](auto& ctx){
|
|
592
593
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
593
594
|
auto const& ext = _attr(ctx);
|
|
594
|
-
|
|
595
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
595
596
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
596
597
|
}
|
|
597
598
|
)
|
|
@@ -615,7 +616,7 @@ const auto mp_object_def =
|
|
|
615
616
|
[](auto& ctx){
|
|
616
617
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
617
618
|
auto const& ext = _attr(ctx);
|
|
618
|
-
|
|
619
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
619
620
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
620
621
|
}
|
|
621
622
|
)
|
|
@@ -639,7 +640,7 @@ const auto mp_object_def =
|
|
|
639
640
|
[](auto& ctx){
|
|
640
641
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
641
642
|
auto const& ext = _attr(ctx);
|
|
642
|
-
|
|
643
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
643
644
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
644
645
|
}
|
|
645
646
|
)
|
|
@@ -663,7 +664,7 @@ const auto mp_object_def =
|
|
|
663
664
|
[](auto& ctx){
|
|
664
665
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
665
666
|
auto const& ext = _attr(ctx);
|
|
666
|
-
|
|
667
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
667
668
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
668
669
|
}
|
|
669
670
|
)
|
|
@@ -687,7 +688,7 @@ const auto mp_object_def =
|
|
|
687
688
|
[](auto& ctx){
|
|
688
689
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
689
690
|
auto const& ext = _attr(ctx);
|
|
690
|
-
|
|
691
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
691
692
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
692
693
|
}
|
|
693
694
|
)
|
|
@@ -711,7 +712,7 @@ const auto mp_object_def =
|
|
|
711
712
|
[](auto& ctx){
|
|
712
713
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
713
714
|
auto const& ext = _attr(ctx);
|
|
714
|
-
|
|
715
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
715
716
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
716
717
|
}
|
|
717
718
|
)
|
|
@@ -735,7 +736,7 @@ const auto mp_object_def =
|
|
|
735
736
|
[](auto& ctx){
|
|
736
737
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
737
738
|
auto const& ext = _attr(ctx);
|
|
738
|
-
|
|
739
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
739
740
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
740
741
|
}
|
|
741
742
|
)
|
|
@@ -759,7 +760,7 @@ const auto mp_object_def =
|
|
|
759
760
|
[](auto& ctx){
|
|
760
761
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
761
762
|
auto const& ext = _attr(ctx);
|
|
762
|
-
|
|
763
|
+
auto size = static_cast<uint32_t>(std::distance(ext.begin(), ext.end()));
|
|
763
764
|
app_specific.vis.visit_ext(size ? &ext.front() : nullptr, size);
|
|
764
765
|
}
|
|
765
766
|
)
|
|
@@ -771,6 +772,7 @@ const auto array_item_def =
|
|
|
771
772
|
[](auto& ctx){
|
|
772
773
|
auto& app_specific = x3::get<tag_app_specific>(ctx).get();
|
|
773
774
|
app_specific.vis.start_array_item();
|
|
775
|
+
|
|
774
776
|
_pass(ctx) = true;
|
|
775
777
|
}
|
|
776
778
|
)
|
|
@@ -63,29 +63,29 @@ private:
|
|
|
63
63
|
load<T>(size, load_pos);
|
|
64
64
|
if (size == 0) {
|
|
65
65
|
if (!sv(size)) {
|
|
66
|
-
off = m_current - m_start;
|
|
66
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
67
67
|
return PARSE_STOP_VISITOR;
|
|
68
68
|
}
|
|
69
69
|
if (!ev()) {
|
|
70
|
-
off = m_current - m_start;
|
|
70
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
71
71
|
return PARSE_STOP_VISITOR;
|
|
72
72
|
}
|
|
73
73
|
parse_return ret = m_stack.consume(holder(), m_current);
|
|
74
74
|
++m_current;
|
|
75
75
|
if (ret != PARSE_CONTINUE) {
|
|
76
|
-
off = m_current - m_start;
|
|
76
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
77
77
|
return ret;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
81
81
|
if (!sv(size)) {
|
|
82
|
-
off = m_current - m_start;
|
|
82
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
83
83
|
return PARSE_STOP_VISITOR;
|
|
84
84
|
}
|
|
85
85
|
parse_return ret = m_stack.push(holder(), sv.type(), static_cast<uint32_t>(size));
|
|
86
86
|
++m_current;
|
|
87
87
|
if (ret != PARSE_CONTINUE) {
|
|
88
|
-
off = m_current - m_start;
|
|
88
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
89
89
|
return ret;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -95,13 +95,13 @@ private:
|
|
|
95
95
|
|
|
96
96
|
parse_return after_visit_proc(bool visit_result, std::size_t& off) {
|
|
97
97
|
if (!visit_result) {
|
|
98
|
-
off = m_current - m_start;
|
|
98
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
99
99
|
return PARSE_STOP_VISITOR;
|
|
100
100
|
}
|
|
101
101
|
parse_return ret = m_stack.consume(holder(), m_current);
|
|
102
102
|
++m_current;
|
|
103
103
|
if (ret != PARSE_CONTINUE) {
|
|
104
|
-
off = m_current - m_start;
|
|
104
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
105
105
|
}
|
|
106
106
|
m_cs = MSGPACK_CS_HEADER;
|
|
107
107
|
return ret;
|
|
@@ -253,7 +253,7 @@ inline parse_return context<VisitorHolder>::execute(const char* data, std::size_
|
|
|
253
253
|
msgpack::object obj;
|
|
254
254
|
|
|
255
255
|
if(m_current == pe) {
|
|
256
|
-
off = m_current - m_start;
|
|
256
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
257
257
|
return PARSE_CONTINUE;
|
|
258
258
|
}
|
|
259
259
|
bool fixed_trail_again = false;
|
|
@@ -335,7 +335,7 @@ inline parse_return context<VisitorHolder>::execute(const char* data, std::size_
|
|
|
335
335
|
parse_return upr = after_visit_proc(visret, off);
|
|
336
336
|
if (upr != PARSE_CONTINUE) return upr;
|
|
337
337
|
} else {
|
|
338
|
-
off = m_current - m_start;
|
|
338
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
339
339
|
holder().visitor().parse_error(off - 1, off);
|
|
340
340
|
return PARSE_PARSE_ERROR;
|
|
341
341
|
}
|
|
@@ -347,7 +347,7 @@ inline parse_return context<VisitorHolder>::execute(const char* data, std::size_
|
|
|
347
347
|
fixed_trail_again = false;
|
|
348
348
|
}
|
|
349
349
|
if(static_cast<std::size_t>(pe - m_current) < m_trail) {
|
|
350
|
-
off = m_current - m_start;
|
|
350
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
351
351
|
return PARSE_CONTINUE;
|
|
352
352
|
}
|
|
353
353
|
n = m_current;
|
|
@@ -617,14 +617,14 @@ inline parse_return context<VisitorHolder>::execute(const char* data, std::size_
|
|
|
617
617
|
if (ret != PARSE_CONTINUE) return ret;
|
|
618
618
|
} break;
|
|
619
619
|
default:
|
|
620
|
-
off = m_current - m_start;
|
|
621
|
-
holder().visitor().parse_error(n - m_start - 1, n - m_start);
|
|
620
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
621
|
+
holder().visitor().parse_error(static_cast<std::size_t>(n - m_start - 1), static_cast<std::size_t>(n - m_start));
|
|
622
622
|
return PARSE_PARSE_ERROR;
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
} while(m_current != pe);
|
|
626
626
|
|
|
627
|
-
off = m_current - m_start;
|
|
627
|
+
off = static_cast<std::size_t>(m_current - m_start);
|
|
628
628
|
return PARSE_CONTINUE;
|
|
629
629
|
}
|
|
630
630
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#define MSGPACK_VERSION_MAJOR 3
|
|
2
|
-
#define MSGPACK_VERSION_MINOR
|
|
3
|
-
#define MSGPACK_VERSION_REVISION
|
|
2
|
+
#define MSGPACK_VERSION_MINOR 2
|
|
3
|
+
#define MSGPACK_VERSION_REVISION 0
|
|
@@ -100,8 +100,9 @@ static inline void msgpack_zbuffer_free(msgpack_zbuffer* zbuf)
|
|
|
100
100
|
|
|
101
101
|
static inline bool msgpack_zbuffer_expand(msgpack_zbuffer* zbuf)
|
|
102
102
|
{
|
|
103
|
-
size_t used = (char
|
|
103
|
+
size_t used = static_cast<size_t>(reinterpret_cast<char*>(zbuf->stream.next_out) - zbuf->data);
|
|
104
104
|
size_t csize = used + zbuf->stream.avail_out;
|
|
105
|
+
|
|
105
106
|
size_t nsize = (csize == 0) ? zbuf->init_size : csize * 2;
|
|
106
107
|
|
|
107
108
|
char* tmp = (char*)realloc(zbuf->data, nsize);
|
|
@@ -111,7 +112,7 @@ static inline bool msgpack_zbuffer_expand(msgpack_zbuffer* zbuf)
|
|
|
111
112
|
|
|
112
113
|
zbuf->data = tmp;
|
|
113
114
|
zbuf->stream.next_out = (Bytef*)(tmp + used);
|
|
114
|
-
zbuf->stream.avail_out = nsize - used;
|
|
115
|
+
zbuf->stream.avail_out = static_cast<uInt>(nsize - used);
|
|
115
116
|
|
|
116
117
|
return true;
|
|
117
118
|
}
|
|
@@ -121,7 +122,7 @@ static inline int msgpack_zbuffer_write(void* data, const char* buf, size_t len)
|
|
|
121
122
|
msgpack_zbuffer* zbuf = (msgpack_zbuffer*)data;
|
|
122
123
|
|
|
123
124
|
zbuf->stream.next_in = (Bytef*)buf;
|
|
124
|
-
zbuf->stream.avail_in = len;
|
|
125
|
+
zbuf->stream.avail_in = static_cast<uInt>(len);
|
|
125
126
|
|
|
126
127
|
while(zbuf->stream.avail_in > 0) {
|
|
127
128
|
if(zbuf->stream.avail_out < MSGPACK_ZBUFFER_RESERVE_SIZE) {
|
|
@@ -162,12 +163,12 @@ static inline const char* msgpack_zbuffer_data(const msgpack_zbuffer* zbuf)
|
|
|
162
163
|
|
|
163
164
|
static inline size_t msgpack_zbuffer_size(const msgpack_zbuffer* zbuf)
|
|
164
165
|
{
|
|
165
|
-
return (char
|
|
166
|
+
return static_cast<size_t>(reinterpret_cast<char*>(zbuf->stream.next_out) - zbuf->data);
|
|
166
167
|
}
|
|
167
168
|
|
|
168
169
|
static inline void msgpack_zbuffer_reset_buffer(msgpack_zbuffer* zbuf)
|
|
169
170
|
{
|
|
170
|
-
zbuf->stream.avail_out += (char*)zbuf->stream.next_out - zbuf->data;
|
|
171
|
+
zbuf->stream.avail_out += (uInt)((char*)zbuf->stream.next_out - zbuf->data);
|
|
171
172
|
zbuf->stream.next_out = (Bytef*)zbuf->data;
|
|
172
173
|
}
|
|
173
174
|
|
|
@@ -197,4 +198,3 @@ static inline char* msgpack_zbuffer_release_buffer(msgpack_zbuffer* zbuf)
|
|
|
197
198
|
#endif
|
|
198
199
|
|
|
199
200
|
#endif /* msgpack/zbuffer.h */
|
|
200
|
-
|
|
@@ -111,7 +111,7 @@ static inline void* msgpack_zone_malloc(msgpack_zone* zone, size_t size)
|
|
|
111
111
|
zone->chunk_list.ptr + (MSGPACK_ZONE_ALIGN - 1)
|
|
112
112
|
) / MSGPACK_ZONE_ALIGN * MSGPACK_ZONE_ALIGN
|
|
113
113
|
);
|
|
114
|
-
size_t adjusted_size = size + (aligned - zone->chunk_list.ptr);
|
|
114
|
+
size_t adjusted_size = size + (size_t)(aligned - zone->chunk_list.ptr);
|
|
115
115
|
if(zone->chunk_list.free >= adjusted_size) {
|
|
116
116
|
zone->chunk_list.free -= adjusted_size;
|
|
117
117
|
zone->chunk_list.ptr += adjusted_size;
|
|
@@ -7,9 +7,15 @@
|
|
|
7
7
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
|
8
8
|
* http://www.boost.org/LICENSE_1_0.txt)
|
|
9
9
|
*/
|
|
10
|
+
#if defined(_KERNEL_MODE)
|
|
11
|
+
# undef _NO_CRT_STDIO_INLINE
|
|
12
|
+
# define _NO_CRT_STDIO_INLINE
|
|
13
|
+
#endif
|
|
14
|
+
|
|
10
15
|
#include "msgpack/object.h"
|
|
11
16
|
#include "msgpack/pack.h"
|
|
12
17
|
#include <ctype.h>
|
|
18
|
+
|
|
13
19
|
#include <stdio.h>
|
|
14
20
|
#include <string.h>
|
|
15
21
|
|
|
@@ -25,6 +31,10 @@
|
|
|
25
31
|
#include <inttypes.h>
|
|
26
32
|
#endif
|
|
27
33
|
|
|
34
|
+
#if defined(_KERNEL_MODE)
|
|
35
|
+
# undef snprintf
|
|
36
|
+
# define snprintf _snprintf
|
|
37
|
+
#endif
|
|
28
38
|
|
|
29
39
|
int msgpack_pack_object(msgpack_packer* pk, msgpack_object d)
|
|
30
40
|
{
|
|
@@ -115,6 +125,7 @@ int msgpack_pack_object(msgpack_packer* pk, msgpack_object d)
|
|
|
115
125
|
}
|
|
116
126
|
}
|
|
117
127
|
|
|
128
|
+
#if !defined(_KERNEL_MODE)
|
|
118
129
|
|
|
119
130
|
static void msgpack_object_bin_print(FILE* out, const char *ptr, size_t size)
|
|
120
131
|
{
|
|
@@ -130,35 +141,6 @@ static void msgpack_object_bin_print(FILE* out, const char *ptr, size_t size)
|
|
|
130
141
|
}
|
|
131
142
|
}
|
|
132
143
|
|
|
133
|
-
static int msgpack_object_bin_print_buffer(char *buffer, size_t buffer_size, const char *ptr, size_t size)
|
|
134
|
-
{
|
|
135
|
-
size_t i;
|
|
136
|
-
char *aux_buffer = buffer;
|
|
137
|
-
size_t aux_buffer_size = buffer_size;
|
|
138
|
-
int ret;
|
|
139
|
-
|
|
140
|
-
for (i = 0; i < size; ++i) {
|
|
141
|
-
if (ptr[i] == '"') {
|
|
142
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "\\\"");
|
|
143
|
-
aux_buffer = aux_buffer + ret;
|
|
144
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
145
|
-
} else if (isprint((unsigned char)ptr[i])) {
|
|
146
|
-
if (aux_buffer_size > 0) {
|
|
147
|
-
memcpy(aux_buffer, ptr + i, 1);
|
|
148
|
-
aux_buffer = aux_buffer + 1;
|
|
149
|
-
aux_buffer_size = aux_buffer_size - 1;
|
|
150
|
-
}
|
|
151
|
-
} else {
|
|
152
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "\\x%02x", (unsigned char)ptr[i]);
|
|
153
|
-
aux_buffer = aux_buffer + ret;
|
|
154
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return buffer_size - aux_buffer_size;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
144
|
void msgpack_object_print(FILE* out, msgpack_object o)
|
|
163
145
|
{
|
|
164
146
|
switch(o.type) {
|
|
@@ -270,6 +252,38 @@ void msgpack_object_print(FILE* out, msgpack_object o)
|
|
|
270
252
|
}
|
|
271
253
|
}
|
|
272
254
|
|
|
255
|
+
#endif
|
|
256
|
+
|
|
257
|
+
#define MSGPACK_CHECKED_CALL(ret, func, aux_buffer, aux_buffer_size, ...) \
|
|
258
|
+
ret = func(aux_buffer, aux_buffer_size, __VA_ARGS__); \
|
|
259
|
+
if (ret <= 0 || ret > (int)aux_buffer_size) return 0; \
|
|
260
|
+
aux_buffer = aux_buffer + ret; \
|
|
261
|
+
aux_buffer_size = aux_buffer_size - ret \
|
|
262
|
+
|
|
263
|
+
static int msgpack_object_bin_print_buffer(char *buffer, size_t buffer_size, const char *ptr, size_t size)
|
|
264
|
+
{
|
|
265
|
+
size_t i;
|
|
266
|
+
char *aux_buffer = buffer;
|
|
267
|
+
size_t aux_buffer_size = buffer_size;
|
|
268
|
+
int ret;
|
|
269
|
+
|
|
270
|
+
for (i = 0; i < size; ++i) {
|
|
271
|
+
if (ptr[i] == '"') {
|
|
272
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\\\"");
|
|
273
|
+
} else if (isprint((unsigned char)ptr[i])) {
|
|
274
|
+
if (aux_buffer_size > 0) {
|
|
275
|
+
memcpy(aux_buffer, ptr + i, 1);
|
|
276
|
+
aux_buffer = aux_buffer + 1;
|
|
277
|
+
aux_buffer_size = aux_buffer_size - 1;
|
|
278
|
+
}
|
|
279
|
+
} else {
|
|
280
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\\x%02x", (unsigned char)ptr[i]);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return (int)(buffer_size - aux_buffer_size);
|
|
285
|
+
}
|
|
286
|
+
|
|
273
287
|
int msgpack_object_print_buffer(char *buffer, size_t buffer_size, msgpack_object o)
|
|
274
288
|
{
|
|
275
289
|
char *aux_buffer = buffer;
|
|
@@ -277,197 +291,118 @@ int msgpack_object_print_buffer(char *buffer, size_t buffer_size, msgpack_object
|
|
|
277
291
|
int ret;
|
|
278
292
|
switch(o.type) {
|
|
279
293
|
case MSGPACK_OBJECT_NIL:
|
|
280
|
-
ret
|
|
281
|
-
aux_buffer = aux_buffer + ret;
|
|
282
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
294
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "nil");
|
|
283
295
|
break;
|
|
284
296
|
|
|
285
297
|
case MSGPACK_OBJECT_BOOLEAN:
|
|
286
|
-
ret
|
|
287
|
-
aux_buffer = aux_buffer + ret;
|
|
288
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
298
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, (o.via.boolean ? "true" : "false"));
|
|
289
299
|
break;
|
|
290
300
|
|
|
291
301
|
case MSGPACK_OBJECT_POSITIVE_INTEGER:
|
|
292
302
|
#if defined(PRIu64)
|
|
293
|
-
ret
|
|
294
|
-
aux_buffer = aux_buffer + ret;
|
|
295
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
303
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%" PRIu64, o.via.u64);
|
|
296
304
|
#else
|
|
297
305
|
if (o.via.u64 > ULONG_MAX) {
|
|
298
|
-
ret
|
|
299
|
-
aux_buffer = aux_buffer + ret;
|
|
300
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
306
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "over 4294967295");
|
|
301
307
|
} else {
|
|
302
|
-
ret
|
|
303
|
-
aux_buffer = aux_buffer + ret;
|
|
304
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
308
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%lu", (unsigned long)o.via.u64);
|
|
305
309
|
}
|
|
306
310
|
#endif
|
|
307
311
|
break;
|
|
308
312
|
|
|
309
313
|
case MSGPACK_OBJECT_NEGATIVE_INTEGER:
|
|
310
314
|
#if defined(PRIi64)
|
|
311
|
-
ret
|
|
312
|
-
aux_buffer = aux_buffer + ret;
|
|
313
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
315
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%" PRIi64, o.via.i64);
|
|
314
316
|
#else
|
|
315
317
|
if (o.via.i64 > LONG_MAX) {
|
|
316
|
-
ret
|
|
317
|
-
aux_buffer = aux_buffer + ret;
|
|
318
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
318
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "over +2147483647");
|
|
319
319
|
} else if (o.via.i64 < LONG_MIN) {
|
|
320
|
-
ret
|
|
321
|
-
aux_buffer = aux_buffer + ret;
|
|
322
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
320
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "under -2147483648");
|
|
323
321
|
} else {
|
|
324
|
-
ret
|
|
325
|
-
aux_buffer = aux_buffer + ret;
|
|
326
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
322
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%ld", (signed long)o.via.i64);
|
|
327
323
|
}
|
|
328
324
|
#endif
|
|
329
325
|
break;
|
|
330
326
|
|
|
331
327
|
case MSGPACK_OBJECT_FLOAT32:
|
|
332
328
|
case MSGPACK_OBJECT_FLOAT64:
|
|
333
|
-
ret
|
|
334
|
-
aux_buffer = aux_buffer + ret;
|
|
335
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
329
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%f", o.via.f64);
|
|
336
330
|
break;
|
|
337
331
|
|
|
338
332
|
case MSGPACK_OBJECT_STR:
|
|
339
|
-
ret
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "%.*s", (int)o.via.str.size, o.via.str.ptr);
|
|
343
|
-
aux_buffer = aux_buffer + ret;
|
|
344
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
345
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "\"");
|
|
346
|
-
aux_buffer = aux_buffer + ret;
|
|
347
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
333
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"");
|
|
334
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%.*s", (int)o.via.str.size, o.via.str.ptr);
|
|
335
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"");
|
|
348
336
|
break;
|
|
349
337
|
|
|
350
338
|
case MSGPACK_OBJECT_BIN:
|
|
351
|
-
ret
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
ret = msgpack_object_bin_print_buffer(aux_buffer, aux_buffer_size, o.via.bin.ptr, o.via.bin.size);
|
|
356
|
-
aux_buffer = aux_buffer + ret;
|
|
357
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
358
|
-
|
|
359
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "\"");
|
|
360
|
-
aux_buffer = aux_buffer + ret;
|
|
361
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
339
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"");
|
|
340
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_bin_print_buffer, aux_buffer, aux_buffer_size, o.via.bin.ptr, o.via.bin.size);
|
|
341
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"");
|
|
362
342
|
break;
|
|
363
343
|
|
|
364
344
|
case MSGPACK_OBJECT_EXT:
|
|
365
345
|
#if defined(PRIi8)
|
|
366
|
-
ret
|
|
367
|
-
aux_buffer = aux_buffer + ret;
|
|
368
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
346
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "(ext: %" PRIi8 ")", o.via.ext.type);
|
|
369
347
|
#else
|
|
370
|
-
ret
|
|
371
|
-
aux_buffer = aux_buffer + ret;
|
|
372
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
348
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "(ext: %d)", (int)o.via.ext.type);
|
|
373
349
|
#endif
|
|
374
|
-
ret
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
ret = msgpack_object_bin_print_buffer(aux_buffer, aux_buffer_size, o.via.ext.ptr, o.via.ext.size);
|
|
379
|
-
aux_buffer = aux_buffer + ret;
|
|
380
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
381
|
-
|
|
382
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "\"");
|
|
383
|
-
aux_buffer = aux_buffer + ret;
|
|
384
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
350
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"");
|
|
351
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_bin_print_buffer, aux_buffer, aux_buffer_size, o.via.ext.ptr, o.via.ext.size);
|
|
352
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"");
|
|
385
353
|
break;
|
|
386
354
|
|
|
387
355
|
case MSGPACK_OBJECT_ARRAY:
|
|
388
|
-
ret
|
|
389
|
-
aux_buffer = aux_buffer + ret;
|
|
390
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
356
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "[");
|
|
391
357
|
if(o.via.array.size != 0) {
|
|
392
358
|
msgpack_object* p = o.via.array.ptr;
|
|
393
359
|
msgpack_object* const pend = o.via.array.ptr + o.via.array.size;
|
|
394
|
-
ret
|
|
395
|
-
aux_buffer = aux_buffer + ret;
|
|
396
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
360
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_print_buffer, aux_buffer, aux_buffer_size, *p);
|
|
397
361
|
++p;
|
|
398
362
|
for(; p < pend; ++p) {
|
|
399
|
-
ret
|
|
400
|
-
|
|
401
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
402
|
-
ret = msgpack_object_print_buffer(aux_buffer, aux_buffer_size, *p);
|
|
403
|
-
aux_buffer = aux_buffer + ret;
|
|
404
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
363
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, ", ");
|
|
364
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_print_buffer, aux_buffer, aux_buffer_size, *p);
|
|
405
365
|
}
|
|
406
366
|
}
|
|
407
|
-
ret
|
|
408
|
-
aux_buffer = aux_buffer + ret;
|
|
409
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
367
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "]");
|
|
410
368
|
break;
|
|
411
369
|
|
|
412
370
|
case MSGPACK_OBJECT_MAP:
|
|
413
|
-
ret
|
|
414
|
-
aux_buffer = aux_buffer + ret;
|
|
415
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
371
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "{");
|
|
416
372
|
if(o.via.map.size != 0) {
|
|
417
373
|
msgpack_object_kv* p = o.via.map.ptr;
|
|
418
374
|
msgpack_object_kv* const pend = o.via.map.ptr + o.via.map.size;
|
|
419
|
-
ret
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "=>");
|
|
423
|
-
aux_buffer = aux_buffer + ret;
|
|
424
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
425
|
-
ret = msgpack_object_print_buffer(aux_buffer, aux_buffer_size, p->val);
|
|
426
|
-
aux_buffer = aux_buffer + ret;
|
|
427
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
375
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_print_buffer, aux_buffer, aux_buffer_size, p->key);
|
|
376
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "=>");
|
|
377
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_print_buffer, aux_buffer, aux_buffer_size, p->val);
|
|
428
378
|
++p;
|
|
429
379
|
for(; p < pend; ++p) {
|
|
430
|
-
ret
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
ret
|
|
434
|
-
aux_buffer = aux_buffer + ret;
|
|
435
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
436
|
-
ret = snprintf(aux_buffer, aux_buffer_size, "=>");
|
|
437
|
-
aux_buffer = aux_buffer + ret;
|
|
438
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
439
|
-
ret = msgpack_object_print_buffer(aux_buffer, aux_buffer_size, p->val);
|
|
440
|
-
aux_buffer = aux_buffer + ret;
|
|
441
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
380
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, ", ");
|
|
381
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_print_buffer, aux_buffer, aux_buffer_size, p->key);
|
|
382
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "=>");
|
|
383
|
+
MSGPACK_CHECKED_CALL(ret, msgpack_object_print_buffer, aux_buffer, aux_buffer_size, p->val);
|
|
442
384
|
}
|
|
443
385
|
}
|
|
444
|
-
ret
|
|
445
|
-
aux_buffer = aux_buffer + ret;
|
|
446
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
386
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "}");
|
|
447
387
|
break;
|
|
448
388
|
|
|
449
389
|
default:
|
|
450
390
|
// FIXME
|
|
451
391
|
#if defined(PRIu64)
|
|
452
|
-
ret
|
|
453
|
-
aux_buffer = aux_buffer + ret;
|
|
454
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
392
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "#<UNKNOWN %i %" PRIu64 ">", o.type, o.via.u64);
|
|
455
393
|
#else
|
|
456
394
|
if (o.via.u64 > ULONG_MAX) {
|
|
457
|
-
ret
|
|
458
|
-
aux_buffer = aux_buffer + ret;
|
|
459
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
395
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "#<UNKNOWN %i over 4294967295>", o.type);
|
|
460
396
|
} else {
|
|
461
|
-
ret
|
|
462
|
-
aux_buffer = aux_buffer + ret;
|
|
463
|
-
aux_buffer_size = aux_buffer_size - ret;
|
|
397
|
+
MSGPACK_CHECKED_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "#<UNKNOWN %i %lu>", o.type, (unsigned long)o.via.u64);
|
|
464
398
|
}
|
|
465
399
|
#endif
|
|
466
400
|
}
|
|
467
401
|
|
|
468
|
-
return buffer_size - aux_buffer_size;
|
|
402
|
+
return (int)(buffer_size - aux_buffer_size);
|
|
469
403
|
}
|
|
470
404
|
|
|
405
|
+
#undef MSGPACK_CHECKED_CALL
|
|
471
406
|
|
|
472
407
|
bool msgpack_object_equal(const msgpack_object x, const msgpack_object y)
|
|
473
408
|
{
|