From e963ad55d27ae0f39bec605f3a0f0362061c9655 Mon Sep 17 00:00:00 2001 From: Naoki INADA Date: Sun, 12 Jul 2009 09:29:11 +0900 Subject: Clean up --- msgpack/_msgpack.pyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'msgpack/_msgpack.pyx') diff --git a/msgpack/_msgpack.pyx b/msgpack/_msgpack.pyx index c455394..b407b92 100644 --- a/msgpack/_msgpack.pyx +++ b/msgpack/_msgpack.pyx @@ -163,7 +163,7 @@ cdef extern from "unpack.h": object template_data(template_context* ctx) -def unpacks(object packed_bytes): +def unpackb(object packed_bytes): """Unpack packed_bytes to object. Returns unpacked object.""" cdef const_char_ptr p = packed_bytes cdef template_context ctx @@ -176,10 +176,12 @@ def unpacks(object packed_bytes): else: return None +unpacks = unpackb + def unpack(object stream): """unpack from stream.""" packed = stream.read() - return unpacks(packed) + return unpackb(packed) cdef class UnpackIterator(object): cdef object unpacker -- cgit v1.2.1