Commits

Brian Kearns committed 59da76c

more no-op changes to reduce diff with py3k

Comments (0)

Files changed (3)

lib_pypy/_ctypes/function.py

                 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):
             self._check_argtypes_for_fastpath()
             return
 
-        
+
         # A callback into python
         if callable(argument) and not argsl:
             self.callable = argument
                         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:
     @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

lib_pypy/_ctypes/primitive.py

                 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):
             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
     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)
         if self.__bases__[0] is _SimpleCData:
             return output.value
         return output
-    
+
     def _sizeofinstances(self):
         return _rawffi.sizeof(self._type_)
 

lib_pypy/_sqlite3.py

             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()
         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)