Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d5dd68

Browse files
committed
Python.h: Don't attempt to redefine NDEBUG if it's already defined.
Others: Remove redundant includes of assert.h.
1 parent b2c075b commit 0d5dd68

5 files changed

Lines changed: 2 additions & 4 deletions

File tree

Include/Python.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@
5151
#endif
5252

5353
#ifndef Py_DEBUG
54+
#ifndef NDEBUG
5455
#define NDEBUG 1
5556
#endif
57+
#endif
5658
#include <assert.h>
5759

5860
#include "pyport.h"

Modules/mpzmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include "Python.h"
1414

15-
#include <assert.h>
1615
#include <sys/types.h> /* For size_t */
1716

1817
/*

Modules/regexpr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
#include "Python.h"
3232
#include "regexpr.h"
33-
#include <assert.h>
3433

3534
/* The original code blithely assumed that sizeof(short) == 2. Not
3635
* always true. Original instances of "(short)x" were replaced by

Objects/longobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "Python.h"
77
#include "longintrepr.h"
88

9-
#include <assert.h>
109
#include <ctype.h>
1110

1211
#define ABS(x) ((x) < 0 ? -(x) : (x))

PC/import_nt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include "Python.h"
1010
#include "osdefs.h"
11-
#include <assert.h>
1211
#include <windows.h>
1312
#include "importdl.h"
1413
#include "malloc.h" /* for alloca */

0 commit comments

Comments
 (0)