Don't create special objects for NULL, just use NULL directly.

Also move null check into PycRef for nullable references.
This commit is contained in:
Michael Hansen
2017-07-05 16:36:04 -07:00
parent 1329626215
commit b9dd99d518
12 changed files with 160 additions and 155 deletions

View File

@@ -141,6 +141,11 @@ bool Pyc::IsCompareArg(int opcode)
void print_const(PycRef<PycObject> obj, PycModule* mod)
{
if (obj == NULL) {
fprintf(pyc_output, "<NULL>");
return;
}
switch (obj->type()) {
case PycObject::TYPE_STRING:
OutputString(obj.cast<PycString>(), (mod->majorVer() == 3) ? 'b' : 0);