mirror of
https://github.com/zrax/pycdc.git
synced 2026-06-23 11:34:07 +00:00
Improved output formatting, and added more instruction support
This commit is contained in:
parent
17f962e9f1
commit
7bb356d00a
8 changed files with 261 additions and 75 deletions
14
bytecode.cpp
14
bytecode.cpp
|
|
@ -231,20 +231,10 @@ void print_const(PycRef<PycObject> obj, PycModule* mod)
|
|||
case PycObject::TYPE_STRING:
|
||||
case PycObject::TYPE_STRINGREF:
|
||||
case PycObject::TYPE_INTERNED:
|
||||
if (mod->majorVer() == 3)
|
||||
printf("b'");
|
||||
else
|
||||
printf("'");
|
||||
OutputString(obj.cast<PycString>(), QS_Single);
|
||||
printf("'");
|
||||
OutputString(obj.cast<PycString>(), (mod->majorVer() == 3) ? 'b' : 0);
|
||||
break;
|
||||
case PycObject::TYPE_UNICODE:
|
||||
if (mod->majorVer() == 3)
|
||||
printf("'");
|
||||
else
|
||||
printf("u'");
|
||||
OutputString(obj.cast<PycString>(), QS_Single);
|
||||
printf("'");
|
||||
OutputString(obj.cast<PycString>(), (mod->majorVer() == 3) ? 0 : 'u');
|
||||
break;
|
||||
case PycObject::TYPE_TUPLE:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue