bpo-29927: Remove duplicate BufferError init and unnecessary semicolo… · python/cpython@c431854 (original) (raw)

`@@ -2488,7 +2488,6 @@ _PyExc_Init(PyObject *bltinmod)

`

2488

2488

`PRE_INIT(ZeroDivisionError)

`

2489

2489

`PRE_INIT(SystemError)

`

2490

2490

`PRE_INIT(ReferenceError)

`

2491

``

`-

PRE_INIT(BufferError)

`

2492

2491

`PRE_INIT(MemoryError)

`

2493

2492

`PRE_INIT(BufferError)

`

2494

2493

`PRE_INIT(Warning)

`

`@@ -2504,22 +2503,22 @@ _PyExc_Init(PyObject *bltinmod)

`

2504

2503

`PRE_INIT(ResourceWarning)

`

2505

2504

``

2506

2505

`/* OSError subclasses */

`

2507

``

`-

PRE_INIT(ConnectionError);

`

2508

``

-

2509

``

`-

PRE_INIT(BlockingIOError);

`

2510

``

`-

PRE_INIT(BrokenPipeError);

`

2511

``

`-

PRE_INIT(ChildProcessError);

`

2512

``

`-

PRE_INIT(ConnectionAbortedError);

`

2513

``

`-

PRE_INIT(ConnectionRefusedError);

`

2514

``

`-

PRE_INIT(ConnectionResetError);

`

2515

``

`-

PRE_INIT(FileExistsError);

`

2516

``

`-

PRE_INIT(FileNotFoundError);

`

2517

``

`-

PRE_INIT(IsADirectoryError);

`

2518

``

`-

PRE_INIT(NotADirectoryError);

`

2519

``

`-

PRE_INIT(InterruptedError);

`

2520

``

`-

PRE_INIT(PermissionError);

`

2521

``

`-

PRE_INIT(ProcessLookupError);

`

2522

``

`-

PRE_INIT(TimeoutError);

`

``

2506

`+

PRE_INIT(ConnectionError)

`

``

2507

+

``

2508

`+

PRE_INIT(BlockingIOError)

`

``

2509

`+

PRE_INIT(BrokenPipeError)

`

``

2510

`+

PRE_INIT(ChildProcessError)

`

``

2511

`+

PRE_INIT(ConnectionAbortedError)

`

``

2512

`+

PRE_INIT(ConnectionRefusedError)

`

``

2513

`+

PRE_INIT(ConnectionResetError)

`

``

2514

`+

PRE_INIT(FileExistsError)

`

``

2515

`+

PRE_INIT(FileNotFoundError)

`

``

2516

`+

PRE_INIT(IsADirectoryError)

`

``

2517

`+

PRE_INIT(NotADirectoryError)

`

``

2518

`+

PRE_INIT(InterruptedError)

`

``

2519

`+

PRE_INIT(PermissionError)

`

``

2520

`+

PRE_INIT(ProcessLookupError)

`

``

2521

`+

PRE_INIT(TimeoutError)

`

2523

2522

``

2524

2523

`bdict = PyModule_GetDict(bltinmod);

`

2525

2524

`if (bdict == NULL)

`

`@@ -2566,7 +2565,6 @@ _PyExc_Init(PyObject *bltinmod)

`

2566

2565

`POST_INIT(ZeroDivisionError)

`

2567

2566

`POST_INIT(SystemError)

`

2568

2567

`POST_INIT(ReferenceError)

`

2569

``

`-

POST_INIT(BufferError)

`

2570

2568

`POST_INIT(MemoryError)

`

2571

2569

`POST_INIT(BufferError)

`

2572

2570

`POST_INIT(Warning)

`

`@@ -2588,43 +2586,43 @@ _PyExc_Init(PyObject *bltinmod)

`

2588

2586

` }

`

2589

2587

``

2590

2588

`/* OSError subclasses */

`

2591

``

`-

POST_INIT(ConnectionError);

`

2592

``

-

2593

``

`-

POST_INIT(BlockingIOError);

`

2594

``

`-

ADD_ERRNO(BlockingIOError, EAGAIN);

`

2595

``

`-

ADD_ERRNO(BlockingIOError, EALREADY);

`

2596

``

`-

ADD_ERRNO(BlockingIOError, EINPROGRESS);

`

2597

``

`-

ADD_ERRNO(BlockingIOError, EWOULDBLOCK);

`

2598

``

`-

POST_INIT(BrokenPipeError);

`

2599

``

`-

ADD_ERRNO(BrokenPipeError, EPIPE);

`

``

2589

`+

POST_INIT(ConnectionError)

`

``

2590

+

``

2591

`+

POST_INIT(BlockingIOError)

`

``

2592

`+

ADD_ERRNO(BlockingIOError, EAGAIN)

`

``

2593

`+

ADD_ERRNO(BlockingIOError, EALREADY)

`

``

2594

`+

ADD_ERRNO(BlockingIOError, EINPROGRESS)

`

``

2595

`+

ADD_ERRNO(BlockingIOError, EWOULDBLOCK)

`

``

2596

`+

POST_INIT(BrokenPipeError)

`

``

2597

`+

ADD_ERRNO(BrokenPipeError, EPIPE)

`

2600

2598

`#ifdef ESHUTDOWN

`

2601

``

`-

ADD_ERRNO(BrokenPipeError, ESHUTDOWN);

`

``

2599

`+

ADD_ERRNO(BrokenPipeError, ESHUTDOWN)

`

2602

2600

`#endif

`

2603

``

`-

POST_INIT(ChildProcessError);

`

2604

``

`-

ADD_ERRNO(ChildProcessError, ECHILD);

`

2605

``

`-

POST_INIT(ConnectionAbortedError);

`

2606

``

`-

ADD_ERRNO(ConnectionAbortedError, ECONNABORTED);

`

2607

``

`-

POST_INIT(ConnectionRefusedError);

`

2608

``

`-

ADD_ERRNO(ConnectionRefusedError, ECONNREFUSED);

`

2609

``

`-

POST_INIT(ConnectionResetError);

`

2610

``

`-

ADD_ERRNO(ConnectionResetError, ECONNRESET);

`

2611

``

`-

POST_INIT(FileExistsError);

`

2612

``

`-

ADD_ERRNO(FileExistsError, EEXIST);

`

2613

``

`-

POST_INIT(FileNotFoundError);

`

2614

``

`-

ADD_ERRNO(FileNotFoundError, ENOENT);

`

2615

``

`-

POST_INIT(IsADirectoryError);

`

2616

``

`-

ADD_ERRNO(IsADirectoryError, EISDIR);

`

2617

``

`-

POST_INIT(NotADirectoryError);

`

2618

``

`-

ADD_ERRNO(NotADirectoryError, ENOTDIR);

`

2619

``

`-

POST_INIT(InterruptedError);

`

2620

``

`-

ADD_ERRNO(InterruptedError, EINTR);

`

2621

``

`-

POST_INIT(PermissionError);

`

2622

``

`-

ADD_ERRNO(PermissionError, EACCES);

`

2623

``

`-

ADD_ERRNO(PermissionError, EPERM);

`

2624

``

`-

POST_INIT(ProcessLookupError);

`

2625

``

`-

ADD_ERRNO(ProcessLookupError, ESRCH);

`

2626

``

`-

POST_INIT(TimeoutError);

`

2627

``

`-

ADD_ERRNO(TimeoutError, ETIMEDOUT);

`

``

2601

`+

POST_INIT(ChildProcessError)

`

``

2602

`+

ADD_ERRNO(ChildProcessError, ECHILD)

`

``

2603

`+

POST_INIT(ConnectionAbortedError)

`

``

2604

`+

ADD_ERRNO(ConnectionAbortedError, ECONNABORTED)

`

``

2605

`+

POST_INIT(ConnectionRefusedError)

`

``

2606

`+

ADD_ERRNO(ConnectionRefusedError, ECONNREFUSED)

`

``

2607

`+

POST_INIT(ConnectionResetError)

`

``

2608

`+

ADD_ERRNO(ConnectionResetError, ECONNRESET)

`

``

2609

`+

POST_INIT(FileExistsError)

`

``

2610

`+

ADD_ERRNO(FileExistsError, EEXIST)

`

``

2611

`+

POST_INIT(FileNotFoundError)

`

``

2612

`+

ADD_ERRNO(FileNotFoundError, ENOENT)

`

``

2613

`+

POST_INIT(IsADirectoryError)

`

``

2614

`+

ADD_ERRNO(IsADirectoryError, EISDIR)

`

``

2615

`+

POST_INIT(NotADirectoryError)

`

``

2616

`+

ADD_ERRNO(NotADirectoryError, ENOTDIR)

`

``

2617

`+

POST_INIT(InterruptedError)

`

``

2618

`+

ADD_ERRNO(InterruptedError, EINTR)

`

``

2619

`+

POST_INIT(PermissionError)

`

``

2620

`+

ADD_ERRNO(PermissionError, EACCES)

`

``

2621

`+

ADD_ERRNO(PermissionError, EPERM)

`

``

2622

`+

POST_INIT(ProcessLookupError)

`

``

2623

`+

ADD_ERRNO(ProcessLookupError, ESRCH)

`

``

2624

`+

POST_INIT(TimeoutError)

`

``

2625

`+

ADD_ERRNO(TimeoutError, ETIMEDOUT)

`

2628

2626

``

2629

2627

`preallocate_memerrors();

`

2630

2628

``