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

arigo at codespeak.net arigo at codespeak.net
Wed Oct 4 20:04:26 CEST 2006


Author: arigo
Date: Wed Oct  4 20:04:25 2006
New Revision: 32887

Modified:
   pypy/dist/pypy/translator/js/commproxy.py
Log:
(arigo, pedronis)

Direct use of MochiKit to do the proper encoding.  That's the point :-)


Modified: pypy/dist/pypy/translator/js/commproxy.py
==============================================================================
--- pypy/dist/pypy/translator/js/commproxy.py	(original)
+++ pypy/dist/pypy/translator/js/commproxy.py	Wed Oct  4 20:04:25 2006
@@ -88,19 +88,7 @@
 %(class)s.prototype.%(method)s = function ( %(args)s ) {
     var data,str;
     data = %(data)s;
-    str = ""
-    for(i in data) {
-        if (!(data[i] == undefined)) {
-            if (str.length == 0) {
-                str += "?";
-            } else {
-                str += "&";
-            }
-            str += i + "=" + data[i].toString();
-        }
-    }
-    //logDebug('%(call)s'+str);
-    loadJSONDoc('%(call)s' + str).addCallback(callback);
+    loadJSONDoc('%(call)s', data).addCallback(callback);
 }
 """
 



More information about the Pypy-commit mailing list