mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
Python.h: Don't attempt to redefine NDEBUG if it's already defined.
Others: Remove redundant includes of assert.h.
This commit is contained in:
parent
b2c075bec4
commit
0d5dd68692
5 changed files with 2 additions and 4 deletions
|
|
@ -51,8 +51,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef Py_DEBUG
|
#ifndef Py_DEBUG
|
||||||
|
#ifndef NDEBUG
|
||||||
#define NDEBUG 1
|
#define NDEBUG 1
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "pyport.h"
|
#include "pyport.h"
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <sys/types.h> /* For size_t */
|
#include <sys/types.h> /* For size_t */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "regexpr.h"
|
#include "regexpr.h"
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
/* The original code blithely assumed that sizeof(short) == 2. Not
|
/* The original code blithely assumed that sizeof(short) == 2. Not
|
||||||
* always true. Original instances of "(short)x" were replaced by
|
* always true. Original instances of "(short)x" were replaced by
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "longintrepr.h"
|
#include "longintrepr.h"
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#define ABS(x) ((x) < 0 ? -(x) : (x))
|
#define ABS(x) ((x) < 0 ? -(x) : (x))
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "osdefs.h"
|
#include "osdefs.h"
|
||||||
#include <assert.h>
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "importdl.h"
|
#include "importdl.h"
|
||||||
#include "malloc.h" /* for alloca */
|
#include "malloc.h" /* for alloca */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue