gh-88402: Add new sysconfig variables on Windows (GH-110049)

Co-authored-by: Filipe Laíns <filipe.lains@gmail.com>
This commit is contained in:
Sam Gross 2023-10-04 22:50:29 +00:00 committed by GitHub
parent 80dc39e1dc
commit cf6f23b0e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 231 additions and 70 deletions

View file

@ -5,7 +5,7 @@
#include <errno.h>
#include "Python.h"
#include "importdl.h"
#include "pycore_importdl.h"
#if defined(__hp9000s300)
#define FUNCNAME_PATTERN "_%.20s_%.200s"

View file

@ -4,7 +4,7 @@
#include "Python.h"
#include "pycore_interp.h" // _PyInterpreterState.dlopenflags
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "importdl.h"
#include "pycore_importdl.h"
#include <sys/types.h>
#include <sys/stat.h>

View file

@ -3,7 +3,7 @@
not present. */
#include "Python.h"
#include "importdl.h"
#include "pycore_importdl.h"
const char *_PyImport_DynLoadFiletab[] = {NULL};

View file

@ -5,30 +5,10 @@
#include "pycore_fileutils.h" // _Py_add_relfile()
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "importdl.h" // dl_funcptr
#include "pycore_importdl.h" // dl_funcptr
#include "patchlevel.h" // PY_MAJOR_VERSION
#include <windows.h>
#ifdef _DEBUG
#define PYD_DEBUG_SUFFIX "_d"
#else
#define PYD_DEBUG_SUFFIX ""
#endif
#ifdef Py_NOGIL
# define PYD_THREADING_TAG "t"
#else
# define PYD_THREADING_TAG ""
#endif
#ifdef PYD_PLATFORM_TAG
#define PYD_TAGGED_SUFFIX PYD_DEBUG_SUFFIX ".cp" Py_STRINGIFY(PY_MAJOR_VERSION) Py_STRINGIFY(PY_MINOR_VERSION) PYD_THREADING_TAG "-" PYD_PLATFORM_TAG ".pyd"
#else
#define PYD_TAGGED_SUFFIX PYD_DEBUG_SUFFIX ".cp" Py_STRINGIFY(PY_MAJOR_VERSION) Py_STRINGIFY(PY_MINOR_VERSION) PYD_THREADING_TAG ".pyd"
#endif
#define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd"
const char *_PyImport_DynLoadFiletab[] = {
PYD_TAGGED_SUFFIX,
PYD_UNTAGGED_SUFFIX,

View file

@ -17,7 +17,7 @@
#include "pycore_weakref.h" // _PyWeakref_GET_REF()
#include "marshal.h" // PyMarshal_ReadObjectFromString()
#include "importdl.h" // _PyImport_DynLoadFiletab
#include "pycore_importdl.h" // _PyImport_DynLoadFiletab
#include "pydtrace.h" // PyDTrace_IMPORT_FIND_LOAD_START_ENABLED()
#include <stdbool.h> // bool

View file

@ -15,7 +15,7 @@
*/
#ifdef HAVE_DYNAMIC_LOADING
#include "importdl.h"
#include "pycore_importdl.h"
#ifdef MS_WINDOWS
extern dl_funcptr _PyImport_FindSharedFuncptrWindows(const char *prefix,

View file

@ -1,29 +0,0 @@
#ifndef Py_IMPORTDL_H
#define Py_IMPORTDL_H
#ifdef __cplusplus
extern "C" {
#endif
extern const char *_PyImport_DynLoadFiletab[];
extern PyObject *_PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *);
typedef PyObject *(*PyModInitFunction)(void);
/* Max length of module suffix searched for -- accommodates "module.slb" */
#define MAXSUFFIXSIZE 12
#ifdef MS_WINDOWS
#include <windows.h>
typedef FARPROC dl_funcptr;
#else
typedef void (*dl_funcptr)(void);
#endif
#ifdef __cplusplus
}
#endif
#endif /* !Py_IMPORTDL_H */

View file

@ -77,6 +77,7 @@ static const char* _Py_stdlib_module_names[] = {
"_strptime",
"_struct",
"_symtable",
"_sysconfig",
"_thread",
"_threading_local",
"_tkinter",