[pypy-svn] r31689 - pypy/dist/pypy/translator/js

fijal at codespeak.net fijal at codespeak.net
Sat Aug 26 18:36:12 CEST 2006


Author: fijal
Date: Sat Aug 26 18:36:09 2006
New Revision: 31689

Modified:
   pypy/dist/pypy/translator/js/commproxy.py
Log:
Small fix.


Modified: pypy/dist/pypy/translator/js/commproxy.py
==============================================================================
--- pypy/dist/pypy/translator/js/commproxy.py	(original)
+++ pypy/dist/pypy/translator/js/commproxy.py	Sat Aug 26 18:36:09 2006
@@ -87,7 +87,7 @@
     
     def render_method(self, method_name, method, ilasm):
         args, retval = method.args, method.retval.name
-        if args[-1].name != 'callback':
+        if len(args) == 0 or args[-1].name != 'callback':
             args.append(ArgDesc('callback', lambda : None))
         real_args = list(arg.name for arg in args)
         # FIXME: dirty JS here



More information about the Pypy-commit mailing list