projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix typos
[youtube-dl]
/
youtube_dl
/
swfinterp.py
diff --git
a/youtube_dl/swfinterp.py
b/youtube_dl/swfinterp.py
index 6f3c3bf956bf3191c5206db53af3071994b95d59..06c1d6cc1755ef022aa78967d4b651e21fd66618 100644
(file)
--- a/
youtube_dl/swfinterp.py
+++ b/
youtube_dl/swfinterp.py
@@
-4,8
+4,8
@@
import collections
import io
import zlib
import io
import zlib
+from .compat import compat_str
from .utils import (
from .utils import (
- compat_str,
ExtractorError,
struct_unpack,
)
ExtractorError,
struct_unpack,
)
@@
-170,6
+170,10
@@
class _Undefined(object):
def __hash__(self):
return 0
def __hash__(self):
return 0
+ def __str__(self):
+ return 'undefined'
+ __repr__ = __str__
+
undefined = _Undefined()
undefined = _Undefined()
@@
-685,7
+689,8
@@
class SWFInterpreter(object):
elif mname in _builtin_classes:
res = _builtin_classes[mname]
else:
elif mname in _builtin_classes:
res = _builtin_classes[mname]
else:
- # Assume unitialized
+ # Assume uninitialized
+ # TODO warn here
res = undefined
stack.append(res)
elif opcode == 97: # setproperty
res = undefined
stack.append(res)
elif opcode == 97: # setproperty
@@
-822,4
+827,3
@@
class SWFInterpreter(object):
avm_class.method_pyfunctions[func_name] = resfunc
return resfunc
avm_class.method_pyfunctions[func_name] = resfunc
return resfunc
-