summaryrefslogtreecommitdiff
path: root/c/pack.c
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:10:02 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:10:02 +0000
commita114f4a5a5136a24f46bb52ffef1d1f588ba94e1 (patch)
treeb5f5a3319ec12a90f9ee5296ce91410d7346ba68 /c/pack.c
parent81a771094d2c54437ca20c3c09a5c8f05f81d0c5 (diff)
downloadmsgpack-python-a114f4a5a5136a24f46bb52ffef1d1f588ba94e1.tar.gz
update pack/unpack routines
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@100 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'c/pack.c')
-rw-r--r--c/pack.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/c/pack.c b/c/pack.c
deleted file mode 100644
index f4787c0..0000000
--- a/c/pack.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * MessagePack packing routine for C
- *
- * Copyright (C) 2008 FURUHASHI Sadayuki
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "msgpack/pack.h"
-#include "msgpack/pack_define.h"
-#include <stdlib.h>
-
-
-#define msgpack_pack_inline_func(name) \
- void msgpack_pack_##name
-
-#define msgpack_pack_inline_func_cint(name) \
- void msgpack_pack_##name
-
-#define msgpack_pack_user msgpack_pack_t*
-
-#define msgpack_pack_append_buffer(user, buf, len) \
- (*(user)->callback)((user)->data, (const char*)buf, len)
-
-#include "msgpack/pack_template.h"
-
-msgpack_pack_t* msgpack_pack_new(void* data, msgpack_pack_append_buffer_t callback)
-{
- msgpack_pack_t* ctx = calloc(1, sizeof(msgpack_pack_t));
- if(!ctx) { return NULL; }
- ctx->data = data;
- ctx->callback = callback;
- return ctx;
-}
-
-void msgpack_pack_free(msgpack_pack_t* ctx)
-{
- free(ctx);
-}
-