mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-12 07:21:04 +00:00
manage to compile on windows
Use C++ compiler to build.
This commit is contained in:
parent
58eb7d0ce8
commit
ebe4c1f4bc
3 changed files with 4 additions and 3 deletions
|
|
@ -222,8 +222,8 @@ def unpackb(object packed, object object_hook=None, object list_hook=None, bint
|
|||
template_init(&ctx)
|
||||
ctx.user.use_list = use_list
|
||||
ctx.user.object_hook = ctx.user.list_hook = NULL
|
||||
ctx.user.encoding = enc
|
||||
ctx.user.unicode_errors = err
|
||||
ctx.user.encoding = <const_char_ptr>enc
|
||||
ctx.user.unicode_errors = <const_char_ptr>err
|
||||
if object_hook is not None:
|
||||
if not PyCallable_Check(object_hook):
|
||||
raise TypeError("object_hook must be a callable.")
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ static inline int msgpack_pack_write(msgpack_packer* pk, const char *data, size_
|
|||
|
||||
if (len + l > bs) {
|
||||
bs = (len + l) * 2;
|
||||
buf = realloc(buf, bs);
|
||||
buf = (char*)realloc(buf, bs);
|
||||
if (!buf) return -1;
|
||||
}
|
||||
memcpy(buf + len, data, l);
|
||||
|
|
|
|||
1
setup.py
Executable file → Normal file
1
setup.py
Executable file → Normal file
|
|
@ -53,6 +53,7 @@ msgpack_mod = Extension('msgpack._msgpack',
|
|||
sources=sources,
|
||||
libraries=libraries,
|
||||
include_dirs=['.'],
|
||||
language='c++',
|
||||
)
|
||||
del sources, libraries
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue