diff options
| author | frsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731> | 2009-02-15 09:09:56 +0000 |
|---|---|---|
| committer | frsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731> | 2009-02-15 09:09:56 +0000 |
| commit | 249d3e9c908ea4a3fd2012a753ca7f0cea0b4ee5 (patch) | |
| tree | e5e469b0a0ff4f2bc211044fad72ccb26528c8d6 /ruby | |
| parent | f41c20a2503411393012d01e3f3c3ea0e9c7dde8 (diff) | |
| download | msgpack-python-249d3e9c908ea4a3fd2012a753ca7f0cea0b4ee5.tar.gz | |
lang/c/msgpack: removed string type
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@54 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'ruby')
| -rw-r--r-- | ruby/test_format.rb | 6 | ||||
| -rw-r--r-- | ruby/unpack_inline.c | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/ruby/test_format.rb b/ruby/test_format.rb index 7c2e8fc..99a27d1 100644 --- a/ruby/test_format.rb +++ b/ruby/test_format.rb @@ -119,10 +119,4 @@ check([ 0xdf, 0x00, 0x00, 0x00, 0x02, 0xc0, 0xc2, 0xc3, 0xc2, ], [{}, {nil=>false}, {true=>false, nil=>false}, {}, {nil=>false}, {true=>false, nil=>false}]) -# string -check([ - 0x92, - 0xc1, 0x00, - 0xc1, ?a, ?b, ?c, 0x00, -], ["", "abc"]) diff --git a/ruby/unpack_inline.c b/ruby/unpack_inline.c index f6715d9..b30754b 100644 --- a/ruby/unpack_inline.c +++ b/ruby/unpack_inline.c @@ -71,11 +71,8 @@ static inline VALUE msgpack_unpack_map_start(msgpack_unpack_context* x, unsigned static inline void msgpack_unpack_map_item(msgpack_unpack_context* x, VALUE c, VALUE k, VALUE v) { rb_hash_aset(c, k, v); } -static inline VALUE msgpack_unpack_string(msgpack_unpack_context* x, const void* b, size_t l) -{ return rb_str_new(b, l); } - -static inline VALUE msgpack_unpack_raw(msgpack_unpack_context* x, const void* b, size_t l) -{ return rb_str_new(b, l); } +static inline VALUE msgpack_unpack_raw(msgpack_unpack_context* x, const void* b, const void* p, size_t l) +{ return rb_str_new(p, l); } #include "msgpack/unpack/inline_impl.h" |
