summaryrefslogtreecommitdiff
path: root/msgpack/unpack.h
diff options
context:
space:
mode:
authorNaoki INADA <inada-n@eagle>2009-06-24 01:54:47 +0900
committerNaoki INADA <inada-n@eagle>2009-06-24 01:54:47 +0900
commitde6afa5285c2f748d0c0c72b930fce77f68fcb85 (patch)
treec9cc84f4510881bbeb76c7013f5480c2919abb27 /msgpack/unpack.h
parentd32b48f98f09be8c829a8d48f8d7fcdb4bd0c61e (diff)
downloadmsgpack-python-de6afa5285c2f748d0c0c72b930fce77f68fcb85.tar.gz
Reduce memory footprint.
Diffstat (limited to 'msgpack/unpack.h')
-rw-r--r--msgpack/unpack.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/msgpack/unpack.h b/msgpack/unpack.h
index cc48d9c..12afb99 100644
--- a/msgpack/unpack.h
+++ b/msgpack/unpack.h
@@ -23,9 +23,7 @@
#define MSGPACK_MAX_STACK_SIZE (1024)
#include "unpack_define.h"
-using namespace std;
-
-typedef map<string, PyObject*> str_cach_t;
+typedef std::map<std::string, PyObject*> str_cach_t;
struct unpack_user {
str_cach_t strcache;
@@ -127,7 +125,7 @@ static inline int template_callback_map_item(unpack_user* u, msgpack_unpack_obje
static inline int template_callback_raw(unpack_user* u, const char* b, const char* p, unsigned int l, msgpack_unpack_object* o)
{
if (l < 16) {
- string s(p, l);
+ std::string s(p, l);
str_cach_t ::iterator it = u->strcache.find(s);
if (it != u->strcache.end()) {
*o = it->second;