Preview of Python 3.3 support

This commit is contained in:
Michael Hansen
2012-05-26 13:50:23 -07:00
parent 3fb340ccd8
commit 50657fb984
9 changed files with 311 additions and 190 deletions

View File

@@ -116,6 +116,12 @@ void PycModule::setVersion(unsigned int magic)
m_unicode = true;
break;
case MAGIC_3_3:
m_maj = 3;
m_min = 3;
m_unicode = true;
break;
/* Bad Magic detected */
default:
m_maj = -1;
@@ -137,6 +143,9 @@ void PycModule::loadFromFile(const char* filename)
}
in.get32(); // Timestamp -- who cares?
if (verCompare(3, 3) >= 0)
in.get32(); // Size parameter added in Python 3.3
m_code = LoadObject(&in, this).cast<PycCode>();
}