[pypy-commit] pypy win-ordinal: Wrap lines to 80 columns
amauryfa
noreply at buildbot.pypy.org
Thu Jun 7 00:37:59 CEST 2012
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: win-ordinal
Changeset: r55455:3437c0a0ded2
Date: 2012-06-07 00:37 +0200
http://bitbucket.org/pypy/pypy/changeset/3437c0a0ded2/
Log: Wrap lines to 80 columns
diff --git a/pypy/module/_ffi/interp_funcptr.py b/pypy/module/_ffi/interp_funcptr.py
--- a/pypy/module/_ffi/interp_funcptr.py
+++ b/pypy/module/_ffi/interp_funcptr.py
@@ -18,44 +18,46 @@
import os
if os.name == 'nt':
def _getfunc(space, CDLL, w_name, w_argtypes, w_restype):
- argtypes_w, argtypes, w_restype, restype = unpack_argtypes(space,
- w_argtypes,
- w_restype)
+ argtypes_w, argtypes, w_restype, restype = unpack_argtypes(
+ space, w_argtypes, w_restype)
if space.isinstance_w(w_name, space.w_str):
name = space.str_w(w_name)
try:
func = CDLL.cdll.getpointer(name, argtypes, restype,
- flags = CDLL.flags)
+ flags = CDLL.flags)
except KeyError:
- raise operationerrfmt(space.w_AttributeError,
- "No symbol %s found in library %s", name, CDLL.name)
+ raise operationerrfmt(
+ space.w_AttributeError,
+ "No symbol %s found in library %s", name, CDLL.name)
return W_FuncPtr(func, argtypes_w, w_restype)
elif space.isinstance_w(w_name, space.w_int):
ordinal = space.int_w(w_name)
try:
- func = CDLL.cdll.getpointer_by_ordinal(ordinal, argtypes, restype,
- flags = CDLL.flags)
+ func = CDLL.cdll.getpointer_by_ordinal(
+ ordinal, argtypes, restype,
+ flags = CDLL.flags)
except KeyError:
- raise operationerrfmt(space.w_AttributeError,
- "No ordinal %d found in library %s", ordinal, CDLL.name)
+ raise operationerrfmt(
+ space.w_AttributeError,
+ "No ordinal %d found in library %s", ordinal, CDLL.name)
return W_FuncPtr(func, argtypes_w, w_restype)
else:
- raise OperationError(space.w_TypeError,
- space.wrap('function name must be a string or integer'))
+ raise OperationError(space.w_TypeError, space.wrap(
+ 'function name must be a string or integer'))
else:
@unwrap_spec(name=str)
def _getfunc(space, CDLL, w_name, w_argtypes, w_restype):
name = space.str_w(w_name)
- argtypes_w, argtypes, w_restype, restype = unpack_argtypes(space,
- w_argtypes,
- w_restype)
+ argtypes_w, argtypes, w_restype, restype = unpack_argtypes(
+ space, w_argtypes, w_restype)
try:
func = CDLL.cdll.getpointer(name, argtypes, restype,
- flags = CDLL.flags)
+ flags = CDLL.flags)
except KeyError:
- raise operationerrfmt(space.w_AttributeError,
- "No symbol %s found in library %s", name, CDLL.name)
+ raise operationerrfmt(
+ space.w_AttributeError,
+ "No symbol %s found in library %s", name, CDLL.name)
return W_FuncPtr(func, argtypes_w, w_restype)
@@ -323,8 +325,9 @@
address_as_uint = rffi.cast(lltype.Unsigned,
self.cdll.getaddressindll(name))
except KeyError:
- raise operationerrfmt(space.w_ValueError,
- "No symbol %s found in library %s", name, self.name)
+ raise operationerrfmt(
+ space.w_ValueError,
+ "No symbol %s found in library %s", name, self.name)
return space.wrap(address_as_uint)
@unwrap_spec(name='str_or_None', mode=int)
More information about the pypy-commit
mailing list