diff options
| author | frsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731> | 2009-02-15 09:09:58 +0000 |
|---|---|---|
| committer | frsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731> | 2009-02-15 09:09:58 +0000 |
| commit | 9923cf4daf631432e389dd0694042b6b405c1288 (patch) | |
| tree | 0219d0365d4f83b48001fbb9f413e7f43a4654fd /ruby | |
| parent | 1222466a1c52161a3da3c3c5ce552d4b90e32bf6 (diff) | |
| download | msgpack-python-9923cf4daf631432e389dd0694042b6b405c1288.tar.gz | |
lang/c/msgpack: reimplemented C++ binding with template-based static resolution design
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@67 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'ruby')
| -rw-r--r-- | ruby/unpack.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ruby/unpack.c b/ruby/unpack.c index 8439c02..b948aa6 100644 --- a/ruby/unpack.c +++ b/ruby/unpack.c @@ -94,14 +94,14 @@ static inline VALUE template_callback_false(msgpack_unpack_context* x) static inline VALUE template_callback_array(msgpack_unpack_context* x, unsigned int n) { return rb_ary_new2(n); } -static inline void template_callback_array_item(msgpack_unpack_context* x, VALUE c, VALUE o) -{ rb_ary_push(c, o); } // FIXME set value directry RARRAY_PTR(obj)[RARRAY_LEN(obj)++] +static inline void template_callback_array_item(msgpack_unpack_context* x, VALUE* c, VALUE o) +{ rb_ary_push(*c, o); } // FIXME set value directry RARRAY_PTR(obj)[RARRAY_LEN(obj)++] static inline VALUE template_callback_map(msgpack_unpack_context* x, unsigned int n) { return rb_hash_new(); } -static inline void template_callback_map_item(msgpack_unpack_context* x, VALUE c, VALUE k, VALUE v) -{ rb_hash_aset(c, k, v); } +static inline void template_callback_map_item(msgpack_unpack_context* x, VALUE* c, VALUE k, VALUE v) +{ rb_hash_aset(*c, k, v); } static inline VALUE template_callback_raw(msgpack_unpack_context* x, const char* b, const char* p, unsigned int l) { return rb_str_new(p, l); } |
