mirror of
https://github.com/python/cpython.git
synced 2024-11-21 12:59:38 +01:00
gh-104922: remove PY_SSIZE_T_CLEAN (#106315)
This commit is contained in:
parent
8571b271e7
commit
d5bd32fb48
@ -7,7 +7,6 @@ Converted to C by Dmitry Vasiliev (dima at hlabs.spb.ru).
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallMethod()
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
/* _bz2 - Low-level Python interface to libbzip2. */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
|
@ -30,7 +30,6 @@ Copyright (c) Corporation for National Research Initiatives.
|
||||
|
||||
------------------------------------------------------------------------ */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_codecs.h" // _PyCodec_Lookup()
|
||||
|
||||
|
@ -101,7 +101,6 @@ bytes(cdata)
|
||||
#ifndef Py_BUILD_CORE_BUILTIN
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
// windows.h must be included before pycore internal headers
|
||||
|
@ -104,8 +104,6 @@ static const char PyCursesVersion[] = "2.2";
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_long.h" // _PyLong_GetZero()
|
||||
#include "pycore_structseq.h" // _PyStructSequence_NewType()
|
||||
|
@ -2,7 +2,6 @@
|
||||
/* DBM module using dictionary interface */
|
||||
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -11,8 +11,6 @@
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "expat.h"
|
||||
|
@ -3,7 +3,6 @@
|
||||
/* Author: Anthony Baxter, after dbmmodule.c */
|
||||
/* Doc strings: Mitch Chapman */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "gdbm.h"
|
||||
|
||||
|
@ -22,8 +22,6 @@
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_hashtable.h"
|
||||
#include "hashlib.h"
|
||||
|
@ -7,7 +7,6 @@
|
||||
Mostly written by Amaury Forgeot d'Arc
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "_iomodule.h"
|
||||
#include "pycore_pystate.h" // _PyInterpreterState_GET()
|
||||
|
@ -7,7 +7,6 @@
|
||||
Written by Amaury Forgeot d'Arc and Antoine Pitrou
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
#include "pycore_object.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* Author: Daniel Stutzbach */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_fileutils.h" // _Py_BEGIN_SUPPRESS_IPH
|
||||
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
|
||||
|
@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallMethod()
|
||||
#include "pycore_long.h" // _PyLong_GetOne()
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "pycore_object.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
Written by Amaury Forgeot d'Arc and Antoine Pitrou
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallMethod()
|
||||
#include "pycore_codecs.h" // _PyCodecInfo_GetIncrementalDecoder()
|
||||
|
@ -6,7 +6,6 @@
|
||||
Written by Steve Dower
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_fileutils.h" // _Py_BEGIN_SUPPRESS_IPH
|
||||
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
|
||||
|
@ -9,7 +9,6 @@ This software comes with no warranty. Use at your own risk.
|
||||
|
||||
******************************************************************/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_fileutils.h"
|
||||
|
||||
|
@ -5,8 +5,6 @@
|
||||
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
#ifndef MULTIPROCESSING_H
|
||||
#define MULTIPROCESSING_H
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h"
|
||||
#include "pythread.h"
|
||||
|
@ -2,8 +2,6 @@
|
||||
posixshmem - A Python extension that provides shm_open() and shm_unlink()
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
// for shm_open() and shm_unlink()
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef PYSQLITE_CONNECTION_H
|
||||
#define PYSQLITE_CONNECTION_H
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pythread.h"
|
||||
#include "structmember.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef PYSQLITE_CURSOR_H
|
||||
#define PYSQLITE_CURSOR_H
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
||||
#include "statement.h"
|
||||
|
@ -26,7 +26,6 @@
|
||||
#ifndef PSYCOPG_MICROPROTOCOLS_H
|
||||
#define PSYCOPG_MICROPROTOCOLS_H 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
|
||||
/** exported functions **/
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef PYSQLITE_MODULE_H
|
||||
#define PYSQLITE_MODULE_H
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
||||
#define LEGACY_TRANSACTION_CONTROL -1
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef PYSQLITE_ROW_H
|
||||
#define PYSQLITE_ROW_H
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
||||
typedef struct _Row
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef PYSQLITE_STATEMENT_H
|
||||
#define PYSQLITE_STATEMENT_H
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
||||
#include "connection.h"
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#ifndef PYSQLITE_UTIL_H
|
||||
#define PYSQLITE_UTIL_H
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pythread.h"
|
||||
#include "sqlite3.h"
|
||||
|
@ -38,8 +38,6 @@
|
||||
static const char copyright[] =
|
||||
" SRE 2.2.2 Copyright (c) 1997-2002 by Secret Labs AB ";
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_long.h" // _PyLong_GetZero()
|
||||
#include "pycore_moduleobject.h" // _PyModule_GetState()
|
||||
|
@ -25,8 +25,6 @@
|
||||
#endif
|
||||
#define OPENSSL_NO_DEPRECATED 1
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_weakref.h" // _PyWeakref_GET_REF()
|
||||
|
||||
|
@ -11,7 +11,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -7,8 +7,6 @@
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_moduleobject.h" // _PyModule_GetState()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
@ -1,9 +1,6 @@
|
||||
/* C Extension module to test all aspects of PEP-3118.
|
||||
Written by Stefan Krah. */
|
||||
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "parts.h"
|
||||
#include "clinic/float.c.h"
|
||||
|
||||
|
@ -3,8 +3,6 @@
|
||||
* APIs that parse and build arguments.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "parts.h"
|
||||
|
||||
static PyObject *
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "parts.h"
|
||||
#include <stddef.h> // for offsetof()
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
#include <stddef.h> // ptrdiff_t
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "parts.h"
|
||||
|
||||
static struct PyModuleDef *_testcapimodule = NULL; // set at initialization
|
||||
|
@ -17,8 +17,6 @@
|
||||
/* Always enable assertions */
|
||||
#undef NDEBUG
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "frameobject.h" // PyFrame_New
|
||||
#include "marshal.h" // PyMarshal_WriteLongToFile
|
||||
|
@ -5,8 +5,6 @@
|
||||
/* Always enable assertions */
|
||||
#undef NDEBUG
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
/* Always enable assertions */
|
||||
#undef NDEBUG
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "frameobject.h"
|
||||
#include "interpreteridobject.h" // _PyInterpreterID_LookUp()
|
||||
|
@ -21,7 +21,6 @@ Copyright (C) 1994 Steen Lumholt.
|
||||
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#ifndef Py_BUILD_CORE_BUILTIN
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
@ -3,8 +3,6 @@
|
||||
* DCE compatible Universally Unique Identifier library.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#if defined(HAVE_UUID_H)
|
||||
// AIX, FreeBSD, libuuid with pkgconf
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
|
@ -7,7 +7,6 @@
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallMethod()
|
||||
#include "pycore_moduleobject.h" // _PyModule_GetState()
|
||||
|
@ -57,8 +57,6 @@
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_long.h" // _PyLong_DigitValue
|
||||
#include "pycore_strhex.h" // _Py_strhex_bytes_with_sep()
|
||||
|
@ -7,7 +7,6 @@
|
||||
#ifndef _CJKCODECS_H_
|
||||
#define _CJKCODECS_H_
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "multibytecodec.h"
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Written by Hye-Shik Chang <perky@FreeBSD.org>
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "multibytecodec.h"
|
||||
|
@ -1,8 +1,5 @@
|
||||
|
||||
/* fcntl module */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef HAVE_SYS_FILE_H
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
#include "pycore_long.h" // _PyLong_GetZero()
|
||||
|
@ -22,7 +22,6 @@
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include "pycore_bytesobject.h" // _PyBytes_Find()
|
||||
#include "pycore_fileutils.h" // _Py_stat_struct
|
||||
|
@ -7,8 +7,6 @@
|
||||
of the compiler used. Different compilers define their own feature
|
||||
test macro, e.g. '_MSC_VER'. */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
|
||||
#ifdef __VXWORKS__
|
||||
|
@ -105,7 +105,6 @@ Local naming conventions:
|
||||
# pragma weak inet_aton
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_fileutils.h" // _Py_set_inheritable()
|
||||
#include "pycore_moduleobject.h" // _PyModule_GetState
|
||||
|
@ -16,8 +16,6 @@
|
||||
# define Py_BUILD_CORE_MODULE 1
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
/* Windows users: read Python's PCbuild\readme.txt */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "structmember.h" // PyMemberDef
|
||||
#include "zlib.h"
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* PyByteArray (bytearray) implementation */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_bytes_methods.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_bytes_methods.h"
|
||||
|
@ -1,7 +1,5 @@
|
||||
/* bytes object implementation */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_bytesobject.h" // _PyBytes_Find(), _PyBytes_Repeat()
|
||||
|
@ -4,7 +4,6 @@
|
||||
* Thanks go to Tim Peters and Michael Hudson for debugging.
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <stdbool.h>
|
||||
#include "pycore_abstract.h" // _PyObject_RealIsSubclass()
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* File object implementation (what's left of it -- see io.py) */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
#include "pycore_runtime.h" // _PyRuntime
|
||||
|
@ -1,6 +1,5 @@
|
||||
/* PickleBuffer object implementation */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include <stddef.h>
|
||||
|
||||
|
@ -38,7 +38,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_abstract.h" // _PyIndex_Check()
|
||||
#include "pycore_atomic_funcs.h" // _Py_atomic_size_get()
|
||||
|
@ -12,7 +12,6 @@
|
||||
|
||||
*/
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_object.h" // _PyObject_Init()
|
||||
#include "pycore_moduleobject.h"
|
||||
|
@ -1,7 +1,6 @@
|
||||
#ifndef PEGEN_H
|
||||
#define PEGEN_H
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include <Python.h>
|
||||
#include <pycore_ast.h>
|
||||
#include <pycore_token.h>
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
/* Tokenizer implementation */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
|
||||
|
@ -6,8 +6,6 @@
|
||||
Version 3 of this protocol properly supports circular links
|
||||
and sharing. */
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include "Python.h"
|
||||
#include "pycore_call.h" // _PyObject_CallNoArgs()
|
||||
#include "pycore_code.h" // _PyCode_New()
|
||||
|
Loading…
Reference in New Issue
Block a user