Fix more Py_ patterns - preconfig, stat, slots, strings

- Fixed PyPreConfig → TyPreConfig
- Fixed _Py_PreInitializeFromPyArgv → _Ty_PreInitializeFromPyArgv
- Fixed struct _Py_stat_struct → struct _Ty_stat_struct
- Fixed _Py_fstat_noraise → _Ty_fstat_noraise
- Fixed _Py_NO_RETURN → _Ty_NO_RETURN
- Fixed Py_tp_* slot patterns (tp_free, tp_dealloc, tp_repr, etc.)
- Fixed Py_mod_* module slot patterns
- Fixed Py_MAX_SCRIPT_PATH_SIZE, Py_RTFLAGS_FORK
- Fixed _Py_DECLARE_STR, _Py_STR → _Ty_DECLARE_STR, _Ty_STR

Build progressing further.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-29 19:01:05 +00:00
parent 4880786dfa
commit a4901966cb
21 changed files with 151 additions and 151 deletions

View File

@@ -42,9 +42,9 @@ PyAPI_FUNC(TyStatus) TyWideStringList_Insert(PyWideStringList *list,
const wchar_t *item);
/* --- PyPreConfig ----------------------------------------------- */
/* --- TyPreConfig ----------------------------------------------- */
typedef struct PyPreConfig {
typedef struct TyPreConfig {
int _config_init; /* _PyConfigInitEnum value */
/* Parse Ty_PreInitializeFromBytesArgs() arguments?
@@ -122,10 +122,10 @@ typedef struct PyPreConfig {
/* Memory allocator: PYTHONMALLOC env var.
See PyMemAllocatorName for valid values. */
int allocator;
} PyPreConfig;
} TyPreConfig;
PyAPI_FUNC(void) TyPreConfig_InitPythonConfig(PyPreConfig *config);
PyAPI_FUNC(void) TyPreConfig_InitIsolatedConfig(PyPreConfig *config);
PyAPI_FUNC(void) TyPreConfig_InitPythonConfig(TyPreConfig *config);
PyAPI_FUNC(void) TyPreConfig_InitIsolatedConfig(TyPreConfig *config);
/* --- PyConfig ---------------------------------------------- */

View File

@@ -9,13 +9,13 @@ PyAPI_FUNC(int) Ty_FrozenMain(int argc, char **argv);
/* PEP 432 Multi-phase initialization API (Private while provisional!) */
PyAPI_FUNC(TyStatus) Ty_PreInitialize(
const PyPreConfig *src_config);
const TyPreConfig *src_config);
PyAPI_FUNC(TyStatus) Ty_PreInitializeFromBytesArgs(
const PyPreConfig *src_config,
const TyPreConfig *src_config,
Ty_ssize_t argc,
char **argv);
PyAPI_FUNC(TyStatus) Ty_PreInitializeFromArgs(
const PyPreConfig *src_config,
const TyPreConfig *src_config,
Ty_ssize_t argc,
wchar_t **argv);

View File

@@ -121,26 +121,26 @@ extern TyStatus _PyPreCmdline_SetConfig(
const _PyPreCmdline *cmdline,
PyConfig *config);
extern TyStatus _PyPreCmdline_Read(_PyPreCmdline *cmdline,
const PyPreConfig *preconfig);
const TyPreConfig *preconfig);
/* --- PyPreConfig ----------------------------------------------- */
/* --- TyPreConfig ----------------------------------------------- */
// Export for '_testembed' program
PyAPI_FUNC(void) _TyPreConfig_InitCompatConfig(PyPreConfig *preconfig);
PyAPI_FUNC(void) _TyPreConfig_InitCompatConfig(TyPreConfig *preconfig);
extern void _TyPreConfig_InitFromConfig(
PyPreConfig *preconfig,
TyPreConfig *preconfig,
const PyConfig *config);
extern TyStatus _TyPreConfig_InitFromPreConfig(
PyPreConfig *preconfig,
const PyPreConfig *config2);
extern TyObject* _TyPreConfig_AsDict(const PyPreConfig *preconfig);
extern void _TyPreConfig_GetConfig(PyPreConfig *preconfig,
TyPreConfig *preconfig,
const TyPreConfig *config2);
extern TyObject* _TyPreConfig_AsDict(const TyPreConfig *preconfig);
extern void _TyPreConfig_GetConfig(TyPreConfig *preconfig,
const PyConfig *config);
extern TyStatus _TyPreConfig_Read(PyPreConfig *preconfig,
extern TyStatus _TyPreConfig_Read(TyPreConfig *preconfig,
const _PyArgv *args);
extern TyStatus _TyPreConfig_Write(const PyPreConfig *preconfig);
extern TyStatus _TyPreConfig_Write(const TyPreConfig *preconfig);
/* --- PyConfig ---------------------------------------------- */

View File

@@ -67,7 +67,7 @@ extern void _TyGILState_Fini(TyInterpreterState *interp);
extern void _TyGC_DumpShutdownStats(TyInterpreterState *interp);
extern TyStatus _Ty_PreInitializeFromPyArgv(
const PyPreConfig *src_config,
const TyPreConfig *src_config,
const struct _PyArgv *args);
extern TyStatus _Ty_PreInitializeFromConfig(
const PyConfig *config,

View File

@@ -262,7 +262,7 @@ struct pyruntimestate {
_PyRWMutex stoptheworld_mutex;
struct _stoptheworld_state stoptheworld;
PyPreConfig preconfig;
TyPreConfig preconfig;
// Audit values must be preserved when Ty_Initialize()/Ty_Finalize()
// is called multiple times.