mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
msgpack template: architecture specific endian conversion
This commit is contained in:
parent
0ae1965f6b
commit
7ce866ad7c
12 changed files with 154 additions and 219 deletions
|
|
@ -126,9 +126,9 @@ msgpack_unpack_func(int, _execute)(msgpack_unpack_struct(_context)* ctx, const c
|
|||
((unsigned int)*p & 0x1f)
|
||||
|
||||
#define PTR_CAST_8(ptr) (*(uint8_t*)ptr)
|
||||
#define PTR_CAST_16(ptr) msgpack_betoh16(*(uint16_t*)ptr)
|
||||
#define PTR_CAST_32(ptr) msgpack_betoh32(*(uint32_t*)ptr)
|
||||
#define PTR_CAST_64(ptr) msgpack_betoh64(*(uint64_t*)ptr)
|
||||
#define PTR_CAST_16(ptr) msgpack_be16(*(uint16_t*)ptr)
|
||||
#define PTR_CAST_32(ptr) msgpack_be32(*(uint32_t*)ptr)
|
||||
#define PTR_CAST_64(ptr) msgpack_be64(*(uint64_t*)ptr)
|
||||
|
||||
if(p == pe) { goto _out; }
|
||||
do {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue