[pypy-svn] r22621 - in pypy/dist/pypy/rpython/rctypes: . test
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Jan 24 22:45:49 CET 2006
Author: cfbolz
Date: Tue Jan 24 22:45:20 2006
New Revision: 22621
Modified:
pypy/dist/pypy/rpython/rctypes/implementation.py
pypy/dist/pypy/rpython/rctypes/interface.py
pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py
Log:
follow PEP 8 (and the style used in PyPy in general -- admittedly it is not
part of coding-guide.txt)
Modified: pypy/dist/pypy/rpython/rctypes/implementation.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/implementation.py (original)
+++ pypy/dist/pypy/rpython/rctypes/implementation.py Tue Jan 24 22:45:20 2006
@@ -16,11 +16,11 @@
c_char_p.annotator_type = None
c_char_p.ll_type = None
c_char_p.wrap_arg = staticmethod(
- lambda ll_type, arg_name: "RPyString_AsString(%s)" % arg_name )
-POINTER( c_char ).annotator_type = None
-POINTER( c_char ).ll_type = None
-POINTER( c_char ).wrap_arg = staticmethod(
- lambda ll_type, arg_name: "RPyString_AsString(%s)" % arg_name )
+ lambda ll_type, arg_name: "RPyString_AsString(%s)" % arg_name)
+POINTER(c_char).annotator_type = None
+POINTER(c_char).ll_type = None
+POINTER(c_char).wrap_arg = staticmethod(
+ lambda ll_type, arg_name: "RPyString_AsString(%s)" % arg_name)
class FunctionPointerTranslation(object):
Modified: pypy/dist/pypy/rpython/rctypes/interface.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/interface.py (original)
+++ pypy/dist/pypy/rpython/rctypes/interface.py Tue Jan 24 22:45:20 2006
@@ -5,9 +5,9 @@
except ImportError:
WinDLL = None
-cdll = _DLLS( CDLL )
+cdll = _DLLS(CDLL)
if WinDLL:
- windll = _DLLS( WinDLL )
+ windll = _DLLS(WinDLL)
"""
Modified: pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py
==============================================================================
--- pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py (original)
+++ pypy/dist/pypy/rpython/rctypes/test/test_rctypes.py Tue Jan 24 22:45:20 2006
@@ -66,7 +66,7 @@
class Test_structure:
def setup_class(cls):
- compile_c_module( [ py.path.local( "_rctypes_test.c" ) ], "_rctypes_test" )
+ compile_c_module([py.path.local("_rctypes_test.c")], "_rctypes_test")
def test_simple_as_extension_module(self):
import _rctypes_test as t0
@@ -76,14 +76,14 @@
def test_simple(self):
if sys.platform == "win32":
- dll = cdll.LoadLibrary( "_rctypes_test.pyd" )
+ dll = cdll.LoadLibrary("_rctypes_test.pyd")
else:
- dll = cdll.LoadLibrary( "_rctypes_test.so" )
+ dll = cdll.LoadLibrary("_rctypes_test.so")
in_point = tagpoint()
in_point.x = 42
in_point.y = 17
out_point = tagpoint()
- assert in_point.x + in_point.y == dll._testfunc_byval( in_point, byref( out_point ) )
+ assert in_point.x + in_point.y == dll._testfunc_byval(in_point, byref(out_point))
assert out_point.x == 42
assert out_point.y == 17
More information about the Pypy-commit
mailing list