Author: Brian Kearns <[email protected]>
Branch:
Changeset: r61981:59da76c514bb
Date: 2013-03-03 20:03 -0500
http://bitbucket.org/pypy/pypy/changeset/59da76c514bb/
Log: more no-op changes to reduce diff with py3k
diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py
--- a/lib_pypy/_ctypes/function.py
+++ b/lib_pypy/_ctypes/function.py
@@ -160,11 +160,11 @@
callable(restype)):
raise TypeError("restype must be a type, a callable, or None")
self._restype_ = restype
-
+
def _delrestype(self):
self._ptr = None
del self._restype_
-
+
restype = property(_getrestype, _setrestype, _delrestype)
def _geterrcheck(self):
@@ -224,7 +224,7 @@
self._check_argtypes_for_fastpath()
return
-
+
# A callback into python
if callable(argument) and not argsl:
self.callable = argument
@@ -277,7 +277,7 @@
for argtype, arg in zip(argtypes, args)]
return to_call(*args)
return f
-
+
def __call__(self, *args, **kwargs):
argtypes = self._argtypes_
if self.callable is not None:
@@ -577,7 +577,7 @@
@staticmethod
def _is_primitive(argtype):
return argtype.__bases__[0] is _SimpleCData
-
+
def _wrap_result(self, restype, result):
"""
Convert from low-level repr of the result to the high-level python
diff --git a/lib_pypy/_ctypes/primitive.py b/lib_pypy/_ctypes/primitive.py
--- a/lib_pypy/_ctypes/primitive.py
+++ b/lib_pypy/_ctypes/primitive.py
@@ -186,8 +186,8 @@
elif value is None:
value = 0
self._buffer[0] = value
- result.value = property(_getvalue, _setvalue)
-
+ result.value = property(_getvalue, _setvalue)
+
elif tp == 'u':
def _setvalue(self, val):
if isinstance(val, str):
@@ -271,7 +271,7 @@
def _as_ffi_pointer_(self, ffitype):
return as_ffi_pointer(self, ffitype)
result._as_ffi_pointer_ = _as_ffi_pointer_
-
+
return result
from_address = cdata_from_address
@@ -279,7 +279,7 @@
def from_param(self, value):
if isinstance(value, self):
return value
-
+
from_param_f = FROM_PARAM_BY_TYPE.get(self._type_)
if from_param_f:
res = from_param_f(self, value)
@@ -298,7 +298,7 @@
if self.__bases__[0] is _SimpleCData:
return output.value
return output
-
+
def _sizeofinstances(self):
return _rawffi.sizeof(self._type_)
diff --git a/lib_pypy/_sqlite3.py b/lib_pypy/_sqlite3.py
--- a/lib_pypy/_sqlite3.py
+++ b/lib_pypy/_sqlite3.py
@@ -964,8 +964,8 @@
raise self.con._get_exception(ret)
self.con._remember_statement(self)
if _check_remaining_sql(next_char.value):
- raise Warning("One and only one statement required: %r" % (
- next_char.value,))
+ raise Warning("One and only one statement required: %r" %
+ (next_char.value,))
# sql_char should remain alive until here
self._build_row_cast_map()
@@ -1036,7 +1036,8 @@
elif type(param) is buffer:
sqlite.sqlite3_bind_blob(self.statement, idx, str(param),
len(param), SQLITE_TRANSIENT)
else:
- raise InterfaceError("parameter type %s is not supported" %
str(type(param)))
+ raise InterfaceError("parameter type %s is not supported" %
+ str(type(param)))
def set_params(self, params):
ret = sqlite.sqlite3_reset(self.statement)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit