mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
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:
parent
80dc39e1dc
commit
cf6f23b0e3
20 changed files with 231 additions and 70 deletions
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
not present. */
|
||||
|
||||
#include "Python.h"
|
||||
#include "importdl.h"
|
||||
#include "pycore_importdl.h"
|
||||
|
||||
|
||||
const char *_PyImport_DynLoadFiletab[] = {NULL};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 */
|
1
Python/stdlib_module_names.h
generated
1
Python/stdlib_module_names.h
generated
|
@ -77,6 +77,7 @@ static const char* _Py_stdlib_module_names[] = {
|
|||
"_strptime",
|
||||
"_struct",
|
||||
"_symtable",
|
||||
"_sysconfig",
|
||||
"_thread",
|
||||
"_threading_local",
|
||||
"_tkinter",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue