mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
fixes Visual C++ compatibility
This commit is contained in:
parent
05a7e4eb64
commit
568704ed22
8 changed files with 351 additions and 280 deletions
|
|
@ -19,8 +19,6 @@
|
|||
#define MSGPACK_ZONE_H__
|
||||
|
||||
#include "msgpack/sysdep.h"
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static int template_execute(template_context* ctx,
|
|||
|
||||
|
||||
static inline msgpack_object template_callback_root(unpack_user* u)
|
||||
{ msgpack_object o = {0}; return o; }
|
||||
{ msgpack_object o = {}; return o; }
|
||||
|
||||
static inline int template_callback_uint8(unpack_user* u, uint8_t d, msgpack_object* o)
|
||||
{ o->type = MSGPACK_OBJECT_POSITIVE_INTEGER; o->via.u64 = d; return 0; }
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ bool msgpack_vrefbuffer_init(msgpack_vrefbuffer* vbuf,
|
|||
vbuf->chunk_size = chunk_size;
|
||||
vbuf->ref_size = ref_size;
|
||||
|
||||
// glibcは72バイト以下のmallocが高速
|
||||
size_t nfirst = (sizeof(struct iovec) < 72/2) ?
|
||||
72 / sizeof(struct iovec) : 8;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue