]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Trim trailing whitespace and test on CI (GH-104275) (#108215)
authorHugo van Kemenade <hugovk@users.noreply.github.com>
Tue, 22 Aug 2023 09:57:31 +0000 (12:57 +0300)
committerGitHub <noreply@github.com>
Tue, 22 Aug 2023 09:57:31 +0000 (12:57 +0300)
24 files changed:
.github/CODEOWNERS
.github/workflows/lint.yml [new file with mode: 0644]
.pre-commit-config.yaml [new file with mode: 0644]
Lib/test/test_asyncio/test_runners.py
Lib/test/test_isinstance.py
Modules/_blake2/blake2module.h
Modules/_blake2/impl/blake2b-round.h
Modules/_blake2/impl/blake2s-load-xop.h
Modules/_blake2/impl/blake2s-round.h
Modules/_ctypes/darwin/dlfcn.h
Modules/_ctypes/libffi_osx/ffi.c
Modules/_ctypes/libffi_osx/include/ffi.h
Modules/_ctypes/libffi_osx/include/ffi_common.h
Modules/_ctypes/libffi_osx/include/fficonfig.h
Modules/_ctypes/libffi_osx/include/x86-ffitarget.h
Modules/_ctypes/libffi_osx/powerpc/ppc-ffi_darwin.c
Modules/_ctypes/libffi_osx/types.c
Modules/_ctypes/libffi_osx/x86/x86-ffi64.c
Modules/_ctypes/libffi_osx/x86/x86-ffi_darwin.c
Modules/_io/_iomodule.c
Modules/termios.c
PC/winreg.c
Tools/msi/bundle/bootstrap/pch.h
Tools/msi/bundle/bootstrap/resource.h

index 3d39e0c4ef0417ae3159d5850ffab22813e33243..99d701daa1d49abeade3c6938f1b410ba901c9f2 100644 (file)
@@ -5,7 +5,10 @@
 # https://git-scm.com/docs/gitignore#_pattern_format
 
 # GitHub
-.github/**                    @ezio-melotti
+.github/**                    @ezio-melotti @hugovk
+
+# pre-commit
+.pre-commit-config.yaml       @hugovk @AlexWaygood
 
 # asyncio
 **/*asyncio*                  @1st1 @asvetlov
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644 (file)
index 0000000..4481ea8
--- /dev/null
@@ -0,0 +1,22 @@
+name: Lint
+
+on: [push, pull_request, workflow_dispatch]
+
+permissions:
+  contents: read
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
+  cancel-in-progress: true
+
+jobs:
+  lint:
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-python@v4
+        with:
+          python-version: "3.x"
+      - uses: pre-commit/action@v3.0.0
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644 (file)
index 0000000..808622f
--- /dev/null
@@ -0,0 +1,7 @@
+repos:
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v4.4.0
+    hooks:
+      - id: check-yaml
+      - id: trailing-whitespace
+        types_or: [c, python, rst]
index 8a4aba6d470bacb5fe1ae752c85e8d0b7812597e..ae823cc7bec33e780d775a74a032c4517859df08 100644 (file)
@@ -441,7 +441,7 @@ class RunnerTests(BaseTest):
         with asyncio.Runner() as runner:
             with self.assertRaises(asyncio.CancelledError):
                 runner.run(coro())
-    
+
     def test_signal_install_not_supported_ok(self):
         # signal.signal() can throw if the "main thread" doensn't have signals enabled
         assert threading.current_thread() is threading.main_thread()
index a0974640bc11466394e5170fd6f3a8b60ba332f1..a8315a4a9123d9176f6e8f52f6076829ac594206 100644 (file)
@@ -8,7 +8,6 @@ import typing
 from test import support
 
 
-\f
 class TestIsInstanceExceptions(unittest.TestCase):
     # Test to make sure that an AttributeError when accessing the instance's
     # class's bases is masked.  This was actually a bug in Python 2.2 and
@@ -97,7 +96,7 @@ class TestIsInstanceExceptions(unittest.TestCase):
         class D: pass
         self.assertRaises(RuntimeError, isinstance, c, D)
 
-\f
+
 # These tests are similar to above, but tickle certain code paths in
 # issubclass() instead of isinstance() -- really PyObject_IsSubclass()
 # vs. PyObject_IsInstance().
@@ -147,7 +146,6 @@ class TestIsSubclassExceptions(unittest.TestCase):
         self.assertRaises(TypeError, issubclass, B, C())
 
 
-\f
 # meta classes for creating abstract classes and instances
 class AbstractClass(object):
     def __init__(self, bases):
@@ -179,7 +177,7 @@ class Super:
 
 class Child(Super):
     pass
-\f
+
 class TestIsInstanceIsSubclass(unittest.TestCase):
     # Tests to ensure that isinstance and issubclass work on abstract
     # classes and instances.  Before the 2.2 release, TypeErrors were
@@ -357,6 +355,6 @@ def blowstack(fxn, arg, compare_to):
         tuple_arg = (tuple_arg,)
         fxn(arg, tuple_arg)
 
-\f
+
 if __name__ == '__main__':
     unittest.main()
index aa8f281178eadce93a14fef5f2c0a7bdbd7e9c34..c8144ec9d48d299c300413645b9ae3cc763dfa82 100644 (file)
@@ -38,6 +38,6 @@
 #endif // HAVE_LIBB2
 
 // for secure_zero_memory(), store32(), store48(), and store64()
-#include "impl/blake2-impl.h" 
+#include "impl/blake2-impl.h"
 
 #endif // Py_BLAKE2MODULE_H
index cebc22550da4cd35890d8e04284b63f67400e35e..5b452c4d63babe8d5e8fe9dbb5219d7f9f9a0ef6 100644 (file)
@@ -62,7 +62,7 @@
   \
   row2l = _mm_roti_epi64(row2l, -24); \
   row2h = _mm_roti_epi64(row2h, -24); \
+
 #define G2(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h,b0,b1) \
   row1l = _mm_add_epi64(_mm_add_epi64(row1l, b0), row2l); \
   row1h = _mm_add_epi64(_mm_add_epi64(row1h, b1), row2h); \
@@ -81,7 +81,7 @@
   \
   row2l = _mm_roti_epi64(row2l, -63); \
   row2h = _mm_roti_epi64(row2h, -63); \
+
 #if defined(HAVE_SSSE3)
 #define DIAGONALIZE(row1l,row2l,row3l,row4l,row1h,row2h,row3h,row4h) \
   t0 = _mm_alignr_epi8(row2h, row2l, 8); \
index ac591a77d191a7e85d77ce92096e549b36ba55b6..14d9e7f7640672f531cfa92960afc9bf2baf7470 100644 (file)
@@ -166,7 +166,7 @@ buf = _mm_perm_epi8(t1, m3, _mm_set_epi32(TOB(3),TOB(2),TOB(1),TOB(7)) );
 #define LOAD_MSG_8_3(buf) \
 t0 = _mm_perm_epi8(m0, m2, _mm_set_epi32(TOB(6),TOB(1),TOB(0),TOB(0)) ); \
 buf = _mm_perm_epi8(t0, m3, _mm_set_epi32(TOB(3),TOB(2),TOB(5),TOB(4)) ); \
+
 #define LOAD_MSG_8_4(buf) \
 buf = _mm_perm_epi8(m0, m1, _mm_set_epi32(TOB(5),TOB(4),TOB(7),TOB(2)) );
 
index 1e2f2b7f59bd6c9c354306a1046d793c77f5667a..3af4be35bee5d4231639e277131eb6461101cfd9 100644 (file)
@@ -86,6 +86,6 @@
   LOAD_MSG_ ##r ##_4(buf4); \
   G2(row1,row2,row3,row4,buf4); \
   UNDIAGONALIZE(row1,row2,row3,row4); \
+
 #endif
 
index a2afc3eeb84794bd27ce338c839d731484c20b7c..a9915c3115ceb6b02ab2cc9df3647d3827b96de9 100644 (file)
@@ -1,7 +1,7 @@
 /*
 Copyright (c) 2002 Jorge Acereda  <jacereda@users.sourceforge.net> &
                    Peter O'Gorman <ogorman@users.sourceforge.net>
-                   
+
 Portions may be copyright others, see the AUTHORS file included with this
 distribution.
 
index 1776b795e2f83d8c997eabbde8348a5b3433835d..e16423aef19fc0d21c4a00580d59b3b1b4a4bd0d 100644 (file)
@@ -65,12 +65,12 @@ initialize_aggregate(
 
                arg->size               = ALIGN(arg->size, curalign);
                arg->size               += (*ptr)->size;
-               arg->alignment  = (arg->alignment > curalign) ? 
+               arg->alignment  = (arg->alignment > curalign) ?
                        arg->alignment : curalign;
 #else
                arg->size               = ALIGN(arg->size, (*ptr)->alignment);
                arg->size               += (*ptr)->size;
-               arg->alignment  = (arg->alignment > (*ptr)->alignment) ? 
+               arg->alignment  = (arg->alignment > (*ptr)->alignment) ?
                        arg->alignment : (*ptr)->alignment;
 #endif
 
@@ -130,10 +130,10 @@ struct_on_stack(
 // Arguments' ffi_type->alignment must be nonzero.
 ffi_status
 ffi_prep_cif(
-/*@out@*/ /*@partial@*/        ffi_cif*                cif, 
+/*@out@*/ /*@partial@*/        ffi_cif*                cif,
                                                ffi_abi                 abi,
-                                               unsigned int    nargs, 
-/*@dependent@*/ /*@out@*/ /*@partial@*/ ffi_type*      rtype, 
+                                               unsigned int    nargs,
+/*@dependent@*/ /*@out@*/ /*@partial@*/ ffi_type*      rtype,
 /*@dependent@*/                        ffi_type**              atypes)
 {
        unsigned int    bytes   = 0;
@@ -184,7 +184,7 @@ ffi_prep_cif(
                if ((*ptr)->alignment == 0)
                        return FFI_BAD_TYPEDEF;
 
-               /* Perform a sanity check on the argument type, do this 
+               /* Perform a sanity check on the argument type, do this
                check after the initialization.  */
                FFI_ASSERT_VALID_TYPE(*ptr);
 
index c104a5c89350b657df7703f8a70c062a31d64561..88c58fc43deb6bf63f805b4543c8fbfae42c1545 100644 (file)
@@ -199,9 +199,9 @@ typedef union {
 
 void
 ffi_raw_call(
-/*@dependent@*/        ffi_cif*        cif, 
-                               void            (*fn)(void), 
-/*@out@*/              void*           rvalue, 
+/*@dependent@*/        ffi_cif*        cif,
+                               void            (*fn)(void),
+/*@out@*/              void*           rvalue,
 /*@dependent@*/        ffi_raw*        avalue);
 
 void
@@ -225,9 +225,9 @@ ffi_raw_size(
        longs and doubles are followed by an empty 64-bit word. */
 void
 ffi_java_raw_call(
-/*@dependent@*/        ffi_cif*        cif, 
-                               void            (*fn)(void), 
-/*@out@*/              void*           rvalue, 
+/*@dependent@*/        ffi_cif*        cif,
+                               void            (*fn)(void),
+/*@out@*/              void*           rvalue,
 /*@dependent@*/        ffi_raw*        avalue);
 
 void
@@ -272,8 +272,8 @@ typedef struct ffi_raw_closure {
        ffi_cif*        cif;
 
 #if !FFI_NATIVE_RAW_API
-       /*      if this is enabled, then a raw closure has the same layout 
-               as a regular closure.  We use this to install an intermediate 
+       /*      if this is enabled, then a raw closure has the same layout
+               as a regular closure.  We use this to install an intermediate
                handler to do the transaltion, void** -> ffi_raw*. */
        void    (*translate_args)(ffi_cif*,void*,void**,void*);
        void*   this_closure;
@@ -303,17 +303,17 @@ ffi_prep_java_raw_closure(
 
 ffi_status
 ffi_prep_cif(
-/*@out@*/ /*@partial@*/                                        ffi_cif*                cif, 
+/*@out@*/ /*@partial@*/                                        ffi_cif*                cif,
                                                                                ffi_abi                 abi,
-                                                                               unsigned int    nargs, 
-/*@dependent@*/ /*@out@*/ /*@partial@*/        ffi_type*               rtype, 
+                                                                               unsigned int    nargs,
+/*@dependent@*/ /*@out@*/ /*@partial@*/        ffi_type*               rtype,
 /*@dependent@*/                                                        ffi_type**              atypes);
 
 void
 ffi_call(
-/*@dependent@*/        ffi_cif*        cif, 
-                               void            (*fn)(void), 
-/*@out@*/              void*           rvalue, 
+/*@dependent@*/        ffi_cif*        cif,
+                               void            (*fn)(void),
+/*@out@*/              void*           rvalue,
 /*@dependent@*/        void**          avalue);
 
 /* Useful for eliminating compiler warnings */
index 685a3580f4fe05e8e40178da03b3df0066fa804d..02b53c8600e012e83ea070268a25d901a7366580 100644 (file)
@@ -41,7 +41,7 @@ char* alloca();
 #      endif
 #endif
 
-/*#if defined(FFI_DEBUG) 
+/*#if defined(FFI_DEBUG)
 #include <stdio.h>
 #endif*/
 
@@ -65,7 +65,7 @@ ffi_type_test(
 #      define FFI_ASSERT_AT(x, f, l)   ((x) ? 0 : ffi_assert(#x, (f), (l)))
 #      define FFI_ASSERT_VALID_TYPE(x) ffi_type_test(x, __FILE__, __LINE__)
 #else
-#      define FFI_ASSERT(x) 
+#      define FFI_ASSERT(x)
 #      define FFI_ASSERT_AT(x, f, l)
 #      define FFI_ASSERT_VALID_TYPE(x)
 #endif // #ifdef FFI_DEBUG
index 217249071dcf48672199140a17805c387d5ee05a..dc0f4ecb26ee0bb29b16d79f04a129564a95dcf8 100644 (file)
@@ -1,4 +1,4 @@
-/*     Manually created fficonfig.h for Darwin on PowerPC or Intel 
+/*     Manually created fficonfig.h for Darwin on PowerPC or Intel
 
        This file is manually generated to do away with the need for autoconf and
        therefore make it easier to cross-compile and build fat binaries.
 #      define  SIZEOF_DOUBLE 8
 #      if __GNUC__ >= 4
 #              define  HAVE_LONG_DOUBLE 1
-#              define  SIZEOF_LONG_DOUBLE 16 
+#              define  SIZEOF_LONG_DOUBLE 16
 #      else
 #              undef   HAVE_LONG_DOUBLE
-#              define  SIZEOF_LONG_DOUBLE 8 
+#              define  SIZEOF_LONG_DOUBLE 8
 #      endif
 
 #elif defined(__ppc64__)
index 55c2b6c50cd90ceefee0fbd707e4d6ff73718d9b..df149eb14d78c7c1795aa9eedeb1b6fce313b024 100644 (file)
@@ -33,7 +33,7 @@
 #      define X86
 #endif
 
-#if defined(__x86_64__) 
+#if defined(__x86_64__)
 #      ifndef X86_64
 #              define X86_64
 #      endif
index 8953d5fda35818334123c592a031f4fad773a00d..875412a6766957f3287b804252fc9ce52b0e3147 100644 (file)
@@ -891,7 +891,7 @@ ffi_closure_helper_DARWIN(
                                        avalue[i] = alloca(arg_types[i]->size);
                                        ffi64_struct_to_ram_form(arg_types[i], (const char*)pgr,
                                                &gprSize, (const char*)pfr, &fprSize, &nf, avalue[i], NULL);
+
                                        ng      += gprSize / sizeof(long);
                                        pgr     += gprSize / sizeof(long);
                                        pfr     += (fprSize - savedFPRSize) / sizeof(double);
@@ -1479,7 +1479,7 @@ ffi64_struct_to_reg_form(
                                                                memcpy(&outGPRs[destGMarker],
                                                                        &inStruct[srcMarker], inType->size);
                                                }
-                                               
+
                                                srcMarker += inType->size;
                                                destGMarker += inType->size;
                                                i += inType->size - 1;
@@ -1561,7 +1561,7 @@ ffi64_struct_to_reg_form(
                        case FFI_TYPE_STRUCT:
                                recurseCount++;
                                ffi64_struct_to_reg_form(inType->elements[i],
-                                       inStruct, &srcMarker, &fprsUsed, outGPRs, 
+                                       inStruct, &srcMarker, &fprsUsed, outGPRs,
                                        &destGMarker, outFPRs, &destFMarker);
                                recurseCount--;
                                break;
index 44806aeeb75d37e47340a75e1e90db2f543fd7f9..761d223ff1498c737c249639da661d9cf0d3839b 100644 (file)
@@ -1,6 +1,6 @@
 /* -----------------------------------------------------------------------
    types.c - Copyright (c) 1996, 1998  Red Hat, Inc.
-   
+
    Predefined ffi_types needed by libffi.
 
    Permission is hereby granted, free of charge, to any person obtaining
@@ -85,7 +85,7 @@ FFI_INTEGRAL_TYPEDEF(sint64, 8, 8, FFI_TYPE_SINT64);
                FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
 #      endif
 
-#elif defined ARM || defined SH || defined POWERPC_AIX 
+#elif defined ARM || defined SH || defined POWERPC_AIX
 FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
 FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
 #elif defined POWERPC_DARWIN
index 8e7d016488029f56eaca5412485b4b0e9462a4c9..b8ae6e80231eceda6c12a1c9dda21684b2585e7d 100644 (file)
@@ -2,8 +2,8 @@
 
 /* -----------------------------------------------------------------------
    x86-ffi64.c - Copyright (c) 2002  Bo Thorsen <bo@suse.de>
-   
-   x86-64 Foreign Function Interface 
+
+   x86-64 Foreign Function Interface
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
@@ -208,7 +208,7 @@ classify_argument(
 
                case FFI_TYPE_STRUCT:
                {
-                       ffi_type**                              ptr; 
+                       ffi_type**                              ptr;
                        int                                             i;
                        enum x86_64_reg_class   subclasses[MAX_CLASSES];
                        const int                               UNITS_PER_WORD = 8;
index 706ea0f51206dc61724d3031102cd9bc13bface6..59e36158067394fbb8453f108014209e4aadb62a 100644 (file)
@@ -4,8 +4,8 @@
            Copyright (c) 2002  Ranjit Mathew
            Copyright (c) 2002  Bo Thorsen
            Copyright (c) 2002  Roger Sayle
-   
-   x86 Foreign Function Interface 
+
+   x86 Foreign Function Interface
 
    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
@@ -43,27 +43,27 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
     register void **p_argv;
     register char *argp;
     register ffi_type **p_arg;
-    
+
     argp = stack;
-    
+
     if (ecif->cif->flags == FFI_TYPE_STRUCT)
     {
         *(void **) argp = ecif->rvalue;
         argp += 4;
     }
-    
+
     p_argv = ecif->avalue;
-    
+
     for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
          i != 0;
          i--, p_arg++)
     {
         size_t z;
-        
+
         /* Align if necessary */
         if ((sizeof(int) - 1) & (unsigned) argp)
             argp = (char *) ALIGN(argp, sizeof(int));
-        
+
         z = (*p_arg)->size;
         if (z < sizeof(int))
         {
@@ -73,31 +73,31 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
                 case FFI_TYPE_SINT8:
                     *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
                     break;
-                    
+
                 case FFI_TYPE_UINT8:
                     *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
                     break;
-                    
+
                 case FFI_TYPE_SINT16:
                     *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
                     break;
-                    
+
                 case FFI_TYPE_UINT16:
                     *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
                     break;
-                    
+
                 case FFI_TYPE_SINT32:
                     *(signed int *) argp = (signed int)*(SINT32 *)(* p_argv);
                     break;
-                    
+
                 case FFI_TYPE_UINT32:
                     *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
                     break;
-                    
+
                 case FFI_TYPE_STRUCT:
                     *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
                     break;
-                    
+
                 default:
                     FFI_ASSERT(0);
             }
@@ -109,7 +109,7 @@ void ffi_prep_args(char *stack, extended_cif *ecif)
         p_argv++;
         argp += z;
     }
-    
+
     return;
 }
 
@@ -127,18 +127,18 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
         case FFI_TYPE_SINT8:
         case FFI_TYPE_SINT16:
 #endif
-            
+
         case FFI_TYPE_SINT64:
         case FFI_TYPE_FLOAT:
         case FFI_TYPE_DOUBLE:
         case FFI_TYPE_LONGDOUBLE:
             cif->flags = (unsigned) cif->rtype->type;
             break;
-            
+
         case FFI_TYPE_UINT64:
             cif->flags = FFI_TYPE_SINT64;
             break;
-            
+
 #ifndef X86
         case FFI_TYPE_STRUCT:
             if (cif->rtype->size == 1)
@@ -163,16 +163,16 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
             }
             break;
 #endif
-            
+
         default:
             cif->flags = FFI_TYPE_INT;
             break;
     }
-    
+
 #ifdef X86_DARWIN
     cif->bytes = (cif->bytes + 15) & ~0xF;
 #endif
-    
+
     return FFI_OK;
 }
 
@@ -188,23 +188,23 @@ extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), extended_cif *,
 void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
 {
     extended_cif ecif;
-    
+
     ecif.cif = cif;
     ecif.avalue = avalue;
-    
+
     /* If the return value is a struct and we don't have a return      */
     /* value address then we need to make one                  */
-    
-    if ((rvalue == NULL) && 
+
+    if ((rvalue == NULL) &&
         (cif->flags == FFI_TYPE_STRUCT))
     {
         ecif.rvalue = alloca(cif->rtype->size);
     }
     else
         ecif.rvalue = rvalue;
-    
-    
-    switch (cif->abi) 
+
+
+    switch (cif->abi)
     {
         case FFI_SYSV:
             ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue,
@@ -245,20 +245,20 @@ void *args;
     // our various things...
     ffi_cif       *cif;
     void         **arg_area;
-    
+
     cif         = closure->cif;
-    arg_area    = (void**) alloca (cif->nargs * sizeof (void*));  
-    
+    arg_area    = (void**) alloca (cif->nargs * sizeof (void*));
+
     /* this call will initialize ARG_AREA, such that each
-     * element in that array points to the corresponding 
+     * element in that array points to the corresponding
      * value on the stack; and if the function returns
      * a structure, it will re-set RESP to point to the
      * structure return address.  */
-    
+
     ffi_prep_incoming_args_SYSV(args, respp, arg_area, cif);
-    
+
     (closure->fun) (cif, *respp, arg_area, closure->user_data);
-    
+
     return cif->flags;
 }
 
@@ -270,35 +270,35 @@ ffi_prep_incoming_args_SYSV(char *stack, void **rvalue, void **avalue,
     register void **p_argv;
     register char *argp;
     register ffi_type **p_arg;
-    
+
     argp = stack;
-    
+
     if ( cif->flags == FFI_TYPE_STRUCT ) {
         *rvalue = *(void **) argp;
         argp += 4;
     }
-    
+
     p_argv = avalue;
-    
+
     for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
     {
         size_t z;
-        
+
         /* Align if necessary */
         if ((sizeof(int) - 1) & (unsigned) argp) {
             argp = (char *) ALIGN(argp, sizeof(int));
         }
-        
+
         z = (*p_arg)->size;
-        
+
         /* because we're little endian, this is what it turns into.   */
-        
+
         *p_argv = (void*) argp;
-        
+
         p_argv++;
         argp += z;
     }
-    
+
     return;
 }
 
@@ -325,15 +325,15 @@ ffi_prep_closure (ffi_closure* closure,
 {
        if (cif->abi != FFI_SYSV)
                return FFI_BAD_ABI;
-    
+
     FFI_INIT_TRAMPOLINE (&closure->tramp[0], \
                          &ffi_closure_SYSV,  \
                          (void*)closure);
-    
+
     closure->cif  = cif;
     closure->user_data = user_data;
     closure->fun  = fun;
-    
+
     return FFI_OK;
 }
 
@@ -349,32 +349,32 @@ ffi_prep_raw_closure_loc (ffi_raw_closure* closure,
                           void *codeloc)
 {
     int i;
-    
+
     FFI_ASSERT (cif->abi == FFI_SYSV);
-    
+
     // we currently don't support certain kinds of arguments for raw
     // closures.  This should be implemented by a separate assembly language
     // routine, since it would require argument processing, something we
     // don't do now for performance.
-    
+
     for (i = cif->nargs-1; i >= 0; i--)
     {
         FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_STRUCT);
         FFI_ASSERT (cif->arg_types[i]->type != FFI_TYPE_LONGDOUBLE);
     }
-    
-    
+
+
     FFI_INIT_TRAMPOLINE (&closure->tramp[0], &ffi_closure_raw_SYSV,
                          codeloc);
-    
+
     closure->cif  = cif;
     closure->user_data = user_data;
     closure->fun  = fun;
-    
+
     return FFI_OK;
 }
 
-static void 
+static void
 ffi_prep_args_raw(char *stack, extended_cif *ecif)
 {
     memcpy (stack, ecif->avalue, ecif->cif->bytes);
@@ -386,7 +386,7 @@ ffi_prep_args_raw(char *stack, extended_cif *ecif)
  */
 
 extern void
-ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned, 
+ffi_call_SYSV(void (*)(char *, extended_cif *), extended_cif *, unsigned,
               unsigned, unsigned *, void (*fn)());
 
 #ifdef X86_WIN32
@@ -400,23 +400,23 @@ ffi_raw_call(ffi_cif *cif, void (*fn)(), void *rvalue, ffi_raw *fake_avalue)
 {
     extended_cif ecif;
     void **avalue = (void **)fake_avalue;
-    
+
     ecif.cif = cif;
     ecif.avalue = avalue;
-    
+
     /* If the return value is a struct and we don't have a return      */
     /* value address then we need to make one                  */
-    
-    if ((rvalue == NULL) && 
+
+    if ((rvalue == NULL) &&
         (cif->rtype->type == FFI_TYPE_STRUCT))
     {
         ecif.rvalue = alloca(cif->rtype->size);
     }
     else
         ecif.rvalue = rvalue;
-    
-    
-    switch (cif->abi) 
+
+
+    switch (cif->abi)
     {
         case FFI_SYSV:
             ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes, cif->flags,
index a7b2e984310d1801059a3128ac25f0de6f9c6984..aa877174417cdd2dbcc8697bb46877942fc04ca6 100644 (file)
@@ -59,7 +59,7 @@ PyDoc_STRVAR(module_doc,
 "   I/O classes. open() uses the file's blksize (as obtained by os.stat) if\n"
 "   possible.\n"
     );
-\f
+
 
 /*
  * The main open() function
@@ -512,7 +512,7 @@ _io_open_code_impl(PyObject *module, PyObject *path)
 {
     return PyFile_OpenCodeObject(path);
 }
-\f
+
 /*
  * Private helpers for the io module.
  */
index fcc8f04267987091d1c9ee80d5e025c4166ce837..3900a6f0b898601fe89829d7f703eee23f4c1eda 100644 (file)
@@ -85,7 +85,7 @@ termios_tcgetattr_impl(PyObject *module, int fd)
     int r;
 
     Py_BEGIN_ALLOW_THREADS
-    r = tcgetattr(fd, &mode); 
+    r = tcgetattr(fd, &mode);
     Py_END_ALLOW_THREADS
     if (r == -1) {
         return PyErr_SetFromErrno(state->TermiosError);
@@ -372,7 +372,7 @@ termios_tcgetwinsize_impl(PyObject *module, int fd)
 #if defined(TIOCGWINSZ)
     termiosmodulestate *state = PyModule_GetState(module);
     struct winsize w;
-    int r; 
+    int r;
 
     Py_BEGIN_ALLOW_THREADS
     r = ioctl(fd, TIOCGWINSZ, &w);
index f668cf3c19cab5e6816d452c8998e5a956475a9f..940278194f4cf5e43415cf4537a2cc8a1c335b21 100644 (file)
@@ -564,7 +564,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
 {
     Py_ssize_t i,j;
     switch (typ) {
-        case REG_DWORD: 
+        case REG_DWORD:
             {
                 if (value != Py_None && !PyLong_Check(value)) {
                     return FALSE;
@@ -588,7 +588,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
                 *retDataSize = sizeof(DWORD);
                 break;
             }
-        case REG_QWORD: 
+        case REG_QWORD:
             {
                 if (value != Py_None && !PyLong_Check(value)) {
                     return FALSE;
index b0aa5111dabd0d1e09d4909c1d4318f2b6285bf6..6d0974b34c61e79f91c375cd25fbcf87e4612ce3 100644 (file)
@@ -5,7 +5,7 @@
 //   The license and further copyright text can be found in the file
 //   LICENSE.TXT at the root directory of the distribution.
 // </copyright>
-// 
+//
 // <summary>
 //    Precompiled header for standard bootstrapper application.
 // </summary>
index 53c03c319f091fe2bdcba3227f2594d48eea4da2..d951e651f6d20d7973182d386a89b888793ae4db 100644 (file)
@@ -14,7 +14,7 @@
 
 
 // Next default values for new objects
-// 
+//
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NEXT_RESOURCE_VALUE        102