bpo-35081: Add Include/internal/pycore_object.h (GH-10640)

Move _PyObject_GC_TRACK() and _PyObject_GC_UNTRACK() from
Include/objimpl.h to Include/internal/pycore_object.h.
This commit is contained in:
Victor Stinner 2018-11-21 22:27:47 +01:00 • committed by GitHub
parent aac1f81eef
commit bcda8f1d42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 93 additions and 50 deletions

View file

@ -9,6 +9,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_object.h"
#include "pycore_pystate.h"
#include "structmember.h"
#include "pythread.h"

View file

@ -1,4 +1,5 @@
#include "Python.h"
#include "pycore_object.h"
#include "structmember.h" /* for offsetof() */
#include "_iomodule.h"

View file

@ -2,6 +2,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_object.h"
#include "structmember.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>

View file

@ -10,6 +10,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_object.h"
#include "structmember.h"
#include "_iomodule.h"

View file

@ -2,6 +2,7 @@
#include "Python.h"
#include "structmember.h"
#include "pycore_accu.h"
#include "pycore_object.h"
#include "_iomodule.h"
/* Implementation note: the buffer is always at least one character longer

View file

@ -8,6 +8,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_object.h"
#include "structmember.h"
#include "_iomodule.h"

View file

@ -8,6 +8,7 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "pycore_object.h"
#ifdef MS_WINDOWS
@ -556,7 +557,7 @@ read_console_w(HANDLE handle, DWORD maxlen, DWORD *readlen) {
Py_BEGIN_ALLOW_THREADS
DWORD off = 0;
while (off < maxlen) {
DWORD n = (DWORD)-1;
DWORD n = (DWORD)-1;
DWORD len = min(maxlen - off, BUFSIZ);
SetLastError(0);
BOOL res = ReadConsoleW(handle, &buf[off], len, &n, NULL);

View file

@ -25,6 +25,7 @@
#include "Python.h"
#include "pycore_context.h"
#include "pycore_object.h"
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#include "frameobject.h" /* for PyFrame_ClearFreeList */