mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
update pack/unpack routines
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@100 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
parent
81a771094d
commit
a114f4a5a5
32 changed files with 503 additions and 366 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* MessagePack packing routine for Ruby
|
||||
* MessagePack for Ruby packing routine
|
||||
*
|
||||
* Copyright (C) 2008 FURUHASHI Sadayuki
|
||||
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -19,10 +19,10 @@
|
|||
#include "msgpack/pack_define.h"
|
||||
|
||||
#define msgpack_pack_inline_func(name) \
|
||||
static inline void msgpack_pack_##name
|
||||
static inline void msgpack_pack ## name
|
||||
|
||||
#define msgpack_pack_inline_func_cint(name) \
|
||||
static inline void msgpack_pack_##name
|
||||
static inline void msgpack_pack ## name
|
||||
|
||||
#define msgpack_pack_user VALUE
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* MessagePack packing routine for Ruby
|
||||
* MessagePack for Ruby packing routine
|
||||
*
|
||||
* Copyright (C) 2008 FURUHASHI Sadayuki
|
||||
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* MessagePack for Ruby
|
||||
*
|
||||
* Copyright (C) 2008 FURUHASHI Sadayuki
|
||||
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
|
|
@ -75,6 +75,13 @@ class MessagePackTestFormat < Test::Unit::TestCase
|
|||
check 9, -(1<<63)
|
||||
end
|
||||
|
||||
it "double" do
|
||||
check 9, 1.0
|
||||
check 9, 0.1
|
||||
check 9, -0.1
|
||||
check 9, -1.0
|
||||
end
|
||||
|
||||
it "fixraw" do
|
||||
check_raw 1, 0
|
||||
check_raw 1, (1<<5)-1
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* MessagePack unpacking routine for Ruby
|
||||
* MessagePack for Ruby unpacking routine
|
||||
*
|
||||
* Copyright (C) 2008 FURUHASHI Sadayuki
|
||||
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -26,13 +26,13 @@ typedef struct {
|
|||
|
||||
|
||||
#define msgpack_unpack_struct(name) \
|
||||
struct msgpack_unpacker_##name
|
||||
struct msgpack_unpacker ## name
|
||||
|
||||
#define msgpack_unpack_func(ret, name) \
|
||||
ret msgpack_unpacker_##name
|
||||
ret msgpack_unpacker ## name
|
||||
|
||||
#define msgpack_unpack_callback(name) \
|
||||
template_callback_##name
|
||||
template_callback ## name
|
||||
|
||||
#define msgpack_unpack_object VALUE
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* MessagePack unpacking routine for Ruby
|
||||
* MessagePack for Ruby unpacking routine
|
||||
*
|
||||
* Copyright (C) 2008 FURUHASHI Sadayuki
|
||||
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue