mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
lang/c/msgpack: divide pack_raw() into pack_raw() and pack_raw_body()
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@74 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
parent
921b0ff62e
commit
1ad04b22d8
9 changed files with 28 additions and 139 deletions
|
|
@ -45,7 +45,8 @@ static void msgpack_pack_true(VALUE x);
|
|||
static void msgpack_pack_false(VALUE x);
|
||||
static void msgpack_pack_array(VALUE x, unsigned int n);
|
||||
static void msgpack_pack_map(VALUE x, unsigned int n);
|
||||
static void msgpack_pack_raw(VALUE x, const void* b, size_t l);
|
||||
static void msgpack_pack_raw(VALUE x, size_t l);
|
||||
static void msgpack_pack_raw_body(VALUE x, const void* b, size_t l);
|
||||
*/
|
||||
|
||||
#include "msgpack/pack_template.h"
|
||||
|
|
@ -123,7 +124,8 @@ static VALUE MessagePack_Float_to_msgpack(int argc, VALUE *argv, VALUE self)
|
|||
static VALUE MessagePack_String_to_msgpack(int argc, VALUE *argv, VALUE self)
|
||||
{
|
||||
ARG_BUFFER(out, argc, argv);
|
||||
msgpack_pack_raw(out, RSTRING_PTR(self), RSTRING_LEN(self));
|
||||
msgpack_pack_raw(out, RSTRING_LEN(self));
|
||||
msgpack_pack_raw_body(out, RSTRING_PTR(self), RSTRING_LEN(self));
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue