Author: Wim Lavrijsen <[email protected]>
Branch: reflex-support
Changeset: r44358:e3f9b01f2aa1
Date: 2011-05-21 11:33 -0700
http://bitbucket.org/pypy/pypy/changeset/e3f9b01f2aa1/
Log: translation fixes: immutability consistency
diff --git a/pypy/module/cppyy/interp_cppyy.py
b/pypy/module/cppyy/interp_cppyy.py
--- a/pypy/module/cppyy/interp_cppyy.py
+++ b/pypy/module/cppyy/interp_cppyy.py
@@ -47,6 +47,7 @@
class W_CPPLibrary(Wrappable):
_immutable_ = True
+
def __init__(self, space, cdll):
self.cdll = cdll
self.space = space
@@ -174,6 +175,8 @@
class CPPFunction(CPPMethod):
+ _immutable_ = True
+
def call(self, cppthis, args_w):
if self.executor is None:
raise OperationError(self.space.w_TypeError,
self.space.wrap("return type not handled"))
@@ -188,6 +191,8 @@
class CPPConstructor(CPPMethod):
+ _immutable_=True
+
def call(self, cppthis, args_w):
assert not cppthis
newthis = capi.c_allocate(self.cpptype.handle)
@@ -202,6 +207,7 @@
class W_CPPOverload(Wrappable):
_immutable_ = True
_immutable_fields_ = ["func_name", "functions[*]"]
+
def __init__(self, space, func_name, functions):
self.space = space
self.func_name = func_name
@@ -241,7 +247,9 @@
class W_CPPDataMember(Wrappable):
+ _immutable_=True
_immutable_fields_ = ["converter", "offset"]
+
def __init__(self, space, cpptype, offset):
self.space = space
self.converter = converter.get_converter(self.space, cpptype)
@@ -266,6 +274,8 @@
class W_CPPStaticDataMember(W_CPPDataMember):
+ _immutable_=True
+
def is_static(self):
return self.space.w_True
@@ -286,6 +296,7 @@
class W_CPPType(Wrappable):
_immutable_fields_ = ["name", "handle"]
+
def __init__(self, space, name, handle):
self.space = space
self.name = name
@@ -381,6 +392,8 @@
class W_CPPInstance(Wrappable):
+ _immutable_fields_ = ["cppclass"]
+
def __init__(self, space, cppclass, rawobject):
self.space = space
self.cppclass = cppclass
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit