[pypy-commit] pypy sepcomp2: clean whitespace
amauryfa
noreply at buildbot.pypy.org
Wed Feb 22 23:24:33 CET 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: sepcomp2
Changeset: r52776:8f7ccec230cd
Date: 2012-02-22 23:23 +0100
http://bitbucket.org/pypy/pypy/changeset/8f7ccec230cd/
Log: clean whitespace
diff --git a/pypy/translator/c/exportinfo.py b/pypy/translator/c/exportinfo.py
--- a/pypy/translator/c/exportinfo.py
+++ b/pypy/translator/c/exportinfo.py
@@ -79,7 +79,7 @@
return args_s # accept any argument unmodified
signature_result = annotation(functype.TO.RESULT)
lltypeimpl = staticmethod(llimpl)
-
+
return llimpl
def make_llexternal_function(self, eci):
@@ -169,7 +169,7 @@
self.classdef = bookkeeper.getuniqueclassdef(self.cls)
self.classrepr = rtyper.getrepr(model.SomeInstance(self.classdef)
).lowleveltype
-
+
def make_controller(self, module):
"""Returns the class repr, but also installs a Controller that
will intercept all operations on the class."""
@@ -184,7 +184,7 @@
ClassController.new = new
if '__init__' in self.methods:
install_constructor(self.methods['__init__'])
-
+
def install_attribute(name):
def getter(self, obj):
return getattr(obj, 'inst_' + name)
@@ -237,7 +237,7 @@
class_info.make_exported_methods()
for meth_name, method in class_info.methods.items():
self.add_function(meth_name, method)
-
+
# annotate functions with signatures
for name, func_info in self.functions.items():
@@ -298,6 +298,5 @@
for name, class_info in self.classes.items():
structptr = class_info.make_controller(mod)
setattr(mod, name, structptr)
-
+
return mod
-
diff --git a/pypy/translator/c/test/test_export.py b/pypy/translator/c/test/test_export.py
--- a/pypy/translator/c/test/test_export.py
+++ b/pypy/translator/c/test/test_export.py
@@ -55,7 +55,7 @@
def f(x):
return x + 42.3
firstmodule = self.compile_module("first", f=f)
-
+
# call it from a function compiled in another module
@export()
def g():
@@ -72,7 +72,7 @@
def f2():
f(1.0)
firstmodule = self.compile_module("first", f=f, f2=f2)
-
+
@export()
def g():
return firstmodule.f(41)
@@ -89,7 +89,7 @@
def f(s, t, v):
return s.x + t.x + v
firstmodule = self.compile_module("first", f=f, Struct=Struct)
-
+
@export()
def g():
s = Struct(3.0)
@@ -116,7 +116,7 @@
assert we_are_translated()
return s.x + t.x + v
self.compile_module("first", f=f, Struct=Struct)
-
+
@export()
def g():
s = Struct(3.0)
@@ -161,4 +161,3 @@
return s.x
mod = self.compile_module("second", g=g)
assert mod.g() == 36.2
-
More information about the pypy-commit
mailing list