msgpack 0.6.0pre1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.travis.yml +26 -0
- data/ChangeLog +117 -0
- data/Dockerfile +30 -0
- data/Gemfile +4 -0
- data/LICENSE +177 -0
- data/README.rdoc +129 -0
- data/Rakefile +114 -0
- data/bench/pack.rb +23 -0
- data/bench/pack_log.rb +33 -0
- data/bench/pack_log_long.rb +65 -0
- data/bench/run.sh +14 -0
- data/bench/run_long.sh +35 -0
- data/bench/unpack.rb +21 -0
- data/bench/unpack_log.rb +34 -0
- data/bench/unpack_log_long.rb +67 -0
- data/cross-build.sh +9 -0
- data/doclib/msgpack/buffer.rb +193 -0
- data/doclib/msgpack/core_ext.rb +101 -0
- data/doclib/msgpack/error.rb +14 -0
- data/doclib/msgpack/packer.rb +134 -0
- data/doclib/msgpack/unpacker.rb +146 -0
- data/doclib/msgpack.rb +77 -0
- data/ext/java/org/msgpack/jruby/Buffer.java +221 -0
- data/ext/java/org/msgpack/jruby/Decoder.java +201 -0
- data/ext/java/org/msgpack/jruby/Encoder.java +308 -0
- data/ext/java/org/msgpack/jruby/ExtensionValue.java +136 -0
- data/ext/java/org/msgpack/jruby/MessagePackLibrary.java +107 -0
- data/ext/java/org/msgpack/jruby/Packer.java +78 -0
- data/ext/java/org/msgpack/jruby/Types.java +37 -0
- data/ext/java/org/msgpack/jruby/Unpacker.java +170 -0
- data/ext/msgpack/buffer.c +695 -0
- data/ext/msgpack/buffer.h +447 -0
- data/ext/msgpack/buffer_class.c +507 -0
- data/ext/msgpack/buffer_class.h +32 -0
- data/ext/msgpack/compat.h +113 -0
- data/ext/msgpack/core_ext.c +129 -0
- data/ext/msgpack/core_ext.h +26 -0
- data/ext/msgpack/extconf.rb +28 -0
- data/ext/msgpack/packer.c +168 -0
- data/ext/msgpack/packer.h +441 -0
- data/ext/msgpack/packer_class.c +302 -0
- data/ext/msgpack/packer_class.h +30 -0
- data/ext/msgpack/rbinit.c +33 -0
- data/ext/msgpack/rmem.c +94 -0
- data/ext/msgpack/rmem.h +109 -0
- data/ext/msgpack/sysdep.h +115 -0
- data/ext/msgpack/sysdep_endian.h +50 -0
- data/ext/msgpack/sysdep_types.h +46 -0
- data/ext/msgpack/unpacker.c +771 -0
- data/ext/msgpack/unpacker.h +122 -0
- data/ext/msgpack/unpacker_class.c +405 -0
- data/ext/msgpack/unpacker_class.h +32 -0
- data/lib/msgpack/msgpack.so +0 -0
- data/lib/msgpack/version.rb +3 -0
- data/lib/msgpack.rb +13 -0
- data/msgpack.gemspec +31 -0
- data/msgpack.org.md +46 -0
- data/spec/cases.json +1 -0
- data/spec/cases.msg +0 -0
- data/spec/cases_compact.msg +0 -0
- data/spec/cases_spec.rb +39 -0
- data/spec/cruby/buffer_io_spec.rb +256 -0
- data/spec/cruby/buffer_packer.rb +29 -0
- data/spec/cruby/buffer_spec.rb +572 -0
- data/spec/cruby/buffer_unpacker.rb +19 -0
- data/spec/cruby/packer_spec.rb +120 -0
- data/spec/cruby/unpacker_spec.rb +305 -0
- data/spec/format_spec.rb +282 -0
- data/spec/jruby/benchmarks/shootout_bm.rb +73 -0
- data/spec/jruby/benchmarks/symbolize_keys_bm.rb +25 -0
- data/spec/jruby/msgpack/unpacker_spec.rb +290 -0
- data/spec/jruby/msgpack_spec.rb +142 -0
- data/spec/pack_spec.rb +67 -0
- data/spec/random_compat.rb +24 -0
- data/spec/spec_helper.rb +27 -0
- data/spec/unpack_spec.rb +60 -0
- metadata +209 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
/*
|
2
|
+
* MessagePack for Ruby
|
3
|
+
*
|
4
|
+
* Copyright (C) 2008-2013 Sadayuki Furuhashi
|
5
|
+
*
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
* you may not use this file except in compliance with the License.
|
8
|
+
* You may obtain a copy of the License at
|
9
|
+
*
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
*
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
* See the License for the specific language governing permissions and
|
16
|
+
* limitations under the License.
|
17
|
+
*/
|
18
|
+
#ifndef MSGPACK_RUBY_SYSDEP_ENDIAN_H__
|
19
|
+
#define MSGPACK_RUBY_SYSDEP_ENDIAN_H__
|
20
|
+
|
21
|
+
/* including arpa/inet.h requires an extra dll on win32 */
|
22
|
+
#ifndef _WIN32
|
23
|
+
#include <arpa/inet.h> /* __BYTE_ORDER */
|
24
|
+
#endif
|
25
|
+
|
26
|
+
/*
|
27
|
+
* Use following command to add consitions here:
|
28
|
+
* cpp -dM `echo "#include <arpa/inet.h>" > test.c; echo test.c` | grep ENDIAN
|
29
|
+
*/
|
30
|
+
#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) /* Mac OS X */
|
31
|
+
# if defined(_LITTLE_ENDIAN) \
|
32
|
+
|| ( defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) \
|
33
|
+
&& __BYTE_ORDER == __LITTLE_ENDIAN ) /* Linux */ \
|
34
|
+
|| ( defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) \
|
35
|
+
&& __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ ) /* Solaris */
|
36
|
+
# define __LITTLE_ENDIAN__
|
37
|
+
# elif defined(_BIG_ENDIAN) \
|
38
|
+
|| (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) \
|
39
|
+
&& __BYTE_ORDER == __BIG_ENDIAN) /* Linux */ \
|
40
|
+
|| (defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) \
|
41
|
+
&& __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) /* Solaris */
|
42
|
+
# define __BIG_ENDIAN__
|
43
|
+
# elif defined(_WIN32) /* Win32 */
|
44
|
+
# define __LITTLE_ENDIAN__
|
45
|
+
# endif
|
46
|
+
#endif
|
47
|
+
|
48
|
+
|
49
|
+
#endif
|
50
|
+
|
@@ -0,0 +1,46 @@
|
|
1
|
+
/*
|
2
|
+
* MessagePack for Ruby
|
3
|
+
*
|
4
|
+
* Copyright (C) 2008-2013 Sadayuki Furuhashi
|
5
|
+
*
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
* you may not use this file except in compliance with the License.
|
8
|
+
* You may obtain a copy of the License at
|
9
|
+
*
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
*
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
* See the License for the specific language governing permissions and
|
16
|
+
* limitations under the License.
|
17
|
+
*/
|
18
|
+
#ifndef MSGPACK_RUBY_SYSDEP_TYPES_H__
|
19
|
+
#define MSGPACK_RUBY_SYSDEP_TYPES_H__
|
20
|
+
|
21
|
+
#include <string.h>
|
22
|
+
#include <stdlib.h>
|
23
|
+
|
24
|
+
#include <stddef.h>
|
25
|
+
|
26
|
+
#if defined(_MSC_VER) && _MSC_VER < 1600
|
27
|
+
typedef __int8 int8_t;
|
28
|
+
typedef unsigned __int8 uint8_t;
|
29
|
+
typedef __int16 int16_t;
|
30
|
+
typedef unsigned __int16 uint16_t;
|
31
|
+
typedef __int32 int32_t;
|
32
|
+
typedef unsigned __int32 uint32_t;
|
33
|
+
typedef __int64 int64_t;
|
34
|
+
typedef unsigned __int64 uint64_t;
|
35
|
+
|
36
|
+
#elif defined(_MSC_VER) // && _MSC_VER >= 1600
|
37
|
+
#include <stdint.h>
|
38
|
+
|
39
|
+
#else
|
40
|
+
#include <stdint.h>
|
41
|
+
#include <stdbool.h>
|
42
|
+
#endif
|
43
|
+
|
44
|
+
|
45
|
+
#endif
|
46
|
+
|