[pypy-commit] pypy remove-remaining-smm: Make W_ComplexObject a W_Root.
Manuel Jacob
noreply at buildbot.pypy.org
Mon Feb 24 00:19:12 CET 2014
Author: Manuel Jacob
Branch: remove-remaining-smm
Changeset: r69314:9bad70f6ed72
Date: 2014-02-24 00:18 +0100
http://bitbucket.org/pypy/pypy/changeset/9bad70f6ed72/
Log: Make W_ComplexObject a W_Root.
diff --git a/pypy/objspace/std/complexobject.py b/pypy/objspace/std/complexobject.py
--- a/pypy/objspace/std/complexobject.py
+++ b/pypy/objspace/std/complexobject.py
@@ -1,11 +1,10 @@
import math
+from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
from pypy.objspace.std import newformat
from pypy.objspace.std.floatobject import _hash_float
-from pypy.objspace.std.model import registerimplementation, W_Object
-from pypy.objspace.std.register_all import register_all
from pypy.objspace.std.stdtypedef import GetSetProperty, StdTypeDef
from rpython.rlib import jit, rcomplex
from rpython.rlib.rarithmetic import intmask, r_ulonglong
@@ -15,7 +14,7 @@
from rpython.rlib.rstring import ParseStringError
-class W_AbstractComplexObject(W_Object):
+class W_AbstractComplexObject(W_Root):
__slots__ = ()
def is_w(self, space, w_other):
@@ -568,7 +567,6 @@
"""(A+Bj).conjugate() -> A-Bj"""
return space.newcomplex(self.realval, -self.imagval)
-registerimplementation(W_ComplexObject)
w_one = W_ComplexObject(1, 0)
@@ -640,6 +638,3 @@
conjugate = interp2app(W_ComplexObject.descr_conjugate),
)
-
-W_ComplexObject.typedef.registermethods(globals())
-register_all(vars(), globals())
More information about the pypy-commit
mailing list