Remove unnecessary complexity and just use the base sequence type common

to both 1.0 and later versions in PyCodeObject.
This commit is contained in:
Michael Hansen
2018-04-28 11:37:13 -07:00
parent 1b01af45fd
commit 56e442605a
3 changed files with 5 additions and 27 deletions

View File

@@ -34,20 +34,6 @@ bool PycTuple::isEqual(PycRef<PycObject> obj) const
return true;
}
PycRef<PycTuple> PycTuple::fromList(const PycRef<PycList>& obj)
{
PycRef<PycTuple> tuple = new PycTuple;
if (!tuple)
return tuple;
tuple->m_values.reserve(obj->values().size());
for (PycList::value_t::const_iterator it = obj->values().begin();
it != obj->values().end(); ++it) {
tuple->m_values.push_back(*it);
}
return tuple;
}
/* PycList */
void PycList::load(PycData* stream, PycModule* mod)