[pypy-svn] rev 740 - in pypy/trunk/src/pypy: interpreter objspace/std

arigo at codespeak.net arigo at codespeak.net
Fri May 30 20:39:49 CEST 2003


Author: arigo
Date: Fri May 30 20:39:48 2003
New Revision: 740

Modified:
   pypy/trunk/src/pypy/interpreter/opcode.py
   pypy/trunk/src/pypy/interpreter/opcode_app.py
   pypy/trunk/src/pypy/objspace/std/usertype.py   (props changed)
Log:
enabled 'class' keyword

Modified: pypy/trunk/src/pypy/interpreter/opcode.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/opcode.py	(original)
+++ pypy/trunk/src/pypy/interpreter/opcode.py	Fri May 30 20:39:48 2003
@@ -314,8 +314,9 @@
     w_methodsdict = f.valuestack.pop()
     w_bases       = f.valuestack.pop()
     w_name        = f.valuestack.pop()
-    w_newclass = f.space.gethelper(appfile).call(
-        "build_class", [w_methodsdict, w_bases, w_name])
+    w_metaclass   = f.space.w_type  # XXX do the correct thing here
+    w_newclass    = f.space.call_function(w_metaclass,
+                                          w_name, w_bases, w_methodsdict)
     f.valuestack.push(w_newclass)
 
 def STORE_NAME(f, varindex):

Modified: pypy/trunk/src/pypy/interpreter/opcode_app.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/opcode_app.py	(original)
+++ pypy/trunk/src/pypy/interpreter/opcode_app.py	Fri May 30 20:39:48 2003
@@ -30,10 +30,6 @@
               "strings (deprecated), not %s"%(type(etype).__name__,)
     return etype, value, traceback
 
-def build_class(methods, bases, name):
-    import new
-    return new.classobj(name, bases, methods)
-
 def print_expr(x):
     import sys
     try:


More information about the Pypy-commit mailing list