Commit dd0f439e authored by Chris Toshok's avatar Chris Toshok

sneak this in here, a couple of std::string allocations that we don't need to make

parent 9305f720
...@@ -162,7 +162,7 @@ static Box* classobjGetattribute(Box* _cls, Box* _attr) { ...@@ -162,7 +162,7 @@ static Box* classobjGetattribute(Box* _cls, Box* _attr) {
} }
} }
Box* r = classLookup(cls, std::string(attr->s())); Box* r = classLookup(cls, attr->s());
if (!r) if (!r)
raiseExcHelper(AttributeError, "class %s has no attribute '%s'", cls->name->data(), attr->data()); raiseExcHelper(AttributeError, "class %s has no attribute '%s'", cls->name->data(), attr->data());
......
...@@ -223,7 +223,7 @@ SearchResult findModule(const std::string& name, const std::string& full_name, B ...@@ -223,7 +223,7 @@ SearchResult findModule(const std::string& name, const std::string& full_name, B
BoxedString* p = static_cast<BoxedString*>(_p); BoxedString* p = static_cast<BoxedString*>(_p);
joined_path.clear(); joined_path.clear();
llvm::sys::path::append(joined_path, std::string(p->s()), name); llvm::sys::path::append(joined_path, p->s(), name);
std::string dn(joined_path.str()); std::string dn(joined_path.str());
llvm::sys::path::append(joined_path, "__init__.py"); llvm::sys::path::append(joined_path, "__init__.py");
......
...@@ -128,7 +128,7 @@ Box* superGetattribute(Box* _s, Box* _attr) { ...@@ -128,7 +128,7 @@ Box* superGetattribute(Box* _s, Box* _attr) {
} }
} }
Box* r = typeLookup(s->cls, std::string(attr->s()), NULL); Box* r = typeLookup(s->cls, attr->s(), NULL);
// TODO implement this // TODO implement this
RELEASE_ASSERT(r, "should call the equivalent of objectGetattr here"); RELEASE_ASSERT(r, "should call the equivalent of objectGetattr here");
return processDescriptor(r, s, s->cls); return processDescriptor(r, s, s->cls);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment