mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03: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
57
Include/internal/pycore_importdl.h
Normal file
57
Include/internal/pycore_importdl.h
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
#ifndef Py_INTERNAL_IMPORTDL_H
|
||||
#define Py_INTERNAL_IMPORTDL_H
|
||||
|
||||
#include "patchlevel.h" // PY_MAJOR_VERSION
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef Py_BUILD_CORE
|
||||
# error "this header requires Py_BUILD_CORE define"
|
||||
#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;
|
||||
|
||||
#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_SOABI "cp" Py_STRINGIFY(PY_MAJOR_VERSION) Py_STRINGIFY(PY_MINOR_VERSION) PYD_THREADING_TAG "-" PYD_PLATFORM_TAG
|
||||
#else
|
||||
# define PYD_SOABI "cp" Py_STRINGIFY(PY_MAJOR_VERSION) Py_STRINGIFY(PY_MINOR_VERSION) PYD_THREADING_TAG
|
||||
#endif
|
||||
|
||||
#define PYD_TAGGED_SUFFIX PYD_DEBUG_SUFFIX "." PYD_SOABI ".pyd"
|
||||
#define PYD_UNTAGGED_SUFFIX PYD_DEBUG_SUFFIX ".pyd"
|
||||
|
||||
#else
|
||||
typedef void (*dl_funcptr)(void);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !Py_INTERNAL_IMPORTDL_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue