mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
lang/c/msgpack: uint64_t, int64_t support for ruby
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@49 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
parent
269cda016d
commit
9f460f17d7
3 changed files with 21 additions and 156 deletions
|
|
@ -30,7 +30,7 @@ static inline VALUE msgpack_unpack_unsigned_int_32(msgpack_unpack_context* x, ui
|
|||
{ return UINT2NUM(d); }
|
||||
|
||||
static inline VALUE msgpack_unpack_unsigned_int_64(msgpack_unpack_context* x, uint64_t d)
|
||||
{ return UINT2NUM(d); } // FIXME
|
||||
{ return rb_ull2inum(d); }
|
||||
|
||||
static inline VALUE msgpack_unpack_signed_int_8(msgpack_unpack_context* x, int8_t d)
|
||||
{ return INT2FIX((long)d); }
|
||||
|
|
@ -42,7 +42,7 @@ static inline VALUE msgpack_unpack_signed_int_32(msgpack_unpack_context* x, int3
|
|||
{ return INT2NUM((long)d); }
|
||||
|
||||
static inline VALUE msgpack_unpack_signed_int_64(msgpack_unpack_context* x, int64_t d)
|
||||
{ return INT2NUM(d); } // FIXME
|
||||
{ return rb_ll2inum(d); }
|
||||
|
||||
static inline VALUE msgpack_unpack_float(msgpack_unpack_context* x, float d)
|
||||
{ return rb_float_new(d); }
|
||||
|
|
@ -63,7 +63,7 @@ static inline VALUE msgpack_unpack_array_start(msgpack_unpack_context* x, unsign
|
|||
{ return rb_ary_new2(n); }
|
||||
|
||||
static inline void msgpack_unpack_array_item(msgpack_unpack_context* x, VALUE c, VALUE o)
|
||||
{ rb_ary_push(c, o); }
|
||||
{ rb_ary_push(c, o); } // FIXME set value directry RARRAY_PTR(obj)[RARRAY_LEN(obj)++]
|
||||
|
||||
static inline VALUE msgpack_unpack_map_start(msgpack_unpack_context* x, unsigned int n)
|
||||
{ return rb_hash_new(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue