Browse Source

[swfinterp] Improve undefined representation

totalwebcasting
Philipp Hagemeister 10 years ago
parent
commit
f48d3e9bbc
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      youtube_dl/swfinterp.py

+ 5
- 0
youtube_dl/swfinterp.py View File

@ -170,6 +170,10 @@ class _Undefined(object):
def __hash__(self): def __hash__(self):
return 0 return 0
def __str__(self):
return 'undefined'
__repr__ = __str__
undefined = _Undefined() undefined = _Undefined()
@ -686,6 +690,7 @@ class SWFInterpreter(object):
res = _builtin_classes[mname] res = _builtin_classes[mname]
else: else:
# Assume unitialized # Assume unitialized
# TODO warn here
res = undefined res = undefined
stack.append(res) stack.append(res)
elif opcode == 97: # setproperty elif opcode == 97: # setproperty


Loading…
Cancel
Save