diff --git a/Include/cpython/ceval.h b/Include/cpython/ceval.h index 62fc748..37cb35b 100644 --- a/Include/cpython/ceval.h +++ b/Include/cpython/ceval.h @@ -29,7 +29,7 @@ PyAPI_FUNC(int) _TyEval_SliceIndexNotNone(TyObject *, Ty_ssize_t *); typedef struct { FILE* perf_map; - PyThread_type_lock map_lock; + TyThread_type_lock map_lock; } PerfMapState; PyAPI_FUNC(int) PyUnstable_PerfMapState_Init(void); diff --git a/Include/cpython/funcobject.h b/Include/cpython/funcobject.h index dd4a021..2a1eba8 100644 --- a/Include/cpython/funcobject.h +++ b/Include/cpython/funcobject.h @@ -82,43 +82,43 @@ PyAPI_FUNC(int) TyFunction_SetClosure(TyObject *, TyObject *); PyAPI_FUNC(TyObject *) TyFunction_GetAnnotations(TyObject *); PyAPI_FUNC(int) TyFunction_SetAnnotations(TyObject *, TyObject *); -#define _PyFunction_CAST(func) \ +#define _TyFunction_CAST(func) \ (assert(TyFunction_Check(func)), _Py_CAST(PyFunctionObject*, func)) /* Static inline functions for direct access to these values. Type checks are *not* done, so use with care. */ static inline TyObject* TyFunction_GET_CODE(TyObject *func) { - return _PyFunction_CAST(func)->func_code; + return _TyFunction_CAST(func)->func_code; } #define TyFunction_GET_CODE(func) TyFunction_GET_CODE(_TyObject_CAST(func)) static inline TyObject* TyFunction_GET_GLOBALS(TyObject *func) { - return _PyFunction_CAST(func)->func_globals; + return _TyFunction_CAST(func)->func_globals; } #define TyFunction_GET_GLOBALS(func) TyFunction_GET_GLOBALS(_TyObject_CAST(func)) static inline TyObject* TyFunction_GET_MODULE(TyObject *func) { - return _PyFunction_CAST(func)->func_module; + return _TyFunction_CAST(func)->func_module; } #define TyFunction_GET_MODULE(func) TyFunction_GET_MODULE(_TyObject_CAST(func)) static inline TyObject* TyFunction_GET_DEFAULTS(TyObject *func) { - return _PyFunction_CAST(func)->func_defaults; + return _TyFunction_CAST(func)->func_defaults; } #define TyFunction_GET_DEFAULTS(func) TyFunction_GET_DEFAULTS(_TyObject_CAST(func)) static inline TyObject* TyFunction_GET_KW_DEFAULTS(TyObject *func) { - return _PyFunction_CAST(func)->func_kwdefaults; + return _TyFunction_CAST(func)->func_kwdefaults; } #define TyFunction_GET_KW_DEFAULTS(func) TyFunction_GET_KW_DEFAULTS(_TyObject_CAST(func)) static inline TyObject* TyFunction_GET_CLOSURE(TyObject *func) { - return _PyFunction_CAST(func)->func_closure; + return _TyFunction_CAST(func)->func_closure; } #define TyFunction_GET_CLOSURE(func) TyFunction_GET_CLOSURE(_TyObject_CAST(func)) static inline TyObject* TyFunction_GET_ANNOTATIONS(TyObject *func) { - return _PyFunction_CAST(func)->func_annotations; + return _TyFunction_CAST(func)->func_annotations; } #define TyFunction_GET_ANNOTATIONS(func) TyFunction_GET_ANNOTATIONS(_TyObject_CAST(func)) diff --git a/Include/cpython/object.h b/Include/cpython/object.h index eaca70f..48a5ddf 100644 --- a/Include/cpython/object.h +++ b/Include/cpython/object.h @@ -12,7 +12,7 @@ PyAPI_FUNC(void) _Ty_ForgetReference(TyObject *op); PyAPI_FUNC(Ty_ssize_t) _Ty_GetGlobalRefTotal(void); # define _Ty_GetRefTotal() _Ty_GetGlobalRefTotal() PyAPI_FUNC(Ty_ssize_t) _Ty_GetLegacyRefTotal(void); -PyAPI_FUNC(Ty_ssize_t) _TyInterpreterState_GetRefTotal(PyInterpreterState *); +PyAPI_FUNC(Ty_ssize_t) _TyInterpreterState_GetRefTotal(TyInterpreterState *); #endif @@ -38,7 +38,7 @@ PyAPI_FUNC(Ty_ssize_t) _TyInterpreterState_GetRefTotal(PyInterpreterState *); */ typedef struct _Ty_Identifier { const char* string; - // Index in PyInterpreterState.unicode.ids.array. It is process-wide + // Index in TyInterpreterState.unicode.ids.array. It is process-wide // unique and must be initialized to -1. Ty_ssize_t index; // Hidden PyMutex struct for non free-threaded build. diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h index 8cca49a..c1f9d85 100644 --- a/Include/cpython/pyerrors.h +++ b/Include/cpython/pyerrors.h @@ -12,7 +12,7 @@ typedef struct { PyException_HEAD -} PyBaseExceptionObject; +} TyBaseExceptionObject; typedef struct { PyException_HEAD diff --git a/Include/cpython/pylifecycle.h b/Include/cpython/pylifecycle.h index 90bde21..92bc3f1 100644 --- a/Include/cpython/pylifecycle.h +++ b/Include/cpython/pylifecycle.h @@ -86,4 +86,4 @@ PyAPI_FUNC(TyStatus) Ty_NewInterpreterFromConfig( typedef void (*atexit_datacallbackfunc)(void *); PyAPI_FUNC(int) PyUnstable_AtExit( - PyInterpreterState *, atexit_datacallbackfunc, void *); + TyInterpreterState *, atexit_datacallbackfunc, void *); diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index be4b9d0..1af3208 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -5,8 +5,8 @@ /* private interpreter helpers */ -PyAPI_FUNC(int) _TyInterpreterState_RequiresIDRef(PyInterpreterState *); -PyAPI_FUNC(void) _TyInterpreterState_RequireIDRef(PyInterpreterState *, int); +PyAPI_FUNC(int) _TyInterpreterState_RequiresIDRef(TyInterpreterState *); +PyAPI_FUNC(void) _TyInterpreterState_RequireIDRef(TyInterpreterState *, int); /* State unique per thread */ @@ -68,7 +68,7 @@ struct _ts { TyThreadState *prev; TyThreadState *next; - PyInterpreterState *interp; + TyInterpreterState *interp; /* The global instrumentation version in high bits, plus flags indicating when to break out of the interpreter loop in lower bits. See details in @@ -187,7 +187,7 @@ struct _ts { These fields should not be accessed directly outside of init. This is indicated by an underscore prefix on the field names. - All other PyInterpreterState pointer fields are populated when + All other TyInterpreterState pointer fields are populated when needed and default to NULL. */ // Note some fields do not have a leading underscore for backward @@ -245,10 +245,10 @@ PyAPI_FUNC(TyObject*) _PyThread_CurrentFrames(void); /* Routines for advanced debuggers, requested by David Beazley. Don't use unless you know what you are doing! */ -PyAPI_FUNC(PyInterpreterState *) TyInterpreterState_Main(void); -PyAPI_FUNC(PyInterpreterState *) TyInterpreterState_Head(void); -PyAPI_FUNC(PyInterpreterState *) TyInterpreterState_Next(PyInterpreterState *); -PyAPI_FUNC(TyThreadState *) TyInterpreterState_ThreadHead(PyInterpreterState *); +PyAPI_FUNC(TyInterpreterState *) TyInterpreterState_Main(void); +PyAPI_FUNC(TyInterpreterState *) TyInterpreterState_Head(void); +PyAPI_FUNC(TyInterpreterState *) TyInterpreterState_Next(TyInterpreterState *); +PyAPI_FUNC(TyThreadState *) TyInterpreterState_ThreadHead(TyInterpreterState *); PyAPI_FUNC(TyThreadState *) TyThreadState_Next(TyThreadState *); PyAPI_FUNC(void) TyThreadState_DeleteCurrent(void); @@ -257,7 +257,7 @@ PyAPI_FUNC(void) TyThreadState_DeleteCurrent(void); typedef TyObject* (*_PyFrameEvalFunction)(TyThreadState *tstate, struct _PyInterpreterFrame *, int); PyAPI_FUNC(_PyFrameEvalFunction) _TyInterpreterState_GetEvalFrameFunc( - PyInterpreterState *interp); + TyInterpreterState *interp); PyAPI_FUNC(void) _TyInterpreterState_SetEvalFrameFunc( - PyInterpreterState *interp, + TyInterpreterState *interp, _PyFrameEvalFunction eval_frame); diff --git a/Include/cpython/pytime.h b/Include/cpython/pytime.h index 8fb547e..17372c3 100644 --- a/Include/cpython/pytime.h +++ b/Include/cpython/pytime.h @@ -1,4 +1,4 @@ -// PyTime_t C API: see Doc/c-api/time.rst for the documentation. +// TyTime_t C API: see Doc/c-api/time.rst for the documentation. #ifndef Ty_LIMITED_API #ifndef Ty_PYTIME_H @@ -7,18 +7,18 @@ extern "C" { #endif -typedef int64_t PyTime_t; +typedef int64_t TyTime_t; #define PyTime_MIN INT64_MIN #define PyTime_MAX INT64_MAX -PyAPI_FUNC(double) PyTime_AsSecondsDouble(PyTime_t t); -PyAPI_FUNC(int) PyTime_Monotonic(PyTime_t *result); -PyAPI_FUNC(int) PyTime_PerfCounter(PyTime_t *result); -PyAPI_FUNC(int) PyTime_Time(PyTime_t *result); +PyAPI_FUNC(double) PyTime_AsSecondsDouble(TyTime_t t); +PyAPI_FUNC(int) PyTime_Monotonic(TyTime_t *result); +PyAPI_FUNC(int) PyTime_PerfCounter(TyTime_t *result); +PyAPI_FUNC(int) PyTime_Time(TyTime_t *result); -PyAPI_FUNC(int) PyTime_MonotonicRaw(PyTime_t *result); -PyAPI_FUNC(int) PyTime_PerfCounterRaw(PyTime_t *result); -PyAPI_FUNC(int) PyTime_TimeRaw(PyTime_t *result); +PyAPI_FUNC(int) PyTime_MonotonicRaw(TyTime_t *result); +PyAPI_FUNC(int) PyTime_PerfCounterRaw(TyTime_t *result); +PyAPI_FUNC(int) PyTime_TimeRaw(TyTime_t *result); #ifdef __cplusplus } diff --git a/Include/internal/pycore_atexit.h b/Include/internal/pycore_atexit.h index e1a179a..bf48d98 100644 --- a/Include/internal/pycore_atexit.h +++ b/Include/internal/pycore_atexit.h @@ -21,7 +21,7 @@ extern "C" { // Export for '_interpchannels' shared extension PyAPI_FUNC(int) _Py_AtExit( - PyInterpreterState *interp, + TyInterpreterState *interp, atexit_datacallbackfunc func, void *data); diff --git a/Include/internal/pycore_brc.h b/Include/internal/pycore_brc.h index 737faab..6fc6a1d 100644 --- a/Include/internal/pycore_brc.h +++ b/Include/internal/pycore_brc.h @@ -54,9 +54,9 @@ void _Ty_brc_init_thread(TyThreadState *tstate); void _Ty_brc_remove_thread(TyThreadState *tstate); // Initialize per-interpreter state -void _Ty_brc_init_state(PyInterpreterState *interp); +void _Ty_brc_init_state(TyInterpreterState *interp); -void _Ty_brc_after_fork(PyInterpreterState *interp); +void _Ty_brc_after_fork(TyInterpreterState *interp); // Enqueues an object to be merged by it's owning thread (tid). This // steals a reference to the object. diff --git a/Include/internal/pycore_bytes_methods.h b/Include/internal/pycore_bytes_methods.h index 3ce1eaf..2c69021 100644 --- a/Include/internal/pycore_bytes_methods.h +++ b/Include/internal/pycore_bytes_methods.h @@ -76,7 +76,7 @@ extern const char _Ty_center__doc__[]; extern const char _Ty_zfill__doc__[]; /* this is needed because some docs are shared from the .o, not static */ -#define PyDoc_STRVAR_shared(name,str) const char name[] = PyDoc_STR(str) +#define PyDoc_STRVAR_shared(name,str) const char name[] = TyDoc_STR(str) #endif /* !Ty_BYTES_CTYPE_H */ #endif /* !Ty_LIMITED_API */ diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h index 7812932..50b6c67 100644 --- a/Include/internal/pycore_ceval.h +++ b/Include/internal/pycore_ceval.h @@ -11,7 +11,7 @@ extern "C" { #include "dynamic_annotations.h" // _Ty_ANNOTATE_RWLOCK_CREATE #include "pycore_code.h" // _TyCode_GetTLBCFast() -#include "pycore_interp.h" // PyInterpreterState.eval_frame +#include "pycore_interp.h" // TyInterpreterState.eval_frame #include "pycore_pystate.h" // _TyThreadState_GET() #include "pycore_stats.h" // EVAL_CALL_STAT_INC() #include "pycore_typedefs.h" // _PyInterpreterFrame @@ -44,7 +44,7 @@ PyAPI_FUNC(int) _TyEval_MakePendingCalls(TyThreadState *); #endif extern void _Ty_FinishPendingCalls(TyThreadState *tstate); -extern void _TyEval_InitState(PyInterpreterState *); +extern void _TyEval_InitState(TyInterpreterState *); extern void _TyEval_SignalReceived(void); // bitwise flags: @@ -57,7 +57,7 @@ typedef int _Ty_add_pending_call_result; // Export for '_testinternalcapi' shared extension PyAPI_FUNC(_Ty_add_pending_call_result) _TyEval_AddPendingCall( - PyInterpreterState *interp, + TyInterpreterState *interp, _Ty_pending_call_func func, void *arg, int flags); @@ -129,11 +129,11 @@ _TyEval_Vector(TyThreadState *tstate, extern int _TyEval_ThreadsInitialized(void); extern void _TyEval_InitGIL(TyThreadState *tstate, int own_gil); -extern void _TyEval_FiniGIL(PyInterpreterState *interp); +extern void _TyEval_FiniGIL(TyInterpreterState *interp); extern void _TyEval_AcquireLock(TyThreadState *tstate); -extern void _TyEval_ReleaseLock(PyInterpreterState *, TyThreadState *, +extern void _TyEval_ReleaseLock(TyInterpreterState *, TyThreadState *, int final_release); #ifdef Ty_GIL_DISABLED @@ -341,8 +341,8 @@ _Ty_eval_breaker_bit_is_set(TyThreadState *tstate, uintptr_t bit) // Free-threaded builds use these functions to set or unset a bit on all // threads in the given interpreter. -void _Ty_set_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit); -void _Ty_unset_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit); +void _Ty_set_eval_breaker_bit_all(TyInterpreterState *interp, uintptr_t bit); +void _Ty_unset_eval_breaker_bit_all(TyInterpreterState *interp, uintptr_t bit); PyAPI_FUNC(_PyStackRef) _TyFloat_FromDouble_ConsumeInputs(_PyStackRef left, _PyStackRef right, double value); diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 84ea1ce..a2066d5 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -49,8 +49,8 @@ _py_set_opcode(_Ty_CODEUNIT *word, uint8_t opcode) (CODE->_co_instrumentation_version > 0) -extern TyStatus _TyCode_Init(PyInterpreterState *interp); -extern void _TyCode_Fini(PyInterpreterState *interp); +extern TyStatus _TyCode_Init(TyInterpreterState *interp); +extern void _TyCode_Fini(TyInterpreterState *interp); /* PEP 659 @@ -509,7 +509,7 @@ typedef struct { #define COMPARISON_NOT_EQUALS (COMPARISON_UNORDERED | COMPARISON_LESS_THAN | COMPARISON_GREATER_THAN) -extern int _Ty_Instrument(PyCodeObject *co, PyInterpreterState *interp); +extern int _Ty_Instrument(PyCodeObject *co, TyInterpreterState *interp); extern _Ty_CODEUNIT _Ty_GetBaseCodeUnit(PyCodeObject *code, int offset); @@ -551,7 +551,7 @@ extern _Ty_CODEUNIT *_TyCode_GetTLBC(PyCodeObject *co); // arrays // // Returns the reserved index or -1 on error. -extern int32_t _Ty_ReserveTLBCIndex(PyInterpreterState *interp); +extern int32_t _Ty_ReserveTLBCIndex(TyInterpreterState *interp); // Release the current thread's index into thread-local bytecode arrays extern void _Ty_ClearTLBCIndex(_PyThreadStateImpl *tstate); @@ -559,7 +559,7 @@ extern void _Ty_ClearTLBCIndex(_PyThreadStateImpl *tstate); // Free all TLBC copies not associated with live threads. // // Returns 0 on success or -1 on error. -extern int _Ty_ClearUnusedTLBC(PyInterpreterState *interp); +extern int _Ty_ClearUnusedTLBC(TyInterpreterState *interp); #endif diff --git a/Include/internal/pycore_codecs.h b/Include/internal/pycore_codecs.h index e33c898..028e623 100644 --- a/Include/internal/pycore_codecs.h +++ b/Include/internal/pycore_codecs.h @@ -13,11 +13,11 @@ extern "C" { /* Initialize codecs-related state for the given interpreter, including registering the first codec search function. Must be called before any other PyCodec-related functions, and while only one thread is active. */ -extern TyStatus _PyCodec_InitRegistry(PyInterpreterState *interp); +extern TyStatus _PyCodec_InitRegistry(TyInterpreterState *interp); /* Finalize codecs-related state for the given interpreter. No PyCodec-related functions other than PyCodec_Unregister() may be called after this. */ -extern void _PyCodec_Fini(PyInterpreterState *interp); +extern void _PyCodec_Fini(TyInterpreterState *interp); extern TyObject* _PyCodec_Lookup(const char *encoding); diff --git a/Include/internal/pycore_context.h b/Include/internal/pycore_context.h index 5150e76..d0d072c 100644 --- a/Include/internal/pycore_context.h +++ b/Include/internal/pycore_context.h @@ -11,7 +11,7 @@ extern TyTypeObject _PyContextTokenMissing_Type; /* runtime lifecycle */ -TyStatus _TyContext_Init(PyInterpreterState *); +TyStatus _TyContext_Init(TyInterpreterState *); /* other API */ diff --git a/Include/internal/pycore_crossinterp.h b/Include/internal/pycore_crossinterp.h index 7bf193f..1ff42ef 100644 --- a/Include/internal/pycore_crossinterp.h +++ b/Include/internal/pycore_crossinterp.h @@ -25,11 +25,11 @@ PyAPI_DATA(TyObject *) TyExc_InterpreterNotFoundError; typedef int (*_Ty_simple_func)(void *); extern int _Ty_CallInInterpreter( - PyInterpreterState *interp, + TyInterpreterState *interp, _Ty_simple_func func, void *arg); extern int _Ty_CallInInterpreterAndRawFree( - PyInterpreterState *interp, + TyInterpreterState *interp, _Ty_simple_func func, void *arg); @@ -62,7 +62,7 @@ struct _xidata { // _TyObject_GetXIData() was called. This should only // be set by the cross-interpreter machinery. // - // We use the ID rather than the PyInterpreterState to avoid issues + // We use the ID rather than the TyInterpreterState to avoid issues // with deleted interpreters. Note that IDs are never re-used, so // each one will always correspond to a specific interpreter // (whether still alive or not). @@ -97,13 +97,13 @@ PyAPI_FUNC(void) _PyXIData_Free(_PyXIData_t *data); PyAPI_FUNC(void) _PyXIData_Init( _PyXIData_t *data, - PyInterpreterState *interp, void *shared, TyObject *obj, + TyInterpreterState *interp, void *shared, TyObject *obj, xid_newobjfunc new_object); PyAPI_FUNC(int) _PyXIData_InitWithSize( _PyXIData_t *, - PyInterpreterState *interp, const size_t, TyObject *, + TyInterpreterState *interp, const size_t, TyObject *, xid_newobjfunc); -PyAPI_FUNC(void) _PyXIData_Clear(PyInterpreterState *, _PyXIData_t *); +PyAPI_FUNC(void) _PyXIData_Clear(TyInterpreterState *, _PyXIData_t *); // Normally the Init* functions are sufficient. The only time // additional initialization might be needed is to set the "free" func, @@ -222,8 +222,8 @@ PyAPI_FUNC(int) _TyCode_GetPureScriptXIData( _PyXIData_t *); // _TyObject_GetXIData() for functions -PyAPI_FUNC(TyObject *) _PyFunction_FromXIData(_PyXIData_t *); -PyAPI_FUNC(int) _PyFunction_GetXIData( +PyAPI_FUNC(TyObject *) _TyFunction_FromXIData(_PyXIData_t *); +PyAPI_FUNC(int) _TyFunction_GetXIData( TyThreadState *, TyObject *, _PyXIData_t *); @@ -271,16 +271,16 @@ typedef struct { #define _PyXI_GET_STATE(interp) (&(interp)->xi) #ifndef Ty_BUILD_CORE_MODULE -extern TyStatus _PyXI_Init(PyInterpreterState *interp); -extern void _PyXI_Fini(PyInterpreterState *interp); -extern TyStatus _PyXI_InitTypes(PyInterpreterState *interp); -extern void _PyXI_FiniTypes(PyInterpreterState *interp); +extern TyStatus _PyXI_Init(TyInterpreterState *interp); +extern void _PyXI_Fini(TyInterpreterState *interp); +extern TyStatus _PyXI_InitTypes(TyInterpreterState *interp); +extern void _PyXI_FiniTypes(TyInterpreterState *interp); #endif // Ty_BUILD_CORE_MODULE int _Ty_xi_global_state_init(_PyXI_global_state_t *); void _Ty_xi_global_state_fini(_PyXI_global_state_t *); -int _Ty_xi_state_init(_PyXI_state_t *, PyInterpreterState *); -void _Ty_xi_state_fini(_PyXI_state_t *, PyInterpreterState *); +int _Ty_xi_state_init(_PyXI_state_t *, TyInterpreterState *); +void _Ty_xi_state_fini(_PyXI_state_t *, TyInterpreterState *); /***************************/ @@ -362,7 +362,7 @@ PyAPI_FUNC(void) _PyXI_ClearResult(_PyXI_session_result *); PyAPI_FUNC(int) _PyXI_Enter( _PyXI_session *session, - PyInterpreterState *interp, + TyInterpreterState *interp, TyObject *nsupdates, _PyXI_session_result *); PyAPI_FUNC(int) _PyXI_Exit( @@ -389,13 +389,13 @@ PyAPI_FUNC(TyObject *) _PyXI_GetPreserved( /*************/ // Export for _testinternalcapi shared extension -PyAPI_FUNC(PyInterpreterState *) _PyXI_NewInterpreter( +PyAPI_FUNC(TyInterpreterState *) _PyXI_NewInterpreter( PyInterpreterConfig *config, long *maybe_whence, TyThreadState **p_tstate, TyThreadState **p_save_tstate); PyAPI_FUNC(void) _PyXI_EndInterpreter( - PyInterpreterState *interp, + TyInterpreterState *interp, TyThreadState *tstate, TyThreadState **p_save_tstate); diff --git a/Include/internal/pycore_debug_offsets.h b/Include/internal/pycore_debug_offsets.h index fad66b3..7af8ac0 100644 --- a/Include/internal/pycore_debug_offsets.h +++ b/Include/internal/pycore_debug_offsets.h @@ -54,7 +54,7 @@ extern "C" { # define _Ty_Debug_Free_Threaded 1 # define _Ty_Debug_code_object_co_tlbc offsetof(PyCodeObject, co_tlbc) # define _Ty_Debug_interpreter_frame_tlbc_index offsetof(_PyInterpreterFrame, tlbc_index) -# define _Ty_Debug_interpreter_state_tlbc_generation offsetof(PyInterpreterState, tlbc_indices.tlbc_generation) +# define _Ty_Debug_interpreter_state_tlbc_generation offsetof(TyInterpreterState, tlbc_indices.tlbc_generation) #else # define _Ty_Debug_gilruntimestate_enabled 0 # define _Ty_Debug_Free_Threaded 0 @@ -246,21 +246,21 @@ typedef struct _Ty_DebugOffsets { .interpreters_head = offsetof(_PyRuntimeState, interpreters.head), \ }, \ .interpreter_state = { \ - .size = sizeof(PyInterpreterState), \ - .id = offsetof(PyInterpreterState, id), \ - .next = offsetof(PyInterpreterState, next), \ - .threads_head = offsetof(PyInterpreterState, threads.head), \ - .threads_main = offsetof(PyInterpreterState, threads.main), \ - .gc = offsetof(PyInterpreterState, gc), \ - .imports_modules = offsetof(PyInterpreterState, imports.modules), \ - .sysdict = offsetof(PyInterpreterState, sysdict), \ - .builtins = offsetof(PyInterpreterState, builtins), \ - .ceval_gil = offsetof(PyInterpreterState, ceval.gil), \ - .gil_runtime_state = offsetof(PyInterpreterState, _gil), \ + .size = sizeof(TyInterpreterState), \ + .id = offsetof(TyInterpreterState, id), \ + .next = offsetof(TyInterpreterState, next), \ + .threads_head = offsetof(TyInterpreterState, threads.head), \ + .threads_main = offsetof(TyInterpreterState, threads.main), \ + .gc = offsetof(TyInterpreterState, gc), \ + .imports_modules = offsetof(TyInterpreterState, imports.modules), \ + .sysdict = offsetof(TyInterpreterState, sysdict), \ + .builtins = offsetof(TyInterpreterState, builtins), \ + .ceval_gil = offsetof(TyInterpreterState, ceval.gil), \ + .gil_runtime_state = offsetof(TyInterpreterState, _gil), \ .gil_runtime_state_enabled = _Ty_Debug_gilruntimestate_enabled, \ - .gil_runtime_state_locked = offsetof(PyInterpreterState, _gil.locked), \ - .gil_runtime_state_holder = offsetof(PyInterpreterState, _gil.last_holder), \ - .code_object_generation = offsetof(PyInterpreterState, _code_object_generation), \ + .gil_runtime_state_locked = offsetof(TyInterpreterState, _gil.locked), \ + .gil_runtime_state_holder = offsetof(TyInterpreterState, _gil.last_holder), \ + .code_object_generation = offsetof(TyInterpreterState, _code_object_generation), \ .tlbc_generation = _Ty_Debug_interpreter_state_tlbc_generation, \ }, \ .thread_state = { \ @@ -365,7 +365,7 @@ typedef struct _Ty_DebugOffsets { .debugger_support = { \ .eval_breaker = offsetof(TyThreadState, eval_breaker), \ .remote_debugger_support = offsetof(TyThreadState, remote_debugger_support), \ - .remote_debugging_enabled = offsetof(PyInterpreterState, config.remote_debug), \ + .remote_debugging_enabled = offsetof(TyInterpreterState, config.remote_debug), \ .debugger_pending_call = offsetof(_PyRemoteDebuggerSupport, debugger_pending_call), \ .debugger_script_path = offsetof(_PyRemoteDebuggerSupport, debugger_script_path), \ .debugger_script_path_size = Ty_MAX_SCRIPT_PATH_SIZE, \ diff --git a/Include/internal/pycore_dict.h b/Include/internal/pycore_dict.h index bfe1d89..e2ce4f3 100644 --- a/Include/internal/pycore_dict.h +++ b/Include/internal/pycore_dict.h @@ -89,7 +89,7 @@ extern TyObject *_TyDict_FromKeys(TyObject *, TyObject *, TyObject *); /* Gets a version number unique to the current state of the keys of dict, if possible. * Returns the version number, or zero if it was not possible to get a version number. */ extern uint32_t _PyDictKeys_GetVersionForCurrentState( - PyInterpreterState *interp, PyDictKeysObject *dictkeys); + TyInterpreterState *interp, PyDictKeysObject *dictkeys); /* Gets a version number unique to the current state of the keys of dict, if possible. * @@ -100,7 +100,7 @@ extern uint32_t _PyDictKeys_GetVersionForCurrentState( * * Returns the version number, or zero if it was not possible to get a version number. */ extern uint32_t _TyDict_GetKeysVersionForCurrentState( - PyInterpreterState *interp, PyDictObject *dict); + TyInterpreterState *interp, PyDictObject *dict); extern size_t _TyDict_KeysSize(PyDictKeysObject *keys); @@ -271,7 +271,7 @@ _TyDict_SendEvent(int watcher_bits, TyObject *value); static inline void -_TyDict_NotifyEvent(PyInterpreterState *interp, +_TyDict_NotifyEvent(TyInterpreterState *interp, TyDict_WatchEvent event, PyDictObject *mp, TyObject *key, diff --git a/Include/internal/pycore_dtoa.h b/Include/internal/pycore_dtoa.h index 5893679..5a57ed0 100644 --- a/Include/internal/pycore_dtoa.h +++ b/Include/internal/pycore_dtoa.h @@ -30,8 +30,8 @@ extern char* _Ty_dg_dtoa(double d, int mode, int ndigits, extern void _Ty_dg_freedtoa(char *s); -extern TyStatus _PyDtoa_Init(PyInterpreterState *interp); -extern void _PyDtoa_Fini(PyInterpreterState *interp); +extern TyStatus _PyDtoa_Init(TyInterpreterState *interp); +extern void _PyDtoa_Fini(TyInterpreterState *interp); #ifdef __cplusplus diff --git a/Include/internal/pycore_exceptions.h b/Include/internal/pycore_exceptions.h index b5e35de..fcfba59 100644 --- a/Include/internal/pycore_exceptions.h +++ b/Include/internal/pycore_exceptions.h @@ -11,10 +11,10 @@ extern "C" { /* runtime lifecycle */ -extern TyStatus _PyExc_InitState(PyInterpreterState *); -extern TyStatus _PyExc_InitGlobalObjects(PyInterpreterState *); -extern int _PyExc_InitTypes(PyInterpreterState *); -extern void _PyExc_Fini(PyInterpreterState *); +extern TyStatus _PyExc_InitState(TyInterpreterState *); +extern TyStatus _PyExc_InitGlobalObjects(TyInterpreterState *); +extern int _PyExc_InitTypes(TyInterpreterState *); +extern void _PyExc_Fini(TyInterpreterState *); /* other API */ @@ -22,7 +22,7 @@ extern void _PyExc_Fini(PyInterpreterState *); struct _Py_exc_state { // The dict mapping from errno codes to OSError subclasses TyObject *errnomap; - PyBaseExceptionObject *memerrors_freelist; + TyBaseExceptionObject *memerrors_freelist; int memerrors_numfree; #ifdef Ty_GIL_DISABLED PyMutex memerrors_lock; @@ -31,7 +31,7 @@ struct _Py_exc_state { TyObject *TyExc_ExceptionGroup; }; -extern void _PyExc_ClearExceptionGroupType(PyInterpreterState *); +extern void _PyExc_ClearExceptionGroupType(TyInterpreterState *); #ifdef __cplusplus diff --git a/Include/internal/pycore_faulthandler.h b/Include/internal/pycore_faulthandler.h index 1ac11ab..a674b2b 100644 --- a/Include/internal/pycore_faulthandler.h +++ b/Include/internal/pycore_faulthandler.h @@ -41,7 +41,7 @@ struct faulthandler_user_signal { int all_threads; int chain; _Ty_sighandler_t previous; - PyInterpreterState *interp; + TyInterpreterState *interp; }; #endif /* FAULTHANDLER_USER */ @@ -52,7 +52,7 @@ struct _faulthandler_runtime_state { TyObject *file; int fd; int all_threads; - PyInterpreterState *interp; + TyInterpreterState *interp; #ifdef MS_WINDOWS void *exc_handler; #endif @@ -64,16 +64,16 @@ struct _faulthandler_runtime_state { int fd; PY_TIMEOUT_T timeout_us; /* timeout in microseconds */ int repeat; - PyInterpreterState *interp; + TyInterpreterState *interp; int exit; char *header; size_t header_len; /* The main thread always holds this lock. It is only released when faulthandler_thread() is interrupted before this thread exits, or at Python exit. */ - PyThread_type_lock cancel_event; + TyThread_type_lock cancel_event; /* released by child thread when joined */ - PyThread_type_lock running; + TyThread_type_lock running; } thread; #ifdef FAULTHANDLER_USER diff --git a/Include/internal/pycore_floatobject.h b/Include/internal/pycore_floatobject.h index 6fd0b8f..6434416 100644 --- a/Include/internal/pycore_floatobject.h +++ b/Include/internal/pycore_floatobject.h @@ -12,9 +12,9 @@ extern "C" { /* runtime lifecycle */ -extern void _TyFloat_InitState(PyInterpreterState *); -extern TyStatus _TyFloat_InitTypes(PyInterpreterState *); -extern void _TyFloat_FiniType(PyInterpreterState *); +extern void _TyFloat_InitState(TyInterpreterState *); +extern TyStatus _TyFloat_InitTypes(TyInterpreterState *); +extern void _TyFloat_FiniType(TyInterpreterState *); diff --git a/Include/internal/pycore_freelist.h b/Include/internal/pycore_freelist.h index 149e609..83e0e3f 100644 --- a/Include/internal/pycore_freelist.h +++ b/Include/internal/pycore_freelist.h @@ -9,7 +9,7 @@ extern "C" { #endif #include "pycore_freelist_state.h" // struct _Ty_freelists -#include "pycore_interp_structs.h" // PyInterpreterState +#include "pycore_interp_structs.h" // TyInterpreterState #include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_STORE_PTR_RELAXED() #include "pycore_pystate.h" // _TyThreadState_GET #include "pycore_stats.h" // OBJECT_STAT_INC diff --git a/Include/internal/pycore_function.h b/Include/internal/pycore_function.h index a645022..7eefa0b 100644 --- a/Include/internal/pycore_function.h +++ b/Include/internal/pycore_function.h @@ -8,7 +8,7 @@ extern "C" { # error "this header requires Ty_BUILD_CORE define" #endif -extern TyObject* _PyFunction_Vectorcall( +extern TyObject* _TyFunction_Vectorcall( TyObject *func, TyObject *const *stack, size_t nargsf, @@ -19,18 +19,18 @@ extern TyObject* _PyFunction_Vectorcall( #define FUNC_VERSION_CLEARED 1 #define FUNC_VERSION_FIRST_VALID 2 -extern PyFunctionObject* _PyFunction_FromConstructor(PyFrameConstructor *constr); +extern PyFunctionObject* _TyFunction_FromConstructor(PyFrameConstructor *constr); static inline int -_PyFunction_IsVersionValid(uint32_t version) +_TyFunction_IsVersionValid(uint32_t version) { return version >= FUNC_VERSION_FIRST_VALID; } -extern uint32_t _PyFunction_GetVersionForCurrentState(PyFunctionObject *func); -PyAPI_FUNC(void) _PyFunction_SetVersion(PyFunctionObject *func, uint32_t version); -void _PyFunction_ClearCodeByVersion(uint32_t version); -PyFunctionObject *_PyFunction_LookupByVersion(uint32_t version, TyObject **p_code); +extern uint32_t _TyFunction_GetVersionForCurrentState(PyFunctionObject *func); +PyAPI_FUNC(void) _TyFunction_SetVersion(PyFunctionObject *func, uint32_t version); +void _TyFunction_ClearCodeByVersion(uint32_t version); +PyFunctionObject *_TyFunction_LookupByVersion(uint32_t version, TyObject **p_code); extern TyObject *_Ty_set_function_type_params( TyThreadState* unused, TyObject *func, TyObject *type_params); @@ -39,12 +39,12 @@ extern TyObject *_Ty_set_function_type_params( /* See pycore_code.h for explanation about what "stateless" means. */ PyAPI_FUNC(int) -_PyFunction_VerifyStateless(TyThreadState *, TyObject *); +_TyFunction_VerifyStateless(TyThreadState *, TyObject *); -static inline TyObject* _PyFunction_GET_BUILTINS(TyObject *func) { - return _PyFunction_CAST(func)->func_builtins; +static inline TyObject* _TyFunction_GET_BUILTINS(TyObject *func) { + return _TyFunction_CAST(func)->func_builtins; } -#define _PyFunction_GET_BUILTINS(func) _PyFunction_GET_BUILTINS(_TyObject_CAST(func)) +#define _TyFunction_GET_BUILTINS(func) _TyFunction_GET_BUILTINS(_TyObject_CAST(func)) #ifdef __cplusplus diff --git a/Include/internal/pycore_gc.h b/Include/internal/pycore_gc.h index 4fbf7f3..0f93c73 100644 --- a/Include/internal/pycore_gc.h +++ b/Include/internal/pycore_gc.h @@ -238,7 +238,7 @@ static inline void _TyObject_GC_TRACK( "object is in generation which is garbage collected", filename, lineno, __func__); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyGC_Head *generation0 = &interp->gc.young.head; TyGC_Head *last = (TyGC_Head*)(generation0->_gc_prev); _PyGCHead_SET_NEXT(last, gc); @@ -332,17 +332,17 @@ extern Ty_ssize_t _TyGC_Collect(TyThreadState *tstate, int generation, _TyGC_Rea extern void _TyGC_CollectNoFail(TyThreadState *tstate); /* Freeze objects tracked by the GC and ignore them in future collections. */ -extern void _TyGC_Freeze(PyInterpreterState *interp); +extern void _TyGC_Freeze(TyInterpreterState *interp); /* Unfreezes objects placing them in the oldest generation */ -extern void _TyGC_Unfreeze(PyInterpreterState *interp); +extern void _TyGC_Unfreeze(TyInterpreterState *interp); /* Number of frozen objects */ -extern Ty_ssize_t _TyGC_GetFreezeCount(PyInterpreterState *interp); +extern Ty_ssize_t _TyGC_GetFreezeCount(TyInterpreterState *interp); -extern TyObject *_TyGC_GetObjects(PyInterpreterState *interp, int generation); -extern TyObject *_TyGC_GetReferrers(PyInterpreterState *interp, TyObject *objs); +extern TyObject *_TyGC_GetObjects(TyInterpreterState *interp, int generation); +extern TyObject *_TyGC_GetReferrers(TyInterpreterState *interp, TyObject *objs); // Functions to clear types free lists -extern void _TyGC_ClearAllFreeLists(PyInterpreterState *interp); +extern void _TyGC_ClearAllFreeLists(TyInterpreterState *interp); extern void _Ty_ScheduleGC(TyThreadState *tstate); extern void _Ty_RunGC(TyThreadState *tstate); @@ -353,7 +353,7 @@ extern int _TyGC_VisitFrameStack(_PyInterpreterFrame *frame, visitproc visit, vo extern int _TyGC_VisitStackRef(union _PyStackRef *ref, visitproc visit, void *arg); #ifdef Ty_GIL_DISABLED -extern void _TyGC_VisitObjectsWorldStopped(PyInterpreterState *interp, +extern void _TyGC_VisitObjectsWorldStopped(TyInterpreterState *interp, gcvisitobjects_t callback, void *arg); #endif diff --git a/Include/internal/pycore_global_objects_fini_generated.h b/Include/internal/pycore_global_objects_fini_generated.h index 9a1abdd..4aa5745 100644 --- a/Include/internal/pycore_global_objects_fini_generated.h +++ b/Include/internal/pycore_global_objects_fini_generated.h @@ -21,7 +21,7 @@ _PyStaticObject_CheckRefcnt(TyObject *obj) { /* The following is auto-generated by Tools/build/generate_global_objects.py. */ #ifdef Ty_DEBUG static inline void -_PyStaticObjects_CheckRefcnt(PyInterpreterState *interp) { +_PyStaticObjects_CheckRefcnt(TyInterpreterState *interp) { /* generated runtime-global */ // (see pycore_runtime_init_generated.h) _PyStaticObject_CheckRefcnt((TyObject *)&_Ty_SINGLETON(small_ints)[_PY_NSMALLNEGINTS + -5]); diff --git a/Include/internal/pycore_import.h b/Include/internal/pycore_import.h index 95d5170..a9251cf 100644 --- a/Include/internal/pycore_import.h +++ b/Include/internal/pycore_import.h @@ -12,16 +12,16 @@ extern "C" { #include "pycore_hashtable.h" // _Ty_hashtable_t #include "pycore_interp_structs.h" // _import_state -extern int _TyImport_IsInitialized(PyInterpreterState *); +extern int _TyImport_IsInitialized(TyInterpreterState *); // Export for 'pyexpat' shared extension PyAPI_FUNC(int) _TyImport_SetModule(TyObject *name, TyObject *module); extern int _TyImport_SetModuleString(const char *name, TyObject* module); -extern void _TyImport_AcquireLock(PyInterpreterState *interp); -extern void _TyImport_ReleaseLock(PyInterpreterState *interp); -extern void _TyImport_ReInitLock(PyInterpreterState *interp); +extern void _TyImport_AcquireLock(TyInterpreterState *interp); +extern void _TyImport_ReleaseLock(TyInterpreterState *interp); +extern void _TyImport_ReInitLock(TyInterpreterState *interp); // This is used exclusively for the sys and builtins modules: extern int _TyImport_FixupBuiltin( @@ -52,38 +52,38 @@ extern int _TyImport_FixupBuiltin( }, \ } -extern void _TyImport_ClearCore(PyInterpreterState *interp); +extern void _TyImport_ClearCore(TyInterpreterState *interp); extern Ty_ssize_t _TyImport_GetNextModuleIndex(void); extern const char * _TyImport_ResolveNameWithPackageContext(const char *name); extern const char * _TyImport_SwapPackageContext(const char *newcontext); -extern int _TyImport_GetDLOpenFlags(PyInterpreterState *interp); -extern void _TyImport_SetDLOpenFlags(PyInterpreterState *interp, int new_val); +extern int _TyImport_GetDLOpenFlags(TyInterpreterState *interp); +extern void _TyImport_SetDLOpenFlags(TyInterpreterState *interp, int new_val); -extern TyObject * _TyImport_InitModules(PyInterpreterState *interp); -extern TyObject * _TyImport_GetModules(PyInterpreterState *interp); -extern TyObject * _TyImport_GetModulesRef(PyInterpreterState *interp); -extern void _TyImport_ClearModules(PyInterpreterState *interp); +extern TyObject * _TyImport_InitModules(TyInterpreterState *interp); +extern TyObject * _TyImport_GetModules(TyInterpreterState *interp); +extern TyObject * _TyImport_GetModulesRef(TyInterpreterState *interp); +extern void _TyImport_ClearModules(TyInterpreterState *interp); -extern void _TyImport_ClearModulesByIndex(PyInterpreterState *interp); +extern void _TyImport_ClearModulesByIndex(TyInterpreterState *interp); -extern int _TyImport_InitDefaultImportFunc(PyInterpreterState *interp); +extern int _TyImport_InitDefaultImportFunc(TyInterpreterState *interp); extern int _TyImport_IsDefaultImportFunc( - PyInterpreterState *interp, + TyInterpreterState *interp, TyObject *func); extern TyObject * _TyImport_GetImportlibLoader( - PyInterpreterState *interp, + TyInterpreterState *interp, const char *loader_name); extern TyObject * _TyImport_GetImportlibExternalLoader( - PyInterpreterState *interp, + TyInterpreterState *interp, const char *loader_name); extern TyObject * _TyImport_BlessMyLoader( - PyInterpreterState *interp, + TyInterpreterState *interp, TyObject *module_globals); extern TyObject * _TyImport_ImportlibModuleRepr( - PyInterpreterState *interp, + TyInterpreterState *interp, TyObject *module); @@ -96,8 +96,8 @@ extern TyStatus _TyImport_InitCore( TyObject *sysmod, int importlib); extern TyStatus _TyImport_InitExternal(TyThreadState *tstate); -extern void _TyImport_FiniCore(PyInterpreterState *interp); -extern void _TyImport_FiniExternal(PyInterpreterState *interp); +extern void _TyImport_FiniCore(TyInterpreterState *interp); +extern void _TyImport_FiniExternal(TyInterpreterState *interp); extern TyObject* _TyImport_GetBuiltinModuleNames(void); diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h index 4ce7cd8..ea48c69 100644 --- a/Include/internal/pycore_interp.h +++ b/Include/internal/pycore_interp.h @@ -8,7 +8,7 @@ extern "C" { # error "this header requires Ty_BUILD_CORE define" #endif -#include "pycore_interp_structs.h" // PyInterpreterState +#include "pycore_interp_structs.h" // TyInterpreterState /* interpreter state */ @@ -28,24 +28,24 @@ extern "C" { extern void _TyInterpreterState_Clear(TyThreadState *tstate); static inline TyThreadState* -_TyInterpreterState_GetFinalizing(PyInterpreterState *interp) { +_TyInterpreterState_GetFinalizing(TyInterpreterState *interp) { return (TyThreadState*)_Ty_atomic_load_ptr_relaxed(&interp->_finalizing); } static inline unsigned long -_TyInterpreterState_GetFinalizingID(PyInterpreterState *interp) { +_TyInterpreterState_GetFinalizingID(TyInterpreterState *interp) { return _Ty_atomic_load_ulong_relaxed(&interp->_finalizing_id); } static inline void -_TyInterpreterState_SetFinalizing(PyInterpreterState *interp, TyThreadState *tstate) { +_TyInterpreterState_SetFinalizing(TyInterpreterState *interp, TyThreadState *tstate) { _Ty_atomic_store_ptr_relaxed(&interp->_finalizing, tstate); if (tstate == NULL) { _Ty_atomic_store_ulong_relaxed(&interp->_finalizing_id, 0); } else { // XXX Re-enable this assert once gh-109860 is fixed. - //assert(tstate->thread_id == PyThread_get_thread_ident()); + //assert(tstate->thread_id == TyThread_get_thread_ident()); _Ty_atomic_store_ulong_relaxed(&interp->_finalizing_id, tstate->thread_id); } @@ -54,16 +54,16 @@ _TyInterpreterState_SetFinalizing(PyInterpreterState *interp, TyThreadState *tst // Exports for the _testinternalcapi module. PyAPI_FUNC(int64_t) _TyInterpreterState_ObjectToID(TyObject *); -PyAPI_FUNC(PyInterpreterState *) _TyInterpreterState_LookUpID(int64_t); -PyAPI_FUNC(PyInterpreterState *) _TyInterpreterState_LookUpIDObject(TyObject *); -PyAPI_FUNC(void) _TyInterpreterState_IDIncref(PyInterpreterState *); -PyAPI_FUNC(void) _TyInterpreterState_IDDecref(PyInterpreterState *); +PyAPI_FUNC(TyInterpreterState *) _TyInterpreterState_LookUpID(int64_t); +PyAPI_FUNC(TyInterpreterState *) _TyInterpreterState_LookUpIDObject(TyObject *); +PyAPI_FUNC(void) _TyInterpreterState_IDIncref(TyInterpreterState *); +PyAPI_FUNC(void) _TyInterpreterState_IDDecref(TyInterpreterState *); -PyAPI_FUNC(int) _TyInterpreterState_IsReady(PyInterpreterState *interp); +PyAPI_FUNC(int) _TyInterpreterState_IsReady(TyInterpreterState *interp); -PyAPI_FUNC(long) _TyInterpreterState_GetWhence(PyInterpreterState *interp); +PyAPI_FUNC(long) _TyInterpreterState_GetWhence(TyInterpreterState *interp); extern void _TyInterpreterState_SetWhence( - PyInterpreterState *interp, + TyInterpreterState *interp, long whence); /* @@ -93,15 +93,15 @@ might not be allowed in the current interpreter (i.e. os.fork() would fail). /* Set if os.exec*() is allowed. */ #define Ty_RTFLAGS_EXEC (1UL << 16) -extern int _TyInterpreterState_HasFeature(PyInterpreterState *interp, +extern int _TyInterpreterState_HasFeature(TyInterpreterState *interp, unsigned long feature); PyAPI_FUNC(TyStatus) _TyInterpreterState_New( TyThreadState *tstate, - PyInterpreterState **pinterp); + TyInterpreterState **pinterp); extern const PyConfig* _TyInterpreterState_GetConfig( - PyInterpreterState *interp); + TyInterpreterState *interp); #ifdef __cplusplus } diff --git a/Include/internal/pycore_interp_structs.h b/Include/internal/pycore_interp_structs.h index 5ed3d3f..e117f40 100644 --- a/Include/internal/pycore_interp_structs.h +++ b/Include/internal/pycore_interp_structs.h @@ -268,7 +268,7 @@ struct _import_runtime_state { /* The most recent value assigned to a TyModuleDef.m_base.m_index. This is incremented each time PyModuleDef_Init() is called, which is just about every time an extension module is imported. - See PyInterpreterState.modules_by_index for more info. */ + See TyInterpreterState.modules_by_index for more info. */ Ty_ssize_t last_module_index; struct { /* A lock to guard the cache. */ @@ -323,7 +323,7 @@ struct _import_state { /* diagnostic info in TyImport_ImportModuleLevelObject() */ struct { int import_level; - PyTime_t accumulated; + TyTime_t accumulated; int header; } find_and_load; }; @@ -361,7 +361,7 @@ struct codecs_state { }; // Support for stop-the-world events. This exists in both the PyRuntime struct -// for global pauses and in each PyInterpreterState for per-interpreter pauses. +// for global pauses and in each TyInterpreterState for per-interpreter pauses. struct _stoptheworld_state { PyMutex mutex; // Serializes stop-the-world attempts. @@ -537,7 +537,7 @@ struct types_state { The first time a static builtin type is initialized, all the normal TyType_Ready() stuff happens. The only difference from normal is that there are three TyTypeObject fields holding - objects which are stored here (on PyInterpreterState) rather + objects which are stored here (on TyInterpreterState) rather than in the corresponding TyTypeObject fields. Those are: tp_dict (cls.__dict__), tp_subclasses (cls.__subclasses__), and tp_weaklist. @@ -546,7 +546,7 @@ struct types_state { is still initialized, but only the interpreter-specific portion, namely those three objects. - Those objects are stored in the PyInterpreterState.types.builtins + Those objects are stored in the TyInterpreterState.types.builtins array, at the index corresponding to each specific static builtin type. That index (a size_t value) is stored in the tp_subclasses field. For static builtin types, we re-purposed the now-unused @@ -696,7 +696,7 @@ struct _Ty_interp_static_objects { // hamt_empty is here instead of global because of its weakreflist. _TyGC_Head_UNUSED _hamt_empty_gc_not_used; PyHamtObject hamt_empty; - PyBaseExceptionObject last_resort_memory_error; + TyBaseExceptionObject last_resort_memory_error; } singletons; }; @@ -756,10 +756,10 @@ struct _Ty_unique_id_pool { #endif -/* PyInterpreterState holds the global state for one of the runtime's +/* TyInterpreterState holds the global state for one of the runtime's interpreters. Typically the initial (main) interpreter is the only one. - The PyInterpreterState typedef is in Include/pytypedefs.h. + The TyInterpreterState typedef is in Include/pytypedefs.h. */ struct _is { @@ -774,7 +774,7 @@ struct _is { */ void *_malloced; - PyInterpreterState *next; + TyInterpreterState *next; int64_t id; Ty_ssize_t id_refcount; @@ -825,10 +825,10 @@ struct _is { struct _gc_runtime_state gc; /* The following fields are here to avoid allocation during init. - The data is exposed through PyInterpreterState pointer fields. + The data is exposed through TyInterpreterState pointer fields. These fields should not be accessed directly outside of init. - All other PyInterpreterState pointer fields are populated when + All other TyInterpreterState pointer fields are populated when needed and default to NULL. For now there are some exceptions to that rule, which require @@ -967,9 +967,9 @@ struct _is { # endif #endif - /* the initial PyInterpreterState.threads.head */ + /* the initial TyInterpreterState.threads.head */ _PyThreadStateImpl _initial_thread; - // _initial_thread should be the last field of PyInterpreterState. + // _initial_thread should be the last field of TyInterpreterState. // See https://github.com/python/cpython/issues/127117. }; diff --git a/Include/internal/pycore_interpolation.h b/Include/internal/pycore_interpolation.h index 58cccdb..ab7b508 100644 --- a/Include/internal/pycore_interpolation.h +++ b/Include/internal/pycore_interpolation.h @@ -16,7 +16,7 @@ extern TyTypeObject _PyInterpolation_Type; PyAPI_FUNC(TyObject *) _PyInterpolation_Build(TyObject *value, TyObject *str, int conversion, TyObject *format_spec); -extern TyStatus _PyInterpolation_InitTypes(PyInterpreterState *interp); +extern TyStatus _PyInterpolation_InitTypes(TyInterpreterState *interp); extern TyObject *_PyInterpolation_GetValueRef(TyObject *interpolation); #ifdef __cplusplus diff --git a/Include/internal/pycore_list.h b/Include/internal/pycore_list.h index e5cba8f..842583b 100644 --- a/Include/internal/pycore_list.h +++ b/Include/internal/pycore_list.h @@ -68,7 +68,7 @@ typedef struct { PyObject_HEAD Ty_ssize_t it_index; PyListObject *it_seq; /* Set to NULL when iterator is exhausted */ -} _PyListIterObject; +} _TyListIterObject; union _PyStackRef; diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h index a425ab2..ff65592 100644 --- a/Include/internal/pycore_lock.h +++ b/Include/internal/pycore_lock.h @@ -52,8 +52,8 @@ typedef enum _PyLockFlags { // Lock a mutex with an optional timeout and additional options. See // _PyLockFlags for details. -extern PyAPI_FUNC(PyLockStatus) -_PyMutex_LockTimed(PyMutex *m, PyTime_t timeout_ns, _PyLockFlags flags); +extern PyAPI_FUNC(TyLockStatus) +_PyMutex_LockTimed(PyMutex *m, TyTime_t timeout_ns, _PyLockFlags flags); // Lock a mutex with additional options. See _PyLockFlags for details. static inline void @@ -92,7 +92,7 @@ PyAPI_FUNC(void) PyEvent_Wait(PyEvent *evt); // and 0 if the timeout expired or thread was interrupted. If `detach` is // true, then the thread will detach/release the GIL while waiting. PyAPI_FUNC(int) -PyEvent_WaitTimed(PyEvent *evt, PyTime_t timeout_ns, int detach); +PyEvent_WaitTimed(PyEvent *evt, TyTime_t timeout_ns, int detach); // _PyRawMutex implements a word-sized mutex that that does not depend on the // parking lot API, and therefore can be used in the parking lot @@ -155,13 +155,13 @@ _PyOnceFlag_CallOnce(_PyOnceFlag *flag, _Ty_once_fn_t *fn, void *arg) // A recursive mutex. The mutex should zero-initialized. typedef struct { PyMutex mutex; - unsigned long long thread; // i.e., PyThread_get_thread_ident_ex() + unsigned long long thread; // i.e., TyThread_get_thread_ident_ex() size_t level; } _PyRecursiveMutex; PyAPI_FUNC(int) _PyRecursiveMutex_IsLockedByCurrentThread(_PyRecursiveMutex *m); PyAPI_FUNC(void) _PyRecursiveMutex_Lock(_PyRecursiveMutex *m); -extern PyLockStatus _PyRecursiveMutex_LockTimed(_PyRecursiveMutex *m, PyTime_t timeout, _PyLockFlags flags); +extern TyLockStatus _PyRecursiveMutex_LockTimed(_PyRecursiveMutex *m, TyTime_t timeout, _PyLockFlags flags); PyAPI_FUNC(void) _PyRecursiveMutex_Unlock(_PyRecursiveMutex *m); extern int _PyRecursiveMutex_TryUnlock(_PyRecursiveMutex *m); diff --git a/Include/internal/pycore_long.h b/Include/internal/pycore_long.h index 022e7c4..f43638b 100644 --- a/Include/internal/pycore_long.h +++ b/Include/internal/pycore_long.h @@ -48,8 +48,8 @@ extern "C" { /* runtime lifecycle */ -extern TyStatus _TyLong_InitTypes(PyInterpreterState *); -extern void _TyLong_FiniTypes(PyInterpreterState *interp); +extern TyStatus _TyLong_InitTypes(TyInterpreterState *); +extern void _TyLong_FiniTypes(TyInterpreterState *interp); /* other API */ diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 01ba33d..6b2424e 100644 --- a/Include/internal/pycore_object.h +++ b/Include/internal/pycore_object.h @@ -316,11 +316,11 @@ _TyType_HasFeature(TyTypeObject *type, unsigned long feature) { return ((FT_ATOMIC_LOAD_ULONG_RELAXED(type->tp_flags) & feature) != 0); } -extern void _TyType_InitCache(PyInterpreterState *interp); +extern void _TyType_InitCache(TyInterpreterState *interp); -extern TyStatus _TyObject_InitState(PyInterpreterState *interp); -extern void _TyObject_FiniState(PyInterpreterState *interp); -extern bool _PyRefchain_IsTraced(PyInterpreterState *interp, TyObject *obj); +extern TyStatus _TyObject_InitState(TyInterpreterState *interp); +extern void _TyObject_FiniState(TyInterpreterState *interp); +extern bool _PyRefchain_IsTraced(TyInterpreterState *interp, TyObject *obj); // Macros used for per-thread reference counting in the free threading build. // They resolve to normal Ty_INCREF/DECREF calls in the default build. @@ -768,15 +768,15 @@ _Ty_TryIncref(TyObject *op) } #ifdef Ty_REF_DEBUG -extern void _TyInterpreterState_FinalizeRefTotal(PyInterpreterState *); +extern void _TyInterpreterState_FinalizeRefTotal(TyInterpreterState *); extern void _Ty_FinalizeRefTotal(_PyRuntimeState *); extern void _PyDebug_PrintTotalRefs(void); #endif #ifdef Ty_TRACE_REFS extern void _Ty_AddToAllObjects(TyObject *op); -extern void _Ty_PrintReferences(PyInterpreterState *, FILE *); -extern void _Ty_PrintReferenceAddresses(PyInterpreterState *, FILE *); +extern void _Ty_PrintReferences(TyInterpreterState *, FILE *); +extern void _Ty_PrintReferenceAddresses(TyInterpreterState *, FILE *); #endif @@ -794,7 +794,7 @@ _TyObject_GET_WEAKREFS_LISTPTR(TyObject *op) { if (TyType_Check(op) && ((TyTypeObject *)op)->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = _PyStaticType_GetState( interp, (TyTypeObject *)op); return _PyStaticType_GET_WEAKREFS_LISTPTR(state); diff --git a/Include/internal/pycore_obmalloc.h b/Include/internal/pycore_obmalloc.h index 8855ee3..65c96f2 100644 --- a/Include/internal/pycore_obmalloc.h +++ b/Include/internal/pycore_obmalloc.h @@ -684,10 +684,10 @@ void _TyObject_VirtualFree(void *, size_t size); extern Ty_ssize_t _Ty_GetGlobalAllocatedBlocks(void); #define _Ty_GetAllocatedBlocks() \ _Ty_GetGlobalAllocatedBlocks() -extern Ty_ssize_t _TyInterpreterState_GetAllocatedBlocks(PyInterpreterState *); -extern void _TyInterpreterState_FinalizeAllocatedBlocks(PyInterpreterState *); -extern int _TyMem_init_obmalloc(PyInterpreterState *interp); -extern bool _TyMem_obmalloc_state_on_heap(PyInterpreterState *interp); +extern Ty_ssize_t _TyInterpreterState_GetAllocatedBlocks(TyInterpreterState *); +extern void _TyInterpreterState_FinalizeAllocatedBlocks(TyInterpreterState *); +extern int _TyMem_init_obmalloc(TyInterpreterState *interp); +extern bool _TyMem_obmalloc_state_on_heap(TyInterpreterState *interp); #ifdef WITH_PYMALLOC diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h index 9342273..d5c38a0 100644 --- a/Include/internal/pycore_opcode_metadata.h +++ b/Include/internal/pycore_opcode_metadata.h @@ -32,9 +32,9 @@ extern "C" { 0) #include "pycore_uop_ids.h" -extern int _PyOpcode_num_popped(int opcode, int oparg); +extern int _TyOpcode_num_popped(int opcode, int oparg); #ifdef NEED_OPCODE_METADATA -int _PyOpcode_num_popped(int opcode, int oparg) { +int _TyOpcode_num_popped(int opcode, int oparg) { switch(opcode) { case ANNOTATIONS_PLACEHOLDER: return 0; @@ -519,9 +519,9 @@ int _PyOpcode_num_popped(int opcode, int oparg) { #endif -extern int _PyOpcode_num_pushed(int opcode, int oparg); +extern int _TyOpcode_num_pushed(int opcode, int oparg); #ifdef NEED_OPCODE_METADATA -int _PyOpcode_num_pushed(int opcode, int oparg) { +int _TyOpcode_num_pushed(int opcode, int oparg) { switch(opcode) { case ANNOTATIONS_PLACEHOLDER: return 0; @@ -1022,7 +1022,7 @@ enum InstructionFormat { #define IS_VALID_OPCODE(OP) \ (((OP) >= 0) && ((OP) < 267) && \ - (_PyOpcode_opcode_metadata[(OP)].valid_entry)) + (_TyOpcode_opcode_metadata[(OP)].valid_entry)) #define HAS_ARG_FLAG (1) #define HAS_CONST_FLAG (2) @@ -1040,22 +1040,22 @@ enum InstructionFormat { #define HAS_OPARG_AND_1_FLAG (8192) #define HAS_ERROR_NO_POP_FLAG (16384) #define HAS_NO_SAVE_IP_FLAG (32768) -#define OPCODE_HAS_ARG(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_ARG_FLAG)) -#define OPCODE_HAS_CONST(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_CONST_FLAG)) -#define OPCODE_HAS_NAME(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_NAME_FLAG)) -#define OPCODE_HAS_JUMP(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_JUMP_FLAG)) -#define OPCODE_HAS_FREE(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_FREE_FLAG)) -#define OPCODE_HAS_LOCAL(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_LOCAL_FLAG)) -#define OPCODE_HAS_EVAL_BREAK(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_EVAL_BREAK_FLAG)) -#define OPCODE_HAS_DEOPT(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_DEOPT_FLAG)) -#define OPCODE_HAS_ERROR(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_ERROR_FLAG)) -#define OPCODE_HAS_ESCAPES(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_ESCAPES_FLAG)) -#define OPCODE_HAS_EXIT(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_EXIT_FLAG)) -#define OPCODE_HAS_PURE(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_PURE_FLAG)) -#define OPCODE_HAS_PASSTHROUGH(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_PASSTHROUGH_FLAG)) -#define OPCODE_HAS_OPARG_AND_1(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_OPARG_AND_1_FLAG)) -#define OPCODE_HAS_ERROR_NO_POP(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_ERROR_NO_POP_FLAG)) -#define OPCODE_HAS_NO_SAVE_IP(OP) (_PyOpcode_opcode_metadata[OP].flags & (HAS_NO_SAVE_IP_FLAG)) +#define OPCODE_HAS_ARG(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_ARG_FLAG)) +#define OPCODE_HAS_CONST(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_CONST_FLAG)) +#define OPCODE_HAS_NAME(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_NAME_FLAG)) +#define OPCODE_HAS_JUMP(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_JUMP_FLAG)) +#define OPCODE_HAS_FREE(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_FREE_FLAG)) +#define OPCODE_HAS_LOCAL(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_LOCAL_FLAG)) +#define OPCODE_HAS_EVAL_BREAK(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_EVAL_BREAK_FLAG)) +#define OPCODE_HAS_DEOPT(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_DEOPT_FLAG)) +#define OPCODE_HAS_ERROR(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_ERROR_FLAG)) +#define OPCODE_HAS_ESCAPES(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_ESCAPES_FLAG)) +#define OPCODE_HAS_EXIT(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_EXIT_FLAG)) +#define OPCODE_HAS_PURE(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_PURE_FLAG)) +#define OPCODE_HAS_PASSTHROUGH(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_PASSTHROUGH_FLAG)) +#define OPCODE_HAS_OPARG_AND_1(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_OPARG_AND_1_FLAG)) +#define OPCODE_HAS_ERROR_NO_POP(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_ERROR_NO_POP_FLAG)) +#define OPCODE_HAS_NO_SAVE_IP(OP) (_TyOpcode_opcode_metadata[OP].flags & (HAS_NO_SAVE_IP_FLAG)) #define OPARG_SIMPLE 0 #define OPARG_CACHE_1 1 @@ -1075,9 +1075,9 @@ struct opcode_metadata { uint16_t flags; }; -extern const struct opcode_metadata _PyOpcode_opcode_metadata[267]; +extern const struct opcode_metadata _TyOpcode_opcode_metadata[267]; #ifdef NEED_OPCODE_METADATA -const struct opcode_metadata _PyOpcode_opcode_metadata[267] = { +const struct opcode_metadata _TyOpcode_opcode_metadata[267] = { [BINARY_OP] = { true, INSTR_FMT_IBC0000, HAS_ARG_FLAG | HAS_ERROR_FLAG | HAS_ERROR_NO_POP_FLAG | HAS_ESCAPES_FLAG }, [BINARY_OP_ADD_FLOAT] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG | HAS_ERROR_FLAG }, [BINARY_OP_ADD_INT] = { true, INSTR_FMT_IXC0000, HAS_EXIT_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG }, @@ -1324,11 +1324,11 @@ struct opcode_macro_expansion { int nuops; struct { int16_t uop; int8_t size; int8_t offset; } uops[MAX_UOP_PER_EXPANSION]; }; -extern const struct opcode_macro_expansion _PyOpcode_macro_expansion[256]; +extern const struct opcode_macro_expansion _TyOpcode_macro_expansion[256]; #ifdef NEED_OPCODE_METADATA const struct opcode_macro_expansion -_PyOpcode_macro_expansion[256] = { +_TyOpcode_macro_expansion[256] = { [BINARY_OP] = { .nuops = 1, .uops = { { _BINARY_OP, OPARG_SIMPLE, 4 } } }, [BINARY_OP_ADD_FLOAT] = { .nuops = 3, .uops = { { _GUARD_TOS_FLOAT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_FLOAT, OPARG_SIMPLE, 0 }, { _BINARY_OP_ADD_FLOAT, OPARG_SIMPLE, 5 } } }, [BINARY_OP_ADD_INT] = { .nuops = 3, .uops = { { _GUARD_TOS_INT, OPARG_SIMPLE, 0 }, { _GUARD_NOS_INT, OPARG_SIMPLE, 0 }, { _BINARY_OP_ADD_INT, OPARG_SIMPLE, 5 } } }, @@ -1515,9 +1515,9 @@ _PyOpcode_macro_expansion[256] = { }; #endif // NEED_OPCODE_METADATA -extern const char *_PyOpcode_OpName[267]; +extern const char *_TyOpcode_OpName[267]; #ifdef NEED_OPCODE_METADATA -const char *_PyOpcode_OpName[267] = { +const char *_TyOpcode_OpName[267] = { [ANNOTATIONS_PLACEHOLDER] = "ANNOTATIONS_PLACEHOLDER", [BINARY_OP] = "BINARY_OP", [BINARY_OP_ADD_FLOAT] = "BINARY_OP_ADD_FLOAT", @@ -1759,9 +1759,9 @@ const char *_PyOpcode_OpName[267] = { }; #endif -extern const uint8_t _PyOpcode_Caches[256]; +extern const uint8_t _TyOpcode_Caches[256]; #ifdef NEED_OPCODE_METADATA -const uint8_t _PyOpcode_Caches[256] = { +const uint8_t _TyOpcode_Caches[256] = { [TO_BOOL] = 3, [STORE_SUBSCR] = 1, [SEND] = 1, @@ -1784,9 +1784,9 @@ const uint8_t _PyOpcode_Caches[256] = { }; #endif -extern const uint8_t _PyOpcode_Deopt[256]; +extern const uint8_t _TyOpcode_Deopt[256]; #ifdef NEED_OPCODE_METADATA -const uint8_t _PyOpcode_Deopt[256] = { +const uint8_t _TyOpcode_Deopt[256] = { [121] = 121, [122] = 122, [123] = 123, @@ -2082,9 +2082,9 @@ struct pseudo_targets { uint8_t as_sequence; uint8_t targets[4]; }; -extern const struct pseudo_targets _PyOpcode_PseudoTargets[11]; +extern const struct pseudo_targets _TyOpcode_PseudoTargets[11]; #ifdef NEED_OPCODE_METADATA -const struct pseudo_targets _PyOpcode_PseudoTargets[11] = { +const struct pseudo_targets _TyOpcode_PseudoTargets[11] = { [LOAD_CLOSURE-256] = { 0, { LOAD_FAST, 0, 0, 0 } }, [STORE_FAST_MAYBE_NULL-256] = { 0, { STORE_FAST, 0, 0, 0 } }, [ANNOTATIONS_PLACEHOLDER-256] = { 0, { NOP, 0, 0, 0 } }, @@ -2104,8 +2104,8 @@ is_pseudo_target(int pseudo, int target) { if (pseudo < 256 || pseudo >= 267) { return false; } - for (int i = 0; _PyOpcode_PseudoTargets[pseudo-256].targets[i]; i++) { - if (_PyOpcode_PseudoTargets[pseudo-256].targets[i] == target) return true; + for (int i = 0; _TyOpcode_PseudoTargets[pseudo-256].targets[i]; i++) { + if (_TyOpcode_PseudoTargets[pseudo-256].targets[i] == target) return true; } return false; } diff --git a/Include/internal/pycore_optimizer.h b/Include/internal/pycore_optimizer.h index 1fe92c2..d619e03 100644 --- a/Include/internal/pycore_optimizer.h +++ b/Include/internal/pycore_optimizer.h @@ -102,9 +102,9 @@ PyAPI_FUNC(void) _Ty_Executor_DependsOn(_PyExecutorObject *executor, void *obj); #define _Ty_MAX_ALLOWED_GLOBALS_MODIFICATIONS 6 #ifdef _Ty_TIER2 -PyAPI_FUNC(void) _Ty_Executors_InvalidateDependency(PyInterpreterState *interp, void *obj, int is_invalidation); -PyAPI_FUNC(void) _Ty_Executors_InvalidateAll(PyInterpreterState *interp, int is_invalidation); -PyAPI_FUNC(void) _Ty_Executors_InvalidateCold(PyInterpreterState *interp); +PyAPI_FUNC(void) _Ty_Executors_InvalidateDependency(TyInterpreterState *interp, void *obj, int is_invalidation); +PyAPI_FUNC(void) _Ty_Executors_InvalidateAll(TyInterpreterState *interp, int is_invalidation); +PyAPI_FUNC(void) _Ty_Executors_InvalidateCold(TyInterpreterState *interp); #else # define _Ty_Executors_InvalidateDependency(A, B, C) ((void)0) @@ -309,7 +309,7 @@ static inline int is_terminator(const _PyUOpInstruction *uop) PyAPI_FUNC(int) _PyDumpExecutors(FILE *out); #ifdef _Ty_TIER2 -extern void _Ty_ClearExecutorDeletionList(PyInterpreterState *interp); +extern void _Ty_ClearExecutorDeletionList(TyInterpreterState *interp); #endif #ifdef __cplusplus diff --git a/Include/internal/pycore_parking_lot.h b/Include/internal/pycore_parking_lot.h index 1949a6f..974ed81 100644 --- a/Include/internal/pycore_parking_lot.h +++ b/Include/internal/pycore_parking_lot.h @@ -59,7 +59,7 @@ enum { // } PyAPI_FUNC(int) _PyParkingLot_Park(const void *address, const void *expected, - size_t address_size, PyTime_t timeout_ns, + size_t address_size, TyTime_t timeout_ns, void *park_arg, int detach); // Callback for _PyParkingLot_Unpark: diff --git a/Include/internal/pycore_pybuffer.h b/Include/internal/pycore_pybuffer.h index bc8aeba..5d87fbd 100644 --- a/Include/internal/pycore_pybuffer.h +++ b/Include/internal/pycore_pybuffer.h @@ -11,9 +11,9 @@ extern "C" { // Exported for the _interpchannels module. PyAPI_FUNC(int) _PyBuffer_ReleaseInInterpreter( - PyInterpreterState *interp, Ty_buffer *view); + TyInterpreterState *interp, Ty_buffer *view); PyAPI_FUNC(int) _PyBuffer_ReleaseInInterpreterAndRawFree( - PyInterpreterState *interp, Ty_buffer *view); + TyInterpreterState *interp, Ty_buffer *view); #ifdef __cplusplus } diff --git a/Include/internal/pycore_pyerrors.h b/Include/internal/pycore_pyerrors.h index 8bcf7f1..2092cb7 100644 --- a/Include/internal/pycore_pyerrors.h +++ b/Include/internal/pycore_pyerrors.h @@ -65,8 +65,8 @@ extern int _TyErr_SetModuleNotFoundError(TyObject *name); /* runtime lifecycle */ -extern TyStatus _TyErr_InitTypes(PyInterpreterState *); -extern void _TyErr_FiniTypes(PyInterpreterState *); +extern TyStatus _TyErr_InitTypes(TyInterpreterState *); +extern void _TyErr_FiniTypes(TyInterpreterState *); /* other API */ @@ -178,7 +178,7 @@ extern TyObject* _PyExc_PrepReraiseStar( extern int _TyErr_CheckSignalsTstate(TyThreadState *tstate); -extern void _Ty_DumpExtensionModules(int fd, PyInterpreterState *interp); +extern void _Ty_DumpExtensionModules(int fd, TyInterpreterState *interp); extern TyObject* _Ty_CalculateSuggestions(TyObject *dir, TyObject *name); extern TyObject* _Ty_Offer_Suggestions(TyObject* exception); diff --git a/Include/internal/pycore_pylifecycle.h b/Include/internal/pycore_pylifecycle.h index a919e84..69d0094 100644 --- a/Include/internal/pycore_pylifecycle.h +++ b/Include/internal/pycore_pylifecycle.h @@ -28,43 +28,43 @@ extern int _Ty_IsLocaleCoercionTarget(const char *ctype_loc); extern void _Ty_InitVersion(void); extern TyStatus _PyFaulthandler_Init(int enable); -extern TyObject * _PyBuiltin_Init(PyInterpreterState *interp); +extern TyObject * _PyBuiltin_Init(TyInterpreterState *interp); extern TyStatus _TySys_Create( TyThreadState *tstate, TyObject **sysmod_p); extern TyStatus _TySys_ReadPreinitWarnOptions(PyWideStringList *options); extern TyStatus _TySys_ReadPreinitXOptions(PyConfig *config); extern int _TySys_UpdateConfig(TyThreadState *tstate); -extern void _TySys_FiniTypes(PyInterpreterState *interp); +extern void _TySys_FiniTypes(TyInterpreterState *interp); extern int _PyBuiltins_AddExceptions(TyObject * bltinmod); extern TyStatus _Ty_HashRandomization_Init(const PyConfig *); -extern TyStatus _TyGC_Init(PyInterpreterState *interp); -extern TyStatus _PyAtExit_Init(PyInterpreterState *interp); -extern TyStatus _PyDateTime_InitTypes(PyInterpreterState *interp); +extern TyStatus _TyGC_Init(TyInterpreterState *interp); +extern TyStatus _PyAtExit_Init(TyInterpreterState *interp); +extern TyStatus _PyDateTime_InitTypes(TyInterpreterState *interp); /* Various internal finalizers */ extern int _PySignal_Init(int install_signal_handlers); extern void _PySignal_Fini(void); -extern void _TyGC_Fini(PyInterpreterState *interp); +extern void _TyGC_Fini(TyInterpreterState *interp); extern void _Ty_HashRandomization_Fini(void); extern void _PyFaulthandler_Fini(void); extern void _PyHash_Fini(void); extern void _PyTraceMalloc_Fini(void); -extern void _TyWarnings_Fini(PyInterpreterState *interp); -extern void _TyAST_Fini(PyInterpreterState *interp); -extern void _PyAtExit_Fini(PyInterpreterState *interp); -extern void _PyThread_FiniType(PyInterpreterState *interp); +extern void _TyWarnings_Fini(TyInterpreterState *interp); +extern void _TyAST_Fini(TyInterpreterState *interp); +extern void _PyAtExit_Fini(TyInterpreterState *interp); +extern void _PyThread_FiniType(TyInterpreterState *interp); extern void _TyArg_Fini(void); extern void _Ty_FinalizeAllocatedBlocks(_PyRuntimeState *); -extern TyStatus _TyGILState_Init(PyInterpreterState *interp); +extern TyStatus _TyGILState_Init(TyInterpreterState *interp); extern void _TyGILState_SetTstate(TyThreadState *tstate); -extern void _TyGILState_Fini(PyInterpreterState *interp); +extern void _TyGILState_Fini(TyInterpreterState *interp); -extern void _TyGC_DumpShutdownStats(PyInterpreterState *interp); +extern void _TyGC_DumpShutdownStats(TyInterpreterState *interp); extern TyStatus _Ty_PreInitializeFromPyArgv( const PyPreConfig *src_config, @@ -86,7 +86,7 @@ extern void _TyErr_DisplayException(TyObject *file, TyObject *exc); extern void _TyThreadState_DeleteCurrent(TyThreadState *tstate); -extern void _PyAtExit_Call(PyInterpreterState *interp); +extern void _PyAtExit_Call(TyInterpreterState *interp); extern int _Ty_IsCoreInitialized(void); @@ -96,7 +96,7 @@ extern const char* _Ty_gitidentifier(void); extern const char* _Ty_gitversion(void); // Export for '_asyncio' shared extension -PyAPI_FUNC(int) _Ty_IsInterpreterFinalizing(PyInterpreterState *interp); +PyAPI_FUNC(int) _Ty_IsInterpreterFinalizing(TyInterpreterState *interp); /* Random */ extern int _TyOS_URandom(void *buffer, Ty_ssize_t size); @@ -120,7 +120,7 @@ int _PyRun_SimpleStringFlagsWithName(const char *command, const char* name, PyCo // Export for _testinternalcapi shared extension PyAPI_FUNC(int) _PyInterpreterConfig_InitFromState( PyInterpreterConfig *, - PyInterpreterState *); + TyInterpreterState *); PyAPI_FUNC(TyObject *) _PyInterpreterConfig_AsDict(PyInterpreterConfig *); PyAPI_FUNC(int) _PyInterpreterConfig_InitFromDict( PyInterpreterConfig *, diff --git a/Include/internal/pycore_pymem.h b/Include/internal/pycore_pymem.h index 7ede594..9e1ec90 100644 --- a/Include/internal/pycore_pymem.h +++ b/Include/internal/pycore_pymem.h @@ -114,7 +114,7 @@ extern void _TyMem_ProcessDelayedNoDealloc(TyThreadState *tstate, extern void _TyMem_AbandonDelayed(TyThreadState *tstate); // On interpreter shutdown, frees all delayed free requests. -extern void _TyMem_FiniDelayed(PyInterpreterState *interp); +extern void _TyMem_FiniDelayed(TyInterpreterState *interp); #ifdef __cplusplus } diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 8777d93..c582528 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -54,23 +54,23 @@ extern "C" { extern int _Ty_IsMainThread(void); // Export for '_testinternalcapi' shared extension -PyAPI_FUNC(PyInterpreterState*) _TyInterpreterState_Main(void); +PyAPI_FUNC(TyInterpreterState*) _TyInterpreterState_Main(void); static inline int -_Ty_IsMainInterpreter(PyInterpreterState *interp) +_Ty_IsMainInterpreter(TyInterpreterState *interp) { return (interp == _TyInterpreterState_Main()); } -extern int _Ty_IsMainInterpreterFinalizing(PyInterpreterState *interp); +extern int _Ty_IsMainInterpreterFinalizing(TyInterpreterState *interp); // Export for _interpreters module. -PyAPI_FUNC(TyObject *) _TyInterpreterState_GetIDObject(PyInterpreterState *); +PyAPI_FUNC(TyObject *) _TyInterpreterState_GetIDObject(TyInterpreterState *); // Export for _interpreters module. -PyAPI_FUNC(int) _TyInterpreterState_SetRunningMain(PyInterpreterState *); -PyAPI_FUNC(void) _TyInterpreterState_SetNotRunningMain(PyInterpreterState *); -PyAPI_FUNC(int) _TyInterpreterState_IsRunningMain(PyInterpreterState *); +PyAPI_FUNC(int) _TyInterpreterState_SetRunningMain(TyInterpreterState *); +PyAPI_FUNC(void) _TyInterpreterState_SetNotRunningMain(TyInterpreterState *); +PyAPI_FUNC(int) _TyInterpreterState_IsRunningMain(TyInterpreterState *); PyAPI_FUNC(void) _TyErr_SetInterpreterAlreadyRunning(void); extern int _TyThreadState_IsRunningMain(TyThreadState *); @@ -80,7 +80,7 @@ extern const PyConfig* _Ty_GetMainConfig(void); /* Only handle signals on the main thread of the main interpreter. */ static inline int -_Ty_ThreadCanHandleSignals(PyInterpreterState *interp) +_Ty_ThreadCanHandleSignals(TyInterpreterState *interp) { return (_Ty_IsMainThread() && _Ty_IsMainInterpreter(interp)); } @@ -167,8 +167,8 @@ extern void _TyEval_StartTheWorldAll(_PyRuntimeState *runtime); // Perform a stop-the-world pause for threads in the specified interpreter. // // NOTE: This is a no-op outside of Ty_GIL_DISABLED builds. -extern PyAPI_FUNC(void) _TyEval_StopTheWorld(PyInterpreterState *interp); -extern PyAPI_FUNC(void) _TyEval_StartTheWorld(PyInterpreterState *interp); +extern PyAPI_FUNC(void) _TyEval_StopTheWorld(TyInterpreterState *interp); +extern PyAPI_FUNC(void) _TyEval_StartTheWorld(TyInterpreterState *interp); static inline void @@ -203,7 +203,7 @@ _Ty_EnsureFuncTstateNotNULL(const char *func, TyThreadState *tstate) See also TyInterpreterState_Get() and _TyGILState_GetInterpreterStateUnsafe(). */ -static inline PyInterpreterState* _TyInterpreterState_GET(void) { +static inline TyInterpreterState* _TyInterpreterState_GET(void) { TyThreadState *tstate = _TyThreadState_GET(); #ifdef Ty_DEBUG _Ty_EnsureTstateNotNULL(tstate); @@ -216,11 +216,11 @@ static inline PyInterpreterState* _TyInterpreterState_GET(void) { // Export for _testinternalcapi PyAPI_FUNC(TyThreadState *) _TyThreadState_New( - PyInterpreterState *interp, + TyInterpreterState *interp, int whence); extern void _TyThreadState_Bind(TyThreadState *tstate); PyAPI_FUNC(TyThreadState *) _TyThreadState_NewBound( - PyInterpreterState *interp, + TyInterpreterState *interp, int whence); extern TyThreadState * _TyThreadState_RemoveExcept(TyThreadState *tstate); extern void _TyThreadState_DeleteList(TyThreadState *list, int is_after_fork); @@ -276,14 +276,14 @@ extern int _TyOS_InterruptOccurred(TyThreadState *tstate); // Export for test_peg_generator. PyAPI_FUNC(const PyConfig*) _Ty_GetConfig(void); -// Get the single PyInterpreterState used by this process' GILState +// Get the single TyInterpreterState used by this process' GILState // implementation. // // This function doesn't check for error. Return NULL before _TyGILState_Init() // is called and after _TyGILState_Fini() is called. // // See also TyInterpreterState_Get() and _TyInterpreterState_GET(). -extern PyInterpreterState* _TyGILState_GetInterpreterStateUnsafe(void); +extern TyInterpreterState* _TyGILState_GetInterpreterStateUnsafe(void); extern TyObject * _Ty_GetMainModule(TyThreadState *); extern int _Ty_CheckMainModule(TyObject *module); diff --git a/Include/internal/pycore_pythread.h b/Include/internal/pycore_pythread.h index fbe0ec0..86ff2b7 100644 --- a/Include/internal/pycore_pythread.h +++ b/Include/internal/pycore_pythread.h @@ -91,16 +91,16 @@ struct _pythread_runtime_state { /* Private function to reinitialize a lock at fork in the child process. Reset the lock to the unlocked state. Return 0 on success, return -1 on error. */ -extern int _PyThread_at_fork_reinit(PyThread_type_lock *lock); +extern int _PyThread_at_fork_reinit(TyThread_type_lock *lock); extern void _PyThread_AfterFork(struct _pythread_runtime_state *state); #endif /* HAVE_FORK */ // unset: -1 seconds, in nanoseconds -#define PyThread_UNSET_TIMEOUT ((PyTime_t)(-1 * 1000 * 1000 * 1000)) +#define TyThread_UNSET_TIMEOUT ((TyTime_t)(-1 * 1000 * 1000 * 1000)) // Exported for the _interpchannels module. -PyAPI_FUNC(int) PyThread_ParseTimeoutArg( +PyAPI_FUNC(int) TyThread_ParseTimeoutArg( TyObject *arg, int blocking, PY_TIMEOUT_T *timeout); @@ -112,46 +112,46 @@ PyAPI_FUNC(int) PyThread_ParseTimeoutArg( * timeout. */ // Exported for the _interpchannels module. -PyAPI_FUNC(PyLockStatus) PyThread_acquire_lock_timed_with_retries( - PyThread_type_lock, +PyAPI_FUNC(TyLockStatus) TyThread_acquire_lock_timed_with_retries( + TyThread_type_lock, PY_TIMEOUT_T microseconds); -typedef unsigned long long PyThread_ident_t; -typedef Ty_uintptr_t PyThread_handle_t; +typedef unsigned long long TyThread_ident_t; +typedef Ty_uintptr_t TyThread_handle_t; #define PY_FORMAT_THREAD_IDENT_T "llu" #define Ty_PARSE_THREAD_IDENT_T "K" -PyAPI_FUNC(PyThread_ident_t) PyThread_get_thread_ident_ex(void); +PyAPI_FUNC(TyThread_ident_t) TyThread_get_thread_ident_ex(void); /* Thread joining APIs. * * These APIs have a strict contract: - * - Either PyThread_join_thread or PyThread_detach_thread must be called + * - Either TyThread_join_thread or TyThread_detach_thread must be called * exactly once with the given handle. - * - Calling neither PyThread_join_thread nor PyThread_detach_thread results + * - Calling neither TyThread_join_thread nor TyThread_detach_thread results * in a resource leak until the end of the process. - * - Any other usage, such as calling both PyThread_join_thread and - * PyThread_detach_thread, or calling them more than once (including + * - Any other usage, such as calling both TyThread_join_thread and + * TyThread_detach_thread, or calling them more than once (including * simultaneously), results in undefined behavior. */ -PyAPI_FUNC(int) PyThread_start_joinable_thread(void (*func)(void *), +PyAPI_FUNC(int) TyThread_start_joinable_thread(void (*func)(void *), void *arg, - PyThread_ident_t* ident, - PyThread_handle_t* handle); + TyThread_ident_t* ident, + TyThread_handle_t* handle); /* - * Join a thread started with `PyThread_start_joinable_thread`. + * Join a thread started with `TyThread_start_joinable_thread`. * This function cannot be interrupted. It returns 0 on success, * a non-zero value on failure. */ -PyAPI_FUNC(int) PyThread_join_thread(PyThread_handle_t); +PyAPI_FUNC(int) TyThread_join_thread(TyThread_handle_t); /* - * Detach a thread started with `PyThread_start_joinable_thread`, such + * Detach a thread started with `TyThread_start_joinable_thread`, such * that its resources are released as soon as it exits. * This function cannot be interrupted. It returns 0 on success, * a non-zero value on failure. */ -PyAPI_FUNC(int) PyThread_detach_thread(PyThread_handle_t); +PyAPI_FUNC(int) TyThread_detach_thread(TyThread_handle_t); /* * Hangs the thread indefinitely without exiting it. * @@ -164,7 +164,7 @@ PyAPI_FUNC(int) PyThread_detach_thread(PyThread_handle_t); * when they're done with the interpreter, but our C API design does not allow * for safely exiting threads attempting to re-enter Python post finalization. */ -void _Ty_NO_RETURN PyThread_hang_thread(void); +void _Ty_NO_RETURN TyThread_hang_thread(void); #ifdef __cplusplus } diff --git a/Include/internal/pycore_qsbr.h b/Include/internal/pycore_qsbr.h index 4de9608..a3b48ec 100644 --- a/Include/internal/pycore_qsbr.h +++ b/Include/internal/pycore_qsbr.h @@ -149,19 +149,19 @@ _Ty_qsbr_detach(struct _qsbr_thread_state *qsbr); // Reserves (allocates) a QSBR state and returns its index. extern Ty_ssize_t -_Ty_qsbr_reserve(PyInterpreterState *interp); +_Ty_qsbr_reserve(TyInterpreterState *interp); // Associates a TyThreadState with the QSBR state at the given index extern void _Ty_qsbr_register(struct _PyThreadStateImpl *tstate, - PyInterpreterState *interp, Ty_ssize_t index); + TyInterpreterState *interp, Ty_ssize_t index); // Disassociates a TyThreadState from the QSBR state and frees the QSBR state. extern void _Ty_qsbr_unregister(TyThreadState *tstate); extern void -_Ty_qsbr_fini(PyInterpreterState *interp); +_Ty_qsbr_fini(TyInterpreterState *interp); extern void _Ty_qsbr_after_fork(struct _PyThreadStateImpl *tstate); diff --git a/Include/internal/pycore_runtime.h b/Include/internal/pycore_runtime.h index 5b361f9..c322cea 100644 --- a/Include/internal/pycore_runtime.h +++ b/Include/internal/pycore_runtime.h @@ -50,7 +50,7 @@ _PyRuntimeState_SetFinalizing(_PyRuntimeState *runtime, TyThreadState *tstate) { } else { // XXX Re-enable this assert once gh-109860 is fixed. - //assert(tstate->thread_id == PyThread_get_thread_ident()); + //assert(tstate->thread_id == TyThread_get_thread_ident()); _Ty_atomic_store_ulong_relaxed(&runtime->_finalizing_id, tstate->thread_id); } diff --git a/Include/internal/pycore_runtime_structs.h b/Include/internal/pycore_runtime_structs.h index 6f13546..2fbda94 100644 --- a/Include/internal/pycore_runtime_structs.h +++ b/Include/internal/pycore_runtime_structs.h @@ -87,8 +87,8 @@ struct _parser_runtime_state { }; typedef struct { - PyTime_t numer; - PyTime_t denom; + TyTime_t numer; + TyTime_t denom; } _PyTimeFraction; struct _Ty_time_runtime_state { @@ -188,11 +188,11 @@ struct pyruntimestate { struct pyinterpreters { PyMutex mutex; /* The linked list of interpreters, newest first. */ - PyInterpreterState *head; + TyInterpreterState *head; /* The runtime's initial interpreter, which has a special role in the operation of the runtime. It is also often the only interpreter. */ - PyInterpreterState *main; + TyInterpreterState *main; /* next_id is an auto-numbered sequence of small integers. It gets initialized in _TyInterpreterState_Enable(), which is called in Ty_Initialize(), and used in @@ -241,11 +241,11 @@ struct pyruntimestate { /* bpo-26558: Flag to disable TyGILState_Check(). If set to non-zero, TyGILState_Check() always return 1. */ int check_enabled; - /* The single PyInterpreterState used by this process' + /* The single TyInterpreterState used by this process' GILState implementation */ /* TODO: Given interp_main, it may be possible to kill this ref */ - PyInterpreterState *autoInterpreterState; + TyInterpreterState *autoInterpreterState; } gilstate; struct _getargs_runtime_state { struct _TyArg_Parser *static_parsers; @@ -299,12 +299,12 @@ struct pyruntimestate { For now there are some exceptions to that rule, which require allocation during init. These will be addressed on a case-by-case basis. Most notably, we don't pre-allocated the several mutex - (PyThread_type_lock) fields, because on Windows we only ever get + (TyThread_type_lock) fields, because on Windows we only ever get a pointer type. */ /* _PyRuntimeState.interpreters.main */ - PyInterpreterState _main_interpreter; + TyInterpreterState _main_interpreter; // _main_interpreter should be the last field of _PyRuntimeState. // See https://github.com/python/cpython/issues/127117. }; diff --git a/Include/internal/pycore_semaphore.h b/Include/internal/pycore_semaphore.h index 0ff1df2..d7f5e8a 100644 --- a/Include/internal/pycore_semaphore.h +++ b/Include/internal/pycore_semaphore.h @@ -49,7 +49,7 @@ typedef struct _PySemaphore { // If `detach` is true, then the thread will detach/release the GIL while // sleeping. PyAPI_FUNC(int) -_PySemaphore_Wait(_PySemaphore *sema, PyTime_t timeout_ns, int detach); +_PySemaphore_Wait(_PySemaphore *sema, TyTime_t timeout_ns, int detach); // Wakes up a single thread waiting on sema. Note that _PySemaphore_Wakeup() // can be called before _PySemaphore_Wait(). diff --git a/Include/internal/pycore_stackref.h b/Include/internal/pycore_stackref.h index b79e84b..d867e00 100644 --- a/Include/internal/pycore_stackref.h +++ b/Include/internal/pycore_stackref.h @@ -59,7 +59,7 @@ PyAPI_FUNC(TyObject *) _Ty_stackref_get_object(_PyStackRef ref); PyAPI_FUNC(TyObject *) _Ty_stackref_close(_PyStackRef ref, const char *filename, int linenumber); PyAPI_FUNC(_PyStackRef) _Ty_stackref_create(TyObject *obj, const char *filename, int linenumber); PyAPI_FUNC(void) _Ty_stackref_record_borrow(_PyStackRef ref, const char *filename, int linenumber); -extern void _Ty_stackref_associate(PyInterpreterState *interp, TyObject *obj, _PyStackRef ref); +extern void _Ty_stackref_associate(TyInterpreterState *interp, TyObject *obj, _PyStackRef ref); static const _PyStackRef PyStackRef_NULL = { .index = 0 }; diff --git a/Include/internal/pycore_stats.h b/Include/internal/pycore_stats.h index 12cbaff..874073b 100644 --- a/Include/internal/pycore_stats.h +++ b/Include/internal/pycore_stats.h @@ -86,7 +86,7 @@ PyAPI_FUNC(TyObject*) _Ty_GetSpecializationStats(void); #define RARE_EVENT_INC(name) \ do { \ - PyInterpreterState *interp = TyInterpreterState_Get(); \ + TyInterpreterState *interp = TyInterpreterState_Get(); \ RARE_EVENT_INTERP_INC(interp, name); \ } while (0); \ diff --git a/Include/internal/pycore_structseq.h b/Include/internal/pycore_structseq.h index 374f5af..c8fbaf3 100644 --- a/Include/internal/pycore_structseq.h +++ b/Include/internal/pycore_structseq.h @@ -13,25 +13,25 @@ extern "C" { // Export for '_curses' shared extension PyAPI_FUNC(TyTypeObject*) _PyStructSequence_NewType( - PyStructSequence_Desc *desc, + TyStructSequence_Desc *desc, unsigned long tp_flags); extern int _PyStructSequence_InitBuiltinWithFlags( - PyInterpreterState *interp, + TyInterpreterState *interp, TyTypeObject *type, - PyStructSequence_Desc *desc, + TyStructSequence_Desc *desc, unsigned long tp_flags); static inline int -_PyStructSequence_InitBuiltin(PyInterpreterState *interp, +_PyStructSequence_InitBuiltin(TyInterpreterState *interp, TyTypeObject *type, - PyStructSequence_Desc *desc) + TyStructSequence_Desc *desc) { return _PyStructSequence_InitBuiltinWithFlags(interp, type, desc, 0); } extern void _PyStructSequence_FiniBuiltin( - PyInterpreterState *interp, + TyInterpreterState *interp, TyTypeObject *type); #ifdef __cplusplus diff --git a/Include/internal/pycore_sysmodule.h b/Include/internal/pycore_sysmodule.h index 02e4cc4..ce8c14e 100644 --- a/Include/internal/pycore_sysmodule.h +++ b/Include/internal/pycore_sysmodule.h @@ -18,7 +18,7 @@ PyAPI_FUNC(size_t) _TySys_GetSizeOf(TyObject *); extern int _TySys_SetAttr(TyObject *, TyObject *); -extern int _TySys_ClearAttrString(PyInterpreterState *interp, +extern int _TySys_ClearAttrString(TyInterpreterState *interp, const char *name, int verbose); extern int _TySys_SetFlagObj(Ty_ssize_t pos, TyObject *new_value); diff --git a/Include/internal/pycore_time.h b/Include/internal/pycore_time.h index 740d581..c34f94d 100644 --- a/Include/internal/pycore_time.h +++ b/Include/internal/pycore_time.h @@ -1,6 +1,6 @@ -// Internal PyTime_t C API: see Doc/c-api/time.rst for the documentation. +// Internal TyTime_t C API: see Doc/c-api/time.rst for the documentation. // -// The PyTime_t type is an integer to support directly common arithmetic +// The TyTime_t type is an integer to support directly common arithmetic // operations such as t1 + t2. // // Time formats: @@ -14,9 +14,9 @@ // * timeval structure, 1 microsecond (10^-6 seconds). // * timespec structure, 1 nanosecond (10^-9 seconds). // -// Note that PyTime_t is now specified as int64_t, in nanoseconds. +// Note that TyTime_t is now specified as int64_t, in nanoseconds. // (If we need to change this, we'll need new public API with new names.) -// Previously, PyTime_t was configurable (in theory); some comments and code +// Previously, TyTime_t was configurable (in theory); some comments and code // might still allude to that. // // Integer overflows are detected and raise OverflowError. Conversion to a @@ -43,7 +43,7 @@ // // Internally, operations like (t * k / q) with integers are implemented in a // way to reduce the risk of integer overflow. Such operation is used to convert a -// clock value expressed in ticks with a frequency to PyTime_t, like +// clock value expressed in ticks with a frequency to TyTime_t, like // QueryPerformanceCounter() with QueryPerformanceFrequency() on Windows. @@ -130,66 +130,66 @@ PyAPI_FUNC(int) _TyTime_ObjectToTimespec( // Create a timestamp from a number of seconds. // Export for '_socket' shared extension. -PyAPI_FUNC(PyTime_t) _TyTime_FromSeconds(int seconds); +PyAPI_FUNC(TyTime_t) _TyTime_FromSeconds(int seconds); // Create a timestamp from a number of seconds in double. extern int _TyTime_FromSecondsDouble( double seconds, _TyTime_round_t round, - PyTime_t *result); + TyTime_t *result); // Macro to create a timestamp from a number of seconds, no integer overflow. // Only use the macro for small values, prefer _TyTime_FromSeconds(). #define _PYTIME_FROMSECONDS(seconds) \ - ((PyTime_t)(seconds) * (1000 * 1000 * 1000)) + ((TyTime_t)(seconds) * (1000 * 1000 * 1000)) // Create a timestamp from a number of microseconds. // Clamp to [PyTime_MIN; PyTime_MAX] on overflow. -extern PyTime_t _TyTime_FromMicrosecondsClamp(PyTime_t us); +extern TyTime_t _TyTime_FromMicrosecondsClamp(TyTime_t us); // Create a timestamp from a Python int object (number of nanoseconds). // Export for '_lsprof' shared extension. -PyAPI_FUNC(int) _TyTime_FromLong(PyTime_t *t, +PyAPI_FUNC(int) _TyTime_FromLong(TyTime_t *t, TyObject *obj); // Convert a number of seconds (Python float or int) to a timestamp. // Raise an exception and return -1 on error, return 0 on success. // Export for '_socket' shared extension. -PyAPI_FUNC(int) _TyTime_FromSecondsObject(PyTime_t *t, +PyAPI_FUNC(int) _TyTime_FromSecondsObject(TyTime_t *t, TyObject *obj, _TyTime_round_t round); // Convert a number of milliseconds (Python float or int, 10^-3) to a timestamp. // Raise an exception and return -1 on error, return 0 on success. // Export for 'select' shared extension. -PyAPI_FUNC(int) _TyTime_FromMillisecondsObject(PyTime_t *t, +PyAPI_FUNC(int) _TyTime_FromMillisecondsObject(TyTime_t *t, TyObject *obj, _TyTime_round_t round); // Convert timestamp to a number of milliseconds (10^-3 seconds). // Export for '_ssl' shared extension. -PyAPI_FUNC(PyTime_t) _TyTime_AsMilliseconds(PyTime_t t, +PyAPI_FUNC(TyTime_t) _TyTime_AsMilliseconds(TyTime_t t, _TyTime_round_t round); // Convert timestamp to a number of microseconds (10^-6 seconds). // Export for '_queue' shared extension. -PyAPI_FUNC(PyTime_t) _TyTime_AsMicroseconds(PyTime_t t, +PyAPI_FUNC(TyTime_t) _TyTime_AsMicroseconds(TyTime_t t, _TyTime_round_t round); #ifdef MS_WINDOWS // Convert timestamp to a number of 100 nanoseconds (10^-7 seconds). -extern PyTime_t _TyTime_As100Nanoseconds(PyTime_t t, +extern TyTime_t _TyTime_As100Nanoseconds(TyTime_t t, _TyTime_round_t round); #endif // Convert a timestamp (number of nanoseconds) as a Python int object. // Export for '_testinternalcapi' shared extension. -PyAPI_FUNC(TyObject*) _TyTime_AsLong(PyTime_t t); +PyAPI_FUNC(TyObject*) _TyTime_AsLong(TyTime_t t); #ifndef MS_WINDOWS // Create a timestamp from a timeval structure. // Raise an exception and return -1 on overflow, return 0 on success. -extern int _TyTime_FromTimeval(PyTime_t *tp, struct timeval *tv); +extern int _TyTime_FromTimeval(TyTime_t *tp, struct timeval *tv); #endif // Convert a timestamp to a timeval structure (microsecond resolution). @@ -197,14 +197,14 @@ extern int _TyTime_FromTimeval(PyTime_t *tp, struct timeval *tv); // Raise an exception and return -1 if the conversion overflowed, // return 0 on success. // Export for 'select' shared extension. -PyAPI_FUNC(int) _TyTime_AsTimeval(PyTime_t t, +PyAPI_FUNC(int) _TyTime_AsTimeval(TyTime_t t, struct timeval *tv, _TyTime_round_t round); // Similar to _TyTime_AsTimeval() but don't raise an exception on overflow. -// On overflow, clamp tv_sec to PyTime_t min/max. +// On overflow, clamp tv_sec to TyTime_t min/max. // Export for 'select' shared extension. -PyAPI_FUNC(void) _TyTime_AsTimeval_clamp(PyTime_t t, +PyAPI_FUNC(void) _TyTime_AsTimeval_clamp(TyTime_t t, struct timeval *tv, _TyTime_round_t round); @@ -216,7 +216,7 @@ PyAPI_FUNC(void) _TyTime_AsTimeval_clamp(PyTime_t t, // return 0 on success. // Export for '_datetime' shared extension. PyAPI_FUNC(int) _TyTime_AsTimevalTime_t( - PyTime_t t, + TyTime_t t, time_t *secs, int *us, _TyTime_round_t round); @@ -224,23 +224,23 @@ PyAPI_FUNC(int) _TyTime_AsTimevalTime_t( #if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_KQUEUE) // Create a timestamp from a timespec structure. // Raise an exception and return -1 on overflow, return 0 on success. -extern int _TyTime_FromTimespec(PyTime_t *tp, const struct timespec *ts); +extern int _TyTime_FromTimespec(TyTime_t *tp, const struct timespec *ts); // Convert a timestamp to a timespec structure (nanosecond resolution). // tv_nsec is always positive. // Raise an exception and return -1 on error, return 0 on success. // Export for '_testinternalcapi' shared extension. -PyAPI_FUNC(int) _TyTime_AsTimespec(PyTime_t t, struct timespec *ts); +PyAPI_FUNC(int) _TyTime_AsTimespec(TyTime_t t, struct timespec *ts); // Similar to _TyTime_AsTimespec() but don't raise an exception on overflow. -// On overflow, clamp tv_sec to PyTime_t min/max. +// On overflow, clamp tv_sec to TyTime_t min/max. // Export for '_testinternalcapi' shared extension. -PyAPI_FUNC(void) _TyTime_AsTimespec_clamp(PyTime_t t, struct timespec *ts); +PyAPI_FUNC(void) _TyTime_AsTimespec_clamp(TyTime_t t, struct timespec *ts); #endif // Compute t1 + t2. Clamp to [PyTime_MIN; PyTime_MAX] on overflow. -extern PyTime_t _TyTime_Add(PyTime_t t1, PyTime_t t2); +extern TyTime_t _TyTime_Add(TyTime_t t1, TyTime_t t2); // Structure used by time.get_clock_info() typedef struct { @@ -254,7 +254,7 @@ typedef struct { // On success, set *t and *info (if not NULL), and return 0. // On error, raise an exception and return -1. extern int _TyTime_TimeWithInfo( - PyTime_t *t, + TyTime_t *t, _Ty_clock_info_t *info); // Get the time of a monotonic clock, i.e. a clock that cannot go backwards. @@ -267,7 +267,7 @@ extern int _TyTime_TimeWithInfo( // Return 0 on success, raise an exception and return -1 on error. // Export for '_testsinglephase' shared extension. PyAPI_FUNC(int) _TyTime_MonotonicWithInfo( - PyTime_t *t, + TyTime_t *t, _Ty_clock_info_t *info); @@ -289,7 +289,7 @@ PyAPI_FUNC(int) _TyTime_gmtime(time_t t, struct tm *tm); // // Return 0 on success, raise an exception and return -1 on error. extern int _TyTime_PerfCounterWithInfo( - PyTime_t *t, + TyTime_t *t, _Ty_clock_info_t *info); @@ -298,12 +298,12 @@ extern int _TyTime_PerfCounterWithInfo( // Create a deadline. // Pseudo code: return PyTime_MonotonicRaw() + timeout // Export for '_ssl' shared extension. -PyAPI_FUNC(PyTime_t) _PyDeadline_Init(PyTime_t timeout); +PyAPI_FUNC(TyTime_t) _PyDeadline_Init(TyTime_t timeout); // Get remaining time from a deadline. // Pseudo code: return deadline - PyTime_MonotonicRaw() // Export for '_ssl' shared extension. -PyAPI_FUNC(PyTime_t) _PyDeadline_Get(PyTime_t deadline); +PyAPI_FUNC(TyTime_t) _PyDeadline_Get(TyTime_t deadline); // --- _PyTimeFraction ------------------------------------------------------- @@ -313,13 +313,13 @@ PyAPI_FUNC(PyTime_t) _PyDeadline_Get(PyTime_t deadline); // Return -1 if the fraction is invalid. extern int _PyTimeFraction_Set( _PyTimeFraction *frac, - PyTime_t numer, - PyTime_t denom); + TyTime_t numer, + TyTime_t denom); // Compute ticks * frac.numer / frac.denom. // Clamp to [PyTime_MIN; PyTime_MAX] on overflow. -extern PyTime_t _PyTimeFraction_Mul( - PyTime_t ticks, +extern TyTime_t _PyTimeFraction_Mul( + TyTime_t ticks, const _PyTimeFraction *frac); // Compute a clock resolution: frac.numer / frac.denom / 1e9. diff --git a/Include/internal/pycore_traceback.h b/Include/internal/pycore_traceback.h index dbc46e4..bfaae76 100644 --- a/Include/internal/pycore_traceback.h +++ b/Include/internal/pycore_traceback.h @@ -60,7 +60,7 @@ extern void _Ty_DumpTraceback( extern const char* _Ty_DumpTracebackThreads( int fd, - PyInterpreterState *interp, + TyInterpreterState *interp, TyThreadState *current_tstate); /* Write a Unicode object into the file descriptor fd. Encode the string to diff --git a/Include/internal/pycore_tuple.h b/Include/internal/pycore_tuple.h index be290f5..a907178 100644 --- a/Include/internal/pycore_tuple.h +++ b/Include/internal/pycore_tuple.h @@ -16,7 +16,7 @@ extern void _TyTuple_DebugMallocStats(FILE *out); /* runtime lifecycle */ -extern TyStatus _TyTuple_InitGlobalObjects(PyInterpreterState *); +extern TyStatus _TyTuple_InitGlobalObjects(TyInterpreterState *); /* other API */ diff --git a/Include/internal/pycore_typeobject.h b/Include/internal/pycore_typeobject.h index 40e7d7e..9acfe98 100644 --- a/Include/internal/pycore_typeobject.h +++ b/Include/internal/pycore_typeobject.h @@ -35,10 +35,10 @@ extern "C" { /* runtime lifecycle */ -extern TyStatus _PyTypes_InitTypes(PyInterpreterState *); -extern void _PyTypes_FiniTypes(PyInterpreterState *); -extern void _PyTypes_FiniExtTypes(PyInterpreterState *interp); -extern void _PyTypes_Fini(PyInterpreterState *); +extern TyStatus _PyTypes_InitTypes(TyInterpreterState *); +extern void _PyTypes_FiniTypes(TyInterpreterState *); +extern void _PyTypes_FiniExtTypes(TyInterpreterState *interp); +extern void _PyTypes_Fini(TyInterpreterState *); extern void _PyTypes_AfterFork(void); static inline TyObject ** @@ -49,21 +49,21 @@ _PyStaticType_GET_WEAKREFS_LISTPTR(managed_static_type_state *state) } extern int _PyStaticType_InitBuiltin( - PyInterpreterState *interp, + TyInterpreterState *interp, TyTypeObject *type); extern void _PyStaticType_FiniBuiltin( - PyInterpreterState *interp, + TyInterpreterState *interp, TyTypeObject *type); extern void _PyStaticType_ClearWeakRefs( - PyInterpreterState *interp, + TyInterpreterState *interp, TyTypeObject *type); extern managed_static_type_state * _PyStaticType_GetState( - PyInterpreterState *interp, + TyInterpreterState *interp, TyTypeObject *type); // Export for '_datetime' shared extension. PyAPI_FUNC(int) _PyStaticType_InitForExtension( - PyInterpreterState *interp, + TyInterpreterState *interp, TyTypeObject *self); // Export for _testinternalcapi extension. diff --git a/Include/internal/pycore_typevarobject.h b/Include/internal/pycore_typevarobject.h index a53ccd5..dc577cf 100644 --- a/Include/internal/pycore_typevarobject.h +++ b/Include/internal/pycore_typevarobject.h @@ -14,8 +14,8 @@ extern TyObject *_Ty_make_typevartuple(TyThreadState *, TyObject *); extern TyObject *_Ty_make_typealias(TyThreadState *, TyObject *); extern TyObject *_Ty_subscript_generic(TyThreadState *, TyObject *); extern TyObject *_Ty_set_typeparam_default(TyThreadState *, TyObject *, TyObject *); -extern int _Ty_initialize_generic(PyInterpreterState *); -extern void _Ty_clear_generic_types(PyInterpreterState *); +extern int _Ty_initialize_generic(TyInterpreterState *); +extern void _Ty_clear_generic_types(TyInterpreterState *); extern int _Ty_typing_type_repr(PyUnicodeWriter *, TyObject *); extern TyTypeObject _PyTypeAlias_Type; diff --git a/Include/internal/pycore_unicodeobject.h b/Include/internal/pycore_unicodeobject.h index 3ee8172..c13d610 100644 --- a/Include/internal/pycore_unicodeobject.h +++ b/Include/internal/pycore_unicodeobject.h @@ -273,11 +273,11 @@ PyAPI_FUNC(Ty_ssize_t) _TyUnicode_ScanIdentifier(TyObject *); /* --- Runtime lifecycle -------------------------------------------------- */ -extern void _TyUnicode_InitState(PyInterpreterState *); -extern TyStatus _TyUnicode_InitGlobalObjects(PyInterpreterState *); -extern TyStatus _TyUnicode_InitTypes(PyInterpreterState *); -extern void _TyUnicode_Fini(PyInterpreterState *); -extern void _TyUnicode_FiniTypes(PyInterpreterState *); +extern void _TyUnicode_InitState(TyInterpreterState *); +extern TyStatus _TyUnicode_InitGlobalObjects(TyInterpreterState *); +extern TyStatus _TyUnicode_InitTypes(TyInterpreterState *); +extern void _TyUnicode_Fini(TyInterpreterState *); +extern void _TyUnicode_FiniTypes(TyInterpreterState *); extern TyTypeObject _PyUnicodeASCIIIter_Type; @@ -286,16 +286,16 @@ extern TyTypeObject _PyUnicodeASCIIIter_Type; // All these are "ref-neutral", like the public TyUnicode_InternInPlace. // Explicit interning routines: -PyAPI_FUNC(void) _TyUnicode_InternMortal(PyInterpreterState *interp, TyObject **); -PyAPI_FUNC(void) _TyUnicode_InternImmortal(PyInterpreterState *interp, TyObject **); +PyAPI_FUNC(void) _TyUnicode_InternMortal(TyInterpreterState *interp, TyObject **); +PyAPI_FUNC(void) _TyUnicode_InternImmortal(TyInterpreterState *interp, TyObject **); // Left here to help backporting: -PyAPI_FUNC(void) _TyUnicode_InternInPlace(PyInterpreterState *interp, TyObject **p); +PyAPI_FUNC(void) _TyUnicode_InternInPlace(TyInterpreterState *interp, TyObject **p); // Only for singletons in the _PyRuntime struct: -extern void _TyUnicode_InternStatic(PyInterpreterState *interp, TyObject **); +extern void _TyUnicode_InternStatic(TyInterpreterState *interp, TyObject **); /* --- Other API ---------------------------------------------------------- */ -extern void _TyUnicode_ClearInterned(PyInterpreterState *interp); +extern void _TyUnicode_ClearInterned(TyInterpreterState *interp); // Like TyUnicode_AsUTF8(), but check for embedded null characters. // Export for '_sqlite3' shared extension. diff --git a/Include/internal/pycore_unicodeobject_generated.h b/Include/internal/pycore_unicodeobject_generated.h index 657d03a..ccf8a40 100644 --- a/Include/internal/pycore_unicodeobject_generated.h +++ b/Include/internal/pycore_unicodeobject_generated.h @@ -10,7 +10,7 @@ extern "C" { /* The following is auto-generated by Tools/build/generate_global_objects.py. */ static inline void -_TyUnicode_InitStaticStrings(PyInterpreterState *interp) { +_TyUnicode_InitStaticStrings(TyInterpreterState *interp) { TyObject *string; string = &_Ty_ID(CANCELLED); _TyUnicode_InternStatic(interp, &string); diff --git a/Include/internal/pycore_uniqueid.h b/Include/internal/pycore_uniqueid.h index 8d91965..a0c6de0 100644 --- a/Include/internal/pycore_uniqueid.h +++ b/Include/internal/pycore_uniqueid.h @@ -44,7 +44,7 @@ extern void _TyObject_MergePerThreadRefcounts(_PyThreadStateImpl *tstate); extern void _TyObject_FinalizePerThreadRefcounts(_PyThreadStateImpl *tstate); // Frees the interpreter's pool of type ids. -extern void _TyObject_FinalizeUniqueIdPool(PyInterpreterState *interp); +extern void _TyObject_FinalizeUniqueIdPool(TyInterpreterState *interp); // Increfs the object, resizing the thread-local refcount array if necessary. PyAPI_FUNC(void) _TyObject_ThreadIncrefSlow(TyObject *obj, size_t idx); diff --git a/Include/internal/pycore_uop_metadata.h b/Include/internal/pycore_uop_metadata.h index ecf53da..b86906f 100644 --- a/Include/internal/pycore_uop_metadata.h +++ b/Include/internal/pycore_uop_metadata.h @@ -13,7 +13,7 @@ extern "C" { #include "pycore_uop_ids.h" extern const uint16_t _PyUop_Flags[MAX_UOP_ID+1]; extern const uint8_t _PyUop_Replication[MAX_UOP_ID+1]; -extern const char * const _PyOpcode_uop_name[MAX_UOP_ID+1]; +extern const char * const _TyOpcode_uop_name[MAX_UOP_ID+1]; extern int _PyUop_num_popped(int opcode, int oparg); @@ -318,7 +318,7 @@ const uint8_t _PyUop_Replication[MAX_UOP_ID+1] = { [_INIT_CALL_PY_EXACT_ARGS] = 5, }; -const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = { +const char *const _TyOpcode_uop_name[MAX_UOP_ID+1] = { [_BINARY_OP] = "_BINARY_OP", [_BINARY_OP_ADD_FLOAT] = "_BINARY_OP_ADD_FLOAT", [_BINARY_OP_ADD_INT] = "_BINARY_OP_ADD_INT", diff --git a/Include/internal/pycore_warnings.h b/Include/internal/pycore_warnings.h index a3da9cf..23924d6 100644 --- a/Include/internal/pycore_warnings.h +++ b/Include/internal/pycore_warnings.h @@ -8,7 +8,7 @@ extern "C" { # error "this header requires Ty_BUILD_CORE define" #endif -extern int _TyWarnings_InitState(PyInterpreterState *interp); +extern int _TyWarnings_InitState(TyInterpreterState *interp); extern TyObject* _TyWarnings_Init(void); diff --git a/Include/moduleobject.h b/Include/moduleobject.h index 854b34e..8448451 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -47,7 +47,7 @@ typedef struct PyModuleDef_Base { TyObject* (*m_init)(void); /* The module's index into its interpreter's modules_by_index cache. This is set for all extension modules but only used for legacy ones. - (See PyInterpreterState.modules_by_index for more info.) + (See TyInterpreterState.modules_by_index for more info.) It is set by PyModuleDef_Init(). */ Ty_ssize_t m_index; /* A copy of the module's __dict__ after the first time it was loaded. diff --git a/Include/object.h b/Include/object.h index d32d45e..08fab9f 100644 --- a/Include/object.h +++ b/Include/object.h @@ -86,7 +86,7 @@ whose size is determined when the object is allocated. }, #endif -#define PyVarObject_HEAD_INIT(type, size) \ +#define TyVarObject_HEAD_INIT(type, size) \ { \ PyObject_HEAD_INIT(type) \ (size) \ diff --git a/Include/pymacro.h b/Include/pymacro.h index 3ea632e..54e8b80 100644 --- a/Include/pymacro.h +++ b/Include/pymacro.h @@ -149,11 +149,11 @@ /* Define macros for inline documentation. */ #define PyDoc_VAR(name) static const char name[] -#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str) +#define TyDoc_STRVAR(name,str) PyDoc_VAR(name) = TyDoc_STR(str) #ifdef WITH_DOC_STRINGS -#define PyDoc_STR(str) str +#define TyDoc_STR(str) str #else -#define PyDoc_STR(str) "" +#define TyDoc_STR(str) "" #endif /* Below "a" is a power of 2. */ diff --git a/Include/pyport.h b/Include/pyport.h index 6ffbd75..b57238c 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -522,7 +522,7 @@ extern "C" { # elif defined(__GNUC__) /* includes clang */ # define _Ty_thread_local __thread # else - // fall back to the PyThread_tss_*() API, or ignore. + // fall back to the TyThread_tss_*() API, or ignore. # undef HAVE_THREAD_LOCAL # endif # endif @@ -543,7 +543,7 @@ extern "C" { #endif /* Mark a function which cannot return. Example: - PyAPI_FUNC(void) _Ty_NO_RETURN PyThread_exit_thread(void); + PyAPI_FUNC(void) _Ty_NO_RETURN TyThread_exit_thread(void); XLC support is intentionally omitted due to bpo-40244 */ #ifndef _Ty_NO_RETURN diff --git a/Include/pystate.h b/Include/pystate.h index 28553c2..07350dc 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -11,9 +11,9 @@ extern "C" { removed (with effort). */ #define MAX_CO_EXTRA_USERS 255 -PyAPI_FUNC(PyInterpreterState *) TyInterpreterState_New(void); -PyAPI_FUNC(void) TyInterpreterState_Clear(PyInterpreterState *); -PyAPI_FUNC(void) TyInterpreterState_Delete(PyInterpreterState *); +PyAPI_FUNC(TyInterpreterState *) TyInterpreterState_New(void); +PyAPI_FUNC(void) TyInterpreterState_Clear(TyInterpreterState *); +PyAPI_FUNC(void) TyInterpreterState_Delete(TyInterpreterState *); #if !defined(Ty_LIMITED_API) || Ty_LIMITED_API+0 >= 0x03090000 /* New in 3.9 */ @@ -23,17 +23,17 @@ PyAPI_FUNC(void) TyInterpreterState_Delete(PyInterpreterState *); interpreter. It cannot return NULL. The caller must hold the GIL. */ -PyAPI_FUNC(PyInterpreterState *) TyInterpreterState_Get(void); +PyAPI_FUNC(TyInterpreterState *) TyInterpreterState_Get(void); #endif #if !defined(Ty_LIMITED_API) || Ty_LIMITED_API+0 >= 0x03080000 /* New in 3.8 */ -PyAPI_FUNC(TyObject *) TyInterpreterState_GetDict(PyInterpreterState *); +PyAPI_FUNC(TyObject *) TyInterpreterState_GetDict(TyInterpreterState *); #endif #if !defined(Ty_LIMITED_API) || Ty_LIMITED_API+0 >= 0x03070000 /* New in 3.7 */ -PyAPI_FUNC(int64_t) TyInterpreterState_GetID(PyInterpreterState *); +PyAPI_FUNC(int64_t) TyInterpreterState_GetID(TyInterpreterState *); #endif #if !defined(Ty_LIMITED_API) || Ty_LIMITED_API+0 >= 0x03030000 @@ -45,7 +45,7 @@ PyAPI_FUNC(int) PyState_RemoveModule(TyModuleDef*); #endif PyAPI_FUNC(TyObject*) PyState_FindModule(TyModuleDef*); -PyAPI_FUNC(TyThreadState *) TyThreadState_New(PyInterpreterState *); +PyAPI_FUNC(TyThreadState *) TyThreadState_New(TyInterpreterState *); PyAPI_FUNC(void) TyThreadState_Clear(TyThreadState *); PyAPI_FUNC(void) TyThreadState_Delete(TyThreadState *); @@ -68,7 +68,7 @@ PyAPI_FUNC(int) TyThreadState_SetAsyncExc(unsigned long, TyObject *); #if !defined(Ty_LIMITED_API) || Ty_LIMITED_API+0 >= 0x03090000 /* New in 3.9 */ -PyAPI_FUNC(PyInterpreterState*) TyThreadState_GetInterpreter(TyThreadState *tstate); +PyAPI_FUNC(TyInterpreterState*) TyThreadState_GetInterpreter(TyThreadState *tstate); PyAPI_FUNC(PyFrameObject*) TyThreadState_GetFrame(TyThreadState *tstate); PyAPI_FUNC(uint64_t) TyThreadState_GetID(TyThreadState *tstate); #endif diff --git a/Include/pythread.h b/Include/pythread.h index 8810ace..9f4fdf2 100644 --- a/Include/pythread.h +++ b/Include/pythread.h @@ -1,7 +1,7 @@ #ifndef Ty_PYTHREAD_H #define Ty_PYTHREAD_H -typedef void *PyThread_type_lock; +typedef void *TyThread_type_lock; #ifdef __cplusplus extern "C" { @@ -9,14 +9,14 @@ extern "C" { /* Return status codes for Python lock acquisition. Chosen for maximum * backwards compatibility, ie failure -> 0, success -> 1. */ -typedef enum PyLockStatus { +typedef enum TyLockStatus { PY_LOCK_FAILURE = 0, PY_LOCK_ACQUIRED = 1, PY_LOCK_INTR -} PyLockStatus; +} TyLockStatus; -PyAPI_FUNC(void) PyThread_init_thread(void); -PyAPI_FUNC(unsigned long) PyThread_start_new_thread(void (*)(void *), void *); +PyAPI_FUNC(void) TyThread_init_thread(void); +PyAPI_FUNC(unsigned long) TyThread_start_new_thread(void (*)(void *), void *); /* Terminates the current thread. Considered unsafe. * * WARNING: This function is only safe to call if all functions in the full call @@ -35,26 +35,26 @@ PyAPI_FUNC(unsigned long) PyThread_start_new_thread(void (*)(void *), void *); * In either case there is a risk of invalid references remaining to data on the * thread stack. */ -Ty_DEPRECATED(3.14) PyAPI_FUNC(void) _Ty_NO_RETURN PyThread_exit_thread(void); +Ty_DEPRECATED(3.14) PyAPI_FUNC(void) _Ty_NO_RETURN TyThread_exit_thread(void); -PyAPI_FUNC(unsigned long) PyThread_get_thread_ident(void); +PyAPI_FUNC(unsigned long) TyThread_get_thread_ident(void); #if (defined(__APPLE__) || defined(__linux__) || defined(_WIN32) \ || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \ || defined(__OpenBSD__) || defined(__NetBSD__) \ || defined(__DragonFly__) || defined(_AIX)) #define PY_HAVE_THREAD_NATIVE_ID -PyAPI_FUNC(unsigned long) PyThread_get_thread_native_id(void); +PyAPI_FUNC(unsigned long) TyThread_get_thread_native_id(void); #endif -PyAPI_FUNC(PyThread_type_lock) PyThread_allocate_lock(void); -PyAPI_FUNC(void) PyThread_free_lock(PyThread_type_lock); -PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int); +PyAPI_FUNC(TyThread_type_lock) TyThread_allocate_lock(void); +PyAPI_FUNC(void) TyThread_free_lock(TyThread_type_lock); +PyAPI_FUNC(int) TyThread_acquire_lock(TyThread_type_lock, int); #define WAIT_LOCK 1 #define NOWAIT_LOCK 0 // PY_TIMEOUT_T is the integral type used to specify timeouts when waiting -// on a lock (see PyThread_acquire_lock_timed() below). +// on a lock (see TyThread_acquire_lock_timed() below). #define PY_TIMEOUT_T long long @@ -70,17 +70,17 @@ PyAPI_FUNC(int) PyThread_acquire_lock(PyThread_type_lock, int); call will return PY_LOCK_INTR. The caller may reattempt to acquire the lock. */ -PyAPI_FUNC(PyLockStatus) PyThread_acquire_lock_timed(PyThread_type_lock, +PyAPI_FUNC(TyLockStatus) TyThread_acquire_lock_timed(TyThread_type_lock, PY_TIMEOUT_T microseconds, int intr_flag); -PyAPI_FUNC(void) PyThread_release_lock(PyThread_type_lock); +PyAPI_FUNC(void) TyThread_release_lock(TyThread_type_lock); -PyAPI_FUNC(size_t) PyThread_get_stacksize(void); -PyAPI_FUNC(int) PyThread_set_stacksize(size_t); +PyAPI_FUNC(size_t) TyThread_get_stacksize(void); +PyAPI_FUNC(int) TyThread_set_stacksize(size_t); #if !defined(Ty_LIMITED_API) || Ty_LIMITED_API+0 >= 0x03030000 -PyAPI_FUNC(TyObject*) PyThread_GetInfo(void); +PyAPI_FUNC(TyObject*) TyThread_GetInfo(void); #endif @@ -91,15 +91,15 @@ PyAPI_FUNC(TyObject*) PyThread_GetInfo(void); platforms, but it is not POSIX-compliant. Therefore, the new TSS API uses opaque data type to represent TSS keys to be compatible (see PEP 539). */ -Ty_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_create_key(void); -Ty_DEPRECATED(3.7) PyAPI_FUNC(void) PyThread_delete_key(int key); -Ty_DEPRECATED(3.7) PyAPI_FUNC(int) PyThread_set_key_value(int key, +Ty_DEPRECATED(3.7) PyAPI_FUNC(int) TyThread_create_key(void); +Ty_DEPRECATED(3.7) PyAPI_FUNC(void) TyThread_delete_key(int key); +Ty_DEPRECATED(3.7) PyAPI_FUNC(int) TyThread_set_key_value(int key, void *value); -Ty_DEPRECATED(3.7) PyAPI_FUNC(void *) PyThread_get_key_value(int key); -Ty_DEPRECATED(3.7) PyAPI_FUNC(void) PyThread_delete_key_value(int key); +Ty_DEPRECATED(3.7) PyAPI_FUNC(void *) TyThread_get_key_value(int key); +Ty_DEPRECATED(3.7) PyAPI_FUNC(void) TyThread_delete_key_value(int key); /* Cleanup after a fork */ -Ty_DEPRECATED(3.7) PyAPI_FUNC(void) PyThread_ReInitTLS(void); +Ty_DEPRECATED(3.7) PyAPI_FUNC(void) TyThread_ReInitTLS(void); #if !defined(Ty_LIMITED_API) || Ty_LIMITED_API+0 >= 0x03070000 @@ -108,15 +108,15 @@ Ty_DEPRECATED(3.7) PyAPI_FUNC(void) PyThread_ReInitTLS(void); typedef struct _Ty_tss_t Ty_tss_t; /* opaque */ -PyAPI_FUNC(Ty_tss_t *) PyThread_tss_alloc(void); -PyAPI_FUNC(void) PyThread_tss_free(Ty_tss_t *key); +PyAPI_FUNC(Ty_tss_t *) TyThread_tss_alloc(void); +PyAPI_FUNC(void) TyThread_tss_free(Ty_tss_t *key); /* The parameter key must not be NULL. */ -PyAPI_FUNC(int) PyThread_tss_is_created(Ty_tss_t *key); -PyAPI_FUNC(int) PyThread_tss_create(Ty_tss_t *key); -PyAPI_FUNC(void) PyThread_tss_delete(Ty_tss_t *key); -PyAPI_FUNC(int) PyThread_tss_set(Ty_tss_t *key, void *value); -PyAPI_FUNC(void *) PyThread_tss_get(Ty_tss_t *key); +PyAPI_FUNC(int) TyThread_tss_is_created(Ty_tss_t *key); +PyAPI_FUNC(int) TyThread_tss_create(Ty_tss_t *key); +PyAPI_FUNC(void) TyThread_tss_delete(Ty_tss_t *key); +PyAPI_FUNC(int) TyThread_tss_set(Ty_tss_t *key, void *value); +PyAPI_FUNC(void *) TyThread_tss_get(Ty_tss_t *key); #endif /* New in 3.7 */ #ifndef Ty_LIMITED_API diff --git a/Include/pytypedefs.h b/Include/pytypedefs.h index 19935ba..d9c2597 100644 --- a/Include/pytypedefs.h +++ b/Include/pytypedefs.h @@ -22,7 +22,7 @@ typedef struct PyCodeObject PyCodeObject; typedef struct _frame PyFrameObject; typedef struct _ts TyThreadState; -typedef struct _is PyInterpreterState; +typedef struct _is TyInterpreterState; #ifdef __cplusplus } diff --git a/Include/structseq.h b/Include/structseq.h index fd03844..6d4ecd4 100644 --- a/Include/structseq.h +++ b/Include/structseq.h @@ -7,37 +7,37 @@ extern "C" { #endif -typedef struct PyStructSequence_Field { +typedef struct TyStructSequence_Field { const char *name; const char *doc; -} PyStructSequence_Field; +} TyStructSequence_Field; -typedef struct PyStructSequence_Desc { +typedef struct TyStructSequence_Desc { const char *name; const char *doc; - PyStructSequence_Field *fields; + TyStructSequence_Field *fields; int n_in_sequence; -} PyStructSequence_Desc; +} TyStructSequence_Desc; -PyAPI_DATA(const char * const) PyStructSequence_UnnamedField; +PyAPI_DATA(const char * const) TyStructSequence_UnnamedField; #ifndef Ty_LIMITED_API -PyAPI_FUNC(void) PyStructSequence_InitType(TyTypeObject *type, - PyStructSequence_Desc *desc); -PyAPI_FUNC(int) PyStructSequence_InitType2(TyTypeObject *type, - PyStructSequence_Desc *desc); +PyAPI_FUNC(void) TyStructSequence_InitType(TyTypeObject *type, + TyStructSequence_Desc *desc); +PyAPI_FUNC(int) TyStructSequence_InitType2(TyTypeObject *type, + TyStructSequence_Desc *desc); #endif -PyAPI_FUNC(TyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc); +PyAPI_FUNC(TyTypeObject*) TyStructSequence_NewType(TyStructSequence_Desc *desc); -PyAPI_FUNC(TyObject *) PyStructSequence_New(TyTypeObject* type); +PyAPI_FUNC(TyObject *) TyStructSequence_New(TyTypeObject* type); -PyAPI_FUNC(void) PyStructSequence_SetItem(TyObject*, Ty_ssize_t, TyObject*); -PyAPI_FUNC(TyObject*) PyStructSequence_GetItem(TyObject*, Ty_ssize_t); +PyAPI_FUNC(void) TyStructSequence_SetItem(TyObject*, Ty_ssize_t, TyObject*); +PyAPI_FUNC(TyObject*) TyStructSequence_GetItem(TyObject*, Ty_ssize_t); #ifndef Ty_LIMITED_API typedef PyTupleObject PyStructSequence; -#define PyStructSequence_SET_ITEM PyStructSequence_SetItem -#define PyStructSequence_GET_ITEM PyStructSequence_GetItem +#define TyStructSequence_SET_ITEM TyStructSequence_SetItem +#define TyStructSequence_GET_ITEM TyStructSequence_GetItem #endif #ifdef __cplusplus diff --git a/Lib/test/clinic.test.c b/Lib/test/clinic.test.c index 3a840d2..952d595 100644 --- a/Lib/test/clinic.test.c +++ b/Lib/test/clinic.test.c @@ -21,7 +21,7 @@ test_object_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_object_converter__doc__, +TyDoc_STRVAR(test_object_converter__doc__, "test_object_converter($module, a, b, c, d, /)\n" "--\n" "\n"); @@ -72,7 +72,7 @@ cloned = test_object_converter Check the clone feature. [clinic start generated code]*/ -PyDoc_STRVAR(cloned__doc__, +TyDoc_STRVAR(cloned__doc__, "cloned($module, a, b, c, d, /)\n" "--\n" "\n" @@ -127,7 +127,7 @@ test_object_converter_one_arg [clinic start generated code]*/ -PyDoc_STRVAR(test_object_converter_one_arg__doc__, +TyDoc_STRVAR(test_object_converter_one_arg__doc__, "test_object_converter_one_arg($module, a, /)\n" "--\n" "\n"); @@ -149,7 +149,7 @@ test_objects_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_objects_converter__doc__, +TyDoc_STRVAR(test_objects_converter__doc__, "test_objects_converter($module, a, b=, /)\n" "--\n" "\n"); @@ -204,7 +204,7 @@ test_object_converter_subclass_of [clinic start generated code]*/ -PyDoc_STRVAR(test_object_converter_subclass_of__doc__, +TyDoc_STRVAR(test_object_converter_subclass_of__doc__, "test_object_converter_subclass_of($module, a, b, c, d, e, f, g, h, i,\n" " j, /)\n" "--\n" @@ -309,7 +309,7 @@ test_PyBytesObject_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_PyBytesObject_converter__doc__, +TyDoc_STRVAR(test_PyBytesObject_converter__doc__, "test_PyBytesObject_converter($module, a, /)\n" "--\n" "\n"); @@ -350,7 +350,7 @@ test_PyByteArrayObject_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_PyByteArrayObject_converter__doc__, +TyDoc_STRVAR(test_PyByteArrayObject_converter__doc__, "test_PyByteArrayObject_converter($module, a, /)\n" "--\n" "\n"); @@ -391,7 +391,7 @@ test_unicode_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_unicode_converter__doc__, +TyDoc_STRVAR(test_unicode_converter__doc__, "test_unicode_converter($module, a, /)\n" "--\n" "\n"); @@ -434,7 +434,7 @@ test_bool_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_bool_converter__doc__, +TyDoc_STRVAR(test_bool_converter__doc__, "test_bool_converter($module, a=True, b=True, c=True, /)\n" "--\n" "\n"); @@ -510,7 +510,7 @@ test_char_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_char_converter__doc__, +TyDoc_STRVAR(test_char_converter__doc__, "test_char_converter($module, a=b\'A\', b=b\'\\x07\', c=b\'\\x08\', d=b\'\\t\',\n" " e=b\'\\n\', f=b\'\\x0b\', g=b\'\\x0c\', h=b\'\\r\', i=b\'\"\',\n" " j=b\"\'\", k=b\'?\', l=b\'\\\\\', m=b\'\\x00\', n=b\'\\xff\', /)\n" @@ -949,7 +949,7 @@ test_unsigned_char_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_unsigned_char_converter__doc__, +TyDoc_STRVAR(test_unsigned_char_converter__doc__, "test_unsigned_char_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1049,7 +1049,7 @@ test_short_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_short_converter__doc__, +TyDoc_STRVAR(test_short_converter__doc__, "test_short_converter($module, a=12, /)\n" "--\n" "\n"); @@ -1113,7 +1113,7 @@ test_unsigned_short_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_unsigned_short_converter__doc__, +TyDoc_STRVAR(test_unsigned_short_converter__doc__, "test_unsigned_short_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1179,7 +1179,7 @@ test_int_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_int_converter__doc__, +TyDoc_STRVAR(test_int_converter__doc__, "test_int_converter($module, a=12, b=34, c=45, d=67, /)\n" "--\n" "\n"); @@ -1260,7 +1260,7 @@ test_unsigned_int_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_unsigned_int_converter__doc__, +TyDoc_STRVAR(test_unsigned_int_converter__doc__, "test_unsigned_int_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1323,7 +1323,7 @@ test_long_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_long_converter__doc__, +TyDoc_STRVAR(test_long_converter__doc__, "test_long_converter($module, a=12, /)\n" "--\n" "\n"); @@ -1372,7 +1372,7 @@ test_unsigned_long_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_unsigned_long_converter__doc__, +TyDoc_STRVAR(test_unsigned_long_converter__doc__, "test_unsigned_long_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1436,7 +1436,7 @@ test_long_long_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_long_long_converter__doc__, +TyDoc_STRVAR(test_long_long_converter__doc__, "test_long_long_converter($module, a=12, /)\n" "--\n" "\n"); @@ -1485,7 +1485,7 @@ test_unsigned_long_long_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_unsigned_long_long_converter__doc__, +TyDoc_STRVAR(test_unsigned_long_long_converter__doc__, "test_unsigned_long_long_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1555,7 +1555,7 @@ test_Py_ssize_t_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_Py_ssize_t_converter__doc__, +TyDoc_STRVAR(test_Py_ssize_t_converter__doc__, "test_Py_ssize_t_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1637,7 +1637,7 @@ test_slice_index_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_slice_index_converter__doc__, +TyDoc_STRVAR(test_slice_index_converter__doc__, "test_slice_index_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1699,7 +1699,7 @@ test_size_t_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_size_t_converter__doc__, +TyDoc_STRVAR(test_size_t_converter__doc__, "test_size_t_converter($module, a=12, /)\n" "--\n" "\n"); @@ -1745,7 +1745,7 @@ test_float_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_float_converter__doc__, +TyDoc_STRVAR(test_float_converter__doc__, "test_float_converter($module, a=12.5, /)\n" "--\n" "\n"); @@ -1798,7 +1798,7 @@ test_double_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_double_converter__doc__, +TyDoc_STRVAR(test_double_converter__doc__, "test_double_converter($module, a=12.5, /)\n" "--\n" "\n"); @@ -1851,7 +1851,7 @@ test_Py_complex_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_Py_complex_converter__doc__, +TyDoc_STRVAR(test_Py_complex_converter__doc__, "test_Py_complex_converter($module, a, /)\n" "--\n" "\n"); @@ -1898,7 +1898,7 @@ test_str_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_str_converter__doc__, +TyDoc_STRVAR(test_str_converter__doc__, "test_str_converter($module, a=, b=\'ab\', c=\'cd\',\n" " d=\'cef\', e=\'gh\', f=\'ij\', g=\'kl\', h=\'mn\', /)\n" "--\n" @@ -1961,7 +1961,7 @@ test_str_converter_encoding [clinic start generated code]*/ -PyDoc_STRVAR(test_str_converter_encoding__doc__, +TyDoc_STRVAR(test_str_converter_encoding__doc__, "test_str_converter_encoding($module, a, b, c, d, e, /)\n" "--\n" "\n"); @@ -2025,7 +2025,7 @@ test_Py_UNICODE_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_Py_UNICODE_converter__doc__, +TyDoc_STRVAR(test_Py_UNICODE_converter__doc__, "test_Py_UNICODE_converter($module, a, b, c, d, e, /)\n" "--\n" "\n"); @@ -2088,7 +2088,7 @@ test_Py_buffer_converter [clinic start generated code]*/ -PyDoc_STRVAR(test_Py_buffer_converter__doc__, +TyDoc_STRVAR(test_Py_buffer_converter__doc__, "test_Py_buffer_converter($module, a, b, c, d, e, /)\n" "--\n" "\n"); @@ -2155,7 +2155,7 @@ test_keywords [clinic start generated code]*/ -PyDoc_STRVAR(test_keywords__doc__, +TyDoc_STRVAR(test_keywords__doc__, "test_keywords($module, /, a, b)\n" "--\n" "\n"); @@ -2179,7 +2179,7 @@ test_keywords(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -2228,7 +2228,7 @@ test_keywords_kwonly [clinic start generated code]*/ -PyDoc_STRVAR(test_keywords_kwonly__doc__, +TyDoc_STRVAR(test_keywords_kwonly__doc__, "test_keywords_kwonly($module, /, a, *, b)\n" "--\n" "\n"); @@ -2252,7 +2252,7 @@ test_keywords_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -2301,7 +2301,7 @@ test_keywords_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_keywords_opt__doc__, +TyDoc_STRVAR(test_keywords_opt__doc__, "test_keywords_opt($module, /, a, b=None, c=None)\n" "--\n" "\n"); @@ -2326,7 +2326,7 @@ test_keywords_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -2390,7 +2390,7 @@ test_keywords_opt_kwonly [clinic start generated code]*/ -PyDoc_STRVAR(test_keywords_opt_kwonly__doc__, +TyDoc_STRVAR(test_keywords_opt_kwonly__doc__, "test_keywords_opt_kwonly($module, /, a, b=None, *, c=None, d=None)\n" "--\n" "\n"); @@ -2415,7 +2415,7 @@ test_keywords_opt_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2489,7 +2489,7 @@ test_keywords_kwonly_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_keywords_kwonly_opt__doc__, +TyDoc_STRVAR(test_keywords_kwonly_opt__doc__, "test_keywords_kwonly_opt($module, /, a, *, b=None, c=None)\n" "--\n" "\n"); @@ -2514,7 +2514,7 @@ test_keywords_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -2576,7 +2576,7 @@ test_posonly_keywords [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords__doc__, +TyDoc_STRVAR(test_posonly_keywords__doc__, "test_posonly_keywords($module, a, /, b)\n" "--\n" "\n"); @@ -2600,7 +2600,7 @@ test_posonly_keywords(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -2650,7 +2650,7 @@ test_posonly_kwonly [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_kwonly__doc__, +TyDoc_STRVAR(test_posonly_kwonly__doc__, "test_posonly_kwonly($module, a, /, *, c)\n" "--\n" "\n"); @@ -2674,7 +2674,7 @@ test_posonly_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('c'), }, }; @@ -2725,7 +2725,7 @@ test_posonly_keywords_kwonly [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords_kwonly__doc__, +TyDoc_STRVAR(test_posonly_keywords_kwonly__doc__, "test_posonly_keywords_kwonly($module, a, /, b, *, c)\n" "--\n" "\n"); @@ -2750,7 +2750,7 @@ test_posonly_keywords_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -2804,7 +2804,7 @@ test_posonly_keywords_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords_opt__doc__, +TyDoc_STRVAR(test_posonly_keywords_opt__doc__, "test_posonly_keywords_opt($module, a, /, b, c=None, d=None)\n" "--\n" "\n"); @@ -2829,7 +2829,7 @@ test_posonly_keywords_opt(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2894,7 +2894,7 @@ test_posonly_keywords_opt2 [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords_opt2__doc__, +TyDoc_STRVAR(test_posonly_keywords_opt2__doc__, "test_posonly_keywords_opt2($module, a, /, b=None, c=None)\n" "--\n" "\n"); @@ -2919,7 +2919,7 @@ test_posonly_keywords_opt2(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -2983,7 +2983,7 @@ test_posonly_opt_keywords_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_opt_keywords_opt__doc__, +TyDoc_STRVAR(test_posonly_opt_keywords_opt__doc__, "test_posonly_opt_keywords_opt($module, a, b=None, /, c=None, d=None)\n" "--\n" "\n"); @@ -3008,7 +3008,7 @@ test_posonly_opt_keywords_opt(TyObject *module, TyObject *const *args, Ty_ssize_ Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -3080,7 +3080,7 @@ test_posonly_kwonly_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_kwonly_opt__doc__, +TyDoc_STRVAR(test_posonly_kwonly_opt__doc__, "test_posonly_kwonly_opt($module, a, /, *, b, c=None, d=None)\n" "--\n" "\n"); @@ -3105,7 +3105,7 @@ test_posonly_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -3171,7 +3171,7 @@ test_posonly_kwonly_opt2 [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_kwonly_opt2__doc__, +TyDoc_STRVAR(test_posonly_kwonly_opt2__doc__, "test_posonly_kwonly_opt2($module, a, /, *, b=None, c=None)\n" "--\n" "\n"); @@ -3196,7 +3196,7 @@ test_posonly_kwonly_opt2(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -3261,7 +3261,7 @@ test_posonly_opt_kwonly_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_opt_kwonly_opt__doc__, +TyDoc_STRVAR(test_posonly_opt_kwonly_opt__doc__, "test_posonly_opt_kwonly_opt($module, a, b=None, /, *, c=None, d=None)\n" "--\n" "\n"); @@ -3286,7 +3286,7 @@ test_posonly_opt_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -3359,7 +3359,7 @@ test_posonly_keywords_kwonly_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords_kwonly_opt__doc__, +TyDoc_STRVAR(test_posonly_keywords_kwonly_opt__doc__, "test_posonly_keywords_kwonly_opt($module, a, /, b, *, c, d=None, e=None)\n" "--\n" "\n"); @@ -3385,7 +3385,7 @@ test_posonly_keywords_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssi Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), }, }; @@ -3455,7 +3455,7 @@ test_posonly_keywords_kwonly_opt2 [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords_kwonly_opt2__doc__, +TyDoc_STRVAR(test_posonly_keywords_kwonly_opt2__doc__, "test_posonly_keywords_kwonly_opt2($module, a, /, b, *, c=None, d=None)\n" "--\n" "\n"); @@ -3480,7 +3480,7 @@ test_posonly_keywords_kwonly_opt2(TyObject *module, TyObject *const *args, Ty_ss Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -3548,7 +3548,7 @@ test_posonly_keywords_opt_kwonly_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords_opt_kwonly_opt__doc__, +TyDoc_STRVAR(test_posonly_keywords_opt_kwonly_opt__doc__, "test_posonly_keywords_opt_kwonly_opt($module, a, /, b, c=None, *,\n" " d=None, e=None)\n" "--\n" @@ -3575,7 +3575,7 @@ test_posonly_keywords_opt_kwonly_opt(TyObject *module, TyObject *const *args, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), }, }; @@ -3655,7 +3655,7 @@ test_posonly_keywords_opt2_kwonly_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_keywords_opt2_kwonly_opt__doc__, +TyDoc_STRVAR(test_posonly_keywords_opt2_kwonly_opt__doc__, "test_posonly_keywords_opt2_kwonly_opt($module, a, /, b=None, c=None, *,\n" " d=None, e=None)\n" "--\n" @@ -3682,7 +3682,7 @@ test_posonly_keywords_opt2_kwonly_opt(TyObject *module, TyObject *const *args, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), }, }; @@ -3768,7 +3768,7 @@ test_posonly_opt_keywords_opt_kwonly_opt [clinic start generated code]*/ -PyDoc_STRVAR(test_posonly_opt_keywords_opt_kwonly_opt__doc__, +TyDoc_STRVAR(test_posonly_opt_keywords_opt_kwonly_opt__doc__, "test_posonly_opt_keywords_opt_kwonly_opt($module, a, b=None, /, c=None,\n" " d=None, *, e=None, f=None)\n" "--\n" @@ -3796,7 +3796,7 @@ test_posonly_opt_keywords_opt_kwonly_opt(TyObject *module, TyObject *const *args Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), _Ty_LATIN1_CHR('f'), }, }; @@ -3884,7 +3884,7 @@ test_keyword_only_parameter [clinic start generated code]*/ -PyDoc_STRVAR(test_keyword_only_parameter__doc__, +TyDoc_STRVAR(test_keyword_only_parameter__doc__, "test_keyword_only_parameter($module, /, *, co_lnotab=None)\n" "--\n" "\n"); @@ -3908,7 +3908,7 @@ test_keyword_only_parameter(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(co_lnotab), }, }; @@ -4035,7 +4035,7 @@ output pop #if defined(CONDITION_A) -PyDoc_STRVAR(test_preprocessor_guarded_condition_a__doc__, +TyDoc_STRVAR(test_preprocessor_guarded_condition_a__doc__, "test_preprocessor_guarded_condition_a($module, /)\n" "--\n" "\n"); @@ -4053,7 +4053,7 @@ test_preprocessor_guarded_condition_a(TyObject *module, TyObject *Py_UNUSED(igno #if !defined(CONDITION_A) && (CONDITION_B) -PyDoc_STRVAR(test_preprocessor_guarded_elif_condition_b__doc__, +TyDoc_STRVAR(test_preprocessor_guarded_elif_condition_b__doc__, "test_preprocessor_guarded_elif_condition_b($module, /)\n" "--\n" "\n"); @@ -4071,7 +4071,7 @@ test_preprocessor_guarded_elif_condition_b(TyObject *module, TyObject *Py_UNUSED #if !defined(CONDITION_A) && !(CONDITION_B) -PyDoc_STRVAR(test_preprocessor_guarded_else__doc__, +TyDoc_STRVAR(test_preprocessor_guarded_else__doc__, "test_preprocessor_guarded_else($module, /)\n" "--\n" "\n"); @@ -4089,7 +4089,7 @@ test_preprocessor_guarded_else(TyObject *module, TyObject *Py_UNUSED(ignored)) #if !defined(CONDITION_C) -PyDoc_STRVAR(test_preprocessor_guarded_ifndef_condition_c__doc__, +TyDoc_STRVAR(test_preprocessor_guarded_ifndef_condition_c__doc__, "test_preprocessor_guarded_ifndef_condition_c($module, /)\n" "--\n" "\n"); @@ -4107,7 +4107,7 @@ test_preprocessor_guarded_ifndef_condition_c(TyObject *module, TyObject *Py_UNUS #if defined(CONDITION_C) -PyDoc_STRVAR(test_preprocessor_guarded_ifndef_not_condition_c__doc__, +TyDoc_STRVAR(test_preprocessor_guarded_ifndef_not_condition_c__doc__, "test_preprocessor_guarded_ifndef_not_condition_c($module, /)\n" "--\n" "\n"); @@ -4125,7 +4125,7 @@ test_preprocessor_guarded_ifndef_not_condition_c(TyObject *module, TyObject *Py_ #if (CONDITION_D) -PyDoc_STRVAR(test_preprocessor_guarded_if_with_continuation__doc__, +TyDoc_STRVAR(test_preprocessor_guarded_if_with_continuation__doc__, "test_preprocessor_guarded_if_with_continuation($module, /)\n" "--\n" "\n"); @@ -4143,7 +4143,7 @@ test_preprocessor_guarded_if_with_continuation(TyObject *module, TyObject *Py_UN #if (CONDITION_E || CONDITION_F) -PyDoc_STRVAR(test_preprocessor_guarded_if_e_or_f__doc__, +TyDoc_STRVAR(test_preprocessor_guarded_if_e_or_f__doc__, "test_preprocessor_guarded_if_e_or_f($module, /)\n" "--\n" "\n" @@ -4199,7 +4199,7 @@ test_vararg_and_posonly [clinic start generated code]*/ -PyDoc_STRVAR(test_vararg_and_posonly__doc__, +TyDoc_STRVAR(test_vararg_and_posonly__doc__, "test_vararg_and_posonly($module, a, /, *args)\n" "--\n" "\n"); @@ -4247,7 +4247,7 @@ test_vararg [clinic start generated code]*/ -PyDoc_STRVAR(test_vararg__doc__, +TyDoc_STRVAR(test_vararg__doc__, "test_vararg($module, /, a, *args)\n" "--\n" "\n"); @@ -4271,7 +4271,7 @@ test_vararg(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -4329,7 +4329,7 @@ test_vararg_with_default [clinic start generated code]*/ -PyDoc_STRVAR(test_vararg_with_default__doc__, +TyDoc_STRVAR(test_vararg_with_default__doc__, "test_vararg_with_default($module, /, a, *args, b=False)\n" "--\n" "\n"); @@ -4354,7 +4354,7 @@ test_vararg_with_default(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -4423,7 +4423,7 @@ test_vararg_with_only_defaults [clinic start generated code]*/ -PyDoc_STRVAR(test_vararg_with_only_defaults__doc__, +TyDoc_STRVAR(test_vararg_with_only_defaults__doc__, "test_vararg_with_only_defaults($module, /, *args, b=False, c=\' \')\n" "--\n" "\n"); @@ -4448,7 +4448,7 @@ test_vararg_with_only_defaults(TyObject *module, TyObject *const *args, Ty_ssize Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -4516,7 +4516,7 @@ test_paramname_module module as mod: object [clinic start generated code]*/ -PyDoc_STRVAR(test_paramname_module__doc__, +TyDoc_STRVAR(test_paramname_module__doc__, "test_paramname_module($module, /, module)\n" "--\n" "\n"); @@ -4540,7 +4540,7 @@ test_paramname_module(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(module), }, }; @@ -4592,7 +4592,7 @@ mangle1 [clinic start generated code]*/ -PyDoc_STRVAR(mangle1__doc__, +TyDoc_STRVAR(mangle1__doc__, "mangle1($module, /, args, kwnames, return_value, _keywords, _parser,\n" " argsbuf, fastargs, nargs, noptargs)\n" "--\n" @@ -4620,7 +4620,7 @@ mangle1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(args), &_Ty_ID(kwnames), &_Ty_ID(return_value), &_Ty_ID(_keywords), &_Ty_ID(_parser), &_Ty_ID(argsbuf), &_Ty_ID(fastargs), &_Ty_ID(nargs), &_Ty_ID(noptargs), }, }; @@ -4685,7 +4685,7 @@ mangle2 [clinic start generated code]*/ -PyDoc_STRVAR(mangle2__doc__, +TyDoc_STRVAR(mangle2__doc__, "mangle2($module, /, args, kwargs, return_value)\n" "--\n" "\n"); @@ -4710,7 +4710,7 @@ mangle2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(args), &_Ty_ID(kwargs), &_Ty_ID(return_value), }, }; @@ -4760,7 +4760,7 @@ Test.cls_with_param a: int [clinic start generated code]*/ -PyDoc_STRVAR(Test_cls_with_param__doc__, +TyDoc_STRVAR(Test_cls_with_param__doc__, "cls_with_param($self, /, a)\n" "--\n" "\n"); @@ -4784,7 +4784,7 @@ Test_cls_with_param(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -4830,7 +4830,7 @@ Test.__init__ Empty init method. [clinic start generated code]*/ -PyDoc_STRVAR(Test___init____doc__, +TyDoc_STRVAR(Test___init____doc__, "Test()\n" "--\n" "\n" @@ -4872,7 +4872,7 @@ Test.__new__ Empty new method. [clinic start generated code]*/ -PyDoc_STRVAR(Test__doc__, +TyDoc_STRVAR(Test__doc__, "Test()\n" "--\n" "\n" @@ -4912,7 +4912,7 @@ Test.cls_no_params / [clinic start generated code]*/ -PyDoc_STRVAR(Test_cls_no_params__doc__, +TyDoc_STRVAR(Test_cls_no_params__doc__, "cls_no_params($self, /)\n" "--\n" "\n"); @@ -4944,7 +4944,7 @@ Test.metho_not_default_return_converter -> int / [clinic start generated code]*/ -PyDoc_STRVAR(Test_metho_not_default_return_converter__doc__, +TyDoc_STRVAR(Test_metho_not_default_return_converter__doc__, "metho_not_default_return_converter($self, a, /)\n" "--\n" "\n"); @@ -4983,7 +4983,7 @@ Test.an_metho_arg_named_arg / [clinic start generated code]*/ -PyDoc_STRVAR(Test_an_metho_arg_named_arg__doc__, +TyDoc_STRVAR(Test_an_metho_arg_named_arg__doc__, "an_metho_arg_named_arg($self, arg, /)\n" "--\n" "\n" @@ -5026,7 +5026,7 @@ Test.__init__ Varargs init method. For example, nargs is translated to TyTuple_GET_SIZE. [clinic start generated code]*/ -PyDoc_STRVAR(Test___init____doc__, +TyDoc_STRVAR(Test___init____doc__, "Test(*args)\n" "--\n" "\n" @@ -5069,7 +5069,7 @@ Test.__new__ Varargs new method. For example, nargs is translated to TyTuple_GET_SIZE. [clinic start generated code]*/ -PyDoc_STRVAR(Test__doc__, +TyDoc_STRVAR(Test__doc__, "Test(*args)\n" "--\n" "\n" @@ -5110,7 +5110,7 @@ Test.__init__ Init method with positional or keyword arguments. [clinic start generated code]*/ -PyDoc_STRVAR(Test___init____doc__, +TyDoc_STRVAR(Test___init____doc__, "Test(a)\n" "--\n" "\n" @@ -5132,7 +5132,7 @@ Test___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -5177,7 +5177,7 @@ Test___init___impl(TestObj *self, TyObject *a) Test.class_method [clinic start generated code]*/ -PyDoc_STRVAR(Test_class_method__doc__, +TyDoc_STRVAR(Test_class_method__doc__, "class_method($type, /)\n" "--\n" "\n"); @@ -5204,7 +5204,7 @@ Test_class_method_impl(TyTypeObject *type) Test.static_method [clinic start generated code]*/ -PyDoc_STRVAR(Test_static_method__doc__, +TyDoc_STRVAR(Test_static_method__doc__, "static_method()\n" "--\n" "\n"); @@ -5231,7 +5231,7 @@ Test_static_method_impl() Test.meth_coexist [clinic start generated code]*/ -PyDoc_STRVAR(Test_meth_coexist__doc__, +TyDoc_STRVAR(Test_meth_coexist__doc__, "meth_coexist($self, /)\n" "--\n" "\n"); @@ -5351,7 +5351,7 @@ Test.setter_first_with_docstr my silly docstring [clinic start generated code]*/ -PyDoc_STRVAR(Test_setter_first_with_docstr__doc__, +TyDoc_STRVAR(Test_setter_first_with_docstr__doc__, "my silly docstring"); #if defined(Test_setter_first_with_docstr_DOCSTR) # undef Test_setter_first_with_docstr_DOCSTR @@ -5429,7 +5429,7 @@ dump test1 output pop [clinic start generated code]*/ -PyDoc_STRVAR(new_dest__doc__, +TyDoc_STRVAR(new_dest__doc__, "new_dest($module, /, a)\n" "--\n" "\n" @@ -5443,7 +5443,7 @@ mangled_c_keyword_identifier The 'int' param should be mangled as 'int_value' [clinic start generated code]*/ -PyDoc_STRVAR(mangled_c_keyword_identifier__doc__, +TyDoc_STRVAR(mangled_c_keyword_identifier__doc__, "mangled_c_keyword_identifier($module, /, i)\n" "--\n" "\n" @@ -5468,7 +5468,7 @@ mangled_c_keyword_identifier(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('i'), }, }; @@ -5513,7 +5513,7 @@ mangled_c_keyword_identifier_impl(TyObject *module, int int_value) bool_return -> bool [clinic start generated code]*/ -PyDoc_STRVAR(bool_return__doc__, +TyDoc_STRVAR(bool_return__doc__, "bool_return($module, /)\n" "--\n" "\n"); @@ -5549,7 +5549,7 @@ bool_return_impl(TyObject *module) double_return -> double [clinic start generated code]*/ -PyDoc_STRVAR(double_return__doc__, +TyDoc_STRVAR(double_return__doc__, "double_return($module, /)\n" "--\n" "\n"); @@ -5591,7 +5591,7 @@ Test.__init__ Should generate two PyArg_ParseTuple calls. [clinic start generated code]*/ -PyDoc_STRVAR(Test___init____doc__, +TyDoc_STRVAR(Test___init____doc__, "Test(a, [b])\n" "Should generate two PyArg_ParseTuple calls."); @@ -5649,7 +5649,7 @@ Test._pyarg_parsestackandkeywords Check that _TyArg_ParseStackAndKeywords() is generated. [clinic start generated code]*/ -PyDoc_STRVAR(Test__pyarg_parsestackandkeywords__doc__, +TyDoc_STRVAR(Test__pyarg_parsestackandkeywords__doc__, "_pyarg_parsestackandkeywords($self, key, /)\n" "--\n" "\n" @@ -5705,7 +5705,7 @@ fn_with_default_binop_expr arg: object(c_default='CONST_A + CONST_B') = a+b [clinic start generated code]*/ -PyDoc_STRVAR(fn_with_default_binop_expr__doc__, +TyDoc_STRVAR(fn_with_default_binop_expr__doc__, "fn_with_default_binop_expr($module, /, arg=a+b)\n" "--\n" "\n"); @@ -5729,7 +5729,7 @@ fn_with_default_binop_expr(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(arg), }, }; @@ -5791,7 +5791,7 @@ The signature should have the default a='Hello!', as given by the Custom converter. [clinic start generated code]*/ -PyDoc_STRVAR(docstr_fallback_to_converter_default__doc__, +TyDoc_STRVAR(docstr_fallback_to_converter_default__doc__, "docstr_fallback_to_converter_default($module, /, a=\'Hello!\')\n" "--\n" "\n" @@ -5821,7 +5821,7 @@ docstr_fallback_to_converter_default(TyObject *module, TyObject *const *args, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -5866,7 +5866,7 @@ docstr_fallback_to_converter_default_impl(TyObject *module, str a) test_critical_section [clinic start generated code]*/ -PyDoc_STRVAR(test_critical_section__doc__, +TyDoc_STRVAR(test_critical_section__doc__, "test_critical_section($module, /)\n" "--\n" "\n"); @@ -5901,7 +5901,7 @@ test_critical_section_meth_o / [clinic start generated code]*/ -PyDoc_STRVAR(test_critical_section_meth_o__doc__, +TyDoc_STRVAR(test_critical_section_meth_o__doc__, "test_critical_section_meth_o($module, a, /)\n" "--\n" "\n"); @@ -5943,7 +5943,7 @@ test_critical_section_object test_critical_section_object [clinic start generated code]*/ -PyDoc_STRVAR(test_critical_section_object__doc__, +TyDoc_STRVAR(test_critical_section_object__doc__, "test_critical_section_object($module, a, /)\n" "--\n" "\n" @@ -5987,7 +5987,7 @@ test_critical_section_object2 test_critical_section_object2 [clinic start generated code]*/ -PyDoc_STRVAR(test_critical_section_object2__doc__, +TyDoc_STRVAR(test_critical_section_object2__doc__, "test_critical_section_object2($module, a, b, /)\n" "--\n" "\n" diff --git a/Lib/test/test_cext/extension.c b/Lib/test/test_cext/extension.c index 8a5fc45..a0d2417 100644 --- a/Lib/test/test_cext/extension.c +++ b/Lib/test/test_cext/extension.c @@ -13,7 +13,7 @@ #define _STR(NAME) #NAME #define STR(NAME) _STR(NAME) -PyDoc_STRVAR(_testcext_add_doc, +TyDoc_STRVAR(_testcext_add_doc, "add(x, y)\n" "\n" "Return the sum of two integers: x + y."); @@ -77,7 +77,7 @@ static PyModuleDef_Slot _testcext_slots[] = { _Ty_COMP_DIAG_POP -PyDoc_STRVAR(_testcext_doc, "C test extension."); +TyDoc_STRVAR(_testcext_doc, "C test extension."); static struct TyModuleDef _testcext_module = { PyModuleDef_HEAD_INIT, // m_base diff --git a/Modules/_abc.c b/Modules/_abc.c index 4da691f..9d91852 100644 --- a/Modules/_abc.c +++ b/Modules/_abc.c @@ -16,7 +16,7 @@ module _abc [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=964f5328e1aefcda]*/ -PyDoc_STRVAR(_abc__doc__, +TyDoc_STRVAR(_abc__doc__, "Module contains faster C implementation of abc.ABCMeta"); typedef struct { @@ -142,7 +142,7 @@ abc_data_new(TyTypeObject *type, TyObject *args, TyObject *kwds) return (TyObject *) self; } -PyDoc_STRVAR(abc_data_doc, +TyDoc_STRVAR(abc_data_doc, "Internal state held by ABC machinery."); static TyType_Slot _abc_data_type_spec_slots[] = { diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 8b9ccea..3ea5ed5 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -130,8 +130,8 @@ GENERATE_DEBUG_SECTION(AsyncioDebug, Ty_AsyncioModuleDebugOffsets _AsyncioDebug) .task_node = offsetof(TaskObj, task_node), }, .asyncio_interpreter_state = { - .size = sizeof(PyInterpreterState), - .asyncio_tasks_head = offsetof(PyInterpreterState, asyncio_tasks_head), + .size = sizeof(TyInterpreterState), + .asyncio_tasks_head = offsetof(TyInterpreterState, asyncio_tasks_head), }, .asyncio_thread_state = { .size = sizeof(_PyThreadStateImpl), @@ -1755,7 +1755,7 @@ static TyMethodDef FutureType_methods[] = { _ASYNCIO_FUTURE_DONE_METHODDEF _ASYNCIO_FUTURE_GET_LOOP_METHODDEF _ASYNCIO_FUTURE__MAKE_CANCELLED_ERROR_METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* Sentinel */ }; @@ -2948,7 +2948,7 @@ static TyMethodDef TaskType_methods[] = { _ASYNCIO_TASK_SET_NAME_METHODDEF _ASYNCIO_TASK_GET_CORO_METHODDEF _ASYNCIO_TASK_GET_CONTEXT_METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* Sentinel */ }; @@ -3925,7 +3925,7 @@ _asyncio_current_task_impl(TyObject *module, TyObject *loop) TyObject *ret = Ty_None; // Stop the world and traverse the per-thread current tasks // and return the task if the loop matches - PyInterpreterState *interp = ts->base.interp; + TyInterpreterState *interp = ts->base.interp; _TyEval_StopTheWorld(interp); _Ty_FOR_EACH_TSTATE_BEGIN(interp, p) { ts = (_PyThreadStateImpl *)p; @@ -4008,7 +4008,7 @@ add_tasks_llist(struct llist_node *head, PyListObject *tasks) } static inline int -add_tasks_interp(PyInterpreterState *interp, PyListObject *tasks) +add_tasks_interp(TyInterpreterState *interp, PyListObject *tasks) { #ifdef Ty_GIL_DISABLED assert(interp->stoptheworld.world_stopped); @@ -4079,7 +4079,7 @@ _asyncio_all_tasks_impl(TyObject *module, TyObject *loop) return NULL; } - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); // Stop the world and traverse the per-thread linked list // of asyncio tasks for every thread, as well as the // interpreter's linked list, and add them to `tasks`. @@ -4337,7 +4337,7 @@ fail: #undef GET_MOD_ATTR } -PyDoc_STRVAR(module_doc, "Accelerator module for asyncio"); +TyDoc_STRVAR(module_doc, "Accelerator module for asyncio"); static TyMethodDef asyncio_methods[] = { _ASYNCIO_CURRENT_TASK_METHODDEF diff --git a/Modules/_bisectmodule.c b/Modules/_bisectmodule.c index a5573ab..8c013ac 100644 --- a/Modules/_bisectmodule.c +++ b/Modules/_bisectmodule.c @@ -426,7 +426,7 @@ static TyMethodDef bisect_methods[] = { {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "Bisection algorithms.\n\ \n\ This module provides support for maintaining a list in sorted order without\n\ diff --git a/Modules/_bz2module.c b/Modules/_bz2module.c index 5137641..51b1ec6 100644 --- a/Modules/_bz2module.c +++ b/Modules/_bz2module.c @@ -98,19 +98,19 @@ OutputBuffer_OnError(_BlocksOutputBuffer *buffer) #define ACQUIRE_LOCK(obj) do { \ - if (!PyThread_acquire_lock((obj)->lock, 0)) { \ + if (!TyThread_acquire_lock((obj)->lock, 0)) { \ Ty_BEGIN_ALLOW_THREADS \ - PyThread_acquire_lock((obj)->lock, 1); \ + TyThread_acquire_lock((obj)->lock, 1); \ Ty_END_ALLOW_THREADS \ } } while (0) -#define RELEASE_LOCK(obj) PyThread_release_lock((obj)->lock) +#define RELEASE_LOCK(obj) TyThread_release_lock((obj)->lock) typedef struct { PyObject_HEAD bz_stream bzs; int flushed; - PyThread_type_lock lock; + TyThread_type_lock lock; } BZ2Compressor; typedef struct { @@ -126,7 +126,7 @@ typedef struct { separately. Conversion and looping is encapsulated in decompress_buf() */ size_t bzs_avail_in_real; - PyThread_type_lock lock; + TyThread_type_lock lock; } BZ2Decompressor; #define _BZ2Compressor_CAST(op) ((BZ2Compressor *)(op)) @@ -357,7 +357,7 @@ _bz2_BZ2Compressor_impl(TyTypeObject *type, int compresslevel) return NULL; } - self->lock = PyThread_allocate_lock(); + self->lock = TyThread_allocate_lock(); if (self->lock == NULL) { Ty_DECREF(self); TyErr_SetString(TyExc_MemoryError, "Unable to allocate lock"); @@ -384,7 +384,7 @@ BZ2Compressor_dealloc(TyObject *op) BZ2Compressor *self = _BZ2Compressor_CAST(op); BZ2_bzCompressEnd(&self->bzs); if (self->lock != NULL) { - PyThread_free_lock(self->lock); + TyThread_free_lock(self->lock); } TyTypeObject *tp = Ty_TYPE(self); tp->tp_free((TyObject *)self); @@ -657,7 +657,7 @@ _bz2_BZ2Decompressor_impl(TyTypeObject *type) return NULL; } - self->lock = PyThread_allocate_lock(); + self->lock = TyThread_allocate_lock(); if (self->lock == NULL) { Ty_DECREF(self); TyErr_SetString(TyExc_MemoryError, "Unable to allocate lock"); @@ -694,7 +694,7 @@ BZ2Decompressor_dealloc(TyObject *op) BZ2_bzDecompressEnd(&self->bzs); Ty_CLEAR(self->unused_data); if (self->lock != NULL) { - PyThread_free_lock(self->lock); + TyThread_free_lock(self->lock); } TyTypeObject *tp = Ty_TYPE(self); @@ -714,13 +714,13 @@ static TyMethodDef BZ2Decompressor_methods[] = { {NULL} }; -PyDoc_STRVAR(BZ2Decompressor_eof__doc__, +TyDoc_STRVAR(BZ2Decompressor_eof__doc__, "True if the end-of-stream marker has been reached."); -PyDoc_STRVAR(BZ2Decompressor_unused_data__doc__, +TyDoc_STRVAR(BZ2Decompressor_unused_data__doc__, "Data found after the end of the compressed stream."); -PyDoc_STRVAR(BZ2Decompressor_needs_input_doc, +TyDoc_STRVAR(BZ2Decompressor_needs_input_doc, "True if more input is needed before more decompressed data can be produced."); static TyMemberDef BZ2Decompressor_members[] = { diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 0587d21..efdd830 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -1610,7 +1610,7 @@ deque___reduce___impl(dequeobject *deque) } } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyObject * deque_repr(TyObject *deque) @@ -1838,7 +1838,7 @@ static TyMethodDef deque_methods[] = { DEQUE_ROTATE_METHODDEF DEQUE___SIZEOF___METHODDEF {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -2033,7 +2033,7 @@ dequeiter_len(TyObject *op, TyObject *Py_UNUSED(dummy)) return TyLong_FromSsize_t(len); } -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * dequeiter_reduce(TyObject *op, TyObject *Py_UNUSED(dummy)) @@ -2206,7 +2206,7 @@ typedef struct { static TyType_Spec defdict_spec; -PyDoc_STRVAR(defdict_missing_doc, +TyDoc_STRVAR(defdict_missing_doc, "__missing__(key) # Called by __getitem__ for missing key; pseudo-code:\n\ if self.default_factory is None: raise KeyError((key,))\n\ self[key] = value = self.default_factory()\n\ @@ -2246,7 +2246,7 @@ new_defdict(TyObject *op, TyObject *arg) dd->default_factory ? dd->default_factory : Ty_None, arg, NULL); } -PyDoc_STRVAR(defdict_copy_doc, "D.copy() -> a shallow copy of D."); +TyDoc_STRVAR(defdict_copy_doc, "D.copy() -> a shallow copy of D."); static TyObject * defdict_copy(TyObject *op, TyObject *Py_UNUSED(dummy)) @@ -2324,14 +2324,14 @@ static TyMethodDef defdict_methods[] = { {"__reduce__", defdict_reduce, METH_NOARGS, reduce_doc}, {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, - PyDoc_STR("See PEP 585")}, + TyDoc_STR("See PEP 585")}, {NULL} }; static TyMemberDef defdict_members[] = { {"default_factory", _Ty_T_OBJECT, offsetof(defdictobject, default_factory), 0, - PyDoc_STR("Factory for default value called by __missing__().")}, + TyDoc_STR("Factory for default value called by __missing__().")}, {NULL} }; @@ -2467,7 +2467,7 @@ defdict_init(TyObject *self, TyObject *args, TyObject *kwds) return result; } -PyDoc_STRVAR(defdict_doc, +TyDoc_STRVAR(defdict_doc, "defaultdict(default_factory=None, /, [...]) --> dict with default factory\n\ \n\ The default factory is called without arguments to produce\n\ @@ -2810,7 +2810,7 @@ collections_free(void *module) (void)collections_clear((TyObject *)module); } -PyDoc_STRVAR(collections_doc, +TyDoc_STRVAR(collections_doc, "High performance data structures.\n\ - deque: ordered collection accessible from endpoints only\n\ - defaultdict: dict subclass with a default value factory\n\ diff --git a/Modules/_csv.c b/Modules/_csv.c index a490305..51f900f 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -573,7 +573,7 @@ err: /* Since dialect is now a heap type, it inherits pickling method for * protocol 0 and 1 from object, therefore it needs to be overridden */ -PyDoc_STRVAR(dialect_reduce_doc, "raises an exception to avoid pickling"); +TyDoc_STRVAR(dialect_reduce_doc, "raises an exception to avoid pickling"); static TyObject * Dialect_reduce(TyObject *self, TyObject *args) { @@ -588,7 +588,7 @@ static struct TyMethodDef dialect_methods[] = { {NULL, NULL} }; -PyDoc_STRVAR(Dialect_Type_doc, +TyDoc_STRVAR(Dialect_Type_doc, "CSV dialect\n" "\n" "The Dialect type records CSV parsing and generation options.\n"); @@ -1021,7 +1021,7 @@ Reader_clear(TyObject *op) return 0; } -PyDoc_STRVAR(Reader_Type_doc, +TyDoc_STRVAR(Reader_Type_doc, "CSV reader\n" "\n" "Reader objects are responsible for reading and parsing tabular data\n" @@ -1303,7 +1303,7 @@ join_append_lineterminator(WriterObj *self) return 1; } -PyDoc_STRVAR(csv_writerow_doc, +TyDoc_STRVAR(csv_writerow_doc, "writerow(iterable)\n" "\n" "Construct and write a CSV record from an iterable of fields. Non-string\n" @@ -1413,7 +1413,7 @@ csv_writerow(TyObject *op, TyObject *seq) return result; } -PyDoc_STRVAR(csv_writerows_doc, +TyDoc_STRVAR(csv_writerows_doc, "writerows(iterable of iterables)\n" "\n" "Construct and write a series of iterables to a csv file. Non-string\n" @@ -1494,7 +1494,7 @@ Writer_dealloc(TyObject *op) Ty_DECREF(tp); } -PyDoc_STRVAR(Writer_Type_doc, +TyDoc_STRVAR(Writer_Type_doc, "CSV writer\n" "\n" "Writer objects are responsible for generating tabular data\n" @@ -1702,9 +1702,9 @@ TyType_Spec error_spec = { * MODULE */ -PyDoc_STRVAR(csv_module_doc, "CSV parsing and writing.\n"); +TyDoc_STRVAR(csv_module_doc, "CSV parsing and writing.\n"); -PyDoc_STRVAR(csv_reader_doc, +TyDoc_STRVAR(csv_reader_doc, " csv_reader = reader(iterable [, dialect='excel']\n" " [optional keyword args])\n" " for row in csv_reader:\n" @@ -1719,7 +1719,7 @@ PyDoc_STRVAR(csv_reader_doc, "The returned object is an iterator. Each iteration returns a row\n" "of the CSV file (which can span multiple input lines).\n"); -PyDoc_STRVAR(csv_writer_doc, +TyDoc_STRVAR(csv_writer_doc, " csv_writer = csv.writer(fileobj [, dialect='excel']\n" " [optional keyword args])\n" " for row in sequence:\n" @@ -1733,7 +1733,7 @@ PyDoc_STRVAR(csv_writer_doc, "\n" "The \"fileobj\" argument can be any object that supports the file API.\n"); -PyDoc_STRVAR(csv_register_dialect_doc, +TyDoc_STRVAR(csv_register_dialect_doc, "Create a mapping from a string name to a dialect class.\n" " dialect = csv.register_dialect(name[, dialect[, **fmtparams]])"); diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index 67aafe2..bd61bd9 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -195,7 +195,7 @@ _DictRemover_call(TyObject *myself, TyObject *args, TyObject *kw) Py_RETURN_NONE; } -PyDoc_STRVAR(dictremover_doc, "deletes a key from a dictionary"); +TyDoc_STRVAR(dictremover_doc, "deletes a key from a dictionary"); static TyType_Slot dictremover_slots[] = { {Ty_tp_dealloc, _DictRemover_dealloc}, @@ -1187,7 +1187,7 @@ UnionType_setattro(TyObject *self, TyObject *key, TyObject *value) static TyType_Slot pycstruct_type_slots[] = { {Ty_tp_setattro, PyCStructType_setattro}, - {Ty_tp_doc, PyDoc_STR("metatype for the CData Objects")}, + {Ty_tp_doc, TyDoc_STR("metatype for the CData Objects")}, {Ty_tp_methods, CDataType_methods}, {Ty_tp_init, PyCStructType_init}, {0, NULL}, @@ -1202,7 +1202,7 @@ static TyType_Spec pycstruct_type_spec = { static TyType_Slot union_type_slots[] = { {Ty_tp_setattro, UnionType_setattro}, - {Ty_tp_doc, PyDoc_STR("metatype for the Union Objects")}, + {Ty_tp_doc, TyDoc_STR("metatype for the Union Objects")}, {Ty_tp_methods, CDataType_methods}, {Ty_tp_init, UnionType_init}, {0, NULL}, @@ -1455,7 +1455,7 @@ static TyMethodDef PyCPointerType_methods[] = { }; static TyType_Slot pycpointer_type_slots[] = { - {Ty_tp_doc, PyDoc_STR("metatype for the Pointer Objects")}, + {Ty_tp_doc, TyDoc_STR("metatype for the Pointer Objects")}, {Ty_tp_methods, PyCPointerType_methods}, {Ty_tp_init, PyCPointerType_init}, {0, NULL}, @@ -1843,7 +1843,7 @@ error: } static TyType_Slot pycarray_type_slots[] = { - {Ty_tp_doc, PyDoc_STR("metatype for the Array Objects")}, + {Ty_tp_doc, TyDoc_STR("metatype for the Array Objects")}, {Ty_tp_methods, CDataType_methods}, {Ty_tp_init, PyCArrayType_init}, {0, NULL}, @@ -2596,7 +2596,7 @@ static TyMethodDef PyCSimpleType_methods[] = { }; static TyType_Slot pycsimple_type_slots[] = { - {Ty_tp_doc, PyDoc_STR("metatype for the PyCSimpleType Objects")}, + {Ty_tp_doc, TyDoc_STR("metatype for the PyCSimpleType Objects")}, {Ty_tp_methods, PyCSimpleType_methods}, {Ty_tp_init, PyCSimpleType_init}, {0, NULL}, @@ -2854,7 +2854,7 @@ PyCFuncPtrType_init(TyObject *self, TyObject *args, TyObject *kwds) } static TyType_Slot pycfuncptr_type_slots[] = { - {Ty_tp_doc, PyDoc_STR("metatype for C function pointers")}, + {Ty_tp_doc, TyDoc_STR("metatype for C function pointers")}, {Ty_tp_methods, CDataType_methods}, {Ty_tp_init, PyCFuncPtrType_init}, {0, NULL}, @@ -3038,13 +3038,13 @@ PyCData_dealloc(TyObject *self) } static TyMemberDef PyCData_members[] = { - { "_b_base_", _Py_T_OBJECT, + { "_b_base_", _Ty_T_OBJECT, offsetof(CDataObject, b_base), Py_READONLY, "the base object" }, { "_b_needsfree_", Ty_T_INT, offsetof(CDataObject, b_needsfree), Py_READONLY, "whether the object owns the memory or not" }, - { "_objects", _Py_T_OBJECT, + { "_objects", _Ty_T_OBJECT, offsetof(CDataObject, b_objects), Py_READONLY, "internal objects tree (NEVER CHANGE THIS OBJECT!)"}, { NULL }, @@ -3221,7 +3221,7 @@ static TyMethodDef PyCData_methods[] = { static TyType_Slot pycdata_slots[] = { {Ty_tp_dealloc, PyCData_dealloc}, {Ty_tp_hash, PyCData_nohash}, - {Ty_tp_doc, PyDoc_STR("XXX to be provided")}, + {Ty_tp_doc, TyDoc_STR("XXX to be provided")}, {Ty_tp_traverse, PyCData_traverse}, {Ty_tp_clear, PyCData_clear}, {Ty_tp_methods, PyCData_methods}, @@ -4772,7 +4772,7 @@ static TyType_Slot pycfuncptr_slots[] = { {Ty_tp_dealloc, PyCFuncPtr_dealloc}, {Ty_tp_repr, PyCFuncPtr_repr}, {Ty_tp_call, PyCFuncPtr_call}, - {Ty_tp_doc, PyDoc_STR("Function Pointer")}, + {Ty_tp_doc, TyDoc_STR("Function Pointer")}, {Ty_tp_traverse, PyCFuncPtr_traverse}, {Ty_tp_clear, PyCFuncPtr_clear}, {Ty_tp_getset, PyCFuncPtr_getsets}, @@ -4913,7 +4913,7 @@ Struct_init(TyObject *self, TyObject *args, TyObject *kwds) } static TyType_Slot pycstruct_slots[] = { - {Ty_tp_doc, PyDoc_STR("Structure base class")}, + {Ty_tp_doc, TyDoc_STR("Structure base class")}, {Ty_tp_init, Struct_init}, {Ty_tp_new, GenericPyCData_new}, {Ty_bf_getbuffer, PyCData_NewGetBuffer}, @@ -4928,7 +4928,7 @@ static TyType_Spec pycstruct_spec = { }; static TyType_Slot pycunion_slots[] = { - {Ty_tp_doc, PyDoc_STR("Union base class")}, + {Ty_tp_doc, TyDoc_STR("Union base class")}, {Ty_tp_init, Struct_init}, {Ty_tp_new, GenericPyCData_new}, {Ty_bf_getbuffer, PyCData_NewGetBuffer}, @@ -5260,11 +5260,11 @@ Array_length(TyObject *myself) static TyMethodDef Array_methods[] = { {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, { NULL, NULL } }; -PyDoc_STRVAR(array_doc, +TyDoc_STRVAR(array_doc, "Abstract base class for arrays.\n" "\n" "The recommended way to create concrete array types is by multiplying any\n" @@ -5499,7 +5499,7 @@ Simple_repr(TyObject *self) static TyType_Slot pycsimple_slots[] = { {Ty_tp_repr, &Simple_repr}, - {Ty_tp_doc, PyDoc_STR("XXX to be provided")}, + {Ty_tp_doc, TyDoc_STR("XXX to be provided")}, {Ty_tp_methods, Simple_methods}, {Ty_tp_getset, Simple_getsets}, {Ty_tp_init, Simple_init}, @@ -5940,7 +5940,7 @@ Pointer_bool(TyObject *self) } static TyType_Slot pycpointer_slots[] = { - {Ty_tp_doc, (void *)PyDoc_STR("XXX to be provided")}, + {Ty_tp_doc, (void *)TyDoc_STR("XXX to be provided")}, {Ty_tp_getset, Pointer_getsets}, {Ty_tp_init, Pointer_init}, {Ty_tp_new, Pointer_new}, @@ -5964,12 +5964,12 @@ static TyType_Spec pycpointer_spec = { * Module initialization. */ -PyDoc_STRVAR(_ctypes__doc__, +TyDoc_STRVAR(_ctypes__doc__, "Create and manipulate C compatible data types in Python."); #ifdef MS_WIN32 -PyDoc_STRVAR(comerror_doc, "Raised when a COM method call failed."); +TyDoc_STRVAR(comerror_doc, "Raised when a COM method call failed."); int comerror_init(TyObject *self, TyObject *args, TyObject *kwds) @@ -6002,7 +6002,7 @@ comerror_init(TyObject *self, TyObject *args, TyObject *kwds) return -1; Ty_INCREF(args); - Ty_SETREF(((PyBaseExceptionObject *)self)->args, args); + Ty_SETREF(((TyBaseExceptionObject *)self)->args, args); return 0; } @@ -6031,7 +6031,7 @@ comerror_dealloc(TyObject *self) } static TyType_Slot comerror_slots[] = { - {Ty_tp_doc, (void *)PyDoc_STR(comerror_doc)}, + {Ty_tp_doc, (void *)TyDoc_STR(comerror_doc)}, {Ty_tp_init, comerror_init}, {Ty_tp_traverse, comerror_traverse}, {Ty_tp_dealloc, comerror_dealloc}, @@ -6041,7 +6041,7 @@ static TyType_Slot comerror_slots[] = { static TyType_Spec comerror_spec = { .name = "_ctypes.COMError", - .basicsize = sizeof(PyBaseExceptionObject), + .basicsize = sizeof(TyBaseExceptionObject), .flags = (Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC | Ty_TPFLAGS_IMMUTABLETYPE), .slots = comerror_slots, diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index 14320e5..dd6286e 100644 --- a/Modules/_ctypes/callbacks.c +++ b/Modules/_ctypes/callbacks.c @@ -61,7 +61,7 @@ CThunkObject_dealloc(TyObject *myself) } static TyType_Slot cthunk_slots[] = { - {Ty_tp_doc, (void *)PyDoc_STR("CThunkObject")}, + {Ty_tp_doc, (void *)TyDoc_STR("CThunkObject")}, {Ty_tp_dealloc, CThunkObject_dealloc}, {Ty_tp_traverse, CThunkObject_traverse}, {Ty_tp_clear, CThunkObject_clear}, diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index 808efe3..28e5cce 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -586,7 +586,7 @@ PyCArg_repr(TyObject *op) } static TyMemberDef PyCArgType_members[] = { - { "_obj", _Py_T_OBJECT, + { "_obj", _Ty_T_OBJECT, offsetof(PyCArgObject, obj), Py_READONLY, "the wrapped object" }, { NULL }, @@ -1373,7 +1373,7 @@ _parse_voidp(TyObject *obj, void *arg) #ifdef MS_WIN32 -PyDoc_STRVAR(format_error_doc, +TyDoc_STRVAR(format_error_doc, "FormatError([integer]) -> string\n\ \n\ Convert a win32 error code into a string. If the error code is not\n\ @@ -1397,7 +1397,7 @@ static TyObject *format_error(TyObject *self, TyObject *args) return result; } -PyDoc_STRVAR(load_library_doc, +TyDoc_STRVAR(load_library_doc, "LoadLibrary(name, load_flags) -> handle\n\ \n\ Load an executable (usually a DLL), and return a handle to it.\n\ @@ -1448,7 +1448,7 @@ static TyObject *load_library(TyObject *self, TyObject *args) #endif } -PyDoc_STRVAR(free_library_doc, +TyDoc_STRVAR(free_library_doc, "FreeLibrary(handle) -> void\n\ \n\ Free the handle of an executable previously loaded by LoadLibrary.\n"); @@ -1471,7 +1471,7 @@ static TyObject *free_library(TyObject *self, TyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(copy_com_pointer_doc, +TyDoc_STRVAR(copy_com_pointer_doc, "CopyComPointer(src, dst) -> HRESULT value\n"); static TyObject * @@ -1772,7 +1772,7 @@ _ctypes_sizeof(TyObject *module, TyObject *obj) return NULL; } -PyDoc_STRVAR(alignment_doc, +TyDoc_STRVAR(alignment_doc, "alignment(C type) -> integer\n" "alignment(C instance) -> integer\n" "Return the alignment requirements of a C instance"); diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c index eb642a5..17dd5e7 100644 --- a/Modules/_ctypes/cfield.c +++ b/Modules/_ctypes/cfield.c @@ -353,15 +353,15 @@ PyCField_is_anonymous(TyObject *self, void *Py_UNUSED(closure)) static TyGetSetDef PyCField_getset[] = { { "size", PyCField_get_legacy_size, NULL, - PyDoc_STR("size in bytes of this field. For bitfields, this is a " + TyDoc_STR("size in bytes of this field. For bitfields, this is a " "legacy packed value; use byte_size instead") }, { "bit_size", PyCField_get_bit_size, NULL, - PyDoc_STR("size of this field in bits") }, + TyDoc_STR("size of this field in bits") }, { "is_bitfield", PyCField_is_bitfield, NULL, - PyDoc_STR("true if this is a bitfield") }, + TyDoc_STR("true if this is a bitfield") }, { "is_anonymous", PyCField_is_anonymous, NULL, - PyDoc_STR("true if this field is anonymous") }, + TyDoc_STR("true if this field is anonymous") }, { NULL }, }; @@ -370,34 +370,34 @@ static TyMemberDef PyCField_members[] = { .type = Ty_T_OBJECT_EX, .offset = offsetof(CFieldObject, name), .flags = Py_READONLY, - .doc = PyDoc_STR("name of this field") }, + .doc = TyDoc_STR("name of this field") }, { "type", .type = Ty_T_OBJECT_EX, .offset = offsetof(CFieldObject, proto), .flags = Py_READONLY, - .doc = PyDoc_STR("type of this field") }, + .doc = TyDoc_STR("type of this field") }, { "offset", .type = Ty_T_PYSSIZET, .offset = offsetof(CFieldObject, byte_offset), .flags = Py_READONLY, - .doc = PyDoc_STR( + .doc = TyDoc_STR( "offset in bytes of this field (same as byte_offset)") }, { "byte_offset", .type = Ty_T_PYSSIZET, .offset = offsetof(CFieldObject, byte_offset), .flags = Py_READONLY, - .doc = PyDoc_STR("offset in bytes of this field. " + .doc = TyDoc_STR("offset in bytes of this field. " "For bitfields: excludes bit_offset.") }, { "byte_size", .type = Ty_T_PYSSIZET, .offset = offsetof(CFieldObject, byte_size), .flags = Py_READONLY, - .doc = PyDoc_STR("size of this field in bytes") }, + .doc = TyDoc_STR("size of this field in bytes") }, { "bit_offset", .type = Ty_T_UBYTE, .offset = offsetof(CFieldObject, bit_offset), .flags = Py_READONLY, - .doc = PyDoc_STR("additional offset in bits (relative to byte_offset);" + .doc = TyDoc_STR("additional offset in bits (relative to byte_offset);" " zero for non-bitfields") }, { NULL }, }; @@ -459,7 +459,7 @@ static TyType_Slot cfield_slots[] = { {Ty_tp_new, PyCField_new}, {Ty_tp_dealloc, PyCField_dealloc}, {Ty_tp_repr, PyCField_repr}, - {Ty_tp_doc, (void *)PyDoc_STR("Structure/Union member")}, + {Ty_tp_doc, (void *)TyDoc_STR("Structure/Union member")}, {Ty_tp_traverse, PyCField_traverse}, {Ty_tp_clear, PyCField_clear}, {Ty_tp_getset, PyCField_getset}, diff --git a/Modules/_ctypes/clinic/_ctypes.c.h b/Modules/_ctypes/clinic/_ctypes.c.h index 929355e..2a6ca14 100644 --- a/Modules/_ctypes/clinic/_ctypes.c.h +++ b/Modules/_ctypes/clinic/_ctypes.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_ctypes_CType_Type___sizeof____doc__, +TyDoc_STRVAR(_ctypes_CType_Type___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -31,7 +31,7 @@ _ctypes_CType_Type___sizeof__(TyObject *self, TyTypeObject *cls, TyObject *const return _ctypes_CType_Type___sizeof___impl(self, cls); } -PyDoc_STRVAR(CDataType_from_address__doc__, +TyDoc_STRVAR(CDataType_from_address__doc__, "from_address($self, value, /)\n" "--\n" "\n" @@ -78,7 +78,7 @@ exit: return return_value; } -PyDoc_STRVAR(CDataType_from_buffer__doc__, +TyDoc_STRVAR(CDataType_from_buffer__doc__, "from_buffer($self, obj, offset=0, /)\n" "--\n" "\n" @@ -142,7 +142,7 @@ exit: return return_value; } -PyDoc_STRVAR(CDataType_from_buffer_copy__doc__, +TyDoc_STRVAR(CDataType_from_buffer_copy__doc__, "from_buffer_copy($self, buffer, offset=0, /)\n" "--\n" "\n" @@ -213,7 +213,7 @@ exit: return return_value; } -PyDoc_STRVAR(CDataType_in_dll__doc__, +TyDoc_STRVAR(CDataType_in_dll__doc__, "in_dll($self, dll, name, /)\n" "--\n" "\n" @@ -274,7 +274,7 @@ exit: return return_value; } -PyDoc_STRVAR(CDataType_from_param__doc__, +TyDoc_STRVAR(CDataType_from_param__doc__, "from_param($self, value, /)\n" "--\n" "\n" @@ -318,7 +318,7 @@ exit: return return_value; } -PyDoc_STRVAR(PyCPointerType_set_type__doc__, +TyDoc_STRVAR(PyCPointerType_set_type__doc__, "set_type($self, type, /)\n" "--\n" "\n"); @@ -362,7 +362,7 @@ exit: return return_value; } -PyDoc_STRVAR(PyCPointerType_from_param__doc__, +TyDoc_STRVAR(PyCPointerType_from_param__doc__, "from_param($self, value, /)\n" "--\n" "\n" @@ -507,7 +507,7 @@ _ctypes_PyCArrayType_Type_value_set(TyObject *self, TyObject *value, void *Py_UN return return_value; } -PyDoc_STRVAR(c_wchar_p_from_param__doc__, +TyDoc_STRVAR(c_wchar_p_from_param__doc__, "from_param($self, value, /)\n" "--\n" "\n"); @@ -550,7 +550,7 @@ exit: return return_value; } -PyDoc_STRVAR(c_char_p_from_param__doc__, +TyDoc_STRVAR(c_char_p_from_param__doc__, "from_param($self, value, /)\n" "--\n" "\n"); @@ -593,7 +593,7 @@ exit: return return_value; } -PyDoc_STRVAR(c_void_p_from_param__doc__, +TyDoc_STRVAR(c_void_p_from_param__doc__, "from_param($self, value, /)\n" "--\n" "\n"); @@ -636,7 +636,7 @@ exit: return return_value; } -PyDoc_STRVAR(PyCSimpleType_from_param__doc__, +TyDoc_STRVAR(PyCSimpleType_from_param__doc__, "from_param($self, value, /)\n" "--\n" "\n" @@ -681,7 +681,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ctypes_PyCData___reduce____doc__, +TyDoc_STRVAR(_ctypes_PyCData___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n"); @@ -709,7 +709,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ctypes_PyCData___setstate____doc__, +TyDoc_STRVAR(_ctypes_PyCData___setstate____doc__, "__setstate__($self, dict, data, /)\n" "--\n" "\n"); @@ -741,7 +741,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ctypes_PyCData___ctypes_from_outparam____doc__, +TyDoc_STRVAR(_ctypes_PyCData___ctypes_from_outparam____doc__, "__ctypes_from_outparam__($self, /)\n" "--\n" "\n" @@ -784,7 +784,7 @@ _ctypes_CFuncPtr_errcheck_set(TyObject *self, TyObject *value, void *Py_UNUSED(c return return_value; } -PyDoc_STRVAR(_ctypes_CFuncPtr_errcheck__doc__, +TyDoc_STRVAR(_ctypes_CFuncPtr_errcheck__doc__, "a function to check for errors"); #if defined(_ctypes_CFuncPtr_errcheck_DOCSTR) # undef _ctypes_CFuncPtr_errcheck_DOCSTR @@ -841,7 +841,7 @@ _ctypes_CFuncPtr_restype_set(TyObject *self, TyObject *value, void *Py_UNUSED(co return return_value; } -PyDoc_STRVAR(_ctypes_CFuncPtr_restype__doc__, +TyDoc_STRVAR(_ctypes_CFuncPtr_restype__doc__, "specify the result type"); #if defined(_ctypes_CFuncPtr_restype_DOCSTR) # undef _ctypes_CFuncPtr_restype_DOCSTR @@ -898,7 +898,7 @@ _ctypes_CFuncPtr_argtypes_set(TyObject *self, TyObject *value, void *Py_UNUSED(c return return_value; } -PyDoc_STRVAR(_ctypes_CFuncPtr_argtypes__doc__, +TyDoc_STRVAR(_ctypes_CFuncPtr_argtypes__doc__, "specify the argument types"); #if defined(_ctypes_CFuncPtr_argtypes_DOCSTR) # undef _ctypes_CFuncPtr_argtypes_DOCSTR @@ -980,7 +980,7 @@ _ctypes_Simple_value_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(Simple_from_outparm__doc__, +TyDoc_STRVAR(Simple_from_outparm__doc__, "__ctypes_from_outparam__($self, /)\n" "--\n" "\n"); diff --git a/Modules/_ctypes/clinic/callproc.c.h b/Modules/_ctypes/clinic/callproc.c.h index e1389a1..b320e75 100644 --- a/Modules/_ctypes/clinic/callproc.c.h +++ b/Modules/_ctypes/clinic/callproc.c.h @@ -6,7 +6,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_ctypes_sizeof__doc__, +TyDoc_STRVAR(_ctypes_sizeof__doc__, "sizeof($module, obj, /)\n" "--\n" "\n" @@ -15,7 +15,7 @@ PyDoc_STRVAR(_ctypes_sizeof__doc__, #define _CTYPES_SIZEOF_METHODDEF \ {"sizeof", (PyCFunction)_ctypes_sizeof, METH_O, _ctypes_sizeof__doc__}, -PyDoc_STRVAR(_ctypes_byref__doc__, +TyDoc_STRVAR(_ctypes_byref__doc__, "byref($module, obj, offset=0, /)\n" "--\n" "\n" @@ -66,7 +66,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ctypes_addressof__doc__, +TyDoc_STRVAR(_ctypes_addressof__doc__, "addressof($module, obj, /)\n" "--\n" "\n" @@ -97,7 +97,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ctypes_resize__doc__, +TyDoc_STRVAR(_ctypes_resize__doc__, "resize($module, obj, size, /)\n" "--\n" "\n"); diff --git a/Modules/_ctypes/clinic/cfield.c.h b/Modules/_ctypes/clinic/cfield.c.h index 7c3b27f..91f0cbd 100644 --- a/Modules/_ctypes/clinic/cfield.c.h +++ b/Modules/_ctypes/clinic/cfield.c.h @@ -28,7 +28,7 @@ PyCField_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(type), &_Ty_ID(byte_size), &_Ty_ID(byte_offset), &_Ty_ID(index), &_Ty_ID(_internal_use), &_Ty_ID(bit_size), &_Ty_ID(bit_offset), }, }; diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index cd95b87..df1bb70 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -1313,7 +1313,7 @@ int py_mvwdelch(WINDOW *w, int y, int x) /* chgat, added by Fabian Kreutz */ #ifdef HAVE_CURSES_WCHGAT -PyDoc_STRVAR(_curses_window_chgat__doc__, +TyDoc_STRVAR(_curses_window_chgat__doc__, "chgat([y, x,] [n=-1,] attr)\n" "Set the attributes of characters.\n" "\n" @@ -1553,14 +1553,14 @@ _curses_window_getch_impl(PyCursesWindowObject *self, int group_right_1, { int rtn; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (!group_right_1) { rtn = wgetch(self->win); } else { rtn = mvwgetch(self->win, y, x); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (rtn == ERR) { // We suppress ERR returned by wgetch() in nodelay mode @@ -1600,14 +1600,14 @@ _curses_window_getkey_impl(PyCursesWindowObject *self, int group_right_1, { int rtn; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (!group_right_1) { rtn = wgetch(self->win); } else { rtn = mvwgetch(self->win, y, x); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (rtn == ERR) { /* getch() returns ERR in nodelay mode */ @@ -1659,14 +1659,14 @@ _curses_window_get_wch_impl(PyCursesWindowObject *self, int group_right_1, int ct; wint_t rtn; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (!group_right_1) { ct = wget_wch(self->win ,&rtn); } else { ct = mvwget_wch(self->win, y, x, &rtn); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (ct == ERR) { if (TyErr_CheckSignals()) @@ -1724,7 +1724,7 @@ curses_clinic_parse_optional_xy_n(TyObject *args, } } -PyDoc_STRVAR(_curses_window_getstr__doc__, +TyDoc_STRVAR(_curses_window_getstr__doc__, "getstr([[y, x,] n=2047])\n" "Read a string from the user, with primitive line editing capacity.\n" "\n" @@ -1758,7 +1758,7 @@ PyCursesWindow_getstr(TyObject *op, TyObject *args) char *buf = TyBytes_AS_STRING(res); if (use_xy) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef STRICT_SYSV_CURSES rtn = wmove(self->win, y, x) == ERR ? ERR @@ -1766,12 +1766,12 @@ PyCursesWindow_getstr(TyObject *op, TyObject *args) #else rtn = mvwgetnstr(self->win, y, x, buf, n); #endif - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } else { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS rtn = wgetnstr(self->win, buf, n); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } if (rtn == ERR) { @@ -1904,7 +1904,7 @@ _curses_window_inch_impl(PyCursesWindowObject *self, int group_right_1, return rtn; } -PyDoc_STRVAR(_curses_window_instr__doc__, +TyDoc_STRVAR(_curses_window_instr__doc__, "instr([y, x,] n=2047)\n" "Return a string of characters, extracted from the window.\n" "\n" @@ -2203,10 +2203,10 @@ _curses_window_noutrefresh_impl(PyCursesWindowObject *self) "requires 6 arguments"); return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS rtn = pnoutrefresh(self->win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return PyCursesCheckERR_ForWin(self, rtn, "pnoutrefresh"); } if (group_right_1) { @@ -2215,9 +2215,9 @@ _curses_window_noutrefresh_impl(PyCursesWindowObject *self) return NULL; } #endif - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS rtn = wnoutrefresh(self->win); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return PyCursesCheckERR_ForWin(self, rtn, "wnoutrefresh"); } @@ -2427,10 +2427,10 @@ _curses_window_refresh_impl(PyCursesWindowObject *self, int group_right_1, "refresh() for a pad requires 6 arguments"); return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS rtn = prefresh(self->win, pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return PyCursesCheckERR_ForWin(self, rtn, "prefresh"); } #endif @@ -2439,9 +2439,9 @@ _curses_window_refresh_impl(PyCursesWindowObject *self, int group_right_1, "refresh() takes no arguments (6 given)"); return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS rtn = wrefresh(self->win); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return PyCursesCheckERR_ForWin(self, rtn, "prefresh"); } @@ -4806,19 +4806,19 @@ _curses_assume_default_colors_impl(TyObject *module, int fg, int bg) #ifdef NCURSES_VERSION -PyDoc_STRVAR(ncurses_version__doc__, +TyDoc_STRVAR(ncurses_version__doc__, "curses.ncurses_version\n\ \n\ Ncurses version information as a named tuple."); -static PyStructSequence_Field ncurses_version_fields[] = { +static TyStructSequence_Field ncurses_version_fields[] = { {"major", "Major release number"}, {"minor", "Minor release number"}, {"patch", "Patch release number"}, {0} }; -static PyStructSequence_Desc ncurses_version_desc = { +static TyStructSequence_Desc ncurses_version_desc = { "curses.ncurses_version", /* name */ ncurses_version__doc__, /* doc */ ncurses_version_fields, /* fields */ @@ -4828,7 +4828,7 @@ static PyStructSequence_Desc ncurses_version_desc = { static TyObject * make_ncurses_version(TyTypeObject *type) { - TyObject *ncurses_version = PyStructSequence_New(type); + TyObject *ncurses_version = TyStructSequence_New(type); if (ncurses_version == NULL) { return NULL; } @@ -4847,7 +4847,7 @@ make_ncurses_version(TyTypeObject *type) Ty_DECREF(ncurses_version); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(ncurses_version, INDEX, o); \ + TyStructSequence_SET_ITEM(ncurses_version, INDEX, o); \ } while (0) SET_VERSION_COMPONENT(0, major); diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 91ec3e9..0d033d2 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -125,7 +125,7 @@ get_module_state(TyObject *module) #define INTERP_KEY ((TyObject *)&_Ty_ID(cached_datetime_module)) static TyObject * -get_current_module(PyInterpreterState *interp) +get_current_module(TyInterpreterState *interp) { TyObject *mod = NULL; @@ -158,7 +158,7 @@ static TyModuleDef datetimemodule; static datetime_state * _get_current_state(TyObject **p_mod) { - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); TyObject *mod = get_current_module(interp); if (mod == NULL) { assert(!TyErr_Occurred()); @@ -183,7 +183,7 @@ _get_current_state(TyObject **p_mod) Ty_DECREF(MOD_VAR) static int -set_current_module(PyInterpreterState *interp, TyObject *mod) +set_current_module(TyInterpreterState *interp, TyObject *mod) { assert(mod != NULL); TyObject *dict = TyInterpreterState_GetDict(interp); @@ -200,7 +200,7 @@ set_current_module(PyInterpreterState *interp, TyObject *mod) } static void -clear_current_module(PyInterpreterState *interp, TyObject *expected) +clear_current_module(TyInterpreterState *interp, TyObject *expected) { TyObject *exc = TyErr_GetRaisedException(); @@ -3008,28 +3008,28 @@ delta_reduce(TyObject *op, TyObject *Py_UNUSED(dummy)) static TyMemberDef delta_members[] = { {"days", Ty_T_INT, OFFSET(days), Py_READONLY, - PyDoc_STR("Number of days.")}, + TyDoc_STR("Number of days.")}, {"seconds", Ty_T_INT, OFFSET(seconds), Py_READONLY, - PyDoc_STR("Number of seconds (>= 0 and less than 1 day).")}, + TyDoc_STR("Number of seconds (>= 0 and less than 1 day).")}, {"microseconds", Ty_T_INT, OFFSET(microseconds), Py_READONLY, - PyDoc_STR("Number of microseconds (>= 0 and less than 1 second).")}, + TyDoc_STR("Number of microseconds (>= 0 and less than 1 second).")}, {NULL} }; static TyMethodDef delta_methods[] = { {"total_seconds", delta_total_seconds, METH_NOARGS, - PyDoc_STR("Total seconds in the duration.")}, + TyDoc_STR("Total seconds in the duration.")}, {"__reduce__", delta_reduce, METH_NOARGS, - PyDoc_STR("__reduce__() -> (cls, state)")}, + TyDoc_STR("__reduce__() -> (cls, state)")}, {NULL, NULL}, }; static const char delta_doc[] = -PyDoc_STR("Difference between two datetime values.\n\n" +TyDoc_STR("Difference between two datetime values.\n\n" "timedelta(days=0, seconds=0, microseconds=0, milliseconds=0, " "minutes=0, hours=0, weeks=0)\n\n" "All arguments are optional and default to 0.\n" @@ -3072,7 +3072,7 @@ static PyNumberMethods delta_as_number = { }; static TyTypeObject PyDateTime_DeltaType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "datetime.timedelta", /* tp_name */ sizeof(PyDateTime_Delta), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -3600,7 +3600,7 @@ date_isoweekday(TyObject *self, TyObject *Py_UNUSED(dummy)) return TyLong_FromLong(dow + 1); } -PyDoc_STRVAR(iso_calendar_date__doc__, +TyDoc_STRVAR(iso_calendar_date__doc__, "The result of date.isocalendar() or datetime.isocalendar()\n\n\ This object may be accessed either as a tuple of\n\ ((year, week, weekday)\n\ @@ -3683,7 +3683,7 @@ static TyGetSetDef iso_calendar_date_getset[] = { static TyMethodDef iso_calendar_date_methods[] = { {"__reduce__", iso_calendar_date_reduce, METH_NOARGS, - PyDoc_STR("__reduce__() -> (cls, state)")}, + TyDoc_STR("__reduce__() -> (cls, state)")}, {NULL, NULL}, }; @@ -3891,72 +3891,72 @@ static TyMethodDef date_methods[] = { DATETIME_DATE_FROMTIMESTAMP_METHODDEF {"fromordinal", date_fromordinal, METH_VARARGS | METH_CLASS, - PyDoc_STR("int -> date corresponding to a proleptic Gregorian " + TyDoc_STR("int -> date corresponding to a proleptic Gregorian " "ordinal.")}, {"fromisoformat", date_fromisoformat, METH_O | METH_CLASS, - PyDoc_STR("str -> Construct a date from a string in ISO 8601 format.")}, + TyDoc_STR("str -> Construct a date from a string in ISO 8601 format.")}, {"fromisocalendar", _PyCFunction_CAST(date_fromisocalendar), METH_VARARGS | METH_KEYWORDS | METH_CLASS, - PyDoc_STR("int, int, int -> Construct a date from the ISO year, week " + TyDoc_STR("int, int, int -> Construct a date from the ISO year, week " "number and weekday.\n\n" "This is the inverse of the date.isocalendar() function")}, {"strptime", date_strptime, METH_VARARGS | METH_CLASS, - PyDoc_STR("string, format -> new date parsed from a string " + TyDoc_STR("string, format -> new date parsed from a string " "(like time.strptime()).")}, {"today", date_today, METH_NOARGS | METH_CLASS, - PyDoc_STR("Current date or datetime: same as " + TyDoc_STR("Current date or datetime: same as " "self.__class__.fromtimestamp(time.time()).")}, /* Instance methods: */ {"ctime", date_ctime, METH_NOARGS, - PyDoc_STR("Return ctime() style string.")}, + TyDoc_STR("Return ctime() style string.")}, {"strftime", _PyCFunction_CAST(date_strftime), METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("format -> strftime() style string.")}, + TyDoc_STR("format -> strftime() style string.")}, {"__format__", date_format, METH_VARARGS, - PyDoc_STR("Formats self with strftime.")}, + TyDoc_STR("Formats self with strftime.")}, {"timetuple", date_timetuple, METH_NOARGS, - PyDoc_STR("Return time tuple, compatible with time.localtime().")}, + TyDoc_STR("Return time tuple, compatible with time.localtime().")}, {"isocalendar", date_isocalendar, METH_NOARGS, - PyDoc_STR("Return a named tuple containing ISO year, week number, and " + TyDoc_STR("Return a named tuple containing ISO year, week number, and " "weekday.")}, {"isoformat", date_isoformat, METH_NOARGS, - PyDoc_STR("Return string in ISO 8601 format, YYYY-MM-DD.")}, + TyDoc_STR("Return string in ISO 8601 format, YYYY-MM-DD.")}, {"isoweekday", date_isoweekday, METH_NOARGS, - PyDoc_STR("Return the day of the week represented by the date.\n" + TyDoc_STR("Return the day of the week represented by the date.\n" "Monday == 1 ... Sunday == 7")}, {"toordinal", date_toordinal, METH_NOARGS, - PyDoc_STR("Return proleptic Gregorian ordinal. January 1 of year " + TyDoc_STR("Return proleptic Gregorian ordinal. January 1 of year " "1 is day 1.")}, {"weekday", date_weekday, METH_NOARGS, - PyDoc_STR("Return the day of the week represented by the date.\n" + TyDoc_STR("Return the day of the week represented by the date.\n" "Monday == 0 ... Sunday == 6")}, DATETIME_DATE_REPLACE_METHODDEF {"__replace__", _PyCFunction_CAST(datetime_date_replace), METH_FASTCALL | METH_KEYWORDS, - PyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, + TyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, {"__reduce__", date_reduce, METH_NOARGS, - PyDoc_STR("__reduce__() -> (cls, state)")}, + TyDoc_STR("__reduce__() -> (cls, state)")}, {NULL, NULL} }; static const char date_doc[] = -PyDoc_STR("date(year, month, day) --> date object"); +TyDoc_STR("date(year, month, day) --> date object"); static PyNumberMethods date_as_number = { date_add, /* nb_add */ @@ -3972,7 +3972,7 @@ static PyNumberMethods date_as_number = { }; static TyTypeObject PyDateTime_DateType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "datetime.date", /* tp_name */ sizeof(PyDateTime_Date), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -4176,29 +4176,29 @@ tzinfo_reduce(TyObject *self, TyObject *Py_UNUSED(dummy)) static TyMethodDef tzinfo_methods[] = { {"tzname", tzinfo_tzname, METH_O, - PyDoc_STR("datetime -> string name of time zone.")}, + TyDoc_STR("datetime -> string name of time zone.")}, {"utcoffset", tzinfo_utcoffset, METH_O, - PyDoc_STR("datetime -> timedelta showing offset from UTC, negative " + TyDoc_STR("datetime -> timedelta showing offset from UTC, negative " "values indicating West of UTC")}, {"dst", tzinfo_dst, METH_O, - PyDoc_STR("datetime -> DST offset as timedelta positive east of UTC.")}, + TyDoc_STR("datetime -> DST offset as timedelta positive east of UTC.")}, {"fromutc", tzinfo_fromutc, METH_O, - PyDoc_STR("datetime in UTC -> datetime in local time.")}, + TyDoc_STR("datetime in UTC -> datetime in local time.")}, {"__reduce__", tzinfo_reduce, METH_NOARGS, - PyDoc_STR("-> (cls, state)")}, + TyDoc_STR("-> (cls, state)")}, {NULL, NULL} }; static const char tzinfo_doc[] = -PyDoc_STR("Abstract base class for time zone info objects."); +TyDoc_STR("Abstract base class for time zone info objects."); static TyTypeObject PyDateTime_TZInfoType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "datetime.tzinfo", /* tp_name */ sizeof(PyDateTime_TZInfo), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -4420,29 +4420,29 @@ timezone_getinitargs(TyObject *op, TyObject *Py_UNUSED(dummy)) static TyMethodDef timezone_methods[] = { {"tzname", timezone_tzname, METH_O, - PyDoc_STR("If name is specified when timezone is created, returns the name." + TyDoc_STR("If name is specified when timezone is created, returns the name." " Otherwise returns offset as 'UTC(+|-)HH:MM'.")}, {"utcoffset", timezone_utcoffset, METH_O, - PyDoc_STR("Return fixed offset.")}, + TyDoc_STR("Return fixed offset.")}, {"dst", timezone_dst, METH_O, - PyDoc_STR("Return None.")}, + TyDoc_STR("Return None.")}, {"fromutc", timezone_fromutc, METH_O, - PyDoc_STR("datetime in UTC -> datetime in local time.")}, + TyDoc_STR("datetime in UTC -> datetime in local time.")}, {"__getinitargs__", timezone_getinitargs, METH_NOARGS, - PyDoc_STR("pickle support")}, + TyDoc_STR("pickle support")}, {NULL, NULL} }; static const char timezone_doc[] = -PyDoc_STR("Fixed offset from UTC implementation of tzinfo."); +TyDoc_STR("Fixed offset from UTC implementation of tzinfo."); static TyTypeObject PyDateTime_TimeZoneType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "datetime.timezone", /* tp_name */ sizeof(PyDateTime_TimeZone), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -5126,13 +5126,13 @@ static TyMethodDef time_methods[] = { {"strptime", time_strptime, METH_VARARGS | METH_CLASS, - PyDoc_STR("string, format -> new time parsed from a string " + TyDoc_STR("string, format -> new time parsed from a string " "(like time.strptime()).")}, /* Instance methods: */ {"isoformat", _PyCFunction_CAST(time_isoformat), METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]]" + TyDoc_STR("Return string in ISO 8601 format, [HH[:MM[:SS[.mmm[uuu]]]]]" "[+HH:MM].\n\n" "The optional argument timespec specifies the number " "of additional terms\nof the time to include. Valid " @@ -5140,45 +5140,45 @@ static TyMethodDef time_methods[] = { "'milliseconds' and 'microseconds'.\n")}, {"strftime", _PyCFunction_CAST(time_strftime), METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("format -> strftime() style string.")}, + TyDoc_STR("format -> strftime() style string.")}, {"__format__", date_format, METH_VARARGS, - PyDoc_STR("Formats self with strftime.")}, + TyDoc_STR("Formats self with strftime.")}, {"utcoffset", time_utcoffset, METH_NOARGS, - PyDoc_STR("Return self.tzinfo.utcoffset(self).")}, + TyDoc_STR("Return self.tzinfo.utcoffset(self).")}, {"tzname", time_tzname, METH_NOARGS, - PyDoc_STR("Return self.tzinfo.tzname(self).")}, + TyDoc_STR("Return self.tzinfo.tzname(self).")}, {"dst", time_dst, METH_NOARGS, - PyDoc_STR("Return self.tzinfo.dst(self).")}, + TyDoc_STR("Return self.tzinfo.dst(self).")}, DATETIME_TIME_REPLACE_METHODDEF {"__replace__", _PyCFunction_CAST(datetime_time_replace), METH_FASTCALL | METH_KEYWORDS, - PyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, + TyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, {"fromisoformat", time_fromisoformat, METH_O | METH_CLASS, - PyDoc_STR("string -> time from a string in ISO 8601 format")}, + TyDoc_STR("string -> time from a string in ISO 8601 format")}, {"__reduce_ex__", time_reduce_ex, METH_VARARGS, - PyDoc_STR("__reduce_ex__(proto) -> (cls, state)")}, + TyDoc_STR("__reduce_ex__(proto) -> (cls, state)")}, {"__reduce__", time_reduce, METH_NOARGS, - PyDoc_STR("__reduce__() -> (cls, state)")}, + TyDoc_STR("__reduce__() -> (cls, state)")}, {NULL, NULL} }; static const char time_doc[] = -PyDoc_STR("time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object\n\ +TyDoc_STR("time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) --> a time object\n\ \n\ All arguments are optional. tzinfo may be None, or an instance of\n\ a tzinfo subclass. The remaining arguments may be ints.\n"); static TyTypeObject PyDateTime_TimeType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "datetime.time", /* tp_name */ sizeof(PyDateTime_Time), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -5527,7 +5527,7 @@ datetime_from_timestamp(TyObject *cls, TM_FUNC f, TyObject *timestamp, static TyObject * datetime_best_possible(TyObject *cls, TM_FUNC f, TyObject *tzinfo) { - PyTime_t ts; + TyTime_t ts; if (PyTime_Time(&ts) < 0) { return NULL; } @@ -6995,54 +6995,54 @@ static TyMethodDef datetime_methods[] = { {"utcnow", datetime_utcnow, METH_NOARGS | METH_CLASS, - PyDoc_STR("Return a new datetime representing UTC day and time.")}, + TyDoc_STR("Return a new datetime representing UTC day and time.")}, {"fromtimestamp", _PyCFunction_CAST(datetime_fromtimestamp), METH_VARARGS | METH_KEYWORDS | METH_CLASS, - PyDoc_STR("timestamp[, tz] -> tz's local time from POSIX timestamp.")}, + TyDoc_STR("timestamp[, tz] -> tz's local time from POSIX timestamp.")}, {"utcfromtimestamp", datetime_utcfromtimestamp, METH_VARARGS | METH_CLASS, - PyDoc_STR("Construct a naive UTC datetime from a POSIX timestamp.")}, + TyDoc_STR("Construct a naive UTC datetime from a POSIX timestamp.")}, {"strptime", datetime_strptime, METH_VARARGS | METH_CLASS, - PyDoc_STR("string, format -> new datetime parsed from a string " + TyDoc_STR("string, format -> new datetime parsed from a string " "(like time.strptime()).")}, {"combine", _PyCFunction_CAST(datetime_combine), METH_VARARGS | METH_KEYWORDS | METH_CLASS, - PyDoc_STR("date, time -> datetime with same date and time fields")}, + TyDoc_STR("date, time -> datetime with same date and time fields")}, {"fromisoformat", datetime_fromisoformat, METH_O | METH_CLASS, - PyDoc_STR("string -> datetime from a string in most ISO 8601 formats")}, + TyDoc_STR("string -> datetime from a string in most ISO 8601 formats")}, /* Instance methods: */ {"date", datetime_getdate, METH_NOARGS, - PyDoc_STR("Return date object with same year, month and day.")}, + TyDoc_STR("Return date object with same year, month and day.")}, {"time", datetime_gettime, METH_NOARGS, - PyDoc_STR("Return time object with same time but with tzinfo=None.")}, + TyDoc_STR("Return time object with same time but with tzinfo=None.")}, {"timetz", datetime_gettimetz, METH_NOARGS, - PyDoc_STR("Return time object with same time and tzinfo.")}, + TyDoc_STR("Return time object with same time and tzinfo.")}, {"ctime", datetime_ctime, METH_NOARGS, - PyDoc_STR("Return ctime() style string.")}, + TyDoc_STR("Return ctime() style string.")}, {"timetuple", datetime_timetuple, METH_NOARGS, - PyDoc_STR("Return time tuple, compatible with time.localtime().")}, + TyDoc_STR("Return time tuple, compatible with time.localtime().")}, {"timestamp", datetime_timestamp, METH_NOARGS, - PyDoc_STR("Return POSIX timestamp as float.")}, + TyDoc_STR("Return POSIX timestamp as float.")}, {"utctimetuple", datetime_utctimetuple, METH_NOARGS, - PyDoc_STR("Return UTC time tuple, compatible with time.localtime().")}, + TyDoc_STR("Return UTC time tuple, compatible with time.localtime().")}, {"isoformat", _PyCFunction_CAST(datetime_isoformat), METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("[sep] -> string in ISO 8601 format, " + TyDoc_STR("[sep] -> string in ISO 8601 format, " "YYYY-MM-DDT[HH[:MM[:SS[.mmm[uuu]]]]][+HH:MM].\n" "sep is used to separate the year from the time, and " "defaults to 'T'.\n" @@ -7052,33 +7052,33 @@ static TyMethodDef datetime_methods[] = { "'milliseconds' and 'microseconds'.\n")}, {"utcoffset", datetime_utcoffset, METH_NOARGS, - PyDoc_STR("Return self.tzinfo.utcoffset(self).")}, + TyDoc_STR("Return self.tzinfo.utcoffset(self).")}, {"tzname", datetime_tzname, METH_NOARGS, - PyDoc_STR("Return self.tzinfo.tzname(self).")}, + TyDoc_STR("Return self.tzinfo.tzname(self).")}, {"dst", datetime_dst, METH_NOARGS, - PyDoc_STR("Return self.tzinfo.dst(self).")}, + TyDoc_STR("Return self.tzinfo.dst(self).")}, DATETIME_DATETIME_REPLACE_METHODDEF {"__replace__", _PyCFunction_CAST(datetime_datetime_replace), METH_FASTCALL | METH_KEYWORDS, - PyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, + TyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, {"astimezone", _PyCFunction_CAST(datetime_astimezone), METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("tz -> convert to local time in new timezone tz\n")}, + TyDoc_STR("tz -> convert to local time in new timezone tz\n")}, {"__reduce_ex__", datetime_reduce_ex, METH_VARARGS, - PyDoc_STR("__reduce_ex__(proto) -> (cls, state)")}, + TyDoc_STR("__reduce_ex__(proto) -> (cls, state)")}, {"__reduce__", datetime_reduce, METH_NOARGS, - PyDoc_STR("__reduce__() -> (cls, state)")}, + TyDoc_STR("__reduce__() -> (cls, state)")}, {NULL, NULL} }; static const char datetime_doc[] = -PyDoc_STR("datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])\n\ +TyDoc_STR("datetime(year, month, day[, hour[, minute[, second[, microsecond[,tzinfo]]]]])\n\ \n\ The year, month and day arguments are required. tzinfo may be None, or an\n\ instance of a tzinfo subclass. The remaining arguments may be ints.\n"); @@ -7097,7 +7097,7 @@ static PyNumberMethods datetime_as_number = { }; static TyTypeObject PyDateTime_DateTimeType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "datetime.datetime", /* tp_name */ sizeof(PyDateTime_DateTime), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -7309,7 +7309,7 @@ clear_state(datetime_state *st) TyStatus -_PyDateTime_InitTypes(PyInterpreterState *interp) +_PyDateTime_InitTypes(TyInterpreterState *interp) { /* Bases classes must be initialized before subclasses, * so capi_types must have the types in the appropriate order. */ @@ -7402,7 +7402,7 @@ _datetime_exec(TyObject *module) int rc = -1; datetime_state *st = get_module_state(module); - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); TyObject *old_module = get_current_module(interp); if (TyErr_Occurred()) { assert(old_module == NULL); @@ -7499,7 +7499,7 @@ module_clear(TyObject *mod) datetime_state *st = get_module_state(mod); clear_state(st); - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); clear_current_module(interp, mod); // The runtime takes care of the static types for us. diff --git a/Modules/_decimal/docstrings.h b/Modules/_decimal/docstrings.h index 8e80029..df29924 100644 --- a/Modules/_decimal/docstrings.h +++ b/Modules/_decimal/docstrings.h @@ -16,20 +16,20 @@ /******************************************************************************/ -PyDoc_STRVAR(doc__decimal, +TyDoc_STRVAR(doc__decimal, "C decimal arithmetic module"); -PyDoc_STRVAR(doc_getcontext, +TyDoc_STRVAR(doc_getcontext, "getcontext($module, /)\n--\n\n\ Get the current default context.\n\ \n"); -PyDoc_STRVAR(doc_setcontext, +TyDoc_STRVAR(doc_setcontext, "setcontext($module, context, /)\n--\n\n\ Set a new default context.\n\ \n"); -PyDoc_STRVAR(doc_localcontext, +TyDoc_STRVAR(doc_localcontext, "localcontext($module, /, ctx=None, **kwargs)\n--\n\n\ Return a context manager that will set the default context to a copy of ctx\n\ on entry to the with-statement and restore the previous default context when\n\ @@ -37,7 +37,7 @@ exiting the with-statement. If no context is specified, a copy of the current\n\ default context is used.\n\ \n"); -PyDoc_STRVAR(doc_ieee_context, +TyDoc_STRVAR(doc_ieee_context, "IEEEContext($module, bits, /)\n--\n\n\ Return a context object initialized to the proper values for one of the\n\ IEEE interchange formats. The argument must be a multiple of 32 and less\n\ @@ -49,7 +49,7 @@ than IEEE_CONTEXT_MAX_BITS.\n\ /* Decimal Object and Methods */ /******************************************************************************/ -PyDoc_STRVAR(doc_decimal, +TyDoc_STRVAR(doc_decimal, "Decimal(value=\"0\", context=None)\n--\n\n\ Construct a new Decimal object. 'value' can be an integer, string, tuple,\n\ or another Decimal object. If no value is given, return Decimal('0'). The\n\ @@ -57,17 +57,17 @@ context does not affect the conversion and is only passed to determine if\n\ the InvalidOperation trap is active.\n\ \n"); -PyDoc_STRVAR(doc_adjusted, +TyDoc_STRVAR(doc_adjusted, "adjusted($self, /)\n--\n\n\ Return the adjusted exponent of the number. Defined as exp + digits - 1.\n\ \n"); -PyDoc_STRVAR(doc_as_tuple, +TyDoc_STRVAR(doc_as_tuple, "as_tuple($self, /)\n--\n\n\ Return a tuple representation of the number.\n\ \n"); -PyDoc_STRVAR(doc_as_integer_ratio, +TyDoc_STRVAR(doc_as_integer_ratio, "as_integer_ratio($self, /)\n--\n\n\ Decimal.as_integer_ratio() -> (int, int)\n\ \n\ @@ -76,14 +76,14 @@ Decimal and with a positive denominator. The ratio is in lowest terms.\n\ Raise OverflowError on infinities and a ValueError on NaNs.\n\ \n"); -PyDoc_STRVAR(doc_canonical, +TyDoc_STRVAR(doc_canonical, "canonical($self, /)\n--\n\n\ Return the canonical encoding of the argument. Currently, the encoding\n\ of a Decimal instance is always canonical, so this operation returns its\n\ argument unchanged.\n\ \n"); -PyDoc_STRVAR(doc_compare, +TyDoc_STRVAR(doc_compare, "compare($self, /, other, context=None)\n--\n\n\ Compare self to other. Return a decimal value:\n\ \n\ @@ -93,12 +93,12 @@ Compare self to other. Return a decimal value:\n\ a > b ==> Decimal('1')\n\ \n"); -PyDoc_STRVAR(doc_compare_signal, +TyDoc_STRVAR(doc_compare_signal, "compare_signal($self, /, other, context=None)\n--\n\n\ Identical to compare, except that all NaNs signal.\n\ \n"); -PyDoc_STRVAR(doc_compare_total, +TyDoc_STRVAR(doc_compare_total, "compare_total($self, /, other, context=None)\n--\n\n\ Compare two operands using their abstract representation rather than\n\ their numerical value. Similar to the compare() method, but the result\n\ @@ -120,7 +120,7 @@ and no rounding is performed. As an exception, the C version may raise\n\ InvalidOperation if the second operand cannot be converted exactly.\n\ \n"); -PyDoc_STRVAR(doc_compare_total_mag, +TyDoc_STRVAR(doc_compare_total_mag, "compare_total_mag($self, /, other, context=None)\n--\n\n\ Compare two operands using their abstract representation rather than their\n\ value as in compare_total(), but ignoring the sign of each operand.\n\ @@ -132,24 +132,24 @@ and no rounding is performed. As an exception, the C version may raise\n\ InvalidOperation if the second operand cannot be converted exactly.\n\ \n"); -PyDoc_STRVAR(doc_conjugate, +TyDoc_STRVAR(doc_conjugate, "conjugate($self, /)\n--\n\n\ Return self.\n\ \n"); -PyDoc_STRVAR(doc_copy_abs, +TyDoc_STRVAR(doc_copy_abs, "copy_abs($self, /)\n--\n\n\ Return the absolute value of the argument. This operation is unaffected by\n\ context and is quiet: no flags are changed and no rounding is performed.\n\ \n"); -PyDoc_STRVAR(doc_copy_negate, +TyDoc_STRVAR(doc_copy_negate, "copy_negate($self, /)\n--\n\n\ Return the negation of the argument. This operation is unaffected by context\n\ and is quiet: no flags are changed and no rounding is performed.\n\ \n"); -PyDoc_STRVAR(doc_copy_sign, +TyDoc_STRVAR(doc_copy_sign, "copy_sign($self, /, other, context=None)\n--\n\n\ Return a copy of the first operand with the sign set to be the same as the\n\ sign of the second operand. For example:\n\ @@ -162,14 +162,14 @@ and no rounding is performed. As an exception, the C version may raise\n\ InvalidOperation if the second operand cannot be converted exactly.\n\ \n"); -PyDoc_STRVAR(doc_exp, +TyDoc_STRVAR(doc_exp, "exp($self, /, context=None)\n--\n\n\ Return the value of the (natural) exponential function e**x at the given\n\ number. The function always uses the ROUND_HALF_EVEN mode and the result\n\ is correctly rounded.\n\ \n"); -PyDoc_STRVAR(doc_from_float, +TyDoc_STRVAR(doc_from_float, "from_float($type, f, /)\n--\n\n\ Class method that converts a float to a decimal number, exactly.\n\ Since 0.1 is not exactly representable in binary floating point,\n\ @@ -186,7 +186,7 @@ Decimal.from_float(0.1) is not the same as Decimal('0.1').\n\ \n\ \n"); -PyDoc_STRVAR(doc_from_number, +TyDoc_STRVAR(doc_from_number, "from_number($type, number, /)\n--\n\n\ Class method that converts a real number to a decimal number, exactly.\n\ \n\ @@ -199,7 +199,7 @@ Class method that converts a real number to a decimal number, exactly.\n\ \n\ \n"); -PyDoc_STRVAR(doc_fma, +TyDoc_STRVAR(doc_fma, "fma($self, /, other, third, context=None)\n--\n\n\ Fused multiply-add. Return self*other+third with no rounding of the\n\ intermediate product self*other.\n\ @@ -209,80 +209,80 @@ intermediate product self*other.\n\ \n\ \n"); -PyDoc_STRVAR(doc_is_canonical, +TyDoc_STRVAR(doc_is_canonical, "is_canonical($self, /)\n--\n\n\ Return True if the argument is canonical and False otherwise. Currently,\n\ a Decimal instance is always canonical, so this operation always returns\n\ True.\n\ \n"); -PyDoc_STRVAR(doc_is_finite, +TyDoc_STRVAR(doc_is_finite, "is_finite($self, /)\n--\n\n\ Return True if the argument is a finite number, and False if the argument\n\ is infinite or a NaN.\n\ \n"); -PyDoc_STRVAR(doc_is_infinite, +TyDoc_STRVAR(doc_is_infinite, "is_infinite($self, /)\n--\n\n\ Return True if the argument is either positive or negative infinity and\n\ False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_is_nan, +TyDoc_STRVAR(doc_is_nan, "is_nan($self, /)\n--\n\n\ Return True if the argument is a (quiet or signaling) NaN and False\n\ otherwise.\n\ \n"); -PyDoc_STRVAR(doc_is_normal, +TyDoc_STRVAR(doc_is_normal, "is_normal($self, /, context=None)\n--\n\n\ Return True if the argument is a normal finite non-zero number with an\n\ adjusted exponent greater than or equal to Emin. Return False if the\n\ argument is zero, subnormal, infinite or a NaN.\n\ \n"); -PyDoc_STRVAR(doc_is_qnan, +TyDoc_STRVAR(doc_is_qnan, "is_qnan($self, /)\n--\n\n\ Return True if the argument is a quiet NaN, and False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_is_signed, +TyDoc_STRVAR(doc_is_signed, "is_signed($self, /)\n--\n\n\ Return True if the argument has a negative sign and False otherwise.\n\ Note that both zeros and NaNs can carry signs.\n\ \n"); -PyDoc_STRVAR(doc_is_snan, +TyDoc_STRVAR(doc_is_snan, "is_snan($self, /)\n--\n\n\ Return True if the argument is a signaling NaN and False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_is_subnormal, +TyDoc_STRVAR(doc_is_subnormal, "is_subnormal($self, /, context=None)\n--\n\n\ Return True if the argument is subnormal, and False otherwise. A number is\n\ subnormal if it is non-zero, finite, and has an adjusted exponent less\n\ than Emin.\n\ \n"); -PyDoc_STRVAR(doc_is_zero, +TyDoc_STRVAR(doc_is_zero, "is_zero($self, /)\n--\n\n\ Return True if the argument is a (positive or negative) zero and False\n\ otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ln, +TyDoc_STRVAR(doc_ln, "ln($self, /, context=None)\n--\n\n\ Return the natural (base e) logarithm of the operand. The function always\n\ uses the ROUND_HALF_EVEN mode and the result is correctly rounded.\n\ \n"); -PyDoc_STRVAR(doc_log10, +TyDoc_STRVAR(doc_log10, "log10($self, /, context=None)\n--\n\n\ Return the base ten logarithm of the operand. The function always uses the\n\ ROUND_HALF_EVEN mode and the result is correctly rounded.\n\ \n"); -PyDoc_STRVAR(doc_logb, +TyDoc_STRVAR(doc_logb, "logb($self, /, context=None)\n--\n\n\ For a non-zero number, return the adjusted exponent of the operand as a\n\ Decimal instance. If the operand is a zero, then Decimal('-Infinity') is\n\ @@ -290,65 +290,65 @@ returned and the DivisionByZero condition is raised. If the operand is\n\ an infinity then Decimal('Infinity') is returned.\n\ \n"); -PyDoc_STRVAR(doc_logical_and, +TyDoc_STRVAR(doc_logical_and, "logical_and($self, /, other, context=None)\n--\n\n\ Return the digit-wise 'and' of the two (logical) operands.\n\ \n"); -PyDoc_STRVAR(doc_logical_invert, +TyDoc_STRVAR(doc_logical_invert, "logical_invert($self, /, context=None)\n--\n\n\ Return the digit-wise inversion of the (logical) operand.\n\ \n"); -PyDoc_STRVAR(doc_logical_or, +TyDoc_STRVAR(doc_logical_or, "logical_or($self, /, other, context=None)\n--\n\n\ Return the digit-wise 'or' of the two (logical) operands.\n\ \n"); -PyDoc_STRVAR(doc_logical_xor, +TyDoc_STRVAR(doc_logical_xor, "logical_xor($self, /, other, context=None)\n--\n\n\ Return the digit-wise 'exclusive or' of the two (logical) operands.\n\ \n"); -PyDoc_STRVAR(doc_max, +TyDoc_STRVAR(doc_max, "max($self, /, other, context=None)\n--\n\n\ Maximum of self and other. If one operand is a quiet NaN and the other is\n\ numeric, the numeric operand is returned.\n\ \n"); -PyDoc_STRVAR(doc_max_mag, +TyDoc_STRVAR(doc_max_mag, "max_mag($self, /, other, context=None)\n--\n\n\ Similar to the max() method, but the comparison is done using the absolute\n\ values of the operands.\n\ \n"); -PyDoc_STRVAR(doc_min, +TyDoc_STRVAR(doc_min, "min($self, /, other, context=None)\n--\n\n\ Minimum of self and other. If one operand is a quiet NaN and the other is\n\ numeric, the numeric operand is returned.\n\ \n"); -PyDoc_STRVAR(doc_min_mag, +TyDoc_STRVAR(doc_min_mag, "min_mag($self, /, other, context=None)\n--\n\n\ Similar to the min() method, but the comparison is done using the absolute\n\ values of the operands.\n\ \n"); -PyDoc_STRVAR(doc_next_minus, +TyDoc_STRVAR(doc_next_minus, "next_minus($self, /, context=None)\n--\n\n\ Return the largest number representable in the given context (or in the\n\ current default context if no context is given) that is smaller than the\n\ given operand.\n\ \n"); -PyDoc_STRVAR(doc_next_plus, +TyDoc_STRVAR(doc_next_plus, "next_plus($self, /, context=None)\n--\n\n\ Return the smallest number representable in the given context (or in the\n\ current default context if no context is given) that is larger than the\n\ given operand.\n\ \n"); -PyDoc_STRVAR(doc_next_toward, +TyDoc_STRVAR(doc_next_toward, "next_toward($self, /, other, context=None)\n--\n\n\ If the two operands are unequal, return the number closest to the first\n\ operand in the direction of the second operand. If both operands are\n\ @@ -356,7 +356,7 @@ numerically equal, return a copy of the first operand with the sign set\n\ to be the same as the sign of the second operand.\n\ \n"); -PyDoc_STRVAR(doc_normalize, +TyDoc_STRVAR(doc_normalize, "normalize($self, /, context=None)\n--\n\n\ Normalize the number by stripping the rightmost trailing zeros and\n\ converting any result equal to Decimal('0') to Decimal('0e0'). Used\n\ @@ -365,7 +365,7 @@ For example, Decimal('32.100') and Decimal('0.321000e+2') both normalize\n\ to the equivalent value Decimal('32.1').\n\ \n"); -PyDoc_STRVAR(doc_number_class, +TyDoc_STRVAR(doc_number_class, "number_class($self, /, context=None)\n--\n\n\ Return a string describing the class of the operand. The returned value\n\ is one of the following ten strings:\n\ @@ -383,7 +383,7 @@ is one of the following ten strings:\n\ \n\ \n"); -PyDoc_STRVAR(doc_quantize, +TyDoc_STRVAR(doc_quantize, "quantize($self, /, exp, rounding=None, context=None)\n--\n\n\ Return a value equal to the first operand after rounding and having the\n\ exponent of the second operand.\n\ @@ -405,13 +405,13 @@ rounding argument if given, else by the given context argument; if neither\n\ argument is given, the rounding mode of the current thread's context is used.\n\ \n"); -PyDoc_STRVAR(doc_radix, +TyDoc_STRVAR(doc_radix, "radix($self, /)\n--\n\n\ Return Decimal(10), the radix (base) in which the Decimal class does\n\ all its arithmetic. Included for compatibility with the specification.\n\ \n"); -PyDoc_STRVAR(doc_remainder_near, +TyDoc_STRVAR(doc_remainder_near, "remainder_near($self, /, other, context=None)\n--\n\n\ Return the remainder from dividing self by other. This differs from\n\ self % other in that the sign of the remainder is chosen so as to minimize\n\ @@ -422,7 +422,7 @@ if two integers are equally near then the even one is chosen.\n\ If the result is zero then its sign will be the sign of self.\n\ \n"); -PyDoc_STRVAR(doc_rotate, +TyDoc_STRVAR(doc_rotate, "rotate($self, /, other, context=None)\n--\n\n\ Return the result of rotating the digits of the first operand by an amount\n\ specified by the second operand. The second operand must be an integer in\n\ @@ -434,7 +434,7 @@ length precision if necessary. The sign and exponent of the first operand are\n\ unchanged.\n\ \n"); -PyDoc_STRVAR(doc_same_quantum, +TyDoc_STRVAR(doc_same_quantum, "same_quantum($self, /, other, context=None)\n--\n\n\ Test whether self and other have the same exponent or whether both are NaN.\n\ \n\ @@ -443,14 +443,14 @@ and no rounding is performed. As an exception, the C version may raise\n\ InvalidOperation if the second operand cannot be converted exactly.\n\ \n"); -PyDoc_STRVAR(doc_scaleb, +TyDoc_STRVAR(doc_scaleb, "scaleb($self, /, other, context=None)\n--\n\n\ Return the first operand with the exponent adjusted the second. Equivalently,\n\ return the first operand multiplied by 10**other. The second operand must be\n\ an integer.\n\ \n"); -PyDoc_STRVAR(doc_shift, +TyDoc_STRVAR(doc_shift, "shift($self, /, other, context=None)\n--\n\n\ Return the result of shifting the digits of the first operand by an amount\n\ specified by the second operand. The second operand must be an integer in\n\ @@ -461,13 +461,13 @@ right. Digits shifted into the coefficient are zeros. The sign and exponent\n\ of the first operand are unchanged.\n\ \n"); -PyDoc_STRVAR(doc_sqrt, +TyDoc_STRVAR(doc_sqrt, "sqrt($self, /, context=None)\n--\n\n\ Return the square root of the argument to full precision. The result is\n\ correctly rounded using the ROUND_HALF_EVEN rounding mode.\n\ \n"); -PyDoc_STRVAR(doc_to_eng_string, +TyDoc_STRVAR(doc_to_eng_string, "to_eng_string($self, /, context=None)\n--\n\n\ Convert to an engineering-type string. Engineering notation has an exponent\n\ which is a multiple of 3, so there are up to 3 digits left of the decimal\n\ @@ -477,13 +477,13 @@ The value of context.capitals determines whether the exponent sign is lower\n\ or upper case. Otherwise, the context does not affect the operation.\n\ \n"); -PyDoc_STRVAR(doc_to_integral, +TyDoc_STRVAR(doc_to_integral, "to_integral($self, /, rounding=None, context=None)\n--\n\n\ Identical to the to_integral_value() method. The to_integral() name has been\n\ kept for compatibility with older versions.\n\ \n"); -PyDoc_STRVAR(doc_to_integral_exact, +TyDoc_STRVAR(doc_to_integral_exact, "to_integral_exact($self, /, rounding=None, context=None)\n--\n\n\ Round to the nearest integer, signaling Inexact or Rounded as appropriate if\n\ rounding occurs. The rounding mode is determined by the rounding parameter\n\ @@ -491,7 +491,7 @@ if given, else by the given context. If neither parameter is given, then the\n\ rounding mode of the current default context is used.\n\ \n"); -PyDoc_STRVAR(doc_to_integral_value, +TyDoc_STRVAR(doc_to_integral_value, "to_integral_value($self, /, rounding=None, context=None)\n--\n\n\ Round to the nearest integer without signaling Inexact or Rounded. The\n\ rounding mode is determined by the rounding parameter if given, else by\n\ @@ -504,7 +504,7 @@ of the current default context is used.\n\ /* Context Object and Methods */ /******************************************************************************/ -PyDoc_STRVAR(doc_context, +TyDoc_STRVAR(doc_context, "Context(prec=None, rounding=None, Emin=None, Emax=None, capitals=None, clamp=None, flags=None, traps=None)\n--\n\n\ The context affects almost all operations and controls rounding,\n\ Over/Underflow, raising of exceptions and much more. A new context\n\ @@ -519,280 +519,280 @@ can be constructed as follows:\n\ \n"); #ifdef EXTRA_FUNCTIONALITY -PyDoc_STRVAR(doc_ctx_apply, +TyDoc_STRVAR(doc_ctx_apply, "apply($self, x, /)\n--\n\n\ Apply self to Decimal x.\n\ \n"); #endif -PyDoc_STRVAR(doc_ctx_clear_flags, +TyDoc_STRVAR(doc_ctx_clear_flags, "clear_flags($self, /)\n--\n\n\ Reset all flags to False.\n\ \n"); -PyDoc_STRVAR(doc_ctx_clear_traps, +TyDoc_STRVAR(doc_ctx_clear_traps, "clear_traps($self, /)\n--\n\n\ Set all traps to False.\n\ \n"); -PyDoc_STRVAR(doc_ctx_copy, +TyDoc_STRVAR(doc_ctx_copy, "copy($self, /)\n--\n\n\ Return a duplicate of the context with all flags cleared.\n\ \n"); -PyDoc_STRVAR(doc_ctx_copy_decimal, +TyDoc_STRVAR(doc_ctx_copy_decimal, "copy_decimal($self, x, /)\n--\n\n\ Return a copy of Decimal x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_create_decimal, +TyDoc_STRVAR(doc_ctx_create_decimal, "create_decimal($self, num=\"0\", /)\n--\n\n\ Create a new Decimal instance from num, using self as the context. Unlike the\n\ Decimal constructor, this function observes the context limits.\n\ \n"); -PyDoc_STRVAR(doc_ctx_create_decimal_from_float, +TyDoc_STRVAR(doc_ctx_create_decimal_from_float, "create_decimal_from_float($self, f, /)\n--\n\n\ Create a new Decimal instance from float f. Unlike the Decimal.from_float()\n\ class method, this function observes the context limits.\n\ \n"); -PyDoc_STRVAR(doc_ctx_Etiny, +TyDoc_STRVAR(doc_ctx_Etiny, "Etiny($self, /)\n--\n\n\ Return a value equal to Emin - prec + 1, which is the minimum exponent value\n\ for subnormal results. When underflow occurs, the exponent is set to Etiny.\n\ \n"); -PyDoc_STRVAR(doc_ctx_Etop, +TyDoc_STRVAR(doc_ctx_Etop, "Etop($self, /)\n--\n\n\ Return a value equal to Emax - prec + 1. This is the maximum exponent\n\ if the _clamp field of the context is set to 1 (IEEE clamp mode). Etop()\n\ must not be negative.\n\ \n"); -PyDoc_STRVAR(doc_ctx_abs, +TyDoc_STRVAR(doc_ctx_abs, "abs($self, x, /)\n--\n\n\ Return the absolute value of x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_add, +TyDoc_STRVAR(doc_ctx_add, "add($self, x, y, /)\n--\n\n\ Return the sum of x and y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_canonical, +TyDoc_STRVAR(doc_ctx_canonical, "canonical($self, x, /)\n--\n\n\ Return a new instance of x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_compare, +TyDoc_STRVAR(doc_ctx_compare, "compare($self, x, y, /)\n--\n\n\ Compare x and y numerically.\n\ \n"); -PyDoc_STRVAR(doc_ctx_compare_signal, +TyDoc_STRVAR(doc_ctx_compare_signal, "compare_signal($self, x, y, /)\n--\n\n\ Compare x and y numerically. All NaNs signal.\n\ \n"); -PyDoc_STRVAR(doc_ctx_compare_total, +TyDoc_STRVAR(doc_ctx_compare_total, "compare_total($self, x, y, /)\n--\n\n\ Compare x and y using their abstract representation.\n\ \n"); -PyDoc_STRVAR(doc_ctx_compare_total_mag, +TyDoc_STRVAR(doc_ctx_compare_total_mag, "compare_total_mag($self, x, y, /)\n--\n\n\ Compare x and y using their abstract representation, ignoring sign.\n\ \n"); -PyDoc_STRVAR(doc_ctx_copy_abs, +TyDoc_STRVAR(doc_ctx_copy_abs, "copy_abs($self, x, /)\n--\n\n\ Return a copy of x with the sign set to 0.\n\ \n"); -PyDoc_STRVAR(doc_ctx_copy_negate, +TyDoc_STRVAR(doc_ctx_copy_negate, "copy_negate($self, x, /)\n--\n\n\ Return a copy of x with the sign inverted.\n\ \n"); -PyDoc_STRVAR(doc_ctx_copy_sign, +TyDoc_STRVAR(doc_ctx_copy_sign, "copy_sign($self, x, y, /)\n--\n\n\ Copy the sign from y to x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_divide, +TyDoc_STRVAR(doc_ctx_divide, "divide($self, x, y, /)\n--\n\n\ Return x divided by y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_divide_int, +TyDoc_STRVAR(doc_ctx_divide_int, "divide_int($self, x, y, /)\n--\n\n\ Return x divided by y, truncated to an integer.\n\ \n"); -PyDoc_STRVAR(doc_ctx_divmod, +TyDoc_STRVAR(doc_ctx_divmod, "divmod($self, x, y, /)\n--\n\n\ Return quotient and remainder of the division x / y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_exp, +TyDoc_STRVAR(doc_ctx_exp, "exp($self, x, /)\n--\n\n\ Return e ** x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_fma, +TyDoc_STRVAR(doc_ctx_fma, "fma($self, x, y, z, /)\n--\n\n\ Return x multiplied by y, plus z.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_canonical, +TyDoc_STRVAR(doc_ctx_is_canonical, "is_canonical($self, x, /)\n--\n\n\ Return True if x is canonical, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_finite, +TyDoc_STRVAR(doc_ctx_is_finite, "is_finite($self, x, /)\n--\n\n\ Return True if x is finite, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_infinite, +TyDoc_STRVAR(doc_ctx_is_infinite, "is_infinite($self, x, /)\n--\n\n\ Return True if x is infinite, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_nan, +TyDoc_STRVAR(doc_ctx_is_nan, "is_nan($self, x, /)\n--\n\n\ Return True if x is a qNaN or sNaN, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_normal, +TyDoc_STRVAR(doc_ctx_is_normal, "is_normal($self, x, /)\n--\n\n\ Return True if x is a normal number, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_qnan, +TyDoc_STRVAR(doc_ctx_is_qnan, "is_qnan($self, x, /)\n--\n\n\ Return True if x is a quiet NaN, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_signed, +TyDoc_STRVAR(doc_ctx_is_signed, "is_signed($self, x, /)\n--\n\n\ Return True if x is negative, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_snan, +TyDoc_STRVAR(doc_ctx_is_snan, "is_snan($self, x, /)\n--\n\n\ Return True if x is a signaling NaN, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_subnormal, +TyDoc_STRVAR(doc_ctx_is_subnormal, "is_subnormal($self, x, /)\n--\n\n\ Return True if x is subnormal, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_is_zero, +TyDoc_STRVAR(doc_ctx_is_zero, "is_zero($self, x, /)\n--\n\n\ Return True if x is a zero, False otherwise.\n\ \n"); -PyDoc_STRVAR(doc_ctx_ln, +TyDoc_STRVAR(doc_ctx_ln, "ln($self, x, /)\n--\n\n\ Return the natural (base e) logarithm of x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_log10, +TyDoc_STRVAR(doc_ctx_log10, "log10($self, x, /)\n--\n\n\ Return the base 10 logarithm of x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_logb, +TyDoc_STRVAR(doc_ctx_logb, "logb($self, x, /)\n--\n\n\ Return the exponent of the magnitude of the operand's MSD.\n\ \n"); -PyDoc_STRVAR(doc_ctx_logical_and, +TyDoc_STRVAR(doc_ctx_logical_and, "logical_and($self, x, y, /)\n--\n\n\ Digit-wise and of x and y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_logical_invert, +TyDoc_STRVAR(doc_ctx_logical_invert, "logical_invert($self, x, /)\n--\n\n\ Invert all digits of x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_logical_or, +TyDoc_STRVAR(doc_ctx_logical_or, "logical_or($self, x, y, /)\n--\n\n\ Digit-wise or of x and y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_logical_xor, +TyDoc_STRVAR(doc_ctx_logical_xor, "logical_xor($self, x, y, /)\n--\n\n\ Digit-wise xor of x and y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_max, +TyDoc_STRVAR(doc_ctx_max, "max($self, x, y, /)\n--\n\n\ Compare the values numerically and return the maximum.\n\ \n"); -PyDoc_STRVAR(doc_ctx_max_mag, +TyDoc_STRVAR(doc_ctx_max_mag, "max_mag($self, x, y, /)\n--\n\n\ Compare the values numerically with their sign ignored.\n\ \n"); -PyDoc_STRVAR(doc_ctx_min, +TyDoc_STRVAR(doc_ctx_min, "min($self, x, y, /)\n--\n\n\ Compare the values numerically and return the minimum.\n\ \n"); -PyDoc_STRVAR(doc_ctx_min_mag, +TyDoc_STRVAR(doc_ctx_min_mag, "min_mag($self, x, y, /)\n--\n\n\ Compare the values numerically with their sign ignored.\n\ \n"); -PyDoc_STRVAR(doc_ctx_minus, +TyDoc_STRVAR(doc_ctx_minus, "minus($self, x, /)\n--\n\n\ Minus corresponds to the unary prefix minus operator in Python, but applies\n\ the context to the result.\n\ \n"); -PyDoc_STRVAR(doc_ctx_multiply, +TyDoc_STRVAR(doc_ctx_multiply, "multiply($self, x, y, /)\n--\n\n\ Return the product of x and y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_next_minus, +TyDoc_STRVAR(doc_ctx_next_minus, "next_minus($self, x, /)\n--\n\n\ Return the largest representable number smaller than x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_next_plus, +TyDoc_STRVAR(doc_ctx_next_plus, "next_plus($self, x, /)\n--\n\n\ Return the smallest representable number larger than x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_next_toward, +TyDoc_STRVAR(doc_ctx_next_toward, "next_toward($self, x, y, /)\n--\n\n\ Return the number closest to x, in the direction towards y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_normalize, +TyDoc_STRVAR(doc_ctx_normalize, "normalize($self, x, /)\n--\n\n\ Reduce x to its simplest form. Alias for reduce(x).\n\ \n"); -PyDoc_STRVAR(doc_ctx_number_class, +TyDoc_STRVAR(doc_ctx_number_class, "number_class($self, x, /)\n--\n\n\ Return an indication of the class of x.\n\ \n"); -PyDoc_STRVAR(doc_ctx_plus, +TyDoc_STRVAR(doc_ctx_plus, "plus($self, x, /)\n--\n\n\ Plus corresponds to the unary prefix plus operator in Python, but applies\n\ the context to the result.\n\ \n"); -PyDoc_STRVAR(doc_ctx_power, +TyDoc_STRVAR(doc_ctx_power, "power($self, /, a, b, modulo=None)\n--\n\n\ Compute a**b. If 'a' is negative, then 'b' must be integral. The result\n\ will be inexact unless 'a' is integral and the result is finite and can\n\ @@ -810,79 +810,79 @@ hold:\n\ \n\ \n"); -PyDoc_STRVAR(doc_ctx_quantize, +TyDoc_STRVAR(doc_ctx_quantize, "quantize($self, x, y, /)\n--\n\n\ Return a value equal to x (rounded), having the exponent of y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_radix, +TyDoc_STRVAR(doc_ctx_radix, "radix($self, /)\n--\n\n\ Return 10.\n\ \n"); -PyDoc_STRVAR(doc_ctx_remainder, +TyDoc_STRVAR(doc_ctx_remainder, "remainder($self, x, y, /)\n--\n\n\ Return the remainder from integer division. The sign of the result,\n\ if non-zero, is the same as that of the original dividend.\n\ \n"); -PyDoc_STRVAR(doc_ctx_remainder_near, +TyDoc_STRVAR(doc_ctx_remainder_near, "remainder_near($self, x, y, /)\n--\n\n\ Return x - y * n, where n is the integer nearest the exact value of x / y\n\ (if the result is 0 then its sign will be the sign of x).\n\ \n"); -PyDoc_STRVAR(doc_ctx_rotate, +TyDoc_STRVAR(doc_ctx_rotate, "rotate($self, x, y, /)\n--\n\n\ Return a copy of x, rotated by y places.\n\ \n"); -PyDoc_STRVAR(doc_ctx_same_quantum, +TyDoc_STRVAR(doc_ctx_same_quantum, "same_quantum($self, x, y, /)\n--\n\n\ Return True if the two operands have the same exponent.\n\ \n"); -PyDoc_STRVAR(doc_ctx_scaleb, +TyDoc_STRVAR(doc_ctx_scaleb, "scaleb($self, x, y, /)\n--\n\n\ Return the first operand after adding the second value to its exp.\n\ \n"); -PyDoc_STRVAR(doc_ctx_shift, +TyDoc_STRVAR(doc_ctx_shift, "shift($self, x, y, /)\n--\n\n\ Return a copy of x, shifted by y places.\n\ \n"); -PyDoc_STRVAR(doc_ctx_sqrt, +TyDoc_STRVAR(doc_ctx_sqrt, "sqrt($self, x, /)\n--\n\n\ Square root of a non-negative number to context precision.\n\ \n"); -PyDoc_STRVAR(doc_ctx_subtract, +TyDoc_STRVAR(doc_ctx_subtract, "subtract($self, x, y, /)\n--\n\n\ Return the difference between x and y.\n\ \n"); -PyDoc_STRVAR(doc_ctx_to_eng_string, +TyDoc_STRVAR(doc_ctx_to_eng_string, "to_eng_string($self, x, /)\n--\n\n\ Convert a number to a string, using engineering notation.\n\ \n"); -PyDoc_STRVAR(doc_ctx_to_integral, +TyDoc_STRVAR(doc_ctx_to_integral, "to_integral($self, x, /)\n--\n\n\ Identical to to_integral_value(x).\n\ \n"); -PyDoc_STRVAR(doc_ctx_to_integral_exact, +TyDoc_STRVAR(doc_ctx_to_integral_exact, "to_integral_exact($self, x, /)\n--\n\n\ Round to an integer. Signal if the result is rounded or inexact.\n\ \n"); -PyDoc_STRVAR(doc_ctx_to_integral_value, +TyDoc_STRVAR(doc_ctx_to_integral_value, "to_integral_value($self, x, /)\n--\n\n\ Round to an integer.\n\ \n"); -PyDoc_STRVAR(doc_ctx_to_sci_string, +TyDoc_STRVAR(doc_ctx_to_sci_string, "to_sci_string($self, x, /)\n--\n\n\ Convert a number to a string using scientific notation.\n\ \n"); diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index 94c1b1f..9814f79 100644 --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -55,7 +55,7 @@ typedef struct { static inline _functools_state * get_functools_state_by_type(TyTypeObject *type); -PyDoc_STRVAR(placeholder_doc, +TyDoc_STRVAR(placeholder_doc, "The type of the Placeholder singleton.\n\n" "Used as a placeholder for partial arguments."); @@ -577,7 +577,7 @@ partial_call(TyObject *self, TyObject *args, TyObject *kwargs) return res; } -PyDoc_STRVAR(partial_doc, +TyDoc_STRVAR(partial_doc, "partial(func, /, *args, **keywords)\n--\n\n\ Create a new function with partial application of the given arguments\n\ and keywords."); @@ -754,7 +754,7 @@ static TyMethodDef partial_methods[] = { {"__reduce__", partial_reduce, METH_NOARGS}, {"__setstate__", partial_setstate, METH_O}, {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -828,7 +828,7 @@ keyobject_traverse(TyObject *op, visitproc visit, void *arg) static TyMemberDef keyobject_members[] = { {"obj", _Ty_T_OBJECT, offsetof(keyobject, object), 0, - PyDoc_STR("Value wrapped by a key function.")}, + TyDoc_STR("Value wrapped by a key function.")}, {NULL} }; @@ -1738,7 +1738,7 @@ lru_cache_tp_traverse(TyObject *op, visitproc visit, void *arg) } -PyDoc_STRVAR(lru_cache_doc, +TyDoc_STRVAR(lru_cache_doc, "Create a cached callable that wraps another function.\n\ \n\ user_function: the function being cached\n\ @@ -1801,7 +1801,7 @@ static TyType_Spec lru_cache_type_spec = { /* module level code ********************************************************/ -PyDoc_STRVAR(_functools_doc, +TyDoc_STRVAR(_functools_doc, "Tools that operate on functions."); static TyMethodDef _functools_methods[] = { diff --git a/Modules/_gdbmmodule.c b/Modules/_gdbmmodule.c index 906605a..c78c61d 100644 --- a/Modules/_gdbmmodule.c +++ b/Modules/_gdbmmodule.c @@ -58,7 +58,7 @@ class _gdbm.gdbm "gdbmobject *" "&Gdbmtype" [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=38ae71cedfc7172b]*/ -PyDoc_STRVAR(gdbmmodule__doc__, +TyDoc_STRVAR(gdbmmodule__doc__, "This module provides an interface to the GNU DBM (GDBM) library.\n\ \n\ This module is quite similar to the dbm module, but uses GDBM instead to\n\ @@ -86,7 +86,7 @@ typedef struct { return NULL; \ } -PyDoc_STRVAR(gdbm_object__doc__, +TyDoc_STRVAR(gdbm_object__doc__, "This object represents a GDBM database.\n\ GDBM objects behave like mappings (dictionaries), except that keys and\n\ values are always immutable bytes-like objects or strings. Printing\n\ diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 6a69a5b..f6e46ca 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -738,7 +738,7 @@ EVP_get_name(TyObject *op, void *Py_UNUSED(closure)) static TyGetSetDef EVP_getseters[] = { {"digest_size", EVP_get_digest_size, NULL, NULL, NULL}, {"block_size", EVP_get_block_size, NULL, NULL, NULL}, - {"name", EVP_get_name, NULL, NULL, PyDoc_STR("algorithm name.")}, + {"name", EVP_get_name, NULL, NULL, TyDoc_STR("algorithm name.")}, {NULL} /* Sentinel */ }; @@ -756,7 +756,7 @@ EVP_repr(TyObject *self) return repr; } -PyDoc_STRVAR(hashtype_doc, +TyDoc_STRVAR(hashtype_doc, "HASH(name, string=b\'\')\n" "--\n" "\n" @@ -907,7 +907,7 @@ static TyGetSetDef EVPXOF_getseters[] = { {NULL} /* Sentinel */ }; -PyDoc_STRVAR(hashxoftype_doc, +TyDoc_STRVAR(hashxoftype_doc, "HASHXOF(name, string=b\'\')\n" "--\n" "\n" @@ -1903,7 +1903,7 @@ static TyGetSetDef HMAC_getset[] = { }; -PyDoc_STRVAR(hmactype_doc, +TyDoc_STRVAR(hmactype_doc, "The object used to calculate HMAC of a message.\n\ \n\ Methods:\n\ diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c index d8c0d8f..026863e 100644 --- a/Modules/_heapqmodule.c +++ b/Modules/_heapqmodule.c @@ -650,7 +650,7 @@ static TyMethodDef heapq_methods[] = { {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "Heap queue algorithm (a.k.a. priority queue).\n\ \n\ Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for\n\ @@ -681,7 +681,7 @@ without surprises: heap[0] is the smallest item, and heap.sort()\n\ maintains the heap invariant!\n"); -PyDoc_STRVAR(__about__, +TyDoc_STRVAR(__about__, "Heap queues\n\ \n\ [explanation by Fran\xc3\xa7ois Pinard]\n\ diff --git a/Modules/_interpchannelsmodule.c b/Modules/_interpchannelsmodule.c index 1ce3822..ded6ed2 100644 --- a/Modules/_interpchannelsmodule.c +++ b/Modules/_interpchannelsmodule.c @@ -37,7 +37,7 @@ _globals (static struct globals): channels (struct _channels): numopen (int64_t) next_id; (int64_t) - mutex (PyThread_type_lock) + mutex (TyThread_type_lock) head (linked list of struct _channelref *): cid (int64_t) objcount (Ty_ssize_t) @@ -45,7 +45,7 @@ _globals (static struct globals): ... chan (struct _channel *): open (int) - mutex (PyThread_type_lock) + mutex (TyThread_type_lock) closing (struct _channel_closing *): ref (struct _channelref *): ... @@ -137,7 +137,7 @@ _release_xid_data(_PyXIData_t *data, int flags) } -static PyInterpreterState * +static TyInterpreterState * _get_current_interp(void) { // TyInterpreterState_Get() aborts if lookup fails, so don't need @@ -201,9 +201,9 @@ add_new_exception(TyObject *mod, const char *name, TyObject *base) add_new_exception(MOD, MODULE_NAME_STR "." Ty_STRINGIFY(NAME), BASE) static int -wait_for_lock(PyThread_type_lock mutex, PY_TIMEOUT_T timeout) +wait_for_lock(TyThread_type_lock mutex, PY_TIMEOUT_T timeout) { - PyLockStatus res = PyThread_acquire_lock_timed_with_retries(mutex, timeout); + TyLockStatus res = TyThread_acquire_lock_timed_with_retries(mutex, timeout); if (res == PY_LOCK_INTR) { /* KeyboardInterrupt, etc. */ assert(TyErr_Occurred()); @@ -216,7 +216,7 @@ wait_for_lock(PyThread_type_lock mutex, PY_TIMEOUT_T timeout) return -1; } assert(res == PY_LOCK_ACQUIRED); - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); return 0; } @@ -451,7 +451,7 @@ handle_channel_error(int err, TyObject *mod, int64_t cid) typedef uintptr_t _channelitem_id_t; typedef struct wait_info { - PyThread_type_lock mutex; + TyThread_type_lock mutex; enum { WAITING_NO_STATUS = 0, WAITING_ACQUIRED = 1, @@ -465,7 +465,7 @@ typedef struct wait_info { static int _waiting_init(_waiting_t *waiting) { - PyThread_type_lock mutex = PyThread_allocate_lock(); + TyThread_type_lock mutex = TyThread_allocate_lock(); if (mutex == NULL) { TyErr_NoMemory(); return -1; @@ -484,7 +484,7 @@ _waiting_clear(_waiting_t *waiting) assert(waiting->status != WAITING_ACQUIRED && waiting->status != WAITING_RELEASING); if (waiting->mutex != NULL) { - PyThread_free_lock(waiting->mutex); + TyThread_free_lock(waiting->mutex); waiting->mutex = NULL; } } @@ -499,7 +499,7 @@ static void _waiting_acquire(_waiting_t *waiting) { assert(waiting->status == WAITING_NO_STATUS); - PyThread_acquire_lock(waiting->mutex, NOWAIT_LOCK); + TyThread_acquire_lock(waiting->mutex, NOWAIT_LOCK); waiting->status = WAITING_ACQUIRED; } @@ -511,7 +511,7 @@ _waiting_release(_waiting_t *waiting, int received) assert(!waiting->received); waiting->status = WAITING_RELEASING; - PyThread_release_lock(waiting->mutex); + TyThread_release_lock(waiting->mutex); if (waiting->received != received) { assert(received == 1); waiting->received = received; @@ -1098,7 +1098,7 @@ static void _channel_clear_closing(struct _channel *); static void _channel_finish_closing(struct _channel *); typedef struct _channel { - PyThread_type_lock mutex; + TyThread_type_lock mutex; _channelqueue *queue; _channelends *ends; struct _channeldefaults { @@ -1110,7 +1110,7 @@ typedef struct _channel { } _channel_state; static _channel_state * -_channel_new(PyThread_type_lock mutex, struct _channeldefaults defaults) +_channel_new(TyThread_type_lock mutex, struct _channeldefaults defaults) { assert(check_unbound(defaults.unboundop)); _channel_state *chan = GLOBAL_MALLOC(_channel_state); @@ -1139,12 +1139,12 @@ static void _channel_free(_channel_state *chan) { _channel_clear_closing(chan); - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); _channelqueue_free(chan->queue); _channelends_free(chan->ends); - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); - PyThread_free_lock(chan->mutex); + TyThread_free_lock(chan->mutex); GLOBAL_FREE(chan); } @@ -1153,7 +1153,7 @@ _channel_add(_channel_state *chan, int64_t interpid, _PyXIData_t *data, _waiting_t *waiting, unboundop_t unboundop) { int res = -1; - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); if (!chan->open) { res = ERR_CHANNEL_CLOSED; @@ -1171,7 +1171,7 @@ _channel_add(_channel_state *chan, int64_t interpid, res = 0; done: - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); return res; } @@ -1180,7 +1180,7 @@ _channel_next(_channel_state *chan, int64_t interpid, _PyXIData_t **p_data, _waiting_t **p_waiting, int *p_unboundop) { int err = 0; - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); if (!chan->open) { err = ERR_CHANNEL_CLOSED; @@ -1203,7 +1203,7 @@ _channel_next(_channel_state *chan, int64_t interpid, } done: - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); if (chan->queue->count == 0) { _channel_finish_closing(chan); } @@ -1216,9 +1216,9 @@ _channel_remove(_channel_state *chan, _channelitem_id_t itemid) _PyXIData_t *data = NULL; _waiting_t *waiting = NULL; - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); _channelqueue_remove(chan->queue, itemid, &data, &waiting); - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); (void)_release_xid_data(data, XID_IGNORE_EXC | XID_FREE); if (waiting != NULL) { @@ -1233,7 +1233,7 @@ _channel_remove(_channel_state *chan, _channelitem_id_t itemid) static int _channel_release_interpreter(_channel_state *chan, int64_t interpid, int end) { - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); int res = -1; if (!chan->open) { @@ -1250,7 +1250,7 @@ _channel_release_interpreter(_channel_state *chan, int64_t interpid, int end) res = 0; done: - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); return res; } @@ -1258,7 +1258,7 @@ static int _channel_release_all(_channel_state *chan, int end, int force) { int res = -1; - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); if (!chan->open) { res = ERR_CHANNEL_CLOSED; @@ -1279,20 +1279,20 @@ _channel_release_all(_channel_state *chan, int end, int force) res = 0; done: - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); return res; } static void _channel_clear_interpreter(_channel_state *chan, int64_t interpid) { - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); _channelqueue_clear_interpreter(chan->queue, interpid); _channelends_clear_interpreter(chan->ends, interpid); chan->open = _channelends_is_open(chan->ends); - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); } @@ -1361,14 +1361,14 @@ _channelref_find(_channelref *first, int64_t cid, _channelref **pprev) typedef struct _channels { - PyThread_type_lock mutex; + TyThread_type_lock mutex; _channelref *head; int64_t numopen; int64_t next_id; } _channels; static void -_channels_init(_channels *channels, PyThread_type_lock mutex) +_channels_init(_channels *channels, TyThread_type_lock mutex) { assert(mutex != NULL); assert(channels->mutex == NULL); @@ -1381,16 +1381,16 @@ _channels_init(_channels *channels, PyThread_type_lock mutex) } static void -_channels_fini(_channels *channels, PyThread_type_lock *p_mutex) +_channels_fini(_channels *channels, TyThread_type_lock *p_mutex) { - PyThread_type_lock mutex = channels->mutex; + TyThread_type_lock mutex = channels->mutex; assert(mutex != NULL); - PyThread_acquire_lock(mutex, WAIT_LOCK); + TyThread_acquire_lock(mutex, WAIT_LOCK); assert(channels->numopen == 0); assert(channels->head == NULL); *channels = (_channels){0}; - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); *p_mutex = mutex; } @@ -1408,12 +1408,12 @@ _channels_next_id(_channels *channels) // needs lock } static int -_channels_lookup(_channels *channels, int64_t cid, PyThread_type_lock *pmutex, +_channels_lookup(_channels *channels, int64_t cid, TyThread_type_lock *pmutex, _channel_state **res) { int err = -1; _channel_state *chan = NULL; - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); if (pmutex != NULL) { *pmutex = NULL; } @@ -1438,7 +1438,7 @@ _channels_lookup(_channels *channels, int64_t cid, PyThread_type_lock *pmutex, done: if (pmutex == NULL || *pmutex == NULL) { - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); } *res = chan; return err; @@ -1448,7 +1448,7 @@ static int64_t _channels_add(_channels *channels, _channel_state *chan) { int64_t cid = -1; - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); // Create a new ref. int64_t _cid = _channels_next_id(channels); @@ -1469,19 +1469,19 @@ _channels_add(_channels *channels, _channel_state *chan) cid = _cid; done: - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); return cid; } /* forward */ -static int _channel_set_closing(_channelref *, PyThread_type_lock); +static int _channel_set_closing(_channelref *, TyThread_type_lock); static int _channels_close(_channels *channels, int64_t cid, _channel_state **pchan, int end, int force) { int res = -1; - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); if (pchan != NULL) { *pchan = NULL; } @@ -1537,7 +1537,7 @@ _channels_close(_channels *channels, int64_t cid, _channel_state **pchan, res = 0; done: - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); return res; } @@ -1563,7 +1563,7 @@ static int _channels_remove(_channels *channels, int64_t cid, _channel_state **pchan) { int res = -1; - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); if (pchan != NULL) { *pchan = NULL; @@ -1580,7 +1580,7 @@ _channels_remove(_channels *channels, int64_t cid, _channel_state **pchan) res = 0; done: - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); return res; } @@ -1588,7 +1588,7 @@ static int _channels_add_id_object(_channels *channels, int64_t cid) { int res = -1; - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); _channelref *ref = _channelref_find(channels->head, cid, NULL); if (ref == NULL) { @@ -1599,14 +1599,14 @@ _channels_add_id_object(_channels *channels, int64_t cid) res = 0; done: - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); return res; } static void _channels_release_cid_object(_channels *channels, int64_t cid) { - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); _channelref *prev = NULL; _channelref *ref = _channelref_find(channels->head, cid, &prev); @@ -1626,7 +1626,7 @@ _channels_release_cid_object(_channels *channels, int64_t cid) } done: - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); } struct channel_id_and_info { @@ -1638,7 +1638,7 @@ static struct channel_id_and_info * _channels_list_all(_channels *channels, int64_t *count) { struct channel_id_and_info *cids = NULL; - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); struct channel_id_and_info *ids = TyMem_NEW(struct channel_id_and_info, (Ty_ssize_t)(channels->numopen)); if (ids == NULL) { @@ -1655,14 +1655,14 @@ _channels_list_all(_channels *channels, int64_t *count) cids = ids; done: - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); return cids; } static void _channels_clear_interpreter(_channels *channels, int64_t interpid) { - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); _channelref *ref = channels->head; for (; ref != NULL; ref = ref->next) { @@ -1671,7 +1671,7 @@ _channels_clear_interpreter(_channels *channels, int64_t interpid) } } - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); } @@ -1682,14 +1682,14 @@ struct _channel_closing { }; static int -_channel_set_closing(_channelref *ref, PyThread_type_lock mutex) { +_channel_set_closing(_channelref *ref, TyThread_type_lock mutex) { _channel_state *chan = ref->chan; if (chan == NULL) { // already closed return 0; } int res = -1; - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); if (chan->closing != NULL) { res = ERR_CHANNEL_CLOSED; goto done; @@ -1702,18 +1702,18 @@ _channel_set_closing(_channelref *ref, PyThread_type_lock mutex) { res = 0; done: - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); return res; } static void _channel_clear_closing(_channel_state *chan) { - PyThread_acquire_lock(chan->mutex, WAIT_LOCK); + TyThread_acquire_lock(chan->mutex, WAIT_LOCK); if (chan->closing != NULL) { GLOBAL_FREE(chan->closing); chan->closing = NULL; } - PyThread_release_lock(chan->mutex); + TyThread_release_lock(chan->mutex); } static void @@ -1736,13 +1736,13 @@ _channel_finish_closing(_channel_state *chan) { static int64_t channel_create(_channels *channels, struct _channeldefaults defaults) { - PyThread_type_lock mutex = PyThread_allocate_lock(); + TyThread_type_lock mutex = TyThread_allocate_lock(); if (mutex == NULL) { return ERR_CHANNEL_MUTEX_INIT; } _channel_state *chan = _channel_new(mutex, defaults); if (chan == NULL) { - PyThread_free_lock(mutex); + TyThread_free_lock(mutex); return -1; } int64_t cid = _channels_add(channels, chan); @@ -1775,11 +1775,11 @@ channel_send(_channels *channels, int64_t cid, TyObject *obj, _waiting_t *waiting, unboundop_t unboundop, xidata_fallback_t fallback) { TyThreadState *tstate = _TyThreadState_GET(); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; int64_t interpid = TyInterpreterState_GetID(interp); // Look up the channel. - PyThread_type_lock mutex = NULL; + TyThread_type_lock mutex = NULL; _channel_state *chan = NULL; int err = _channels_lookup(channels, cid, &mutex, &chan); if (err != 0) { @@ -1789,25 +1789,25 @@ channel_send(_channels *channels, int64_t cid, TyObject *obj, // Past this point we are responsible for releasing the mutex. if (chan->closing != NULL) { - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); return ERR_CHANNEL_CLOSED; } // Convert the object to cross-interpreter data. _PyXIData_t *data = _PyXIData_New(); if (data == NULL) { - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); return -1; } if (_TyObject_GetXIData(tstate, obj, fallback, data) != 0) { - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); GLOBAL_FREE(data); return -1; } // Add the data to the channel. int res = _channel_add(chan, interpid, data, waiting, unboundop); - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); if (res != 0) { // We may chain an exception here: (void)_release_xid_data(data, 0); @@ -1823,7 +1823,7 @@ static void channel_clear_sent(_channels *channels, int64_t cid, _waiting_t *waiting) { // Look up the channel. - PyThread_type_lock mutex = NULL; + TyThread_type_lock mutex = NULL; _channel_state *chan = NULL; int err = _channels_lookup(channels, cid, &mutex, &chan); if (err != 0) { @@ -1837,7 +1837,7 @@ channel_clear_sent(_channels *channels, int64_t cid, _waiting_t *waiting) _channelitem_id_t itemid = _waiting_get_itemid(waiting); _channel_remove(chan, itemid); - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); } // Like channel_send(), but strictly wait for the object to be received. @@ -1902,7 +1902,7 @@ channel_recv(_channels *channels, int64_t cid, TyObject **res, int *p_unboundop) int err; *res = NULL; - PyInterpreterState *interp = _get_current_interp(); + TyInterpreterState *interp = _get_current_interp(); if (interp == NULL) { // XXX Is this always an error? if (TyErr_Occurred()) { @@ -1913,7 +1913,7 @@ channel_recv(_channels *channels, int64_t cid, TyObject **res, int *p_unboundop) int64_t interpid = TyInterpreterState_GetID(interp); // Look up the channel. - PyThread_type_lock mutex = NULL; + TyThread_type_lock mutex = NULL; _channel_state *chan = NULL; err = _channels_lookup(channels, cid, &mutex, &chan); if (err != 0) { @@ -1926,7 +1926,7 @@ channel_recv(_channels *channels, int64_t cid, TyObject **res, int *p_unboundop) _PyXIData_t *data = NULL; _waiting_t *waiting = NULL; err = _channel_next(chan, interpid, &data, &waiting, p_unboundop); - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); if (err != 0) { return err; } @@ -1975,14 +1975,14 @@ channel_recv(_channels *channels, int64_t cid, TyObject **res, int *p_unboundop) static int channel_release(_channels *channels, int64_t cid, int send, int recv) { - PyInterpreterState *interp = _get_current_interp(); + TyInterpreterState *interp = _get_current_interp(); if (interp == NULL) { return -1; } int64_t interpid = TyInterpreterState_GetID(interp); // Look up the channel. - PyThread_type_lock mutex = NULL; + TyThread_type_lock mutex = NULL; _channel_state *chan = NULL; int err = _channels_lookup(channels, cid, &mutex, &chan); if (err != 0) { @@ -1992,7 +1992,7 @@ channel_release(_channels *channels, int64_t cid, int send, int recv) // Close one or both of the two ends. int res = _channel_release_interpreter(chan, interpid, send-recv); - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); return res; } @@ -2029,21 +2029,21 @@ channel_is_associated(_channels *channels, int64_t cid, int64_t interpid, static int channel_get_defaults(_channels *channels, int64_t cid, struct _channeldefaults *defaults) { - PyThread_type_lock mutex = NULL; + TyThread_type_lock mutex = NULL; _channel_state *channel = NULL; int err = _channels_lookup(channels, cid, &mutex, &channel); if (err != 0) { return err; } *defaults = channel->defaults; - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); return 0; } static int _channel_get_count(_channels *channels, int64_t cid, Ty_ssize_t *p_count) { - PyThread_type_lock mutex = NULL; + TyThread_type_lock mutex = NULL; _channel_state *chan = NULL; int err = _channels_lookup(channels, cid, &mutex, &chan); if (err != 0) { @@ -2051,7 +2051,7 @@ _channel_get_count(_channels *channels, int64_t cid, Ty_ssize_t *p_count) } assert(chan != NULL); int64_t count = chan->queue->count; - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); *p_count = (Ty_ssize_t)count; return 0; @@ -2090,14 +2090,14 @@ _channel_get_info(_channels *channels, int64_t cid, struct channel_info *info) *info = (struct channel_info){0}; // Get the current interpreter. - PyInterpreterState *interp = _get_current_interp(); + TyInterpreterState *interp = _get_current_interp(); if (interp == NULL) { return -1; } int64_t interpid = TyInterpreterState_GetID(interp); // Hold the global lock until we're done. - PyThread_acquire_lock(channels->mutex, WAIT_LOCK); + TyThread_acquire_lock(channels->mutex, WAIT_LOCK); // Find the channel. _channelref *ref = _channelref_find(channels->head, cid, NULL); @@ -2193,16 +2193,16 @@ _channel_get_info(_channels *channels, int64_t cid, struct channel_info *info) } finally: - PyThread_release_lock(channels->mutex); + TyThread_release_lock(channels->mutex); return err; } -PyDoc_STRVAR(channel_info_doc, +TyDoc_STRVAR(channel_info_doc, "ChannelInfo\n\ \n\ A named tuple of a channel's state."); -static PyStructSequence_Field channel_info_fields[] = { +static TyStructSequence_Field channel_info_fields[] = { {"open", "both ends are open"}, {"closing", "send is closed, recv is non-empty"}, {"closed", "both ends are closed"}, @@ -2231,7 +2231,7 @@ static PyStructSequence_Field channel_info_fields[] = { {0} }; -static PyStructSequence_Desc channel_info_desc = { +static TyStructSequence_Desc channel_info_desc = { .name = MODULE_NAME_STR ".ChannelInfo", .doc = channel_info_doc, .fields = channel_info_fields, @@ -2247,14 +2247,14 @@ new_channel_info(TyObject *mod, struct channel_info *info) } assert(state->ChannelInfoType != NULL); - TyObject *self = PyStructSequence_New(state->ChannelInfoType); + TyObject *self = TyStructSequence_New(state->ChannelInfoType); if (self == NULL) { return NULL; } int pos = 0; #define SET_BOOL(val) \ - PyStructSequence_SET_ITEM(self, pos++, \ + TyStructSequence_SET_ITEM(self, pos++, \ Ty_NewRef(val ? Ty_True : Ty_False)) #define SET_COUNT(val) \ do { \ @@ -2263,7 +2263,7 @@ new_channel_info(TyObject *mod, struct channel_info *info) Ty_CLEAR(self); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(self, pos++, obj); \ + TyStructSequence_SET_ITEM(self, pos++, obj); \ } while(0) SET_BOOL(info->status.closed == 0); SET_BOOL(info->status.closed == -1); @@ -2684,15 +2684,15 @@ static int _channelid_end_recv = CHANNEL_RECV; static TyGetSetDef channelid_getsets[] = { {"end", channelid_end, NULL, - PyDoc_STR("'send', 'recv', or 'both'")}, + TyDoc_STR("'send', 'recv', or 'both'")}, {"send", channelid_end, NULL, - PyDoc_STR("the 'send' end of the channel"), &_channelid_end_send}, + TyDoc_STR("the 'send' end of the channel"), &_channelid_end_send}, {"recv", channelid_end, NULL, - PyDoc_STR("the 'recv' end of the channel"), &_channelid_end_recv}, + TyDoc_STR("the 'recv' end of the channel"), &_channelid_end_recv}, {NULL} }; -PyDoc_STRVAR(channelid_doc, +TyDoc_STRVAR(channelid_doc, "A channel ID identifies a channel and may be used as an int."); static TyType_Slot channelid_typeslots[] = { @@ -2861,7 +2861,7 @@ _globals_init(void) _globals.module_count++; if (_globals.module_count == 1) { // Called for the first time. - PyThread_type_lock mutex = PyThread_allocate_lock(); + TyThread_type_lock mutex = TyThread_allocate_lock(); if (mutex == NULL) { _globals.module_count--; PyMutex_Unlock(&_globals.mutex); @@ -2880,10 +2880,10 @@ _globals_fini(void) assert(_globals.module_count > 0); _globals.module_count--; if (_globals.module_count == 0) { - PyThread_type_lock mutex; + TyThread_type_lock mutex; _channels_fini(&_globals.channels, &mutex); assert(mutex != NULL); - PyThread_free_lock(mutex); + TyThread_free_lock(mutex); } PyMutex_Unlock(&_globals.mutex); } @@ -2900,7 +2900,7 @@ clear_interpreter(void *data) if (_globals.module_count == 0) { return; } - PyInterpreterState *interp = (PyInterpreterState *)data; + TyInterpreterState *interp = (TyInterpreterState *)data; assert(interp == _get_current_interp()); int64_t interpid = TyInterpreterState_GetID(interp); _channels_clear_interpreter(&_globals.channels, interpid); @@ -2956,7 +2956,7 @@ channelsmod_create(TyObject *self, TyObject *args, TyObject *kwds) return (TyObject *)cidobj; } -PyDoc_STRVAR(channelsmod_create_doc, +TyDoc_STRVAR(channelsmod_create_doc, "channel_create(unboundop) -> cid\n\ \n\ Create a new cross-interpreter channel and return a unique generated ID."); @@ -2982,7 +2982,7 @@ channelsmod_destroy(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(channelsmod_destroy_doc, +TyDoc_STRVAR(channelsmod_destroy_doc, "channel_destroy(cid)\n\ \n\ Close and finalize the channel. Afterward attempts to use the channel\n\ @@ -3039,7 +3039,7 @@ finally: return ids; } -PyDoc_STRVAR(channelsmod_list_all_doc, +TyDoc_STRVAR(channelsmod_list_all_doc, "channel_list_all() -> [cid]\n\ \n\ Return the list of all IDs for active channels."); @@ -3055,7 +3055,7 @@ channelsmod_list_interpreters(TyObject *self, TyObject *args, TyObject *kwds) int send = 0; /* Send or receive end? */ int64_t interpid; TyObject *ids, *interpid_obj; - PyInterpreterState *interp; + TyInterpreterState *interp; if (!TyArg_ParseTupleAndKeywords( args, kwds, "O&$p:channel_list_interpreters", @@ -3101,7 +3101,7 @@ finally: return ids; } -PyDoc_STRVAR(channelsmod_list_interpreters_doc, +TyDoc_STRVAR(channelsmod_list_interpreters_doc, "channel_list_interpreters(cid, *, send) -> [id]\n\ \n\ Return the list of all interpreter IDs associated with an end of the channel.\n\ @@ -3133,7 +3133,7 @@ channelsmod_send(TyObject *self, TyObject *args, TyObject *kwds) } int64_t cid = cid_data.cid; PY_TIMEOUT_T timeout; - if (PyThread_ParseTimeoutArg(timeout_obj, blocking, &timeout) < 0) { + if (TyThread_ParseTimeoutArg(timeout_obj, blocking, &timeout) < 0) { return NULL; } struct _channeldefaults defaults = {-1, -1}; @@ -3169,7 +3169,7 @@ channelsmod_send(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(channelsmod_send_doc, +TyDoc_STRVAR(channelsmod_send_doc, "channel_send(cid, obj, *, blocking=True, timeout=None)\n\ \n\ Add the object's data to the channel's queue.\n\ @@ -3198,7 +3198,7 @@ channelsmod_send_buffer(TyObject *self, TyObject *args, TyObject *kwds) } int64_t cid = cid_data.cid; PY_TIMEOUT_T timeout; - if (PyThread_ParseTimeoutArg(timeout_obj, blocking, &timeout) < 0) { + if (TyThread_ParseTimeoutArg(timeout_obj, blocking, &timeout) < 0) { return NULL; } struct _channeldefaults defaults = {-1, -1}; @@ -3240,7 +3240,7 @@ channelsmod_send_buffer(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(channelsmod_send_buffer_doc, +TyDoc_STRVAR(channelsmod_send_buffer_doc, "channel_send_buffer(cid, obj, *, blocking=True, timeout=None)\n\ \n\ Add the object's buffer to the channel's queue.\n\ @@ -3282,7 +3282,7 @@ channelsmod_recv(TyObject *self, TyObject *args, TyObject *kwds) return res; } -PyDoc_STRVAR(channelsmod_recv_doc, +TyDoc_STRVAR(channelsmod_recv_doc, "channel_recv(cid, [default]) -> (obj, unboundop)\n\ \n\ Return a new object from the data at the front of the channel's queue.\n\ @@ -3316,7 +3316,7 @@ channelsmod_close(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(channelsmod_close_doc, +TyDoc_STRVAR(channelsmod_close_doc, "channel_close(cid, *, send=None, recv=None, force=False)\n\ \n\ Close the channel for all interpreters.\n\ @@ -3377,7 +3377,7 @@ channelsmod_release(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(channelsmod_release_doc, +TyDoc_STRVAR(channelsmod_release_doc, "channel_release(cid, *, send=None, recv=None, force=True)\n\ \n\ Close the channel for the current interpreter. 'send' and 'recv'\n\ @@ -3407,7 +3407,7 @@ channelsmod_get_count(TyObject *self, TyObject *args, TyObject *kwds) return TyLong_FromSsize_t(count); } -PyDoc_STRVAR(channelsmod_get_count_doc, +TyDoc_STRVAR(channelsmod_get_count_doc, "get_count(cid)\n\ \n\ Return the number of items in the channel."); @@ -3434,7 +3434,7 @@ channelsmod_get_info(TyObject *self, TyObject *args, TyObject *kwds) return new_channel_info(self, &info); } -PyDoc_STRVAR(channelsmod_get_info_doc, +TyDoc_STRVAR(channelsmod_get_info_doc, "get_info(cid)\n\ \n\ Return details about the channel."); @@ -3463,7 +3463,7 @@ channelsmod_get_channel_defaults(TyObject *self, TyObject *args, TyObject *kwds) return res; } -PyDoc_STRVAR(channelsmod_get_channel_defaults_doc, +TyDoc_STRVAR(channelsmod_get_channel_defaults_doc, "get_channel_defaults(cid)\n\ \n\ Return the channel's default values, set when it was created."); @@ -3549,7 +3549,7 @@ static TyMethodDef module_functions[] = { /* initialization function */ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides primitive operations to manage Python interpreters.\n\ The 'interpreters' module provides a more convenient interface."); @@ -3574,7 +3574,7 @@ module_exec(TyObject *mod) /* Add other types */ // ChannelInfo - state->ChannelInfoType = PyStructSequence_NewType(&channel_info_desc); + state->ChannelInfoType = TyStructSequence_NewType(&channel_info_desc); if (state->ChannelInfoType == NULL) { goto error; } @@ -3589,7 +3589,7 @@ module_exec(TyObject *mod) } /* Make sure chnnels drop objects owned by this interpreter. */ - PyInterpreterState *interp = _get_current_interp(); + TyInterpreterState *interp = _get_current_interp(); PyUnstable_AtExit(interp, clear_interpreter, (void *)interp); return 0; diff --git a/Modules/_interpqueuesmodule.c b/Modules/_interpqueuesmodule.c index 8225b67..dc9c622 100644 --- a/Modules/_interpqueuesmodule.c +++ b/Modules/_interpqueuesmodule.c @@ -62,7 +62,7 @@ _release_xid_data(_PyXIData_t *data, int flags) return res; } -static PyInterpreterState * +static TyInterpreterState * _get_current_interp(void) { // TyInterpreterState_Get() aborts if lookup fails, so don't need @@ -515,7 +515,7 @@ _queueitem_clear_interpreter(_queueitem *item) typedef struct _queue { Ty_ssize_t num_waiters; // protected by global lock - PyThread_type_lock mutex; + TyThread_type_lock mutex; int alive; struct _queueitems { Ty_ssize_t maxsize; @@ -533,7 +533,7 @@ static int _queue_init(_queue *queue, Ty_ssize_t maxsize, struct _queuedefaults defaults) { assert(check_unbound(defaults.unboundop)); - PyThread_type_lock mutex = PyThread_allocate_lock(); + TyThread_type_lock mutex = TyThread_allocate_lock(); if (mutex == NULL) { return ERR_QUEUE_ALLOC; } @@ -555,7 +555,7 @@ _queue_clear(_queue *queue) assert(queue->num_waiters == 0); _queueitem_free_all(queue->items.first); assert(queue->mutex != NULL); - PyThread_free_lock(queue->mutex); + TyThread_free_lock(queue->mutex); *queue = (_queue){0}; } @@ -565,25 +565,25 @@ static void _queue_kill_and_wait(_queue *queue) { // Mark it as dead. - PyThread_acquire_lock(queue->mutex, WAIT_LOCK); + TyThread_acquire_lock(queue->mutex, WAIT_LOCK); assert(queue->alive); queue->alive = 0; - PyThread_release_lock(queue->mutex); + TyThread_release_lock(queue->mutex); // Wait for all waiters to fail. while (queue->num_waiters > 0) { - PyThread_acquire_lock(queue->mutex, WAIT_LOCK); - PyThread_release_lock(queue->mutex); + TyThread_acquire_lock(queue->mutex, WAIT_LOCK); + TyThread_release_lock(queue->mutex); }; } static void -_queue_mark_waiter(_queue *queue, PyThread_type_lock parent_mutex) +_queue_mark_waiter(_queue *queue, TyThread_type_lock parent_mutex) { if (parent_mutex != NULL) { - PyThread_acquire_lock(parent_mutex, WAIT_LOCK); + TyThread_acquire_lock(parent_mutex, WAIT_LOCK); queue->num_waiters += 1; - PyThread_release_lock(parent_mutex); + TyThread_release_lock(parent_mutex); } else { // The caller must be holding the parent lock already. @@ -592,12 +592,12 @@ _queue_mark_waiter(_queue *queue, PyThread_type_lock parent_mutex) } static void -_queue_unmark_waiter(_queue *queue, PyThread_type_lock parent_mutex) +_queue_unmark_waiter(_queue *queue, TyThread_type_lock parent_mutex) { if (parent_mutex != NULL) { - PyThread_acquire_lock(parent_mutex, WAIT_LOCK); + TyThread_acquire_lock(parent_mutex, WAIT_LOCK); queue->num_waiters -= 1; - PyThread_release_lock(parent_mutex); + TyThread_release_lock(parent_mutex); } else { // The caller must be holding the parent lock already. @@ -609,9 +609,9 @@ static int _queue_lock(_queue *queue) { // The queue must be marked as a waiter already. - PyThread_acquire_lock(queue->mutex, WAIT_LOCK); + TyThread_acquire_lock(queue->mutex, WAIT_LOCK); if (!queue->alive) { - PyThread_release_lock(queue->mutex); + TyThread_release_lock(queue->mutex); return ERR_QUEUE_NOT_FOUND; } return 0; @@ -620,7 +620,7 @@ _queue_lock(_queue *queue) static void _queue_unlock(_queue *queue) { - PyThread_release_lock(queue->mutex); + TyThread_release_lock(queue->mutex); } static int @@ -828,14 +828,14 @@ _queuerefs_clear(_queueref *head) /* a collection of queues ***************************************************/ typedef struct _queues { - PyThread_type_lock mutex; + TyThread_type_lock mutex; _queueref *head; int64_t count; int64_t next_id; } _queues; static void -_queues_init(_queues *queues, PyThread_type_lock mutex) +_queues_init(_queues *queues, TyThread_type_lock mutex) { assert(mutex != NULL); assert(queues->mutex == NULL); @@ -848,18 +848,18 @@ _queues_init(_queues *queues, PyThread_type_lock mutex) } static void -_queues_fini(_queues *queues, PyThread_type_lock *p_mutex) +_queues_fini(_queues *queues, TyThread_type_lock *p_mutex) { - PyThread_type_lock mutex = queues->mutex; + TyThread_type_lock mutex = queues->mutex; assert(mutex != NULL); - PyThread_acquire_lock(mutex, WAIT_LOCK); + TyThread_acquire_lock(mutex, WAIT_LOCK); if (queues->count > 0) { assert(queues->head != NULL); _queuerefs_clear(queues->head); } *queues = (_queues){0}; - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); *p_mutex = mutex; } @@ -879,11 +879,11 @@ _queues_next_id(_queues *queues) // needs lock static int _queues_lookup(_queues *queues, int64_t qid, _queue **res) { - PyThread_acquire_lock(queues->mutex, WAIT_LOCK); + TyThread_acquire_lock(queues->mutex, WAIT_LOCK); _queueref *ref = _queuerefs_find(queues->head, qid, NULL); if (ref == NULL) { - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); return ERR_QUEUE_NOT_FOUND; } assert(ref->queue != NULL); @@ -891,7 +891,7 @@ _queues_lookup(_queues *queues, int64_t qid, _queue **res) _queue_mark_waiter(queue, NULL); // The caller must unmark it. - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); *res = queue; return 0; @@ -901,7 +901,7 @@ static int64_t _queues_add(_queues *queues, _queue *queue) { int64_t qid = -1; - PyThread_acquire_lock(queues->mutex, WAIT_LOCK); + TyThread_acquire_lock(queues->mutex, WAIT_LOCK); // Create a new ref. int64_t _qid = _queues_next_id(queues); @@ -926,7 +926,7 @@ _queues_add(_queues *queues, _queue *queue) qid = _qid; done: - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); return qid; } @@ -953,17 +953,17 @@ _queues_remove_ref(_queues *queues, _queueref *ref, _queueref *prev, static int _queues_remove(_queues *queues, int64_t qid, _queue **p_queue) { - PyThread_acquire_lock(queues->mutex, WAIT_LOCK); + TyThread_acquire_lock(queues->mutex, WAIT_LOCK); _queueref *prev = NULL; _queueref *ref = _queuerefs_find(queues->head, qid, &prev); if (ref == NULL) { - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); return ERR_QUEUE_NOT_FOUND; } _queues_remove_ref(queues, ref, prev, p_queue); - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); return 0; } @@ -973,7 +973,7 @@ _queues_incref(_queues *queues, int64_t qid) { // XXX Track interpreter IDs? int res = -1; - PyThread_acquire_lock(queues->mutex, WAIT_LOCK); + TyThread_acquire_lock(queues->mutex, WAIT_LOCK); _queueref *ref = _queuerefs_find(queues->head, qid, NULL); if (ref == NULL) { @@ -985,7 +985,7 @@ _queues_incref(_queues *queues, int64_t qid) res = 0; done: - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); return res; } @@ -993,7 +993,7 @@ static int _queues_decref(_queues *queues, int64_t qid) { int res = -1; - PyThread_acquire_lock(queues->mutex, WAIT_LOCK); + TyThread_acquire_lock(queues->mutex, WAIT_LOCK); _queueref *prev = NULL; _queueref *ref = _queuerefs_find(queues->head, qid, &prev); @@ -1014,7 +1014,7 @@ _queues_decref(_queues *queues, int64_t qid) if (ref->refcount == 0) { _queue *queue = NULL; _queues_remove_ref(queues, ref, prev, &queue); - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); _queue_kill_and_wait(queue); _queue_free(queue); @@ -1023,7 +1023,7 @@ _queues_decref(_queues *queues, int64_t qid) res = 0; finally: - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); return res; } @@ -1036,7 +1036,7 @@ static struct queue_id_and_info * _queues_list_all(_queues *queues, int64_t *p_count) { struct queue_id_and_info *qids = NULL; - PyThread_acquire_lock(queues->mutex, WAIT_LOCK); + TyThread_acquire_lock(queues->mutex, WAIT_LOCK); struct queue_id_and_info *ids = TyMem_NEW(struct queue_id_and_info, (Ty_ssize_t)(queues->count)); if (ids == NULL) { @@ -1052,14 +1052,14 @@ _queues_list_all(_queues *queues, int64_t *p_count) qids = ids; done: - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); return qids; } static void _queues_clear_interpreter(_queues *queues, int64_t interpid) { - PyThread_acquire_lock(queues->mutex, WAIT_LOCK); + TyThread_acquire_lock(queues->mutex, WAIT_LOCK); _queueref *ref = queues->head; for (; ref != NULL; ref = ref->next) { @@ -1067,7 +1067,7 @@ _queues_clear_interpreter(_queues *queues, int64_t interpid) _queue_clear_interpreter(ref->queue, interpid); } - PyThread_release_lock(queues->mutex); + TyThread_release_lock(queues->mutex); } @@ -1419,7 +1419,7 @@ _globals_init(void) _globals.module_count++; if (_globals.module_count == 1) { // Called for the first time. - PyThread_type_lock mutex = PyThread_allocate_lock(); + TyThread_type_lock mutex = TyThread_allocate_lock(); if (mutex == NULL) { _globals.module_count--; PyMutex_Unlock(&_globals.mutex); @@ -1438,10 +1438,10 @@ _globals_fini(void) assert(_globals.module_count > 0); _globals.module_count--; if (_globals.module_count == 0) { - PyThread_type_lock mutex; + TyThread_type_lock mutex; _queues_fini(&_globals.queues, &mutex); assert(mutex != NULL); - PyThread_free_lock(mutex); + TyThread_free_lock(mutex); } PyMutex_Unlock(&_globals.mutex); } @@ -1459,7 +1459,7 @@ clear_interpreter(void *data) if (_globals.module_count == 0) { return; } - PyInterpreterState *interp = (PyInterpreterState *)data; + TyInterpreterState *interp = (TyInterpreterState *)data; assert(interp == _get_current_interp()); int64_t interpid = TyInterpreterState_GetID(interp); _queues_clear_interpreter(&_globals.queues, interpid); @@ -1524,7 +1524,7 @@ queuesmod_create(TyObject *self, TyObject *args, TyObject *kwds) return qidobj; } -PyDoc_STRVAR(queuesmod_create_doc, +TyDoc_STRVAR(queuesmod_create_doc, "create(maxsize, unboundop, fallback) -> qid\n\ \n\ Create a new cross-interpreter queue and return its unique generated ID.\n\ @@ -1551,7 +1551,7 @@ queuesmod_destroy(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(queuesmod_destroy_doc, +TyDoc_STRVAR(queuesmod_destroy_doc, "destroy(qid)\n\ \n\ Clear and destroy the queue. Afterward attempts to use the queue\n\ @@ -1589,7 +1589,7 @@ finally: return ids; } -PyDoc_STRVAR(queuesmod_list_all_doc, +TyDoc_STRVAR(queuesmod_list_all_doc, "list_all() -> [(qid, unboundop, fallback)]\n\ \n\ Return the list of IDs for all queues.\n\ @@ -1636,7 +1636,7 @@ queuesmod_put(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(queuesmod_put_doc, +TyDoc_STRVAR(queuesmod_put_doc, "put(qid, obj)\n\ \n\ Add the object's data to the queue."); @@ -1668,7 +1668,7 @@ queuesmod_get(TyObject *self, TyObject *args, TyObject *kwds) return res; } -PyDoc_STRVAR(queuesmod_get_doc, +TyDoc_STRVAR(queuesmod_get_doc, "get(qid) -> (obj, unboundop)\n\ \n\ Return a new object from the data at the front of the queue.\n\ @@ -1699,7 +1699,7 @@ queuesmod_bind(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(queuesmod_bind_doc, +TyDoc_STRVAR(queuesmod_bind_doc, "bind(qid)\n\ \n\ Take a reference to the identified queue.\n\ @@ -1729,7 +1729,7 @@ queuesmod_release(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(queuesmod_release_doc, +TyDoc_STRVAR(queuesmod_release_doc, "release(qid)\n\ \n\ Release a reference to the queue.\n\ @@ -1755,7 +1755,7 @@ queuesmod_get_maxsize(TyObject *self, TyObject *args, TyObject *kwds) return TyLong_FromLongLong(maxsize); } -PyDoc_STRVAR(queuesmod_get_maxsize_doc, +TyDoc_STRVAR(queuesmod_get_maxsize_doc, "get_maxsize(qid)\n\ \n\ Return the maximum number of items in the queue."); @@ -1782,7 +1782,7 @@ queuesmod_get_queue_defaults(TyObject *self, TyObject *args, TyObject *kwds) return res; } -PyDoc_STRVAR(queuesmod_get_queue_defaults_doc, +TyDoc_STRVAR(queuesmod_get_queue_defaults_doc, "get_queue_defaults(qid)\n\ \n\ Return the queue's default values, set when it was created."); @@ -1810,7 +1810,7 @@ queuesmod_is_full(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_FALSE; } -PyDoc_STRVAR(queuesmod_is_full_doc, +TyDoc_STRVAR(queuesmod_is_full_doc, "is_full(qid)\n\ \n\ Return true if the queue has a maxsize and has reached it."); @@ -1836,7 +1836,7 @@ queuesmod_get_count(TyObject *self, TyObject *args, TyObject *kwds) return TyLong_FromSsize_t(count); } -PyDoc_STRVAR(queuesmod_get_count_doc, +TyDoc_STRVAR(queuesmod_get_count_doc, "get_count(qid)\n\ \n\ Return the number of items in the queue."); @@ -1913,7 +1913,7 @@ static TyMethodDef module_functions[] = { /* initialization function */ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides primitive operations to manage Python interpreters.\n\ The 'interpreters' module provides a more convenient interface."); @@ -1931,7 +1931,7 @@ module_exec(TyObject *mod) } /* Make sure queues drop objects owned by this interpreter. */ - PyInterpreterState *interp = _get_current_interp(); + TyInterpreterState *interp = _get_current_interp(); PyUnstable_AtExit(interp, clear_interpreter, (void *)interp); return 0; diff --git a/Modules/_interpretersmodule.c b/Modules/_interpretersmodule.c index b28a831..1746277 100644 --- a/Modules/_interpretersmodule.c +++ b/Modules/_interpretersmodule.c @@ -26,7 +26,7 @@ #define MODINIT_FUNC_NAME RESOLVE_MODINIT_FUNC_NAME(MODULE_NAME) -static PyInterpreterState * +static TyInterpreterState * _get_current_interp(void) { // TyInterpreterState_Get() aborts if lookup fails, so don't need @@ -55,7 +55,7 @@ _get_current_module(void) static int -is_running_main(PyInterpreterState *interp) +is_running_main(TyInterpreterState *interp) { if (_TyInterpreterState_IsRunningMain(interp)) { return 1; @@ -161,7 +161,7 @@ xibufferview_dealloc(TyObject *op) { xibufferview *self = (xibufferview *)op; if (self->view != NULL) { - PyInterpreterState *interp = + TyInterpreterState *interp = _TyInterpreterState_LookUpID(self->interpid); if (interp == NULL) { /* The interpreter is no longer alive. */ @@ -478,7 +478,7 @@ _interp_call_pack(TyThreadState *tstate, struct interp_call *call, "expected a callable, got %R", func); return -1; } - if (_PyFunction_GetXIData(tstate, func, &call->_preallocated.func) < 0) { + if (_TyFunction_GetXIData(tstate, func, &call->_preallocated.func) < 0) { TyObject *exc = _TyErr_GetRaisedException(tstate); if (_PyPickle_GetXIData(tstate, func, &call->_preallocated.func) < 0) { _TyErr_SetRaisedException(tstate, exc); @@ -647,7 +647,7 @@ _run_result_clear(struct run_result *runres) } static int -_run_in_interpreter(TyThreadState *tstate, PyInterpreterState *interp, +_run_in_interpreter(TyThreadState *tstate, TyInterpreterState *interp, _PyXIData_t *script, struct interp_call *call, TyObject *shareables, struct run_result *runres) { @@ -729,16 +729,16 @@ finally: /* module level code ********************************************************/ static long -get_whence(PyInterpreterState *interp) +get_whence(TyInterpreterState *interp) { return _TyInterpreterState_GetWhence(interp); } -static PyInterpreterState * +static TyInterpreterState * resolve_interp(TyObject *idobj, int restricted, int reqready, const char *op) { - PyInterpreterState *interp; + TyInterpreterState *interp; if (idobj == NULL) { interp = TyInterpreterState_Get(); } @@ -778,7 +778,7 @@ resolve_interp(TyObject *idobj, int restricted, int reqready, const char *op) static TyObject * -get_summary(PyInterpreterState *interp) +get_summary(TyInterpreterState *interp) { TyObject *idobj = _TyInterpreterState_GetIDObject(interp); if (idobj == NULL) { @@ -829,7 +829,7 @@ interp_new_config(TyObject *self, TyObject *args, TyObject *kwds) return configobj; } -PyDoc_STRVAR(new_config_doc, +TyDoc_STRVAR(new_config_doc, "new_config(name='isolated', /, **overrides) -> type.SimpleNamespace\n\ \n\ Return a representation of a new PyInterpreterConfig.\n\ @@ -858,7 +858,7 @@ interp_create(TyObject *self, TyObject *args, TyObject *kwds) } long whence = _TyInterpreterState_WHENCE_STDLIB; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ _PyXI_NewInterpreter(&config, &whence, NULL, NULL); if (interp == NULL) { // XXX Move the chained exception to interpreters.create()? @@ -885,7 +885,7 @@ interp_create(TyObject *self, TyObject *args, TyObject *kwds) } -PyDoc_STRVAR(create_doc, +TyDoc_STRVAR(create_doc, "create([config], *, reqrefs=False) -> ID\n\ \n\ Create a new interpreter and return a unique generated ID.\n\ @@ -915,14 +915,14 @@ interp_destroy(TyObject *self, TyObject *args, TyObject *kwds) // Look up the interpreter. int reqready = 0; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "destroy"); if (interp == NULL) { return NULL; } // Ensure we don't try to destroy the current interpreter. - PyInterpreterState *current = _get_current_interp(); + TyInterpreterState *current = _get_current_interp(); if (current == NULL) { return NULL; } @@ -946,7 +946,7 @@ interp_destroy(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_NONE; } -PyDoc_STRVAR(destroy_doc, +TyDoc_STRVAR(destroy_doc, "destroy(id, *, restrict=False)\n\ \n\ Destroy the identified interpreter.\n\ @@ -972,7 +972,7 @@ interp_list_all(TyObject *self, TyObject *args, TyObject *kwargs) return NULL; } - PyInterpreterState *interp = TyInterpreterState_Head(); + TyInterpreterState *interp = TyInterpreterState_Head(); while (interp != NULL) { if (!reqready || _TyInterpreterState_IsReady(interp)) { TyObject *item = get_summary(interp); @@ -995,7 +995,7 @@ interp_list_all(TyObject *self, TyObject *args, TyObject *kwargs) return ids; } -PyDoc_STRVAR(list_all_doc, +TyDoc_STRVAR(list_all_doc, "list_all() -> [(ID, whence)]\n\ \n\ Return a list containing the ID of every existing interpreter."); @@ -1004,7 +1004,7 @@ Return a list containing the ID of every existing interpreter."); static TyObject * interp_get_current(TyObject *self, TyObject *Py_UNUSED(ignored)) { - PyInterpreterState *interp =_get_current_interp(); + TyInterpreterState *interp =_get_current_interp(); if (interp == NULL) { return NULL; } @@ -1012,7 +1012,7 @@ interp_get_current(TyObject *self, TyObject *Py_UNUSED(ignored)) return get_summary(interp); } -PyDoc_STRVAR(get_current_doc, +TyDoc_STRVAR(get_current_doc, "get_current() -> (ID, whence)\n\ \n\ Return the ID of current interpreter."); @@ -1021,12 +1021,12 @@ Return the ID of current interpreter."); static TyObject * interp_get_main(TyObject *self, TyObject *Py_UNUSED(ignored)) { - PyInterpreterState *interp = _TyInterpreterState_Main(); + TyInterpreterState *interp = _TyInterpreterState_Main(); assert(_TyInterpreterState_IsReady(interp)); return get_summary(interp); } -PyDoc_STRVAR(get_main_doc, +TyDoc_STRVAR(get_main_doc, "get_main() -> (ID, whence)\n\ \n\ Return the ID of main interpreter."); @@ -1047,7 +1047,7 @@ interp_set___main___attrs(TyObject *self, TyObject *args, TyObject *kwargs) // Look up the interpreter. int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "update __main__ for"); if (interp == NULL) { return NULL; @@ -1091,7 +1091,7 @@ interp_set___main___attrs(TyObject *self, TyObject *args, TyObject *kwargs) Py_RETURN_NONE; } -PyDoc_STRVAR(set___main___attrs_doc, +TyDoc_STRVAR(set___main___attrs_doc, "set___main___attrs(id, ns, *, restrict=False)\n\ \n\ Bind the given attributes in the interpreter's __main__ module."); @@ -1127,7 +1127,7 @@ interp_exec(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "exec code for"); if (interp == NULL) { return NULL; @@ -1153,7 +1153,7 @@ interp_exec(TyObject *self, TyObject *args, TyObject *kwds) #undef FUNCNAME } -PyDoc_STRVAR(exec_doc, +TyDoc_STRVAR(exec_doc, "exec(id, code, shared=None, *, restrict=False)\n\ \n\ Execute the provided code in the identified interpreter.\n\ @@ -1188,7 +1188,7 @@ interp_run_string(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "run a string in"); if (interp == NULL) { return NULL; @@ -1217,7 +1217,7 @@ interp_run_string(TyObject *self, TyObject *args, TyObject *kwds) #undef FUNCNAME } -PyDoc_STRVAR(run_string_doc, +TyDoc_STRVAR(run_string_doc, "run_string(id, script, shared=None, *, restrict=False)\n\ \n\ Execute the provided string in the identified interpreter.\n\ @@ -1242,7 +1242,7 @@ interp_run_func(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "run a function in"); if (interp == NULL) { return NULL; @@ -1280,7 +1280,7 @@ interp_run_func(TyObject *self, TyObject *args, TyObject *kwds) #undef FUNCNAME } -PyDoc_STRVAR(run_func_doc, +TyDoc_STRVAR(run_func_doc, "run_func(id, func, shared=None, *, restrict=False)\n\ \n\ Execute the body of the provided function in the identified interpreter.\n\ @@ -1312,7 +1312,7 @@ interp_call(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "make a call in"); if (interp == NULL) { return NULL; @@ -1344,7 +1344,7 @@ finally: #undef FUNCNAME } -PyDoc_STRVAR(call_doc, +TyDoc_STRVAR(call_doc, "call(id, callable, args=None, kwargs=None, *, restrict=False)\n\ \n\ Call the provided object in the identified interpreter.\n\ @@ -1369,7 +1369,7 @@ object_is_shareable(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_FALSE; } -PyDoc_STRVAR(is_shareable_doc, +TyDoc_STRVAR(is_shareable_doc, "is_shareable(obj) -> bool\n\ \n\ Return True if the object's data may be shared between interpreters and\n\ @@ -1390,7 +1390,7 @@ interp_is_running(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "check if running for"); if (interp == NULL) { return NULL; @@ -1402,7 +1402,7 @@ interp_is_running(TyObject *self, TyObject *args, TyObject *kwds) Py_RETURN_FALSE; } -PyDoc_STRVAR(is_running_doc, +TyDoc_STRVAR(is_running_doc, "is_running(id, *, restrict=False) -> bool\n\ \n\ Return whether or not the identified interpreter is running."); @@ -1422,7 +1422,7 @@ interp_get_config(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 0; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(idobj, restricted, reqready, "get the config of"); if (interp == NULL) { return NULL; @@ -1442,7 +1442,7 @@ interp_get_config(TyObject *self, TyObject *args, TyObject *kwds) return configobj; } -PyDoc_STRVAR(get_config_doc, +TyDoc_STRVAR(get_config_doc, "get_config(id, *, restrict=False) -> types.SimpleNamespace\n\ \n\ Return a representation of the config used to initialize the interpreter."); @@ -1459,7 +1459,7 @@ interp_whence(TyObject *self, TyObject *args, TyObject *kwds) return NULL; } - PyInterpreterState *interp = look_up_interp(id); + TyInterpreterState *interp = look_up_interp(id); if (interp == NULL) { return NULL; } @@ -1468,7 +1468,7 @@ interp_whence(TyObject *self, TyObject *args, TyObject *kwds) return TyLong_FromLong(whence); } -PyDoc_STRVAR(whence_doc, +TyDoc_STRVAR(whence_doc, "whence(id) -> int\n\ \n\ Return an identifier for where the interpreter was created."); @@ -1489,7 +1489,7 @@ interp_incref(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "incref"); if (interp == NULL) { return NULL; @@ -1518,7 +1518,7 @@ interp_decref(TyObject *self, TyObject *args, TyObject *kwds) } int reqready = 1; - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ resolve_interp(id, restricted, reqready, "decref"); if (interp == NULL) { return NULL; @@ -1589,7 +1589,7 @@ finally: return captured; } -PyDoc_STRVAR(capture_exception_doc, +TyDoc_STRVAR(capture_exception_doc, "capture_exception(exc=None) -> types.SimpleNamespace\n\ \n\ Return a snapshot of an exception. If \"exc\" is None\n\ @@ -1648,7 +1648,7 @@ static TyMethodDef module_functions[] = { /* initialization function */ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides primitive operations to manage Python interpreters.\n\ The 'interpreters' module provides a more convenient interface."); diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index 0e64016..24b61f0 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -28,7 +28,7 @@ #include #endif -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "The io module provides the Python interfaces to stream handling. The\n" "builtin open function is defined in this module.\n" "\n" @@ -477,7 +477,7 @@ _io_text_encoding_impl(TyObject *module, TyObject *encoding, int stacklevel) /*[clinic end generated code: output=91b2cfea6934cc0c input=4999aa8b3d90f3d4]*/ { if (encoding == NULL || encoding == Ty_None) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_TyInterpreterState_GetConfig(interp)->warn_default_encoding) { if (TyErr_WarnEx(TyExc_EncodingWarning, "'encoding' argument not specified", stacklevel)) { diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index 5937108..f707aca 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -31,7 +31,7 @@ class _io.BufferedRandom "buffered *" "clinic_state()->PyBufferedRandom_Type" /* * BufferedIOBase class, inherits from IOBase. */ -PyDoc_STRVAR(bufferediobase_doc, +TyDoc_STRVAR(bufferediobase_doc, "Base class for buffered IO objects.\n" "\n" "The main difference with RawIOBase is that the read() method\n" @@ -253,7 +253,7 @@ typedef struct { isn't ready for writing. */ Ty_off_t write_end; - PyThread_type_lock lock; + TyThread_type_lock lock; volatile unsigned long owner; Ty_ssize_t buffer_size; @@ -294,17 +294,17 @@ static int _enter_buffered_busy(buffered *self) { int relax_locking; - PyLockStatus st; - if (self->owner == PyThread_get_thread_ident()) { + TyLockStatus st; + if (self->owner == TyThread_get_thread_ident()) { TyErr_Format(TyExc_RuntimeError, "reentrant call inside %R", self); return 0; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); relax_locking = _Ty_IsInterpreterFinalizing(interp); Ty_BEGIN_ALLOW_THREADS if (!relax_locking) - st = PyThread_acquire_lock(self->lock, 1); + st = TyThread_acquire_lock(self->lock, 1); else { /* When finalizing, we don't want a deadlock to happen with daemon * threads abruptly shut down while they owned the lock. @@ -312,7 +312,7 @@ _enter_buffered_busy(buffered *self) * Note that non-daemon threads have already exited here, so this * shouldn't affect carefully written threaded I/O code. */ - st = PyThread_acquire_lock_timed(self->lock, (PY_TIMEOUT_T)1e6, 0); + st = TyThread_acquire_lock_timed(self->lock, (PY_TIMEOUT_T)1e6, 0); } Ty_END_ALLOW_THREADS if (relax_locking && st != PY_LOCK_ACQUIRED) { @@ -326,14 +326,14 @@ _enter_buffered_busy(buffered *self) } #define ENTER_BUFFERED(self) \ - ( (PyThread_acquire_lock(self->lock, 0) ? \ + ( (TyThread_acquire_lock(self->lock, 0) ? \ 1 : _enter_buffered_busy(self)) \ - && (self->owner = PyThread_get_thread_ident(), 1) ) + && (self->owner = TyThread_get_thread_ident(), 1) ) #define LEAVE_BUFFERED(self) \ do { \ self->owner = 0; \ - PyThread_release_lock(self->lock); \ + TyThread_release_lock(self->lock); \ } while(0); #define CHECK_INITIALIZED(self) \ @@ -428,7 +428,7 @@ buffered_dealloc(TyObject *op) self->buffer = NULL; } if (self->lock) { - PyThread_free_lock(self->lock); + TyThread_free_lock(self->lock); self->lock = NULL; } (void)buffered_clear(op); @@ -842,8 +842,8 @@ _buffered_init(buffered *self) return -1; } if (self->lock) - PyThread_free_lock(self->lock); - self->lock = PyThread_allocate_lock(); + TyThread_free_lock(self->lock); + self->lock = TyThread_allocate_lock(); if (self->lock == NULL) { TyErr_SetString(TyExc_RuntimeError, "can't allocate read lock"); return -1; diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index 82550d6..ca8d254 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_io_open__doc__, +TyDoc_STRVAR(_io_open__doc__, "open($module, /, file, mode=\'r\', buffering=-1, encoding=None,\n" " errors=None, newline=None, closefd=True, opener=None)\n" "--\n" @@ -148,7 +148,7 @@ _io_open(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file), &_Ty_ID(mode), &_Ty_ID(buffering), &_Ty_ID(encoding), &_Ty_ID(errors), &_Ty_ID(newline), &_Ty_ID(closefd), &_Ty_ID(opener), }, }; @@ -299,7 +299,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_text_encoding__doc__, +TyDoc_STRVAR(_io_text_encoding__doc__, "text_encoding($module, encoding, stacklevel=2, /)\n" "--\n" "\n" @@ -346,7 +346,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_open_code__doc__, +TyDoc_STRVAR(_io_open_code__doc__, "open_code($module, /, path)\n" "--\n" "\n" @@ -374,7 +374,7 @@ _io_open_code(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; diff --git a/Modules/_io/clinic/bufferedio.c.h b/Modules/_io/clinic/bufferedio.c.h index e52d211..63b87d9 100644 --- a/Modules/_io/clinic/bufferedio.c.h +++ b/Modules/_io/clinic/bufferedio.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(_io__BufferedIOBase_readinto__doc__, +TyDoc_STRVAR(_io__BufferedIOBase_readinto__doc__, "readinto($self, buffer, /)\n" "--\n" "\n"); @@ -44,7 +44,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__BufferedIOBase_readinto1__doc__, +TyDoc_STRVAR(_io__BufferedIOBase_readinto1__doc__, "readinto1($self, buffer, /)\n" "--\n" "\n"); @@ -78,7 +78,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__BufferedIOBase_detach__doc__, +TyDoc_STRVAR(_io__BufferedIOBase_detach__doc__, "detach($self, /)\n" "--\n" "\n" @@ -103,7 +103,7 @@ _io__BufferedIOBase_detach(TyObject *self, TyTypeObject *cls, TyObject *const *a return _io__BufferedIOBase_detach_impl(self, cls); } -PyDoc_STRVAR(_io__BufferedIOBase_read__doc__, +TyDoc_STRVAR(_io__BufferedIOBase_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n" @@ -170,7 +170,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__BufferedIOBase_read1__doc__, +TyDoc_STRVAR(_io__BufferedIOBase_read1__doc__, "read1($self, size=-1, /)\n" "--\n" "\n" @@ -225,7 +225,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__BufferedIOBase_write__doc__, +TyDoc_STRVAR(_io__BufferedIOBase_write__doc__, "write($self, b, /)\n" "--\n" "\n" @@ -276,7 +276,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered___sizeof____doc__, +TyDoc_STRVAR(_io__Buffered___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n"); @@ -299,7 +299,7 @@ _io__Buffered___sizeof__(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered__dealloc_warn__doc__, +TyDoc_STRVAR(_io__Buffered__dealloc_warn__doc__, "_dealloc_warn($self, source, /)\n" "--\n" "\n"); @@ -320,7 +320,7 @@ _io__Buffered__dealloc_warn(TyObject *self, TyObject *source) return return_value; } -PyDoc_STRVAR(_io__Buffered_simple_flush__doc__, +TyDoc_STRVAR(_io__Buffered_simple_flush__doc__, "flush($self, /)\n" "--\n" "\n"); @@ -368,7 +368,7 @@ _io__Buffered_closed_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_io__Buffered_close__doc__, +TyDoc_STRVAR(_io__Buffered_close__doc__, "close($self, /)\n" "--\n" "\n"); @@ -391,7 +391,7 @@ _io__Buffered_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_detach__doc__, +TyDoc_STRVAR(_io__Buffered_detach__doc__, "detach($self, /)\n" "--\n" "\n"); @@ -414,7 +414,7 @@ _io__Buffered_detach(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_seekable__doc__, +TyDoc_STRVAR(_io__Buffered_seekable__doc__, "seekable($self, /)\n" "--\n" "\n"); @@ -437,7 +437,7 @@ _io__Buffered_seekable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_readable__doc__, +TyDoc_STRVAR(_io__Buffered_readable__doc__, "readable($self, /)\n" "--\n" "\n"); @@ -460,7 +460,7 @@ _io__Buffered_readable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_writable__doc__, +TyDoc_STRVAR(_io__Buffered_writable__doc__, "writable($self, /)\n" "--\n" "\n"); @@ -533,7 +533,7 @@ _io__Buffered_mode_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_io__Buffered_fileno__doc__, +TyDoc_STRVAR(_io__Buffered_fileno__doc__, "fileno($self, /)\n" "--\n" "\n"); @@ -556,7 +556,7 @@ _io__Buffered_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_isatty__doc__, +TyDoc_STRVAR(_io__Buffered_isatty__doc__, "isatty($self, /)\n" "--\n" "\n"); @@ -579,7 +579,7 @@ _io__Buffered_isatty(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_flush__doc__, +TyDoc_STRVAR(_io__Buffered_flush__doc__, "flush($self, /)\n" "--\n" "\n"); @@ -602,7 +602,7 @@ _io__Buffered_flush(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_peek__doc__, +TyDoc_STRVAR(_io__Buffered_peek__doc__, "peek($self, size=0, /)\n" "--\n" "\n"); @@ -646,7 +646,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered_read__doc__, +TyDoc_STRVAR(_io__Buffered_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n"); @@ -681,7 +681,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered_read1__doc__, +TyDoc_STRVAR(_io__Buffered_read1__doc__, "read1($self, size=-1, /)\n" "--\n" "\n"); @@ -725,7 +725,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered_readinto__doc__, +TyDoc_STRVAR(_io__Buffered_readinto__doc__, "readinto($self, buffer, /)\n" "--\n" "\n"); @@ -759,7 +759,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered_readinto1__doc__, +TyDoc_STRVAR(_io__Buffered_readinto1__doc__, "readinto1($self, buffer, /)\n" "--\n" "\n"); @@ -793,7 +793,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered_readline__doc__, +TyDoc_STRVAR(_io__Buffered_readline__doc__, "readline($self, size=-1, /)\n" "--\n" "\n"); @@ -828,7 +828,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered_tell__doc__, +TyDoc_STRVAR(_io__Buffered_tell__doc__, "tell($self, /)\n" "--\n" "\n"); @@ -851,7 +851,7 @@ _io__Buffered_tell(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io__Buffered_seek__doc__, +TyDoc_STRVAR(_io__Buffered_seek__doc__, "seek($self, target, whence=0, /)\n" "--\n" "\n"); @@ -889,7 +889,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__Buffered_truncate__doc__, +TyDoc_STRVAR(_io__Buffered_truncate__doc__, "truncate($self, pos=None, /)\n" "--\n" "\n"); @@ -938,7 +938,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BufferedReader___init____doc__, +TyDoc_STRVAR(_io_BufferedReader___init____doc__, "BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE)\n" "--\n" "\n" @@ -961,7 +961,7 @@ _io_BufferedReader___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(raw), &_Ty_ID(buffer_size), }, }; @@ -1014,7 +1014,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BufferedWriter___init____doc__, +TyDoc_STRVAR(_io_BufferedWriter___init____doc__, "BufferedWriter(raw, buffer_size=DEFAULT_BUFFER_SIZE)\n" "--\n" "\n" @@ -1041,7 +1041,7 @@ _io_BufferedWriter___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(raw), &_Ty_ID(buffer_size), }, }; @@ -1094,7 +1094,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BufferedWriter_write__doc__, +TyDoc_STRVAR(_io_BufferedWriter_write__doc__, "write($self, buffer, /)\n" "--\n" "\n"); @@ -1127,7 +1127,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BufferedRWPair___init____doc__, +TyDoc_STRVAR(_io_BufferedRWPair___init____doc__, "BufferedRWPair(reader, writer, buffer_size=DEFAULT_BUFFER_SIZE, /)\n" "--\n" "\n" @@ -1186,7 +1186,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BufferedRandom___init____doc__, +TyDoc_STRVAR(_io_BufferedRandom___init____doc__, "BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE)\n" "--\n" "\n" @@ -1213,7 +1213,7 @@ _io_BufferedRandom___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(raw), &_Ty_ID(buffer_size), }, }; diff --git a/Modules/_io/clinic/bytesio.c.h b/Modules/_io/clinic/bytesio.c.h index 9a6837e..2a94154 100644 --- a/Modules/_io/clinic/bytesio.c.h +++ b/Modules/_io/clinic/bytesio.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _Ty_convert_optional_to_ssize_t() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_io_BytesIO_readable__doc__, +TyDoc_STRVAR(_io_BytesIO_readable__doc__, "readable($self, /)\n" "--\n" "\n" @@ -27,7 +27,7 @@ _io_BytesIO_readable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_readable_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO_writable__doc__, +TyDoc_STRVAR(_io_BytesIO_writable__doc__, "writable($self, /)\n" "--\n" "\n" @@ -45,7 +45,7 @@ _io_BytesIO_writable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_writable_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO_seekable__doc__, +TyDoc_STRVAR(_io_BytesIO_seekable__doc__, "seekable($self, /)\n" "--\n" "\n" @@ -63,7 +63,7 @@ _io_BytesIO_seekable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_seekable_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO_flush__doc__, +TyDoc_STRVAR(_io_BytesIO_flush__doc__, "flush($self, /)\n" "--\n" "\n" @@ -81,7 +81,7 @@ _io_BytesIO_flush(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_flush_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO_getbuffer__doc__, +TyDoc_STRVAR(_io_BytesIO_getbuffer__doc__, "getbuffer($self, /)\n" "--\n" "\n" @@ -103,7 +103,7 @@ _io_BytesIO_getbuffer(TyObject *self, TyTypeObject *cls, TyObject *const *args, return _io_BytesIO_getbuffer_impl((bytesio *)self, cls); } -PyDoc_STRVAR(_io_BytesIO_getvalue__doc__, +TyDoc_STRVAR(_io_BytesIO_getvalue__doc__, "getvalue($self, /)\n" "--\n" "\n" @@ -121,7 +121,7 @@ _io_BytesIO_getvalue(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_getvalue_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO_isatty__doc__, +TyDoc_STRVAR(_io_BytesIO_isatty__doc__, "isatty($self, /)\n" "--\n" "\n" @@ -141,7 +141,7 @@ _io_BytesIO_isatty(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_isatty_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO_tell__doc__, +TyDoc_STRVAR(_io_BytesIO_tell__doc__, "tell($self, /)\n" "--\n" "\n" @@ -159,7 +159,7 @@ _io_BytesIO_tell(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_tell_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO_read__doc__, +TyDoc_STRVAR(_io_BytesIO_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n" @@ -196,7 +196,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BytesIO_read1__doc__, +TyDoc_STRVAR(_io_BytesIO_read1__doc__, "read1($self, size=-1, /)\n" "--\n" "\n" @@ -233,7 +233,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BytesIO_readline__doc__, +TyDoc_STRVAR(_io_BytesIO_readline__doc__, "readline($self, size=-1, /)\n" "--\n" "\n" @@ -271,7 +271,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BytesIO_readlines__doc__, +TyDoc_STRVAR(_io_BytesIO_readlines__doc__, "readlines($self, size=None, /)\n" "--\n" "\n" @@ -307,7 +307,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BytesIO_readinto__doc__, +TyDoc_STRVAR(_io_BytesIO_readinto__doc__, "readinto($self, buffer, /)\n" "--\n" "\n" @@ -343,7 +343,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BytesIO_truncate__doc__, +TyDoc_STRVAR(_io_BytesIO_truncate__doc__, "truncate($self, size=None, /)\n" "--\n" "\n" @@ -380,7 +380,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BytesIO_seek__doc__, +TyDoc_STRVAR(_io_BytesIO_seek__doc__, "seek($self, pos, whence=0, /)\n" "--\n" "\n" @@ -434,7 +434,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_BytesIO_write__doc__, +TyDoc_STRVAR(_io_BytesIO_write__doc__, "write($self, b, /)\n" "--\n" "\n" @@ -458,7 +458,7 @@ _io_BytesIO_write(TyObject *self, TyObject *b) return return_value; } -PyDoc_STRVAR(_io_BytesIO_writelines__doc__, +TyDoc_STRVAR(_io_BytesIO_writelines__doc__, "writelines($self, lines, /)\n" "--\n" "\n" @@ -484,7 +484,7 @@ _io_BytesIO_writelines(TyObject *self, TyObject *lines) return return_value; } -PyDoc_STRVAR(_io_BytesIO_close__doc__, +TyDoc_STRVAR(_io_BytesIO_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -502,7 +502,7 @@ _io_BytesIO_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_BytesIO_close_impl((bytesio *)self); } -PyDoc_STRVAR(_io_BytesIO___init____doc__, +TyDoc_STRVAR(_io_BytesIO___init____doc__, "BytesIO(initial_bytes=b\'\')\n" "--\n" "\n" @@ -524,7 +524,7 @@ _io_BytesIO___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(initial_bytes), }, }; diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h index 7dcff1b..8f03ae8 100644 --- a/Modules/_io/clinic/fileio.c.h +++ b/Modules/_io/clinic/fileio.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _Ty_convert_optional_to_ssize_t() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_io_FileIO_close__doc__, +TyDoc_STRVAR(_io_FileIO_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -34,7 +34,7 @@ _io_FileIO_close(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ss return _io_FileIO_close_impl((fileio *)self, cls); } -PyDoc_STRVAR(_io_FileIO___init____doc__, +TyDoc_STRVAR(_io_FileIO___init____doc__, "FileIO(file, mode=\'r\', closefd=True, opener=None)\n" "--\n" "\n" @@ -69,7 +69,7 @@ _io_FileIO___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file), &_Ty_ID(mode), &_Ty_ID(closefd), &_Ty_ID(opener), }, }; @@ -140,7 +140,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_FileIO_fileno__doc__, +TyDoc_STRVAR(_io_FileIO_fileno__doc__, "fileno($self, /)\n" "--\n" "\n" @@ -158,7 +158,7 @@ _io_FileIO_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_FileIO_fileno_impl((fileio *)self); } -PyDoc_STRVAR(_io_FileIO_readable__doc__, +TyDoc_STRVAR(_io_FileIO_readable__doc__, "readable($self, /)\n" "--\n" "\n" @@ -176,7 +176,7 @@ _io_FileIO_readable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_FileIO_readable_impl((fileio *)self); } -PyDoc_STRVAR(_io_FileIO_writable__doc__, +TyDoc_STRVAR(_io_FileIO_writable__doc__, "writable($self, /)\n" "--\n" "\n" @@ -194,7 +194,7 @@ _io_FileIO_writable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_FileIO_writable_impl((fileio *)self); } -PyDoc_STRVAR(_io_FileIO_seekable__doc__, +TyDoc_STRVAR(_io_FileIO_seekable__doc__, "seekable($self, /)\n" "--\n" "\n" @@ -212,7 +212,7 @@ _io_FileIO_seekable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_FileIO_seekable_impl((fileio *)self); } -PyDoc_STRVAR(_io_FileIO_readinto__doc__, +TyDoc_STRVAR(_io_FileIO_readinto__doc__, "readinto($self, buffer, /)\n" "--\n" "\n" @@ -264,7 +264,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_FileIO_readall__doc__, +TyDoc_STRVAR(_io_FileIO_readall__doc__, "readall($self, /)\n" "--\n" "\n" @@ -288,7 +288,7 @@ _io_FileIO_readall(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io_FileIO_readall_impl((fileio *)self); } -PyDoc_STRVAR(_io_FileIO_read__doc__, +TyDoc_STRVAR(_io_FileIO_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n" @@ -347,7 +347,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_FileIO_write__doc__, +TyDoc_STRVAR(_io_FileIO_write__doc__, "write($self, b, /)\n" "--\n" "\n" @@ -402,7 +402,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_FileIO_seek__doc__, +TyDoc_STRVAR(_io_FileIO_seek__doc__, "seek($self, pos, whence=0, /)\n" "--\n" "\n" @@ -447,7 +447,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_FileIO_tell__doc__, +TyDoc_STRVAR(_io_FileIO_tell__doc__, "tell($self, /)\n" "--\n" "\n" @@ -469,7 +469,7 @@ _io_FileIO_tell(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_FTRUNCATE) -PyDoc_STRVAR(_io_FileIO_truncate__doc__, +TyDoc_STRVAR(_io_FileIO_truncate__doc__, "truncate($self, size=None, /)\n" "--\n" "\n" @@ -522,7 +522,7 @@ exit: #endif /* defined(HAVE_FTRUNCATE) */ -PyDoc_STRVAR(_io_FileIO_isatty__doc__, +TyDoc_STRVAR(_io_FileIO_isatty__doc__, "isatty($self, /)\n" "--\n" "\n" diff --git a/Modules/_io/clinic/iobase.c.h b/Modules/_io/clinic/iobase.c.h index 4efb981..a0f6d16 100644 --- a/Modules/_io/clinic/iobase.c.h +++ b/Modules/_io/clinic/iobase.c.h @@ -8,7 +8,7 @@ preserve #include "pycore_abstract.h" // _Ty_convert_optional_to_ssize_t() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_io__IOBase_seek__doc__, +TyDoc_STRVAR(_io__IOBase_seek__doc__, "seek($self, offset, whence=os.SEEK_SET, /)\n" "--\n" "\n" @@ -79,7 +79,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__IOBase_tell__doc__, +TyDoc_STRVAR(_io__IOBase_tell__doc__, "tell($self, /)\n" "--\n" "\n" @@ -97,7 +97,7 @@ _io__IOBase_tell(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io__IOBase_tell_impl(self); } -PyDoc_STRVAR(_io__IOBase_truncate__doc__, +TyDoc_STRVAR(_io__IOBase_truncate__doc__, "truncate($self, size=None, /)\n" "--\n" "\n" @@ -149,7 +149,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__IOBase_flush__doc__, +TyDoc_STRVAR(_io__IOBase_flush__doc__, "flush($self, /)\n" "--\n" "\n" @@ -169,7 +169,7 @@ _io__IOBase_flush(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io__IOBase_flush_impl(self); } -PyDoc_STRVAR(_io__IOBase_close__doc__, +TyDoc_STRVAR(_io__IOBase_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -189,7 +189,7 @@ _io__IOBase_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io__IOBase_close_impl(self); } -PyDoc_STRVAR(_io__IOBase_seekable__doc__, +TyDoc_STRVAR(_io__IOBase_seekable__doc__, "seekable($self, /)\n" "--\n" "\n" @@ -210,7 +210,7 @@ _io__IOBase_seekable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io__IOBase_seekable_impl(self); } -PyDoc_STRVAR(_io__IOBase_readable__doc__, +TyDoc_STRVAR(_io__IOBase_readable__doc__, "readable($self, /)\n" "--\n" "\n" @@ -230,7 +230,7 @@ _io__IOBase_readable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io__IOBase_readable_impl(self); } -PyDoc_STRVAR(_io__IOBase_writable__doc__, +TyDoc_STRVAR(_io__IOBase_writable__doc__, "writable($self, /)\n" "--\n" "\n" @@ -250,7 +250,7 @@ _io__IOBase_writable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io__IOBase_writable_impl(self); } -PyDoc_STRVAR(_io__IOBase_fileno__doc__, +TyDoc_STRVAR(_io__IOBase_fileno__doc__, "fileno($self, /)\n" "--\n" "\n" @@ -274,7 +274,7 @@ _io__IOBase_fileno(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ return _io__IOBase_fileno_impl(self, cls); } -PyDoc_STRVAR(_io__IOBase_isatty__doc__, +TyDoc_STRVAR(_io__IOBase_isatty__doc__, "isatty($self, /)\n" "--\n" "\n" @@ -294,7 +294,7 @@ _io__IOBase_isatty(TyObject *self, TyObject *Py_UNUSED(ignored)) return _io__IOBase_isatty_impl(self); } -PyDoc_STRVAR(_io__IOBase_readline__doc__, +TyDoc_STRVAR(_io__IOBase_readline__doc__, "readline($self, size=-1, /)\n" "--\n" "\n" @@ -334,7 +334,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__IOBase_readlines__doc__, +TyDoc_STRVAR(_io__IOBase_readlines__doc__, "readlines($self, hint=-1, /)\n" "--\n" "\n" @@ -372,7 +372,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__IOBase_writelines__doc__, +TyDoc_STRVAR(_io__IOBase_writelines__doc__, "writelines($self, lines, /)\n" "--\n" "\n" @@ -384,7 +384,7 @@ PyDoc_STRVAR(_io__IOBase_writelines__doc__, #define _IO__IOBASE_WRITELINES_METHODDEF \ {"writelines", (PyCFunction)_io__IOBase_writelines, METH_O, _io__IOBase_writelines__doc__}, -PyDoc_STRVAR(_io__RawIOBase_read__doc__, +TyDoc_STRVAR(_io__RawIOBase_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n"); @@ -426,7 +426,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__RawIOBase_readall__doc__, +TyDoc_STRVAR(_io__RawIOBase_readall__doc__, "readall($self, /)\n" "--\n" "\n" diff --git a/Modules/_io/clinic/stringio.c.h b/Modules/_io/clinic/stringio.c.h index ee124b6..b284923 100644 --- a/Modules/_io/clinic/stringio.c.h +++ b/Modules/_io/clinic/stringio.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_io_StringIO_getvalue__doc__, +TyDoc_STRVAR(_io_StringIO_getvalue__doc__, "getvalue($self, /)\n" "--\n" "\n" @@ -34,7 +34,7 @@ _io_StringIO_getvalue(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_StringIO_tell__doc__, +TyDoc_STRVAR(_io_StringIO_tell__doc__, "tell($self, /)\n" "--\n" "\n" @@ -58,7 +58,7 @@ _io_StringIO_tell(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_StringIO_read__doc__, +TyDoc_STRVAR(_io_StringIO_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n" @@ -97,7 +97,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_StringIO_readline__doc__, +TyDoc_STRVAR(_io_StringIO_readline__doc__, "readline($self, size=-1, /)\n" "--\n" "\n" @@ -135,7 +135,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_StringIO_truncate__doc__, +TyDoc_STRVAR(_io_StringIO_truncate__doc__, "truncate($self, pos=None, /)\n" "--\n" "\n" @@ -175,7 +175,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_StringIO_seek__doc__, +TyDoc_STRVAR(_io_StringIO_seek__doc__, "seek($self, pos, whence=0, /)\n" "--\n" "\n" @@ -231,7 +231,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_StringIO_write__doc__, +TyDoc_STRVAR(_io_StringIO_write__doc__, "write($self, s, /)\n" "--\n" "\n" @@ -258,7 +258,7 @@ _io_StringIO_write(TyObject *self, TyObject *obj) return return_value; } -PyDoc_STRVAR(_io_StringIO_close__doc__, +TyDoc_STRVAR(_io_StringIO_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -287,7 +287,7 @@ _io_StringIO_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_StringIO___init____doc__, +TyDoc_STRVAR(_io_StringIO___init____doc__, "StringIO(initial_value=\'\', newline=\'\\n\')\n" "--\n" "\n" @@ -313,7 +313,7 @@ _io_StringIO___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(initial_value), &_Ty_ID(newline), }, }; @@ -360,7 +360,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_StringIO_readable__doc__, +TyDoc_STRVAR(_io_StringIO_readable__doc__, "readable($self, /)\n" "--\n" "\n" @@ -384,7 +384,7 @@ _io_StringIO_readable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_StringIO_writable__doc__, +TyDoc_STRVAR(_io_StringIO_writable__doc__, "writable($self, /)\n" "--\n" "\n" @@ -408,7 +408,7 @@ _io_StringIO_writable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_StringIO_seekable__doc__, +TyDoc_STRVAR(_io_StringIO_seekable__doc__, "seekable($self, /)\n" "--\n" "\n" @@ -432,7 +432,7 @@ _io_StringIO_seekable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_StringIO___getstate____doc__, +TyDoc_STRVAR(_io_StringIO___getstate____doc__, "__getstate__($self, /)\n" "--\n" "\n"); @@ -455,7 +455,7 @@ _io_StringIO___getstate__(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_StringIO___setstate____doc__, +TyDoc_STRVAR(_io_StringIO___setstate____doc__, "__setstate__($self, state, /)\n" "--\n" "\n"); diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index fa794ad..05fa54b 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_io__TextIOBase_detach__doc__, +TyDoc_STRVAR(_io__TextIOBase_detach__doc__, "detach($self, /)\n" "--\n" "\n" @@ -34,7 +34,7 @@ _io__TextIOBase_detach(TyObject *self, TyTypeObject *cls, TyObject *const *args, return _io__TextIOBase_detach_impl(self, cls); } -PyDoc_STRVAR(_io__TextIOBase_read__doc__, +TyDoc_STRVAR(_io__TextIOBase_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n" @@ -89,7 +89,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__TextIOBase_readline__doc__, +TyDoc_STRVAR(_io__TextIOBase_readline__doc__, "readline($self, size=-1, /)\n" "--\n" "\n" @@ -144,7 +144,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__TextIOBase_write__doc__, +TyDoc_STRVAR(_io__TextIOBase_write__doc__, "write($self, s, /)\n" "--\n" "\n" @@ -204,7 +204,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io__TextIOBase_encoding__doc__, +TyDoc_STRVAR(_io__TextIOBase_encoding__doc__, "Encoding of the text stream.\n" "\n" "Subclasses should override."); @@ -232,7 +232,7 @@ _io__TextIOBase_encoding_get(TyObject *self, void *Py_UNUSED(context)) return _io__TextIOBase_encoding_get_impl(self); } -PyDoc_STRVAR(_io__TextIOBase_newlines__doc__, +TyDoc_STRVAR(_io__TextIOBase_newlines__doc__, "Line endings translated so far.\n" "\n" "Only line endings translated during reading are considered.\n" @@ -262,7 +262,7 @@ _io__TextIOBase_newlines_get(TyObject *self, void *Py_UNUSED(context)) return _io__TextIOBase_newlines_get_impl(self); } -PyDoc_STRVAR(_io__TextIOBase_errors__doc__, +TyDoc_STRVAR(_io__TextIOBase_errors__doc__, "The error setting of the decoder or encoder.\n" "\n" "Subclasses should override."); @@ -290,7 +290,7 @@ _io__TextIOBase_errors_get(TyObject *self, void *Py_UNUSED(context)) return _io__TextIOBase_errors_get_impl(self); } -PyDoc_STRVAR(_io_IncrementalNewlineDecoder___init____doc__, +TyDoc_STRVAR(_io_IncrementalNewlineDecoder___init____doc__, "IncrementalNewlineDecoder(decoder, translate, errors=\'strict\')\n" "--\n" "\n" @@ -321,7 +321,7 @@ _io_IncrementalNewlineDecoder___init__(TyObject *self, TyObject *args, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(decoder), &_Ty_ID(translate), &_Ty_ID(errors), }, }; @@ -368,7 +368,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_IncrementalNewlineDecoder_decode__doc__, +TyDoc_STRVAR(_io_IncrementalNewlineDecoder_decode__doc__, "decode($self, /, input, final=False)\n" "--\n" "\n"); @@ -393,7 +393,7 @@ _io_IncrementalNewlineDecoder_decode(TyObject *self, TyObject *const *args, Ty_s Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(input), &_Ty_ID(final), }, }; @@ -436,7 +436,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_IncrementalNewlineDecoder_getstate__doc__, +TyDoc_STRVAR(_io_IncrementalNewlineDecoder_getstate__doc__, "getstate($self, /)\n" "--\n" "\n"); @@ -453,7 +453,7 @@ _io_IncrementalNewlineDecoder_getstate(TyObject *self, TyObject *Py_UNUSED(ignor return _io_IncrementalNewlineDecoder_getstate_impl((nldecoder_object *)self); } -PyDoc_STRVAR(_io_IncrementalNewlineDecoder_setstate__doc__, +TyDoc_STRVAR(_io_IncrementalNewlineDecoder_setstate__doc__, "setstate($self, state, /)\n" "--\n" "\n"); @@ -475,7 +475,7 @@ _io_IncrementalNewlineDecoder_setstate(TyObject *self, TyObject *state) return return_value; } -PyDoc_STRVAR(_io_IncrementalNewlineDecoder_reset__doc__, +TyDoc_STRVAR(_io_IncrementalNewlineDecoder_reset__doc__, "reset($self, /)\n" "--\n" "\n"); @@ -492,7 +492,7 @@ _io_IncrementalNewlineDecoder_reset(TyObject *self, TyObject *Py_UNUSED(ignored) return _io_IncrementalNewlineDecoder_reset_impl((nldecoder_object *)self); } -PyDoc_STRVAR(_io_TextIOWrapper___init____doc__, +TyDoc_STRVAR(_io_TextIOWrapper___init____doc__, "TextIOWrapper(buffer, encoding=None, errors=None, newline=None,\n" " line_buffering=False, write_through=False)\n" "--\n" @@ -545,7 +545,7 @@ _io_TextIOWrapper___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(buffer), &_Ty_ID(encoding), &_Ty_ID(errors), &_Ty_ID(newline), &_Ty_ID(line_buffering), &_Ty_ID(write_through), }, }; @@ -655,7 +655,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_reconfigure__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_reconfigure__doc__, "reconfigure($self, /, *, encoding=None, errors=None, newline=None,\n" " line_buffering=None, write_through=None)\n" "--\n" @@ -686,7 +686,7 @@ _io_TextIOWrapper_reconfigure(TyObject *self, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(encoding), &_Ty_ID(errors), &_Ty_ID(newline), &_Ty_ID(line_buffering), &_Ty_ID(write_through), }, }; @@ -754,7 +754,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_detach__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_detach__doc__, "detach($self, /)\n" "--\n" "\n"); @@ -777,7 +777,7 @@ _io_TextIOWrapper_detach(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_write__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_write__doc__, "write($self, text, /)\n" "--\n" "\n"); @@ -807,7 +807,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_read__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n"); @@ -842,7 +842,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_readline__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_readline__doc__, "readline($self, size=-1, /)\n" "--\n" "\n"); @@ -886,7 +886,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_seek__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_seek__doc__, "seek($self, cookie, whence=os.SEEK_SET, /)\n" "--\n" "\n" @@ -942,7 +942,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_tell__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_tell__doc__, "tell($self, /)\n" "--\n" "\n" @@ -969,7 +969,7 @@ _io_TextIOWrapper_tell(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_truncate__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_truncate__doc__, "truncate($self, pos=None, /)\n" "--\n" "\n"); @@ -1002,7 +1002,7 @@ exit: return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_fileno__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_fileno__doc__, "fileno($self, /)\n" "--\n" "\n"); @@ -1025,7 +1025,7 @@ _io_TextIOWrapper_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_seekable__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_seekable__doc__, "seekable($self, /)\n" "--\n" "\n"); @@ -1048,7 +1048,7 @@ _io_TextIOWrapper_seekable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_readable__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_readable__doc__, "readable($self, /)\n" "--\n" "\n"); @@ -1071,7 +1071,7 @@ _io_TextIOWrapper_readable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_writable__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_writable__doc__, "writable($self, /)\n" "--\n" "\n"); @@ -1094,7 +1094,7 @@ _io_TextIOWrapper_writable(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_isatty__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_isatty__doc__, "isatty($self, /)\n" "--\n" "\n"); @@ -1117,7 +1117,7 @@ _io_TextIOWrapper_isatty(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_flush__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_flush__doc__, "flush($self, /)\n" "--\n" "\n"); @@ -1140,7 +1140,7 @@ _io_TextIOWrapper_flush(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_io_TextIOWrapper_close__doc__, +TyDoc_STRVAR(_io_TextIOWrapper_close__doc__, "close($self, /)\n" "--\n" "\n"); diff --git a/Modules/_io/clinic/winconsoleio.c.h b/Modules/_io/clinic/winconsoleio.c.h index 992595e..025ebb1 100644 --- a/Modules/_io/clinic/winconsoleio.c.h +++ b/Modules/_io/clinic/winconsoleio.c.h @@ -11,7 +11,7 @@ preserve #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_close__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -40,7 +40,7 @@ _io__WindowsConsoleIO_close(TyObject *self, TyTypeObject *cls, TyObject *const * #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO___init____doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO___init____doc__, "_WindowsConsoleIO(file, mode=\'r\', closefd=True, opener=None)\n" "--\n" "\n" @@ -68,7 +68,7 @@ _io__WindowsConsoleIO___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file), &_Ty_ID(mode), &_Ty_ID(closefd), &_Ty_ID(opener), }, }; @@ -143,7 +143,7 @@ exit: #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_fileno__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_fileno__doc__, "fileno($self, /)\n" "--\n" "\n" @@ -165,7 +165,7 @@ _io__WindowsConsoleIO_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_readable__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_readable__doc__, "readable($self, /)\n" "--\n" "\n" @@ -187,7 +187,7 @@ _io__WindowsConsoleIO_readable(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_writable__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_writable__doc__, "writable($self, /)\n" "--\n" "\n" @@ -209,7 +209,7 @@ _io__WindowsConsoleIO_writable(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_readinto__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_readinto__doc__, "readinto($self, buffer, /)\n" "--\n" "\n" @@ -266,7 +266,7 @@ exit: #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_readall__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_readall__doc__, "readall($self, /)\n" "--\n" "\n" @@ -290,7 +290,7 @@ _io__WindowsConsoleIO_readall(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_read__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n" @@ -349,7 +349,7 @@ exit: #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_write__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_write__doc__, "write($self, b, /)\n" "--\n" "\n" @@ -408,7 +408,7 @@ exit: #if defined(HAVE_WINDOWS_CONSOLE_IO) -PyDoc_STRVAR(_io__WindowsConsoleIO_isatty__doc__, +TyDoc_STRVAR(_io__WindowsConsoleIO_isatty__doc__, "isatty($self, /)\n" "--\n" "\n" diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c index f779c31..f050b17 100644 --- a/Modules/_io/iobase.c +++ b/Modules/_io/iobase.c @@ -39,7 +39,7 @@ typedef struct { #define iobase_CAST(op) ((iobase *)(op)) -PyDoc_STRVAR(iobase_doc, +TyDoc_STRVAR(iobase_doc, "The abstract base class for all I/O classes.\n" "\n" "This class provides dummy implementations for many methods that\n" @@ -895,7 +895,7 @@ TyType_Spec iobase_spec = { /* * RawIOBase class, Inherits from IOBase. */ -PyDoc_STRVAR(rawiobase_doc, +TyDoc_STRVAR(rawiobase_doc, "Base class for raw binary I/O."); /* diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 8b20194..ef55fa7 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -10,7 +10,7 @@ #include "pycore_call.h" // _TyObject_CallMethod() #include "pycore_codecs.h" // _PyCodecInfo_GetIncrementalDecoder() #include "pycore_fileutils.h" // _Ty_GetLocaleEncoding() -#include "pycore_interp.h" // PyInterpreterState.fs_codec +#include "pycore_interp.h" // TyInterpreterState.fs_codec #include "pycore_long.h" // _TyLong_GetZero() #include "pycore_object.h" // _TyObject_GC_UNTRACK() #include "pycore_pyerrors.h" // _TyErr_ChainExceptions1() @@ -37,7 +37,7 @@ typedef struct textio textio; /* TextIOBase */ -PyDoc_STRVAR(textiobase_doc, +TyDoc_STRVAR(textiobase_doc, "Base class for text I/O.\n" "\n" "This class provides a character and line based interface to stream\n" @@ -1025,7 +1025,7 @@ io_check_errors(TyObject *errors) { assert(errors != NULL && errors != Ty_None); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); #ifndef Ty_DEBUG /* In release mode, only check in development mode (-X dev) */ if (!_TyInterpreterState_GetConfig(interp)->dev_mode) { @@ -1109,7 +1109,7 @@ _io_TextIOWrapper___init___impl(textio *self, TyObject *buffer, self->detached = 0; if (encoding == NULL) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_TyInterpreterState_GetConfig(interp)->warn_default_encoding) { if (TyErr_WarnEx(TyExc_EncodingWarning, "'encoding' argument not specified", 1)) { diff --git a/Modules/_json.c b/Modules/_json.c index 8173f65..a47603f 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -542,7 +542,7 @@ bail: return NULL; } -PyDoc_STRVAR(pydoc_scanstring, +TyDoc_STRVAR(pydoc_scanstring, "scanstring(string, end, strict=True) -> (string, end)\n" "\n" "Scan the string s for a JSON string. End is the index of the\n" @@ -578,7 +578,7 @@ py_scanstring(TyObject* Py_UNUSED(self), TyObject *args) return _build_rval_index_tuple(rval, next_end); } -PyDoc_STRVAR(pydoc_encode_basestring_ascii, +TyDoc_STRVAR(pydoc_encode_basestring_ascii, "encode_basestring_ascii(string) -> string\n" "\n" "Return an ASCII-only JSON representation of a Python string" @@ -603,7 +603,7 @@ py_encode_basestring_ascii(TyObject* Py_UNUSED(self), TyObject *pystr) } -PyDoc_STRVAR(pydoc_encode_basestring, +TyDoc_STRVAR(pydoc_encode_basestring, "encode_basestring(string) -> string\n" "\n" "Return a JSON representation of a Python string" @@ -1201,7 +1201,7 @@ bail: return NULL; } -PyDoc_STRVAR(scanner_doc, "JSON scanner object"); +TyDoc_STRVAR(scanner_doc, "JSON scanner object"); static TyType_Slot PyScannerType_slots[] = { {Ty_tp_doc, (void *)scanner_doc}, @@ -1864,7 +1864,7 @@ encoder_clear(TyObject *op) return 0; } -PyDoc_STRVAR(encoder_doc, "Encoder(markers, default, encoder, indent, key_separator, item_separator, sort_keys, skipkeys, allow_nan)"); +TyDoc_STRVAR(encoder_doc, "Encoder(markers, default, encoder, indent, key_separator, item_separator, sort_keys, skipkeys, allow_nan)"); static TyType_Slot PyEncoderType_slots[] = { {Ty_tp_doc, (void *)encoder_doc}, @@ -1901,7 +1901,7 @@ static TyMethodDef speedups_methods[] = { {NULL, NULL, 0, NULL} }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "json speedups\n"); static int diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index f5d0678..f95c9ca 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -31,7 +31,7 @@ This software comes with no warranty. Use at your own risk. # include #endif -PyDoc_STRVAR(locale__doc__, "Support for POSIX locales."); +TyDoc_STRVAR(locale__doc__, "Support for POSIX locales."); typedef struct _locale_state { TyObject *Error; diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index 972989b..afa8264 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -20,8 +20,8 @@ struct _ProfilerEntry; /* represents a function called from another function */ typedef struct _ProfilerSubEntry { rotating_node_t header; - PyTime_t tt; - PyTime_t it; + TyTime_t tt; + TyTime_t it; long callcount; long recursivecallcount; long recursionLevel; @@ -31,8 +31,8 @@ typedef struct _ProfilerSubEntry { typedef struct _ProfilerEntry { rotating_node_t header; TyObject *userObj; /* PyCodeObject, or a descriptive str for builtins */ - PyTime_t tt; /* total time in this entry */ - PyTime_t it; /* inline time in this entry (not in subcalls) */ + TyTime_t tt; /* total time in this entry */ + TyTime_t it; /* inline time in this entry (not in subcalls) */ long callcount; /* how many times this was called */ long recursivecallcount; /* how many times called recursively */ long recursionLevel; @@ -40,8 +40,8 @@ typedef struct _ProfilerEntry { } ProfilerEntry; typedef struct _ProfilerContext { - PyTime_t t0; - PyTime_t subt; + TyTime_t t0; + TyTime_t subt; struct _ProfilerContext *previous; ProfilerEntry *ctxEntry; } ProfilerContext; @@ -90,7 +90,7 @@ _lsprof_get_state(TyObject *module) /*** External Timers ***/ -static PyTime_t CallExternalTimer(ProfilerObject *pObj) +static TyTime_t CallExternalTimer(ProfilerObject *pObj) { TyObject *o = NULL; @@ -106,7 +106,7 @@ static PyTime_t CallExternalTimer(ProfilerObject *pObj) return 0; } - PyTime_t result; + TyTime_t result; int err; if (pObj->externalTimerUnit > 0.0) { /* interpret the result as an integer that will be scaled @@ -115,7 +115,7 @@ static PyTime_t CallExternalTimer(ProfilerObject *pObj) } else { /* interpret the result as a double measured in seconds. - As the profiler works with PyTime_t internally + As the profiler works with TyTime_t internally we convert it to a large integer */ err = _TyTime_FromSecondsObject(&result, o, _TyTime_ROUND_FLOOR); } @@ -128,14 +128,14 @@ static PyTime_t CallExternalTimer(ProfilerObject *pObj) return result; } -static inline PyTime_t +static inline TyTime_t call_timer(ProfilerObject *pObj) { if (pObj->externalTimer != NULL) { return CallExternalTimer(pObj); } else { - PyTime_t t; + TyTime_t t; (void)PyTime_PerfCounterRaw(&t); return t; } @@ -327,8 +327,8 @@ initContext(ProfilerObject *pObj, ProfilerContext *self, ProfilerEntry *entry) static void Stop(ProfilerObject *pObj, ProfilerContext *self, ProfilerEntry *entry) { - PyTime_t tt = call_timer(pObj) - self->t0; - PyTime_t it = tt - self->subt; + TyTime_t tt = call_timer(pObj) - self->t0; + TyTime_t it = tt - self->subt; if (self->previous) self->previous->subt += tt; pObj->currentProfilerContext = self->previous; @@ -433,7 +433,7 @@ pending_exception(ProfilerObject *pObj) /************************************************************/ -static PyStructSequence_Field profiler_entry_fields[] = { +static TyStructSequence_Field profiler_entry_fields[] = { {"code", "code object or built-in function name"}, {"callcount", "how many times this was called"}, {"reccallcount", "how many times called recursively"}, @@ -443,7 +443,7 @@ static PyStructSequence_Field profiler_entry_fields[] = { {0} }; -static PyStructSequence_Field profiler_subentry_fields[] = { +static TyStructSequence_Field profiler_subentry_fields[] = { {"code", "called code object or built-in function name"}, {"callcount", "how many times this is called"}, {"reccallcount", "how many times this is called recursively"}, @@ -452,14 +452,14 @@ static PyStructSequence_Field profiler_subentry_fields[] = { {0} }; -static PyStructSequence_Desc profiler_entry_desc = { +static TyStructSequence_Desc profiler_entry_desc = { .name = "_lsprof.profiler_entry", .fields = profiler_entry_fields, .doc = NULL, .n_in_sequence = 6 }; -static PyStructSequence_Desc profiler_subentry_desc = { +static TyStructSequence_Desc profiler_subentry_desc = { .name = "_lsprof.profiler_subentry", .fields = profiler_subentry_fields, .doc = NULL, @@ -573,7 +573,7 @@ _lsprof_Profiler_getstats_impl(ProfilerObject *self, TyTypeObject *cls) return NULL; } if (!self->externalTimer || self->externalTimerUnit == 0.0) { - PyTime_t onesec = _TyTime_FromSeconds(1); + TyTime_t onesec = _TyTime_FromSeconds(1); collect.factor = (double)1 / onesec; } else { @@ -1092,7 +1092,7 @@ _lsprof_exec(TyObject *module) return -1; } - state->stats_entry_type = PyStructSequence_NewType(&profiler_entry_desc); + state->stats_entry_type = TyStructSequence_NewType(&profiler_entry_desc); if (state->stats_entry_type == NULL) { return -1; } @@ -1100,7 +1100,7 @@ _lsprof_exec(TyObject *module) return -1; } - state->stats_subentry_type = PyStructSequence_NewType(&profiler_subentry_desc); + state->stats_subentry_type = TyStructSequence_NewType(&profiler_subentry_desc); if (state->stats_subentry_type == NULL) { return -1; } diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c index 10aa5e3..131b6b5 100644 --- a/Modules/_lzmamodule.c +++ b/Modules/_lzmamodule.c @@ -73,12 +73,12 @@ OutputBuffer_OnError(_BlocksOutputBuffer *buffer) #define ACQUIRE_LOCK(obj) do { \ - if (!PyThread_acquire_lock((obj)->lock, 0)) { \ + if (!TyThread_acquire_lock((obj)->lock, 0)) { \ Ty_BEGIN_ALLOW_THREADS \ - PyThread_acquire_lock((obj)->lock, 1); \ + TyThread_acquire_lock((obj)->lock, 1); \ Ty_END_ALLOW_THREADS \ } } while (0) -#define RELEASE_LOCK(obj) PyThread_release_lock((obj)->lock) +#define RELEASE_LOCK(obj) TyThread_release_lock((obj)->lock) typedef struct { TyTypeObject *lzma_compressor_type; @@ -111,7 +111,7 @@ typedef struct { lzma_allocator alloc; lzma_stream lzs; int flushed; - PyThread_type_lock lock; + TyThread_type_lock lock; } Compressor; typedef struct { @@ -124,7 +124,7 @@ typedef struct { char needs_input; uint8_t *input_buffer; size_t input_buffer_size; - PyThread_type_lock lock; + TyThread_type_lock lock; } Decompressor; #define Compressor_CAST(op) ((Compressor *)(op)) @@ -820,7 +820,7 @@ Compressor_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) self->alloc.free = PyLzma_Free; self->lzs.allocator = &self->alloc; - self->lock = PyThread_allocate_lock(); + self->lock = TyThread_allocate_lock(); if (self->lock == NULL) { Ty_DECREF(self); TyErr_SetString(TyExc_MemoryError, "Unable to allocate lock"); @@ -869,7 +869,7 @@ Compressor_dealloc(TyObject *op) Compressor *self = Compressor_CAST(op); lzma_end(&self->lzs); if (self->lock != NULL) { - PyThread_free_lock(self->lock); + TyThread_free_lock(self->lock); } TyTypeObject *tp = Ty_TYPE(self); tp->tp_free(self); @@ -889,7 +889,7 @@ Compressor_traverse(TyObject *self, visitproc visit, void *arg) return 0; } -PyDoc_STRVAR(Compressor_doc, +TyDoc_STRVAR(Compressor_doc, "LZMACompressor(format=FORMAT_XZ, check=-1, preset=None, filters=None)\n" "\n" "Create a compressor object for compressing data incrementally.\n" @@ -1251,7 +1251,7 @@ _lzma_LZMADecompressor_impl(TyTypeObject *type, int format, self->lzs.allocator = &self->alloc; self->lzs.next_in = NULL; - self->lock = PyThread_allocate_lock(); + self->lock = TyThread_allocate_lock(); if (self->lock == NULL) { Ty_DECREF(self); TyErr_SetString(TyExc_MemoryError, "Unable to allocate lock"); @@ -1320,7 +1320,7 @@ Decompressor_dealloc(TyObject *op) lzma_end(&self->lzs); Ty_CLEAR(self->unused_data); if (self->lock != NULL) { - PyThread_free_lock(self->lock); + TyThread_free_lock(self->lock); } TyTypeObject *tp = Ty_TYPE(self); tp->tp_free(self); @@ -1339,16 +1339,16 @@ static TyMethodDef Decompressor_methods[] = { {NULL} }; -PyDoc_STRVAR(Decompressor_check_doc, +TyDoc_STRVAR(Decompressor_check_doc, "ID of the integrity check used by the input stream."); -PyDoc_STRVAR(Decompressor_eof_doc, +TyDoc_STRVAR(Decompressor_eof_doc, "True if the end-of-stream marker has been reached."); -PyDoc_STRVAR(Decompressor_needs_input_doc, +TyDoc_STRVAR(Decompressor_needs_input_doc, "True if more input is needed before more decompressed data can be produced."); -PyDoc_STRVAR(Decompressor_unused_data_doc, +TyDoc_STRVAR(Decompressor_unused_data_doc, "Data found after the end of the compressed stream."); static TyMemberDef Decompressor_members[] = { @@ -1404,7 +1404,7 @@ _lzma_is_check_supported_impl(TyObject *module, int check_id) return TyBool_FromLong(lzma_check_is_supported(check_id)); } -PyDoc_STRVAR(_lzma__encode_filter_properties__doc__, +TyDoc_STRVAR(_lzma__encode_filter_properties__doc__, "_encode_filter_properties($module, filter, /)\n" "--\n" "\n" diff --git a/Modules/_multiprocessing/clinic/multiprocessing.c.h b/Modules/_multiprocessing/clinic/multiprocessing.c.h index 740d083..4cc38f7 100644 --- a/Modules/_multiprocessing/clinic/multiprocessing.c.h +++ b/Modules/_multiprocessing/clinic/multiprocessing.c.h @@ -6,7 +6,7 @@ preserve #if defined(MS_WINDOWS) -PyDoc_STRVAR(_multiprocessing_closesocket__doc__, +TyDoc_STRVAR(_multiprocessing_closesocket__doc__, "closesocket($module, handle, /)\n" "--\n" "\n"); @@ -37,7 +37,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_multiprocessing_recv__doc__, +TyDoc_STRVAR(_multiprocessing_recv__doc__, "recv($module, handle, size, /)\n" "--\n" "\n"); @@ -76,7 +76,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_multiprocessing_send__doc__, +TyDoc_STRVAR(_multiprocessing_send__doc__, "send($module, handle, buf, /)\n" "--\n" "\n"); @@ -117,7 +117,7 @@ exit: #endif /* defined(MS_WINDOWS) */ -PyDoc_STRVAR(_multiprocessing_sem_unlink__doc__, +TyDoc_STRVAR(_multiprocessing_sem_unlink__doc__, "sem_unlink($module, name, /)\n" "--\n" "\n"); diff --git a/Modules/_multiprocessing/clinic/posixshmem.c.h b/Modules/_multiprocessing/clinic/posixshmem.c.h index 7328906..cb454d1 100644 --- a/Modules/_multiprocessing/clinic/posixshmem.c.h +++ b/Modules/_multiprocessing/clinic/posixshmem.c.h @@ -4,7 +4,7 @@ preserve #if defined(HAVE_SHM_OPEN) -PyDoc_STRVAR(_posixshmem_shm_open__doc__, +TyDoc_STRVAR(_posixshmem_shm_open__doc__, "shm_open($module, /, path, flags, mode=511)\n" "--\n" "\n" @@ -44,7 +44,7 @@ exit: #if defined(HAVE_SHM_UNLINK) -PyDoc_STRVAR(_posixshmem_shm_unlink__doc__, +TyDoc_STRVAR(_posixshmem_shm_unlink__doc__, "shm_unlink($module, path, /)\n" "--\n" "\n" diff --git a/Modules/_multiprocessing/clinic/semaphore.c.h b/Modules/_multiprocessing/clinic/semaphore.c.h index 74a02c9..0961663 100644 --- a/Modules/_multiprocessing/clinic/semaphore.c.h +++ b/Modules/_multiprocessing/clinic/semaphore.c.h @@ -11,7 +11,7 @@ preserve #if defined(HAVE_MP_SEMAPHORE) && defined(MS_WINDOWS) -PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, "acquire($self, /, block=True, timeout=None)\n" "--\n" "\n" @@ -37,7 +37,7 @@ _multiprocessing_SemLock_acquire(TyObject *self, TyObject *const *args, Ty_ssize Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(block), &_Ty_ID(timeout), }, }; @@ -91,7 +91,7 @@ exit: #if defined(HAVE_MP_SEMAPHORE) && defined(MS_WINDOWS) -PyDoc_STRVAR(_multiprocessing_SemLock_release__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock_release__doc__, "release($self, /)\n" "--\n" "\n" @@ -119,7 +119,7 @@ _multiprocessing_SemLock_release(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_MP_SEMAPHORE) && !defined(MS_WINDOWS) -PyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock_acquire__doc__, "acquire($self, /, block=True, timeout=None)\n" "--\n" "\n" @@ -145,7 +145,7 @@ _multiprocessing_SemLock_acquire(TyObject *self, TyObject *const *args, Ty_ssize Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(block), &_Ty_ID(timeout), }, }; @@ -199,7 +199,7 @@ exit: #if defined(HAVE_MP_SEMAPHORE) && !defined(MS_WINDOWS) -PyDoc_STRVAR(_multiprocessing_SemLock_release__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock_release__doc__, "release($self, /)\n" "--\n" "\n" @@ -244,7 +244,7 @@ _multiprocessing_SemLock(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(kind), &_Ty_ID(value), &_Ty_ID(maxvalue), &_Ty_ID(name), &_Ty_ID(unlink), }, }; @@ -315,7 +315,7 @@ exit: #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock__rebuild__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock__rebuild__doc__, "_rebuild($type, handle, kind, maxvalue, name, /)\n" "--\n" "\n"); @@ -351,7 +351,7 @@ exit: #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock__count__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock__count__doc__, "_count($self, /)\n" "--\n" "\n" @@ -379,7 +379,7 @@ _multiprocessing_SemLock__count(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock__is_mine__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock__is_mine__doc__, "_is_mine($self, /)\n" "--\n" "\n" @@ -401,7 +401,7 @@ _multiprocessing_SemLock__is_mine(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock__get_value__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock__get_value__doc__, "_get_value($self, /)\n" "--\n" "\n" @@ -423,7 +423,7 @@ _multiprocessing_SemLock__get_value(TyObject *self, TyObject *Py_UNUSED(ignored) #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock__is_zero__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock__is_zero__doc__, "_is_zero($self, /)\n" "--\n" "\n" @@ -445,7 +445,7 @@ _multiprocessing_SemLock__is_zero(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock__after_fork__doc__, +TyDoc_STRVAR(_multiprocessing_SemLock__after_fork__doc__, "_after_fork($self, /)\n" "--\n" "\n" @@ -467,7 +467,7 @@ _multiprocessing_SemLock__after_fork(TyObject *self, TyObject *Py_UNUSED(ignored #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock___enter____doc__, +TyDoc_STRVAR(_multiprocessing_SemLock___enter____doc__, "__enter__($self, /)\n" "--\n" "\n" @@ -495,7 +495,7 @@ _multiprocessing_SemLock___enter__(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_MP_SEMAPHORE) -PyDoc_STRVAR(_multiprocessing_SemLock___exit____doc__, +TyDoc_STRVAR(_multiprocessing_SemLock___exit____doc__, "__exit__($self, exc_type=None, exc_value=None, exc_tb=None, /)\n" "--\n" "\n" diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index fcb3407..647de2d 100644 --- a/Modules/_multiprocessing/semaphore.c +++ b/Modules/_multiprocessing/semaphore.c @@ -46,7 +46,7 @@ class _multiprocessing.SemLock "SemLockObject *" "&_PyMp_SemLockType" #include "clinic/semaphore.c.h" -#define ISMINE(o) (o->count > 0 && PyThread_get_thread_ident() == o->last_tid) +#define ISMINE(o) (o->count > 0 && TyThread_get_thread_ident() == o->last_tid) #ifdef MS_WINDOWS @@ -382,7 +382,7 @@ _multiprocessing_SemLock_acquire_impl(SemLockObject *self, int blocking, } ++self->count; - self->last_tid = PyThread_get_thread_ident(); + self->last_tid = TyThread_get_thread_ident(); Py_RETURN_TRUE; } @@ -775,7 +775,7 @@ static TyType_Slot _PyMp_SemLockType_slots[] = { {Ty_tp_new, _multiprocessing_SemLock}, {Ty_tp_traverse, semlock_traverse}, {Ty_tp_free, PyObject_GC_Del}, - {Ty_tp_doc, (void *)PyDoc_STR("Semaphore/Mutex type")}, + {Ty_tp_doc, (void *)TyDoc_STR("Semaphore/Mutex type")}, {0, 0}, }; diff --git a/Modules/_operator.c b/Modules/_operator.c index a962620..baea1ca 100644 --- a/Modules/_operator.c +++ b/Modules/_operator.c @@ -28,7 +28,7 @@ module _operator [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=672ecf48487521e7]*/ -PyDoc_STRVAR(operator_doc, +TyDoc_STRVAR(operator_doc, "Operator interface.\n\ \n\ This module exports a set of functions implemented in C corresponding\n\ @@ -915,7 +915,7 @@ _operator__compare_digest_impl(TyObject *module, TyObject *a, TyObject *b) return TyBool_FromLong(rc); } -PyDoc_STRVAR(_operator_call__doc__, +TyDoc_STRVAR(_operator_call__doc__, "call($module, obj, /, *args, **kwargs)\n" "--\n" "\n" @@ -1197,7 +1197,7 @@ itemgetter_reduce(TyObject *op, TyObject *Py_UNUSED(dummy)) return TyTuple_Pack(2, Ty_TYPE(ig), ig->item); } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling"); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling"); static TyMethodDef itemgetter_methods[] = { {"__reduce__", itemgetter_reduce, METH_NOARGS, @@ -1210,7 +1210,7 @@ static TyMemberDef itemgetter_members[] = { {NULL} /* Sentinel */ }; -PyDoc_STRVAR(itemgetter_doc, +TyDoc_STRVAR(itemgetter_doc, "itemgetter(item, /, *items)\n--\n\n\ Return a callable object that fetches the given item(s) from its operand.\n\ After f = itemgetter(2), the call f(r) returns r[2].\n\ @@ -1279,7 +1279,7 @@ attrgetter_new(TyTypeObject *type, TyObject *args, TyObject *kwds) return NULL; /* prepare attr while checking args */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); for (idx = 0; idx < nattrs; ++idx) { TyObject *item = TyTuple_GET_ITEM(args, idx); int dot_count; @@ -1575,7 +1575,7 @@ static TyMemberDef attrgetter_members[] = { {NULL} /* Sentinel*/ }; -PyDoc_STRVAR(attrgetter_doc, +TyDoc_STRVAR(attrgetter_doc, "attrgetter(attr, /, *attrs)\n--\n\n\ Return a callable object that fetches the given attribute(s) from its operand.\n\ After f = attrgetter('name'), the call f(r) returns r.name.\n\ @@ -1717,7 +1717,7 @@ methodcaller_new(TyTypeObject *type, TyObject *args, TyObject *kwds) mc->kwds = Ty_XNewRef(kwds); Ty_INCREF(name); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternMortal(interp, &name); mc->name = name; @@ -1917,7 +1917,7 @@ static TyMemberDef methodcaller_members[] = { {NULL} }; -PyDoc_STRVAR(methodcaller_doc, +TyDoc_STRVAR(methodcaller_doc, "methodcaller(name, /, *args, **kwargs)\n--\n\n\ Return a callable object that calls the given method on its operand.\n\ After f = methodcaller('name'), the call f(r) returns r.name().\n\ diff --git a/Modules/_pickle.c b/Modules/_pickle.c index af6b07c..b8bbe8d 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -25,7 +25,7 @@ #include // strtol() -PyDoc_STRVAR(pickle_module_doc, +TyDoc_STRVAR(pickle_module_doc, "Optimized C implementation for the Python pickle module."); /*[clinic input] @@ -4726,7 +4726,7 @@ _pickle_Pickler___sizeof___impl(PicklerObject *self) static struct TyMethodDef Pickler_methods[] = { {"persistent_id", persistent_id, METH_O, - PyDoc_STR("persistent_id($self, obj, /)\n--\n\n")}, + TyDoc_STR("persistent_id($self, obj, /)\n--\n\n")}, _PICKLE_PICKLER_DUMP_METHODDEF _PICKLE_PICKLER_CLEAR_MEMO_METHODDEF _PICKLE_PICKLER___SIZEOF___METHODDEF @@ -6746,7 +6746,7 @@ load_build(PickleState *st, UnpicklerObject *self) interned. we should try to do that here. */ Ty_INCREF(d_key); if (TyUnicode_CheckExact(d_key)) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternMortal(interp, &d_key); } if (PyObject_SetItem(dict, d_key, d_value) < 0) { diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index e60b431..2aec4f2 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -1031,7 +1031,7 @@ subprocess_fork_exec_impl(TyObject *module, TyObject *process_args, int *c_fds_to_keep = NULL; Ty_ssize_t fds_to_keep_len = TyTuple_GET_SIZE(py_fds_to_keep); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if ((preexec_fn != Ty_None) && _TyInterpreterState_GetFinalizing(interp) != NULL) { @@ -1321,7 +1321,7 @@ cleanup: /* module level code ********************************************************/ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "A POSIX helper for the subprocess module."); static TyMethodDef module_methods[] = { diff --git a/Modules/_queuemodule.c b/Modules/_queuemodule.c index 61d48ea..7325098 100644 --- a/Modules/_queuemodule.c +++ b/Modules/_queuemodule.c @@ -379,13 +379,13 @@ _queue_SimpleQueue_get_impl(simplequeueobject *self, TyTypeObject *cls, int block, TyObject *timeout_obj) /*[clinic end generated code: output=5c2cca914cd1e55b input=f7836c65e5839c51]*/ { - PyTime_t endtime = 0; + TyTime_t endtime = 0; - // XXX Use PyThread_ParseTimeoutArg(). + // XXX Use TyThread_ParseTimeoutArg(). if (block != 0 && !Ty_IsNone(timeout_obj)) { /* With timeout */ - PyTime_t timeout; + TyTime_t timeout; if (_TyTime_FromSecondsObject(&timeout, timeout_obj, _TyTime_ROUND_CEILING) < 0) { return NULL; @@ -535,7 +535,7 @@ static TyMethodDef simplequeue_methods[] = { _QUEUE_SIMPLEQUEUE_PUT_NOWAIT_METHODDEF _QUEUE_SIMPLEQUEUE_QSIZE_METHODDEF {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -566,7 +566,7 @@ static TyType_Spec simplequeue_spec = { /* Initialization function */ -PyDoc_STRVAR(queue_module_doc, +TyDoc_STRVAR(queue_module_doc, "C implementation of the Python queue module.\n\ This module is an implementation detail, please do not use it directly."); diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index 653cbb3..0e69b3c 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -263,7 +263,7 @@ random_seed_urandom(RandomObject *self) static int random_seed_time_pid(RandomObject *self) { - PyTime_t now; + TyTime_t now; if (PyTime_Time(&now) < 0) { return -1; } @@ -582,7 +582,7 @@ static TyMethodDef random_methods[] = { {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(random_doc, +TyDoc_STRVAR(random_doc, "Random() -> create a random number generator with its own internal state."); static TyType_Slot Random_Type_slots[] = { @@ -602,7 +602,7 @@ static TyType_Spec Random_Type_spec = { Random_Type_slots }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "Module implements the Mersenne Twister random number generator."); static int diff --git a/Modules/_remote_debugging_module.c b/Modules/_remote_debugging_module.c index 89d5e93..df7d560 100644 --- a/Modules/_remote_debugging_module.c +++ b/Modules/_remote_debugging_module.c @@ -64,14 +64,14 @@ #endif #ifdef Ty_GIL_DISABLED -#define INTERP_STATE_MIN_SIZE MAX(MAX(MAX(offsetof(PyInterpreterState, _code_object_generation) + sizeof(uint64_t), \ - offsetof(PyInterpreterState, tlbc_indices.tlbc_generation) + sizeof(uint32_t)), \ - offsetof(PyInterpreterState, threads.head) + sizeof(void*)), \ - offsetof(PyInterpreterState, _gil.last_holder) + sizeof(TyThreadState*)) +#define INTERP_STATE_MIN_SIZE MAX(MAX(MAX(offsetof(TyInterpreterState, _code_object_generation) + sizeof(uint64_t), \ + offsetof(TyInterpreterState, tlbc_indices.tlbc_generation) + sizeof(uint32_t)), \ + offsetof(TyInterpreterState, threads.head) + sizeof(void*)), \ + offsetof(TyInterpreterState, _gil.last_holder) + sizeof(TyThreadState*)) #else -#define INTERP_STATE_MIN_SIZE MAX(MAX(offsetof(PyInterpreterState, _code_object_generation) + sizeof(uint64_t), \ - offsetof(PyInterpreterState, threads.head) + sizeof(void*)), \ - offsetof(PyInterpreterState, _gil.last_holder) + sizeof(TyThreadState*)) +#define INTERP_STATE_MIN_SIZE MAX(MAX(offsetof(TyInterpreterState, _code_object_generation) + sizeof(uint64_t), \ + offsetof(TyInterpreterState, threads.head) + sizeof(void*)), \ + offsetof(TyInterpreterState, _gil.last_holder) + sizeof(TyThreadState*)) #endif #define INTERP_STATE_BUFFER_SIZE MAX(INTERP_STATE_MIN_SIZE, 256) @@ -106,7 +106,7 @@ struct _Ty_AsyncioModuleDebugOffsets { * ============================================================================ */ // TaskInfo structseq type - replaces 4-tuple (task_id, task_name, coroutine_stack, awaited_by) -static PyStructSequence_Field TaskInfo_fields[] = { +static TyStructSequence_Field TaskInfo_fields[] = { {"task_id", "Task ID (memory address)"}, {"task_name", "Task name"}, {"coroutine_stack", "Coroutine call stack"}, @@ -114,7 +114,7 @@ static PyStructSequence_Field TaskInfo_fields[] = { {NULL} }; -static PyStructSequence_Desc TaskInfo_desc = { +static TyStructSequence_Desc TaskInfo_desc = { "_remote_debugging.TaskInfo", "Information about an asyncio task", TaskInfo_fields, @@ -122,14 +122,14 @@ static PyStructSequence_Desc TaskInfo_desc = { }; // FrameInfo structseq type - replaces 3-tuple (filename, lineno, funcname) -static PyStructSequence_Field FrameInfo_fields[] = { +static TyStructSequence_Field FrameInfo_fields[] = { {"filename", "Source code filename"}, {"lineno", "Line number"}, {"funcname", "Function name"}, {NULL} }; -static PyStructSequence_Desc FrameInfo_desc = { +static TyStructSequence_Desc FrameInfo_desc = { "_remote_debugging.FrameInfo", "Information about a frame", FrameInfo_fields, @@ -137,13 +137,13 @@ static PyStructSequence_Desc FrameInfo_desc = { }; // CoroInfo structseq type - replaces 2-tuple (call_stack, task_name) -static PyStructSequence_Field CoroInfo_fields[] = { +static TyStructSequence_Field CoroInfo_fields[] = { {"call_stack", "Coroutine call stack"}, {"task_name", "Task name"}, {NULL} }; -static PyStructSequence_Desc CoroInfo_desc = { +static TyStructSequence_Desc CoroInfo_desc = { "_remote_debugging.CoroInfo", "Information about a coroutine", CoroInfo_fields, @@ -151,13 +151,13 @@ static PyStructSequence_Desc CoroInfo_desc = { }; // ThreadInfo structseq type - replaces 2-tuple (thread_id, frame_info) -static PyStructSequence_Field ThreadInfo_fields[] = { +static TyStructSequence_Field ThreadInfo_fields[] = { {"thread_id", "Thread ID"}, {"frame_info", "Frame information"}, {NULL} }; -static PyStructSequence_Desc ThreadInfo_desc = { +static TyStructSequence_Desc ThreadInfo_desc = { "_remote_debugging.ThreadInfo", "Information about a thread", ThreadInfo_fields, @@ -165,13 +165,13 @@ static PyStructSequence_Desc ThreadInfo_desc = { }; // AwaitedInfo structseq type - replaces 2-tuple (tid, awaited_by_list) -static PyStructSequence_Field AwaitedInfo_fields[] = { +static TyStructSequence_Field AwaitedInfo_fields[] = { {"thread_id", "Thread ID"}, {"awaited_by", "List of tasks awaited by this thread"}, {NULL} }; -static PyStructSequence_Desc AwaitedInfo_desc = { +static TyStructSequence_Desc AwaitedInfo_desc = { "_remote_debugging.AwaitedInfo", "Information about what a thread is awaiting", AwaitedInfo_fields, @@ -1112,15 +1112,15 @@ create_task_result( // Create final CoroInfo result RemoteDebuggingState *state = RemoteDebugging_GetStateFromObject((TyObject*)unwinder); - result = PyStructSequence_New(state->CoroInfo_Type); + result = TyStructSequence_New(state->CoroInfo_Type); if (result == NULL) { set_exception_cause(unwinder, TyExc_MemoryError, "Failed to create CoroInfo"); goto error; } - // PyStructSequence_SetItem steals references, so we don't need to DECREF on success - PyStructSequence_SetItem(result, 0, call_stack); // This steals the reference - PyStructSequence_SetItem(result, 1, tn); // This steals the reference + // TyStructSequence_SetItem steals references, so we don't need to DECREF on success + TyStructSequence_SetItem(result, 0, call_stack); // This steals the reference + TyStructSequence_SetItem(result, 1, tn); // This steals the reference return result; @@ -1159,7 +1159,7 @@ parse_task( } else { // Create an empty CoroInfo for non-task objects RemoteDebuggingState *state = RemoteDebugging_GetStateFromObject((TyObject*)unwinder); - result = PyStructSequence_New(state->CoroInfo_Type); + result = TyStructSequence_New(state->CoroInfo_Type); if (result == NULL) { set_exception_cause(unwinder, TyExc_MemoryError, "Failed to create empty CoroInfo"); goto error; @@ -1175,8 +1175,8 @@ parse_task( set_exception_cause(unwinder, TyExc_RuntimeError, "Failed to create task name"); goto error; } - PyStructSequence_SetItem(result, 0, empty_list); // This steals the reference - PyStructSequence_SetItem(result, 1, task_name); // This steals the reference + TyStructSequence_SetItem(result, 0, empty_list); // This steals the reference + TyStructSequence_SetItem(result, 1, task_name); // This steals the reference } if (TyList_Append(render_to, result)) { set_exception_cause(unwinder, TyExc_RuntimeError, "Failed to append task result to render list"); @@ -1235,16 +1235,16 @@ process_single_task_node( } RemoteDebuggingState *state = RemoteDebugging_GetStateFromObject((TyObject*)unwinder); - result_item = PyStructSequence_New(state->TaskInfo_Type); + result_item = TyStructSequence_New(state->TaskInfo_Type); if (result_item == NULL) { set_exception_cause(unwinder, TyExc_MemoryError, "Failed to create TaskInfo in single task node"); goto error; } - PyStructSequence_SetItem(result_item, 0, task_id); // steals ref - PyStructSequence_SetItem(result_item, 1, tn); // steals ref - PyStructSequence_SetItem(result_item, 2, coroutine_stack); // steals ref - PyStructSequence_SetItem(result_item, 3, current_awaited_by); // steals ref + TyStructSequence_SetItem(result_item, 0, task_id); // steals ref + TyStructSequence_SetItem(result_item, 1, tn); // steals ref + TyStructSequence_SetItem(result_item, 2, coroutine_stack); // steals ref + TyStructSequence_SetItem(result_item, 3, current_awaited_by); // steals ref // References transferred to tuple task_id = NULL; @@ -1263,7 +1263,7 @@ process_single_task_node( Ty_DECREF(result_item); // Get back current_awaited_by reference for parse_task_awaited_by - current_awaited_by = PyStructSequence_GetItem(result_item, 3); + current_awaited_by = TyStructSequence_GetItem(result_item, 3); if (parse_task_awaited_by(unwinder, task_addr, current_awaited_by) < 0) { set_exception_cause(unwinder, TyExc_RuntimeError, "Failed to parse awaited_by in single task node"); // No cleanup needed here since all references were transferred to result_item @@ -1346,7 +1346,7 @@ process_running_task_chain( } // Get the chain from the current frame to this task - TyObject *coro_chain = PyStructSequence_GET_ITEM(task_info, 2); + TyObject *coro_chain = TyStructSequence_GET_ITEM(task_info, 2); assert(coro_chain != NULL); if (TyList_GET_SIZE(coro_chain) != 1) { set_exception_cause(unwinder, TyExc_RuntimeError, "Coro chain is not a single item"); @@ -1354,7 +1354,7 @@ process_running_task_chain( } TyObject *coro_info = TyList_GET_ITEM(coro_chain, 0); assert(coro_info != NULL); - TyObject *frame_chain = PyStructSequence_GET_ITEM(coro_info, 0); + TyObject *frame_chain = TyStructSequence_GET_ITEM(coro_info, 0); assert(frame_chain != NULL); // Clear the coro_chain @@ -1415,7 +1415,7 @@ process_thread_for_async_stack_trace( } RemoteDebuggingState *state = RemoteDebugging_GetStateFromObject((TyObject*)unwinder); - TyObject *awaited_info = PyStructSequence_New(state->AwaitedInfo_Type); + TyObject *awaited_info = TyStructSequence_New(state->AwaitedInfo_Type); if (awaited_info == NULL) { Ty_DECREF(tid_py); Ty_DECREF(task_list); @@ -1423,8 +1423,8 @@ process_thread_for_async_stack_trace( return -1; } - PyStructSequence_SetItem(awaited_info, 0, tid_py); // steals ref - PyStructSequence_SetItem(awaited_info, 1, task_list); // steals ref + TyStructSequence_SetItem(awaited_info, 0, tid_py); // steals ref + TyStructSequence_SetItem(awaited_info, 1, task_list); // steals ref if (TyList_Append(result, awaited_info)) { Ty_DECREF(awaited_info); @@ -1859,7 +1859,7 @@ done_tlbc: } RemoteDebuggingState *state = RemoteDebugging_GetStateFromObject((TyObject*)unwinder); - tuple = PyStructSequence_New(state->FrameInfo_Type); + tuple = TyStructSequence_New(state->FrameInfo_Type); if (!tuple) { set_exception_cause(unwinder, TyExc_MemoryError, "Failed to create FrameInfo for code object"); goto error; @@ -1867,9 +1867,9 @@ done_tlbc: Ty_INCREF(meta->func_name); Ty_INCREF(meta->file_name); - PyStructSequence_SetItem(tuple, 0, meta->file_name); - PyStructSequence_SetItem(tuple, 1, lineno); - PyStructSequence_SetItem(tuple, 2, meta->func_name); + TyStructSequence_SetItem(tuple, 0, meta->file_name); + TyStructSequence_SetItem(tuple, 1, lineno); + TyStructSequence_SetItem(tuple, 2, meta->func_name); *result = tuple; return 0; @@ -2327,7 +2327,7 @@ append_awaited_by( } RemoteDebuggingState *state = RemoteDebugging_GetStateFromObject((TyObject*)unwinder); - TyObject *result_item = PyStructSequence_New(state->AwaitedInfo_Type); + TyObject *result_item = TyStructSequence_New(state->AwaitedInfo_Type); if (result_item == NULL) { Ty_DECREF(tid_py); Ty_DECREF(awaited_by_for_thread); @@ -2335,8 +2335,8 @@ append_awaited_by( return -1; } - PyStructSequence_SetItem(result_item, 0, tid_py); // steals ref - PyStructSequence_SetItem(result_item, 1, awaited_by_for_thread); // steals ref + TyStructSequence_SetItem(result_item, 0, tid_py); // steals ref + TyStructSequence_SetItem(result_item, 1, awaited_by_for_thread); // steals ref if (TyList_Append(result, result_item)) { Ty_DECREF(result_item); set_exception_cause(unwinder, TyExc_RuntimeError, "Failed to append awaited_by result item"); @@ -2462,14 +2462,14 @@ unwind_stack_for_thread( } RemoteDebuggingState *state = RemoteDebugging_GetStateFromObject((TyObject*)unwinder); - result = PyStructSequence_New(state->ThreadInfo_Type); + result = TyStructSequence_New(state->ThreadInfo_Type); if (result == NULL) { set_exception_cause(unwinder, TyExc_MemoryError, "Failed to create ThreadInfo"); goto error; } - PyStructSequence_SetItem(result, 0, thread_id); // Steals reference - PyStructSequence_SetItem(result, 1, frame_info); // Steals reference + TyStructSequence_SetItem(result, 0, thread_id); // Steals reference + TyStructSequence_SetItem(result, 1, frame_info); // Steals reference cleanup_stack_chunks(&chunks); return result; @@ -2992,7 +2992,7 @@ _remote_debugging_exec(TyObject *m) } // Initialize structseq types - st->TaskInfo_Type = PyStructSequence_NewType(&TaskInfo_desc); + st->TaskInfo_Type = TyStructSequence_NewType(&TaskInfo_desc); if (st->TaskInfo_Type == NULL) { return -1; } @@ -3000,7 +3000,7 @@ _remote_debugging_exec(TyObject *m) return -1; } - st->FrameInfo_Type = PyStructSequence_NewType(&FrameInfo_desc); + st->FrameInfo_Type = TyStructSequence_NewType(&FrameInfo_desc); if (st->FrameInfo_Type == NULL) { return -1; } @@ -3008,7 +3008,7 @@ _remote_debugging_exec(TyObject *m) return -1; } - st->CoroInfo_Type = PyStructSequence_NewType(&CoroInfo_desc); + st->CoroInfo_Type = TyStructSequence_NewType(&CoroInfo_desc); if (st->CoroInfo_Type == NULL) { return -1; } @@ -3016,7 +3016,7 @@ _remote_debugging_exec(TyObject *m) return -1; } - st->ThreadInfo_Type = PyStructSequence_NewType(&ThreadInfo_desc); + st->ThreadInfo_Type = TyStructSequence_NewType(&ThreadInfo_desc); if (st->ThreadInfo_Type == NULL) { return -1; } @@ -3024,7 +3024,7 @@ _remote_debugging_exec(TyObject *m) return -1; } - st->AwaitedInfo_Type = PyStructSequence_NewType(&AwaitedInfo_desc); + st->AwaitedInfo_Type = TyStructSequence_NewType(&AwaitedInfo_desc); if (st->AwaitedInfo_Type == NULL) { return -1; } diff --git a/Modules/_sqlite/clinic/_sqlite3.connect.c.h b/Modules/_sqlite/clinic/_sqlite3.connect.c.h index 7d1ad91..90a655f 100644 --- a/Modules/_sqlite/clinic/_sqlite3.connect.c.h +++ b/Modules/_sqlite/clinic/_sqlite3.connect.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(pysqlite_connect__doc__, +TyDoc_STRVAR(pysqlite_connect__doc__, "connect($module, /, database, timeout=5.0, detect_types=0,\n" " isolation_level=\'\', check_same_thread=True,\n" " factory=ConnectionType, cached_statements=128, uri=False, *,\n" diff --git a/Modules/_sqlite/clinic/blob.c.h b/Modules/_sqlite/clinic/blob.c.h index b4ba558..10d1cc4 100644 --- a/Modules/_sqlite/clinic/blob.c.h +++ b/Modules/_sqlite/clinic/blob.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(blob_close__doc__, +TyDoc_STRVAR(blob_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -22,7 +22,7 @@ blob_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return blob_close_impl((pysqlite_Blob *)self); } -PyDoc_STRVAR(blob_read__doc__, +TyDoc_STRVAR(blob_read__doc__, "read($self, length=-1, /)\n" "--\n" "\n" @@ -64,7 +64,7 @@ exit: return return_value; } -PyDoc_STRVAR(blob_write__doc__, +TyDoc_STRVAR(blob_write__doc__, "write($self, data, /)\n" "--\n" "\n" @@ -99,7 +99,7 @@ exit: return return_value; } -PyDoc_STRVAR(blob_seek__doc__, +TyDoc_STRVAR(blob_seek__doc__, "seek($self, offset, origin=0, /)\n" "--\n" "\n" @@ -143,7 +143,7 @@ exit: return return_value; } -PyDoc_STRVAR(blob_tell__doc__, +TyDoc_STRVAR(blob_tell__doc__, "tell($self, /)\n" "--\n" "\n" @@ -161,7 +161,7 @@ blob_tell(TyObject *self, TyObject *Py_UNUSED(ignored)) return blob_tell_impl((pysqlite_Blob *)self); } -PyDoc_STRVAR(blob_enter__doc__, +TyDoc_STRVAR(blob_enter__doc__, "__enter__($self, /)\n" "--\n" "\n" @@ -179,7 +179,7 @@ blob_enter(TyObject *self, TyObject *Py_UNUSED(ignored)) return blob_enter_impl((pysqlite_Blob *)self); } -PyDoc_STRVAR(blob_exit__doc__, +TyDoc_STRVAR(blob_exit__doc__, "__exit__($self, type, val, tb, /)\n" "--\n" "\n" diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index 9bf24d3..fafcfdf 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -40,7 +40,7 @@ pysqlite_connection_init(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(database), &_Ty_ID(timeout), &_Ty_ID(detect_types), &_Ty_ID(isolation_level), &_Ty_ID(check_same_thread), &_Ty_ID(factory), &_Ty_ID(cached_statements), &_Ty_ID(uri), &_Ty_ID(autocommit), }, }; @@ -171,7 +171,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_cursor__doc__, +TyDoc_STRVAR(pysqlite_connection_cursor__doc__, "cursor($self, /, factory=)\n" "--\n" "\n" @@ -196,7 +196,7 @@ pysqlite_connection_cursor(TyObject *self, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(factory), }, }; @@ -234,7 +234,7 @@ exit: return return_value; } -PyDoc_STRVAR(blobopen__doc__, +TyDoc_STRVAR(blobopen__doc__, "blobopen($self, table, column, row, /, *, readonly=False, name=\'main\')\n" "--\n" "\n" @@ -271,7 +271,7 @@ blobopen(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwna Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(readonly), &_Ty_ID(name), }, }; @@ -363,7 +363,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_close__doc__, +TyDoc_STRVAR(pysqlite_connection_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -383,7 +383,7 @@ pysqlite_connection_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return pysqlite_connection_close_impl((pysqlite_Connection *)self); } -PyDoc_STRVAR(pysqlite_connection_commit__doc__, +TyDoc_STRVAR(pysqlite_connection_commit__doc__, "commit($self, /)\n" "--\n" "\n" @@ -403,7 +403,7 @@ pysqlite_connection_commit(TyObject *self, TyObject *Py_UNUSED(ignored)) return pysqlite_connection_commit_impl((pysqlite_Connection *)self); } -PyDoc_STRVAR(pysqlite_connection_rollback__doc__, +TyDoc_STRVAR(pysqlite_connection_rollback__doc__, "rollback($self, /)\n" "--\n" "\n" @@ -423,7 +423,7 @@ pysqlite_connection_rollback(TyObject *self, TyObject *Py_UNUSED(ignored)) return pysqlite_connection_rollback_impl((pysqlite_Connection *)self); } -PyDoc_STRVAR(pysqlite_connection_create_function__doc__, +TyDoc_STRVAR(pysqlite_connection_create_function__doc__, "create_function($self, /, name, narg, func, *, deterministic=False)\n" "--\n" "\n" @@ -467,7 +467,7 @@ pysqlite_connection_create_function(TyObject *self, TyTypeObject *cls, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(narg), &_Ty_ID(func), &_Ty_ID(deterministic), }, }; @@ -541,7 +541,7 @@ exit: #if defined(HAVE_WINDOW_FUNCTIONS) -PyDoc_STRVAR(create_window_function__doc__, +TyDoc_STRVAR(create_window_function__doc__, "create_window_function($self, name, num_params, aggregate_class, /)\n" "--\n" "\n" @@ -617,7 +617,7 @@ exit: #endif /* defined(HAVE_WINDOW_FUNCTIONS) */ -PyDoc_STRVAR(pysqlite_connection_create_aggregate__doc__, +TyDoc_STRVAR(pysqlite_connection_create_aggregate__doc__, "create_aggregate($self, /, name, n_arg, aggregate_class)\n" "--\n" "\n" @@ -662,7 +662,7 @@ pysqlite_connection_create_aggregate(TyObject *self, TyTypeObject *cls, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(n_arg), &_Ty_ID(aggregate_class), }, }; @@ -724,7 +724,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_set_authorizer__doc__, +TyDoc_STRVAR(pysqlite_connection_set_authorizer__doc__, "set_authorizer($self, /, authorizer_callback)\n" "--\n" "\n" @@ -767,7 +767,7 @@ pysqlite_connection_set_authorizer(TyObject *self, TyTypeObject *cls, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(authorizer_callback), }, }; @@ -810,7 +810,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_set_progress_handler__doc__, +TyDoc_STRVAR(pysqlite_connection_set_progress_handler__doc__, "set_progress_handler($self, /, progress_handler, n)\n" "--\n" "\n" @@ -863,7 +863,7 @@ pysqlite_connection_set_progress_handler(TyObject *self, TyTypeObject *cls, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(progress_handler), _Ty_LATIN1_CHR('n'), }, }; @@ -911,7 +911,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_set_trace_callback__doc__, +TyDoc_STRVAR(pysqlite_connection_set_trace_callback__doc__, "set_trace_callback($self, /, trace_callback)\n" "--\n" "\n" @@ -954,7 +954,7 @@ pysqlite_connection_set_trace_callback(TyObject *self, TyTypeObject *cls, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(trace_callback), }, }; @@ -999,7 +999,7 @@ exit: #if defined(PY_SQLITE_ENABLE_LOAD_EXTENSION) -PyDoc_STRVAR(pysqlite_connection_enable_load_extension__doc__, +TyDoc_STRVAR(pysqlite_connection_enable_load_extension__doc__, "enable_load_extension($self, enable, /)\n" "--\n" "\n" @@ -1032,7 +1032,7 @@ exit: #if defined(PY_SQLITE_ENABLE_LOAD_EXTENSION) -PyDoc_STRVAR(pysqlite_connection_load_extension__doc__, +TyDoc_STRVAR(pysqlite_connection_load_extension__doc__, "load_extension($self, name, /, *, entrypoint=None)\n" "--\n" "\n" @@ -1059,7 +1059,7 @@ pysqlite_connection_load_extension(TyObject *self, TyObject *const *args, Ty_ssi Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(entrypoint), }, }; @@ -1130,7 +1130,7 @@ exit: #endif /* defined(PY_SQLITE_ENABLE_LOAD_EXTENSION) */ -PyDoc_STRVAR(pysqlite_connection_execute__doc__, +TyDoc_STRVAR(pysqlite_connection_execute__doc__, "execute($self, sql, parameters=, /)\n" "--\n" "\n" @@ -1169,7 +1169,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_executemany__doc__, +TyDoc_STRVAR(pysqlite_connection_executemany__doc__, "executemany($self, sql, parameters, /)\n" "--\n" "\n" @@ -1204,7 +1204,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_executescript__doc__, +TyDoc_STRVAR(pysqlite_connection_executescript__doc__, "executescript($self, sql_script, /)\n" "--\n" "\n" @@ -1227,7 +1227,7 @@ pysqlite_connection_executescript(TyObject *self, TyObject *script_obj) return return_value; } -PyDoc_STRVAR(pysqlite_connection_interrupt__doc__, +TyDoc_STRVAR(pysqlite_connection_interrupt__doc__, "interrupt($self, /)\n" "--\n" "\n" @@ -1245,7 +1245,7 @@ pysqlite_connection_interrupt(TyObject *self, TyObject *Py_UNUSED(ignored)) return pysqlite_connection_interrupt_impl((pysqlite_Connection *)self); } -PyDoc_STRVAR(pysqlite_connection_iterdump__doc__, +TyDoc_STRVAR(pysqlite_connection_iterdump__doc__, "iterdump($self, /, *, filter=None)\n" "--\n" "\n" @@ -1274,7 +1274,7 @@ pysqlite_connection_iterdump(TyObject *self, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(filter), }, }; @@ -1312,7 +1312,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_backup__doc__, +TyDoc_STRVAR(pysqlite_connection_backup__doc__, "backup($self, /, target, *, pages=-1, progress=None, name=\'main\',\n" " sleep=0.25)\n" "--\n" @@ -1341,7 +1341,7 @@ pysqlite_connection_backup(TyObject *self, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(target), &_Ty_ID(pages), &_Ty_ID(progress), &_Ty_ID(name), &_Ty_ID(sleep), }, }; @@ -1430,7 +1430,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_connection_create_collation__doc__, +TyDoc_STRVAR(pysqlite_connection_create_collation__doc__, "create_collation($self, name, callback, /)\n" "--\n" "\n" @@ -1493,7 +1493,7 @@ exit: #if defined(PY_SQLITE_HAVE_SERIALIZE) -PyDoc_STRVAR(serialize__doc__, +TyDoc_STRVAR(serialize__doc__, "serialize($self, /, *, name=\'main\')\n" "--\n" "\n" @@ -1526,7 +1526,7 @@ serialize(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), }, }; @@ -1580,7 +1580,7 @@ exit: #if defined(PY_SQLITE_HAVE_SERIALIZE) -PyDoc_STRVAR(deserialize__doc__, +TyDoc_STRVAR(deserialize__doc__, "deserialize($self, data, /, *, name=\'main\')\n" "--\n" "\n" @@ -1618,7 +1618,7 @@ deserialize(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), }, }; @@ -1691,7 +1691,7 @@ exit: #endif /* defined(PY_SQLITE_HAVE_SERIALIZE) */ -PyDoc_STRVAR(pysqlite_connection_enter__doc__, +TyDoc_STRVAR(pysqlite_connection_enter__doc__, "__enter__($self, /)\n" "--\n" "\n" @@ -1711,7 +1711,7 @@ pysqlite_connection_enter(TyObject *self, TyObject *Py_UNUSED(ignored)) return pysqlite_connection_enter_impl((pysqlite_Connection *)self); } -PyDoc_STRVAR(pysqlite_connection_exit__doc__, +TyDoc_STRVAR(pysqlite_connection_exit__doc__, "__exit__($self, type, value, traceback, /)\n" "--\n" "\n" @@ -1746,7 +1746,7 @@ exit: return return_value; } -PyDoc_STRVAR(setlimit__doc__, +TyDoc_STRVAR(setlimit__doc__, "setlimit($self, category, limit, /)\n" "--\n" "\n" @@ -1792,7 +1792,7 @@ exit: return return_value; } -PyDoc_STRVAR(getlimit__doc__, +TyDoc_STRVAR(getlimit__doc__, "getlimit($self, category, /)\n" "--\n" "\n" @@ -1823,7 +1823,7 @@ exit: return return_value; } -PyDoc_STRVAR(setconfig__doc__, +TyDoc_STRVAR(setconfig__doc__, "setconfig($self, op, enable=True, /)\n" "--\n" "\n" @@ -1866,7 +1866,7 @@ exit: return return_value; } -PyDoc_STRVAR(getconfig__doc__, +TyDoc_STRVAR(getconfig__doc__, "getconfig($self, op, /)\n" "--\n" "\n" diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index e8971fa..73bced9 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -38,7 +38,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_cursor_execute__doc__, +TyDoc_STRVAR(pysqlite_cursor_execute__doc__, "execute($self, sql, parameters=(), /)\n" "--\n" "\n" @@ -77,7 +77,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_cursor_executemany__doc__, +TyDoc_STRVAR(pysqlite_cursor_executemany__doc__, "executemany($self, sql, seq_of_parameters, /)\n" "--\n" "\n" @@ -112,7 +112,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_cursor_executescript__doc__, +TyDoc_STRVAR(pysqlite_cursor_executescript__doc__, "executescript($self, sql_script, /)\n" "--\n" "\n" @@ -150,7 +150,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_cursor_fetchone__doc__, +TyDoc_STRVAR(pysqlite_cursor_fetchone__doc__, "fetchone($self, /)\n" "--\n" "\n" @@ -168,7 +168,7 @@ pysqlite_cursor_fetchone(TyObject *self, TyObject *Py_UNUSED(ignored)) return pysqlite_cursor_fetchone_impl((pysqlite_Cursor *)self); } -PyDoc_STRVAR(pysqlite_cursor_fetchmany__doc__, +TyDoc_STRVAR(pysqlite_cursor_fetchmany__doc__, "fetchmany($self, /, size=1)\n" "--\n" "\n" @@ -196,7 +196,7 @@ pysqlite_cursor_fetchmany(TyObject *self, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(size), }, }; @@ -237,7 +237,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_cursor_fetchall__doc__, +TyDoc_STRVAR(pysqlite_cursor_fetchall__doc__, "fetchall($self, /)\n" "--\n" "\n" @@ -255,7 +255,7 @@ pysqlite_cursor_fetchall(TyObject *self, TyObject *Py_UNUSED(ignored)) return pysqlite_cursor_fetchall_impl((pysqlite_Cursor *)self); } -PyDoc_STRVAR(pysqlite_cursor_setinputsizes__doc__, +TyDoc_STRVAR(pysqlite_cursor_setinputsizes__doc__, "setinputsizes($self, sizes, /)\n" "--\n" "\n" @@ -277,7 +277,7 @@ pysqlite_cursor_setinputsizes(TyObject *self, TyObject *sizes) return return_value; } -PyDoc_STRVAR(pysqlite_cursor_setoutputsize__doc__, +TyDoc_STRVAR(pysqlite_cursor_setoutputsize__doc__, "setoutputsize($self, size, column=None, /)\n" "--\n" "\n" @@ -312,7 +312,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_cursor_close__doc__, +TyDoc_STRVAR(pysqlite_cursor_close__doc__, "close($self, /)\n" "--\n" "\n" diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index 4b4fc3f..d4db6e0 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(pysqlite_complete_statement__doc__, +TyDoc_STRVAR(pysqlite_complete_statement__doc__, "complete_statement($module, /, statement)\n" "--\n" "\n" @@ -33,7 +33,7 @@ pysqlite_complete_statement(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(statement), }, }; @@ -78,7 +78,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_register_adapter__doc__, +TyDoc_STRVAR(pysqlite_register_adapter__doc__, "register_adapter($module, type, adapter, /)\n" "--\n" "\n" @@ -109,7 +109,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_register_converter__doc__, +TyDoc_STRVAR(pysqlite_register_converter__doc__, "register_converter($module, typename, converter, /)\n" "--\n" "\n" @@ -144,7 +144,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_enable_callback_trace__doc__, +TyDoc_STRVAR(pysqlite_enable_callback_trace__doc__, "enable_callback_tracebacks($module, enable, /)\n" "--\n" "\n" @@ -172,7 +172,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_adapt__doc__, +TyDoc_STRVAR(pysqlite_adapt__doc__, "adapt($module, obj, proto=PrepareProtocolType, alt=, /)\n" "--\n" "\n" diff --git a/Modules/_sqlite/clinic/row.c.h b/Modules/_sqlite/clinic/row.c.h index 6c30802..3baaf05 100644 --- a/Modules/_sqlite/clinic/row.c.h +++ b/Modules/_sqlite/clinic/row.c.h @@ -39,7 +39,7 @@ exit: return return_value; } -PyDoc_STRVAR(pysqlite_row_keys__doc__, +TyDoc_STRVAR(pysqlite_row_keys__doc__, "keys($self, /)\n" "--\n" "\n" diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 8f6d957..e2b44aa 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -306,7 +306,7 @@ pysqlite_connection_init_impl(pysqlite_Connection *self, TyObject *database, self->isolation_level = isolation_level; self->autocommit = autocommit; self->check_same_thread = check_same_thread; - self->thread_ident = PyThread_get_thread_ident(); + self->thread_ident = TyThread_get_thread_ident(); self->statement_cache = statement_cache; self->cursors = cursors; self->blobs = blobs; @@ -487,7 +487,7 @@ connection_finalize(TyObject *self) /* If close is implicitly called as a result of interpreter * tear-down, we must not call back into Python. */ - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); int teardown = _Ty_IsInterpreterFinalizing(interp); if (teardown && con->db) { remove_callbacks(con->db); @@ -1733,11 +1733,11 @@ pysqlite_connection_load_extension_impl(pysqlite_Connection *self, int pysqlite_check_thread(pysqlite_Connection* self) { if (self->check_same_thread) { - if (PyThread_get_thread_ident() != self->thread_ident) { + if (TyThread_get_thread_ident() != self->thread_ident) { TyErr_Format(self->ProgrammingError, "SQLite objects created in a thread can only be used in that same thread. " "The object was created in thread id %lu and this is thread id %lu.", - self->thread_ident, PyThread_get_thread_ident()); + self->thread_ident, TyThread_get_thread_ident()); return 0; } @@ -2614,7 +2614,7 @@ get_sig(TyObject *Py_UNUSED(self), void *Py_UNUSED(closure)) static const char connection_doc[] = -PyDoc_STR("SQLite database connection object."); +TyDoc_STR("SQLite database connection object."); static TyGetSetDef connection_getset[] = { {"isolation_level", pysqlite_connection_get_isolation_level, diff --git a/Modules/_sqlite/cursor.c b/Modules/_sqlite/cursor.c index 9941549..4be480f 100644 --- a/Modules/_sqlite/cursor.c +++ b/Modules/_sqlite/cursor.c @@ -1327,7 +1327,7 @@ static struct TyMemberDef cursor_members[] = }; static const char cursor_doc[] = -PyDoc_STR("SQLite database cursor class."); +TyDoc_STR("SQLite database cursor class."); static TyType_Slot cursor_slots[] = { {Ty_tp_dealloc, cursor_dealloc}, diff --git a/Modules/_sqlite/prepare_protocol.c b/Modules/_sqlite/prepare_protocol.c index df6b97c..8676ec0 100644 --- a/Modules/_sqlite/prepare_protocol.c +++ b/Modules/_sqlite/prepare_protocol.c @@ -45,7 +45,7 @@ pysqlite_prepare_protocol_dealloc(TyObject *self) Ty_DECREF(tp); } -PyDoc_STRVAR(doc, "PEP 246 style object adaption protocol type."); +TyDoc_STRVAR(doc, "PEP 246 style object adaption protocol type."); static TyType_Slot type_slots[] = { {Ty_tp_dealloc, pysqlite_prepare_protocol_dealloc}, diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h index fff5d14..aea1301 100644 --- a/Modules/_sre/clinic/sre.c.h +++ b/Modules/_sre/clinic/sre.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_sre_getcodesize__doc__, +TyDoc_STRVAR(_sre_getcodesize__doc__, "getcodesize($module, /)\n" "--\n" "\n"); @@ -36,7 +36,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_ascii_iscased__doc__, +TyDoc_STRVAR(_sre_ascii_iscased__doc__, "ascii_iscased($module, character, /)\n" "--\n" "\n"); @@ -68,7 +68,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_unicode_iscased__doc__, +TyDoc_STRVAR(_sre_unicode_iscased__doc__, "unicode_iscased($module, character, /)\n" "--\n" "\n"); @@ -100,7 +100,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_ascii_tolower__doc__, +TyDoc_STRVAR(_sre_ascii_tolower__doc__, "ascii_tolower($module, character, /)\n" "--\n" "\n"); @@ -132,7 +132,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_unicode_tolower__doc__, +TyDoc_STRVAR(_sre_unicode_tolower__doc__, "unicode_tolower($module, character, /)\n" "--\n" "\n"); @@ -164,7 +164,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_match__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_match__doc__, "match($self, /, string, pos=0, endpos=sys.maxsize)\n" "--\n" "\n" @@ -191,7 +191,7 @@ _sre_SRE_Pattern_match(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(string), &_Ty_ID(pos), &_Ty_ID(endpos), }, }; @@ -260,7 +260,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_fullmatch__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_fullmatch__doc__, "fullmatch($self, /, string, pos=0, endpos=sys.maxsize)\n" "--\n" "\n" @@ -287,7 +287,7 @@ _sre_SRE_Pattern_fullmatch(TyObject *self, TyTypeObject *cls, TyObject *const *a Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(string), &_Ty_ID(pos), &_Ty_ID(endpos), }, }; @@ -356,7 +356,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_search__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_search__doc__, "search($self, /, string, pos=0, endpos=sys.maxsize)\n" "--\n" "\n" @@ -385,7 +385,7 @@ _sre_SRE_Pattern_search(TyObject *self, TyTypeObject *cls, TyObject *const *args Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(string), &_Ty_ID(pos), &_Ty_ID(endpos), }, }; @@ -454,7 +454,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_findall__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_findall__doc__, "findall($self, /, string, pos=0, endpos=sys.maxsize)\n" "--\n" "\n" @@ -480,7 +480,7 @@ _sre_SRE_Pattern_findall(TyObject *self, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(string), &_Ty_ID(pos), &_Ty_ID(endpos), }, }; @@ -549,7 +549,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_finditer__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_finditer__doc__, "finditer($self, /, string, pos=0, endpos=sys.maxsize)\n" "--\n" "\n" @@ -578,7 +578,7 @@ _sre_SRE_Pattern_finditer(TyObject *self, TyTypeObject *cls, TyObject *const *ar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(string), &_Ty_ID(pos), &_Ty_ID(endpos), }, }; @@ -647,7 +647,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_scanner__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_scanner__doc__, "scanner($self, /, string, pos=0, endpos=sys.maxsize)\n" "--\n" "\n"); @@ -673,7 +673,7 @@ _sre_SRE_Pattern_scanner(TyObject *self, TyTypeObject *cls, TyObject *const *arg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(string), &_Ty_ID(pos), &_Ty_ID(endpos), }, }; @@ -742,7 +742,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_split__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_split__doc__, "split($self, /, string, maxsplit=0)\n" "--\n" "\n" @@ -768,7 +768,7 @@ _sre_SRE_Pattern_split(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(string), &_Ty_ID(maxsplit), }, }; @@ -819,7 +819,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_sub__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_sub__doc__, "sub($self, /, repl, string, count=0)\n" "--\n" "\n" @@ -845,7 +845,7 @@ _sre_SRE_Pattern_sub(TyObject *self, TyTypeObject *cls, TyObject *const *args, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(repl), &_Ty_ID(string), &_Ty_ID(count), }, }; @@ -898,7 +898,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern_subn__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern_subn__doc__, "subn($self, /, repl, string, count=0)\n" "--\n" "\n" @@ -925,7 +925,7 @@ _sre_SRE_Pattern_subn(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(repl), &_Ty_ID(string), &_Ty_ID(count), }, }; @@ -978,7 +978,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Pattern___copy____doc__, +TyDoc_STRVAR(_sre_SRE_Pattern___copy____doc__, "__copy__($self, /)\n" "--\n" "\n"); @@ -995,7 +995,7 @@ _sre_SRE_Pattern___copy__(TyObject *self, TyObject *Py_UNUSED(ignored)) return _sre_SRE_Pattern___copy___impl((PatternObject *)self); } -PyDoc_STRVAR(_sre_SRE_Pattern___deepcopy____doc__, +TyDoc_STRVAR(_sre_SRE_Pattern___deepcopy____doc__, "__deepcopy__($self, memo, /)\n" "--\n" "\n"); @@ -1018,7 +1018,7 @@ _sre_SRE_Pattern___deepcopy__(TyObject *self, TyObject *memo) #if defined(Ty_DEBUG) -PyDoc_STRVAR(_sre_SRE_Pattern__fail_after__doc__, +TyDoc_STRVAR(_sre_SRE_Pattern__fail_after__doc__, "_fail_after($self, count, exception, /)\n" "--\n" "\n" @@ -1054,7 +1054,7 @@ exit: #endif /* defined(Ty_DEBUG) */ -PyDoc_STRVAR(_sre_compile__doc__, +TyDoc_STRVAR(_sre_compile__doc__, "compile($module, /, pattern, flags, code, groups, groupindex,\n" " indexgroup)\n" "--\n" @@ -1081,7 +1081,7 @@ _sre_compile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pattern), &_Ty_ID(flags), &_Ty_ID(code), &_Ty_ID(groups), &_Ty_ID(groupindex), &_Ty_ID(indexgroup), }, }; @@ -1150,7 +1150,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_template__doc__, +TyDoc_STRVAR(_sre_template__doc__, "template($module, pattern, template, /)\n" "--\n" "\n" @@ -1189,7 +1189,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Match_expand__doc__, +TyDoc_STRVAR(_sre_SRE_Match_expand__doc__, "expand($self, /, template)\n" "--\n" "\n" @@ -1214,7 +1214,7 @@ _sre_SRE_Match_expand(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(template), }, }; @@ -1247,7 +1247,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Match_groups__doc__, +TyDoc_STRVAR(_sre_SRE_Match_groups__doc__, "groups($self, /, default=None)\n" "--\n" "\n" @@ -1275,7 +1275,7 @@ _sre_SRE_Match_groups(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(default), }, }; @@ -1313,7 +1313,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Match_groupdict__doc__, +TyDoc_STRVAR(_sre_SRE_Match_groupdict__doc__, "groupdict($self, /, default=None)\n" "--\n" "\n" @@ -1341,7 +1341,7 @@ _sre_SRE_Match_groupdict(TyObject *self, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(default), }, }; @@ -1379,7 +1379,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Match_start__doc__, +TyDoc_STRVAR(_sre_SRE_Match_start__doc__, "start($self, group=0, /)\n" "--\n" "\n" @@ -1416,7 +1416,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Match_end__doc__, +TyDoc_STRVAR(_sre_SRE_Match_end__doc__, "end($self, group=0, /)\n" "--\n" "\n" @@ -1453,7 +1453,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Match_span__doc__, +TyDoc_STRVAR(_sre_SRE_Match_span__doc__, "span($self, group=0, /)\n" "--\n" "\n" @@ -1485,7 +1485,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sre_SRE_Match___copy____doc__, +TyDoc_STRVAR(_sre_SRE_Match___copy____doc__, "__copy__($self, /)\n" "--\n" "\n"); @@ -1502,7 +1502,7 @@ _sre_SRE_Match___copy__(TyObject *self, TyObject *Py_UNUSED(ignored)) return _sre_SRE_Match___copy___impl((MatchObject *)self); } -PyDoc_STRVAR(_sre_SRE_Match___deepcopy____doc__, +TyDoc_STRVAR(_sre_SRE_Match___deepcopy____doc__, "__deepcopy__($self, memo, /)\n" "--\n" "\n"); @@ -1523,7 +1523,7 @@ _sre_SRE_Match___deepcopy__(TyObject *self, TyObject *memo) return return_value; } -PyDoc_STRVAR(_sre_SRE_Scanner_match__doc__, +TyDoc_STRVAR(_sre_SRE_Scanner_match__doc__, "match($self, /)\n" "--\n" "\n"); @@ -1544,7 +1544,7 @@ _sre_SRE_Scanner_match(TyObject *self, TyTypeObject *cls, TyObject *const *args, return _sre_SRE_Scanner_match_impl((ScannerObject *)self, cls); } -PyDoc_STRVAR(_sre_SRE_Scanner_search__doc__, +TyDoc_STRVAR(_sre_SRE_Scanner_search__doc__, "search($self, /)\n" "--\n" "\n"); diff --git a/Modules/_sre/sre.c b/Modules/_sre/sre.c index e505de6..1d00ace 100644 --- a/Modules/_sre/sre.c +++ b/Modules/_sre/sre.c @@ -1591,7 +1591,7 @@ done: return result; } -PyDoc_STRVAR(pattern_doc, "Compiled regular expression object."); +TyDoc_STRVAR(pattern_doc, "Compiled regular expression object."); /* PatternObject's 'groupindex' method. */ static TyObject * @@ -2664,11 +2664,11 @@ _sre_SRE_Match___deepcopy___impl(MatchObject *self, TyObject *memo) return Ty_NewRef(self); } -PyDoc_STRVAR(match_doc, +TyDoc_STRVAR(match_doc, "The result of re.match() and re.search().\n\ Match objects always have a boolean value of True."); -PyDoc_STRVAR(match_group_doc, +TyDoc_STRVAR(match_group_doc, "group([group1, ...]) -> str or tuple.\n\ Return subgroup(s) of the match by indices or names.\n\ For 0 returns the entire match."); @@ -3172,7 +3172,7 @@ static TyMethodDef pattern_methods[] = { _SRE_SRE_PATTERN___DEEPCOPY___METHODDEF _SRE_SRE_PATTERN__FAIL_AFTER_METHODDEF {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, - PyDoc_STR("See PEP 585")}, + TyDoc_STR("See PEP 585")}, {NULL, NULL} }; @@ -3228,7 +3228,7 @@ static TyMethodDef match_methods[] = { _SRE_SRE_MATCH___COPY___METHODDEF _SRE_SRE_MATCH___DEEPCOPY___METHODDEF {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, - PyDoc_STR("See PEP 585")}, + TyDoc_STR("See PEP 585")}, {NULL, NULL} }; diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 42707d6..deb69ae 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -381,7 +381,7 @@ class _ssl.SSLSession "PySSLSession *" "get_state_type(type)->PySSLSession_Type" #include "clinic/_ssl.c.h" -static int PySSL_select(PySocketSockObject *s, int writing, PyTime_t timeout); +static int PySSL_select(PySocketSockObject *s, int writing, TyTime_t timeout); typedef enum { SOCKET_IS_NONBLOCKING, @@ -426,27 +426,27 @@ static inline PySocketSockObject* GET_SOCKET(PySSLSocket *obj) { * SSL errors. */ -PyDoc_STRVAR(SSLError_doc, +TyDoc_STRVAR(SSLError_doc, "An error occurred in the SSL implementation."); -PyDoc_STRVAR(SSLCertVerificationError_doc, +TyDoc_STRVAR(SSLCertVerificationError_doc, "A certificate could not be verified."); -PyDoc_STRVAR(SSLZeroReturnError_doc, +TyDoc_STRVAR(SSLZeroReturnError_doc, "SSL/TLS session closed cleanly."); -PyDoc_STRVAR(SSLWantReadError_doc, +TyDoc_STRVAR(SSLWantReadError_doc, "Non-blocking SSL socket needs to read more data\n" "before the requested operation can be completed."); -PyDoc_STRVAR(SSLWantWriteError_doc, +TyDoc_STRVAR(SSLWantWriteError_doc, "Non-blocking SSL socket needs to write more data\n" "before the requested operation can be completed."); -PyDoc_STRVAR(SSLSyscallError_doc, +TyDoc_STRVAR(SSLSyscallError_doc, "System error when attempting SSL operation."); -PyDoc_STRVAR(SSLEOFError_doc, +TyDoc_STRVAR(SSLEOFError_doc, "SSL/TLS connection terminated abruptly."); static TyObject * @@ -1007,7 +1007,7 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self) _PySSLError err; int sockstate, nonblocking; PySocketSockObject *sock = GET_SOCKET(self); - PyTime_t timeout, deadline = 0; + TyTime_t timeout, deadline = 0; int has_timeout; if (sock) { @@ -2378,12 +2378,12 @@ PySSL_dealloc(TyObject *op) */ static int -PySSL_select(PySocketSockObject *s, int writing, PyTime_t timeout) +PySSL_select(PySocketSockObject *s, int writing, TyTime_t timeout) { int rc; #ifdef HAVE_POLL struct pollfd pollfd; - PyTime_t ms; + TyTime_t ms; #else int nfds; fd_set fds; @@ -2463,7 +2463,7 @@ _ssl__SSLSocket_write_impl(PySSLSocket *self, Ty_buffer *b) _PySSLError err; int nonblocking; PySocketSockObject *sock = GET_SOCKET(self); - PyTime_t timeout, deadline = 0; + TyTime_t timeout, deadline = 0; int has_timeout; if (sock != NULL) { @@ -2603,7 +2603,7 @@ _ssl__SSLSocket_read_impl(PySSLSocket *self, Ty_ssize_t len, _PySSLError err; int nonblocking; PySocketSockObject *sock = GET_SOCKET(self); - PyTime_t timeout, deadline = 0; + TyTime_t timeout, deadline = 0; int has_timeout; if (!group_right_1 && len < 0) { @@ -2736,7 +2736,7 @@ _ssl__SSLSocket_shutdown_impl(PySSLSocket *self) int sockstate, nonblocking, ret; int zeros = 0; PySocketSockObject *sock = GET_SOCKET(self); - PyTime_t timeout, deadline = 0; + TyTime_t timeout, deadline = 0; int has_timeout; if (sock != NULL) { @@ -4590,9 +4590,9 @@ _ssl__SSLContext_set_default_verify_paths_impl(PySSLContext *self) /*[clinic end generated code: output=0bee74e6e09deaaa input=939a88e78f634119]*/ { int rc; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS rc = SSL_CTX_set_default_verify_paths(self->ctx); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!rc) { _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); return NULL; @@ -6282,7 +6282,7 @@ static TyMethodDef PySSL_methods[] = { }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "Implementation module for SSL socket operations. See the socket module\n\ for documentation."); @@ -6817,7 +6817,7 @@ static int sslmodule_init_lock(TyObject *module) { _sslmodulestate *state = get_ssl_state(module); - state->keylog_lock = PyThread_allocate_lock(); + state->keylog_lock = TyThread_allocate_lock(); if (state->keylog_lock == NULL) { TyErr_NoMemory(); return -1; @@ -6895,7 +6895,7 @@ sslmodule_free(void *m) { sslmodule_clear((TyObject *)m); _sslmodulestate *state = get_ssl_state(m); - PyThread_free_lock(state->keylog_lock); + TyThread_free_lock(state->keylog_lock); } static struct TyModuleDef _sslmodule_def = { diff --git a/Modules/_ssl.h b/Modules/_ssl.h index 1f05181..7490dac 100644 --- a/Modules/_ssl.h +++ b/Modules/_ssl.h @@ -34,7 +34,7 @@ typedef struct { TyObject *str_verify_code; TyObject *str_verify_message; /* keylog lock */ - PyThread_type_lock keylog_lock; + TyThread_type_lock keylog_lock; } _sslmodulestate; static struct TyModuleDef _sslmodule_def; diff --git a/Modules/_ssl/clinic/cert.c.h b/Modules/_ssl/clinic/cert.c.h index f31aa38..8c56f20 100644 --- a/Modules/_ssl/clinic/cert.c.h +++ b/Modules/_ssl/clinic/cert.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_ssl_Certificate_public_bytes__doc__, +TyDoc_STRVAR(_ssl_Certificate_public_bytes__doc__, "public_bytes($self, /, format=Encoding.PEM)\n" "--\n" "\n"); @@ -32,7 +32,7 @@ _ssl_Certificate_public_bytes(TyObject *self, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(format), }, }; @@ -73,7 +73,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl_Certificate_get_info__doc__, +TyDoc_STRVAR(_ssl_Certificate_get_info__doc__, "get_info($self, /)\n" "--\n" "\n"); diff --git a/Modules/_ssl/debughelpers.c b/Modules/_ssl/debughelpers.c index 05be203..ffe41a3 100644 --- a/Modules/_ssl/debughelpers.c +++ b/Modules/_ssl/debughelpers.c @@ -128,7 +128,7 @@ _PySSL_keylog_callback(const SSL *ssl, const char *line) ssl_obj = (PySSLSocket *)SSL_get_app_data(ssl); assert(Ty_IS_TYPE(ssl_obj, get_state_sock(ssl_obj)->PySSLSocket_Type)); - PyThread_type_lock lock = get_state_sock(ssl_obj)->keylog_lock; + TyThread_type_lock lock = get_state_sock(ssl_obj)->keylog_lock; assert(lock != NULL); if (ssl_obj->ctx->keylog_bio == NULL) { return; @@ -141,11 +141,11 @@ _PySSL_keylog_callback(const SSL *ssl, const char *line) */ PySSL_BEGIN_ALLOW_THREADS - PyThread_acquire_lock(lock, 1); + TyThread_acquire_lock(lock, 1); res = BIO_printf(ssl_obj->ctx->keylog_bio, "%s\n", line); e = errno; (void)BIO_flush(ssl_obj->ctx->keylog_bio); - PyThread_release_lock(lock); + TyThread_release_lock(lock); PySSL_END_ALLOW_THREADS if (res == -1) { diff --git a/Modules/_stat.c b/Modules/_stat.c index 5d6d334..fd14594 100644 --- a/Modules/_stat.c +++ b/Modules/_stat.c @@ -329,7 +329,7 @@ _TyLong_AsMode_t(TyObject *op) return NULL; \ return TyBool_FromLong(isfunc(mode)); \ } \ - PyDoc_STRVAR(stat_ ## isfunc ## _doc, doc) + TyDoc_STRVAR(stat_ ## isfunc ## _doc, doc) stat_S_ISFUNC(S_ISDIR, "S_ISDIR(mode) -> bool\n\n" @@ -372,7 +372,7 @@ stat_S_ISFUNC(S_ISWHT, "Return True if mode is from a whiteout."); -PyDoc_STRVAR(stat_S_IMODE_doc, +TyDoc_STRVAR(stat_S_IMODE_doc, "Return the portion of the file's mode that can be set by os.chmod()."); static TyObject * @@ -385,7 +385,7 @@ stat_S_IMODE(TyObject *self, TyObject *omode) } -PyDoc_STRVAR(stat_S_IFMT_doc, +TyDoc_STRVAR(stat_S_IFMT_doc, "Return the portion of the file's mode that describes the file type."); static TyObject * @@ -446,7 +446,7 @@ fileperm(mode_t mode, char *buf) } } -PyDoc_STRVAR(stat_filemode_doc, +TyDoc_STRVAR(stat_filemode_doc, "Convert a file's mode to a string of the form '-rwxrwxrwx'"); static TyObject * @@ -483,7 +483,7 @@ static TyMethodDef stat_methods[] = { }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "S_IFMT_: file type bits\n\ S_IFDIR: directory\n\ S_IFCHR: character device\n\ diff --git a/Modules/_statisticsmodule.c b/Modules/_statisticsmodule.c index 738193b..c5c4252 100644 --- a/Modules/_statisticsmodule.c +++ b/Modules/_statisticsmodule.c @@ -131,7 +131,7 @@ static TyMethodDef statistics_methods[] = { {NULL, NULL, 0, NULL} }; -PyDoc_STRVAR(statistics_doc, +TyDoc_STRVAR(statistics_doc, "Accelerators for the statistics module.\n"); static struct PyModuleDef_Slot _statisticsmodule_slots[] = { diff --git a/Modules/_struct.c b/Modules/_struct.c index 870a272..b0e2b44 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -2179,7 +2179,7 @@ s_pack_internal(PyStructObject *soself, TyObject *const *args, int offset, } -PyDoc_STRVAR(s_pack__doc__, +TyDoc_STRVAR(s_pack__doc__, "S.pack(v1, v2, ...) -> bytes\n\ \n\ Return a bytes object containing values v1, v2, ... packed according\n\ @@ -2222,7 +2222,7 @@ s_pack(TyObject *self, TyObject *const *args, Ty_ssize_t nargs) return _PyBytesWriter_Finish(&writer, buf + soself->s_size); } -PyDoc_STRVAR(s_pack_into__doc__, +TyDoc_STRVAR(s_pack_into__doc__, "S.pack_into(buffer, offset, v1, v2, ...)\n\ \n\ Pack the values v1, v2, ... according to the format string S.format\n\ @@ -2339,7 +2339,7 @@ s_get_size(TyObject *op, void *Py_UNUSED(closure)) return TyLong_FromSsize_t(self->s_size); } -PyDoc_STRVAR(s_sizeof__doc__, +TyDoc_STRVAR(s_sizeof__doc__, "S.__sizeof__() -> size of S in memory, in bytes"); static TyObject * @@ -2385,12 +2385,12 @@ static TyMemberDef s_members[] = { }; static TyGetSetDef s_getsetlist[] = { - {"format", s_get_format, NULL, PyDoc_STR("struct format string"), NULL}, - {"size", s_get_size, NULL, PyDoc_STR("struct size in bytes"), NULL}, + {"format", s_get_format, NULL, TyDoc_STR("struct format string"), NULL}, + {"size", s_get_size, NULL, TyDoc_STR("struct size in bytes"), NULL}, {NULL} /* sentinel */ }; -PyDoc_STRVAR(s__doc__, +TyDoc_STRVAR(s__doc__, "Struct(fmt) --> compiled struct object\n" "\n" ); @@ -2490,7 +2490,7 @@ calcsize_impl(TyObject *module, PyStructObject *s_object) return s_object->s_size; } -PyDoc_STRVAR(pack_doc, +TyDoc_STRVAR(pack_doc, "pack(format, v1, v2, ...) -> bytes\n\ \n\ Return a bytes object containing the values v1, v2, ... packed according\n\ @@ -2516,7 +2516,7 @@ pack(TyObject *module, TyObject *const *args, Ty_ssize_t nargs) return result; } -PyDoc_STRVAR(pack_into_doc, +TyDoc_STRVAR(pack_into_doc, "pack_into(format, buffer, offset, v1, v2, ...)\n\ \n\ Pack the values v1, v2, ... according to the format string and write\n\ @@ -2625,7 +2625,7 @@ static struct TyMethodDef module_functions[] = { /* Module initialization */ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "Functions to convert between Python values and C structs.\n\ Python bytes objects are used to hold the data representing the C struct\n\ and also as format strings (explained below) to describe the layout of data\n\ diff --git a/Modules/_sysconfig.c b/Modules/_sysconfig.c index 9d2d6e1..fb17534 100644 --- a/Modules/_sysconfig.c +++ b/Modules/_sysconfig.c @@ -80,7 +80,7 @@ _sysconfig_config_vars_impl(TyObject *module) return config; } -PyDoc_STRVAR(sysconfig__doc__, +TyDoc_STRVAR(sysconfig__doc__, "A helper for the sysconfig module."); static struct TyMethodDef sysconfig_methods[] = { diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c index 87a9741..139a847 100644 --- a/Modules/_testbuffer.c +++ b/Modules/_testbuffer.c @@ -2652,7 +2652,7 @@ static TyMethodDef ndarray_methods[] = }; static TyTypeObject NDArray_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "ndarray", /* Name of this type */ sizeof(NDArrayObject), /* Basic object size */ 0, /* Item size for varobject */ @@ -2772,7 +2772,7 @@ static PyBufferProcs staticarray_as_buffer = { }; static TyTypeObject StaticArray_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "staticarray", /* Name of this type */ sizeof(StaticArrayObject), /* Basic object size */ 0, /* Item size for varobject */ diff --git a/Modules/_testcapi/buffer.c b/Modules/_testcapi/buffer.c index 1af113c..c2cfe89 100644 --- a/Modules/_testcapi/buffer.c +++ b/Modules/_testcapi/buffer.c @@ -86,7 +86,7 @@ static struct TyMemberDef testbuf_members[] = { }; static TyTypeObject testBufType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "testBufType", .tp_basicsize = sizeof(testBufObject), .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_HAVE_GC, diff --git a/Modules/_testcapi/clinic/exceptions.c.h b/Modules/_testcapi/clinic/exceptions.c.h index c66d297..4cc09e8 100644 --- a/Modules/_testcapi/clinic/exceptions.c.h +++ b/Modules/_testcapi/clinic/exceptions.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_testcapi_err_set_raised__doc__, +TyDoc_STRVAR(_testcapi_err_set_raised__doc__, "err_set_raised($module, exception, /)\n" "--\n" "\n"); @@ -16,7 +16,7 @@ PyDoc_STRVAR(_testcapi_err_set_raised__doc__, #define _TESTCAPI_ERR_SET_RAISED_METHODDEF \ {"err_set_raised", (PyCFunction)_testcapi_err_set_raised, METH_O, _testcapi_err_set_raised__doc__}, -PyDoc_STRVAR(_testcapi_exception_print__doc__, +TyDoc_STRVAR(_testcapi_exception_print__doc__, "exception_print($module, exception, legacy=False, /)\n" "--\n" "\n" @@ -53,7 +53,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_make_exception_with_doc__doc__, +TyDoc_STRVAR(_testcapi_make_exception_with_doc__doc__, "make_exception_with_doc($module, /, name, doc=,\n" " base=, dict=)\n" "--\n" @@ -81,7 +81,7 @@ _testcapi_make_exception_with_doc(TyObject *module, TyObject *const *args, Ty_ss Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(doc), &_Ty_ID(base), &_Ty_ID(dict), }, }; @@ -159,7 +159,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_exc_set_object__doc__, +TyDoc_STRVAR(_testcapi_exc_set_object__doc__, "exc_set_object($module, exception, obj, /)\n" "--\n" "\n"); @@ -188,7 +188,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_exc_set_object_fetch__doc__, +TyDoc_STRVAR(_testcapi_exc_set_object_fetch__doc__, "exc_set_object_fetch($module, exception, obj, /)\n" "--\n" "\n"); @@ -218,7 +218,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_err_setstring__doc__, +TyDoc_STRVAR(_testcapi_err_setstring__doc__, "err_setstring($module, exc, value, /)\n" "--\n" "\n"); @@ -248,7 +248,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_err_setfromerrnowithfilename__doc__, +TyDoc_STRVAR(_testcapi_err_setfromerrnowithfilename__doc__, "err_setfromerrnowithfilename($module, error, exc, value, /)\n" "--\n" "\n"); @@ -280,7 +280,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_raise_exception__doc__, +TyDoc_STRVAR(_testcapi_raise_exception__doc__, "raise_exception($module, exception, num_args, /)\n" "--\n" "\n"); @@ -312,7 +312,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_raise_memoryerror__doc__, +TyDoc_STRVAR(_testcapi_raise_memoryerror__doc__, "raise_memoryerror($module, /)\n" "--\n" "\n"); @@ -329,7 +329,7 @@ _testcapi_raise_memoryerror(TyObject *module, TyObject *Py_UNUSED(ignored)) return _testcapi_raise_memoryerror_impl(module); } -PyDoc_STRVAR(_testcapi_fatal_error__doc__, +TyDoc_STRVAR(_testcapi_fatal_error__doc__, "fatal_error($module, message, release_gil=False, /)\n" "--\n" "\n"); @@ -358,7 +358,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_set_exc_info__doc__, +TyDoc_STRVAR(_testcapi_set_exc_info__doc__, "set_exc_info($module, new_type, new_value, new_tb, /)\n" "--\n" "\n"); @@ -390,7 +390,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_set_exception__doc__, +TyDoc_STRVAR(_testcapi_set_exception__doc__, "set_exception($module, new_exc, /)\n" "--\n" "\n"); @@ -398,7 +398,7 @@ PyDoc_STRVAR(_testcapi_set_exception__doc__, #define _TESTCAPI_SET_EXCEPTION_METHODDEF \ {"set_exception", (PyCFunction)_testcapi_set_exception, METH_O, _testcapi_set_exception__doc__}, -PyDoc_STRVAR(_testcapi_traceback_print__doc__, +TyDoc_STRVAR(_testcapi_traceback_print__doc__, "traceback_print($module, traceback, file, /)\n" "--\n" "\n" @@ -429,7 +429,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_unstable_exc_prep_reraise_star__doc__, +TyDoc_STRVAR(_testcapi_unstable_exc_prep_reraise_star__doc__, "unstable_exc_prep_reraise_star($module, orig, excs, /)\n" "--\n" "\n" diff --git a/Modules/_testcapi/clinic/file.c.h b/Modules/_testcapi/clinic/file.c.h index 3340585..ada24b1 100644 --- a/Modules/_testcapi/clinic/file.c.h +++ b/Modules/_testcapi/clinic/file.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_testcapi_pyfile_newstdprinter__doc__, +TyDoc_STRVAR(_testcapi_pyfile_newstdprinter__doc__, "pyfile_newstdprinter($module, fd, /)\n" "--\n" "\n"); @@ -31,7 +31,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_py_fopen__doc__, +TyDoc_STRVAR(_testcapi_py_fopen__doc__, "py_fopen($module, path, mode, /)\n" "--\n" "\n" @@ -62,7 +62,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_py_universalnewlinefgets__doc__, +TyDoc_STRVAR(_testcapi_py_universalnewlinefgets__doc__, "py_universalnewlinefgets($module, file, size, /)\n" "--\n" "\n" diff --git a/Modules/_testcapi/clinic/float.c.h b/Modules/_testcapi/clinic/float.c.h index 8ce688b..1ef84ab 100644 --- a/Modules/_testcapi/clinic/float.c.h +++ b/Modules/_testcapi/clinic/float.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_testcapi_float_pack__doc__, +TyDoc_STRVAR(_testcapi_float_pack__doc__, "float_pack($module, size, d, le, /)\n" "--\n" "\n" @@ -51,7 +51,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_float_unpack__doc__, +TyDoc_STRVAR(_testcapi_float_unpack__doc__, "float_unpack($module, data, le, /)\n" "--\n" "\n" diff --git a/Modules/_testcapi/clinic/long.c.h b/Modules/_testcapi/clinic/long.c.h index 767c671..08ec739 100644 --- a/Modules/_testcapi/clinic/long.c.h +++ b/Modules/_testcapi/clinic/long.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_testcapi_call_long_compact_api__doc__, +TyDoc_STRVAR(_testcapi_call_long_compact_api__doc__, "call_long_compact_api($module, arg, /)\n" "--\n" "\n"); diff --git a/Modules/_testcapi/clinic/vectorcall.c.h b/Modules/_testcapi/clinic/vectorcall.c.h index 33d1763..7bff144 100644 --- a/Modules/_testcapi/clinic/vectorcall.c.h +++ b/Modules/_testcapi/clinic/vectorcall.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_testcapi_pyobject_fastcalldict__doc__, +TyDoc_STRVAR(_testcapi_pyobject_fastcalldict__doc__, "pyobject_fastcalldict($module, func, func_args, kwargs, /)\n" "--\n" "\n"); @@ -36,7 +36,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_pyobject_vectorcall__doc__, +TyDoc_STRVAR(_testcapi_pyobject_vectorcall__doc__, "pyobject_vectorcall($module, func, func_args, kwnames, /)\n" "--\n" "\n"); @@ -68,7 +68,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_pyvectorcall_call__doc__, +TyDoc_STRVAR(_testcapi_pyvectorcall_call__doc__, "pyvectorcall_call($module, func, argstuple, kwargs=, /)\n" "--\n" "\n"); @@ -104,7 +104,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_VectorCallClass_set_vectorcall__doc__, +TyDoc_STRVAR(_testcapi_VectorCallClass_set_vectorcall__doc__, "set_vectorcall($self, type, /)\n" "--\n" "\n" @@ -134,7 +134,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_make_vectorcall_class__doc__, +TyDoc_STRVAR(_testcapi_make_vectorcall_class__doc__, "make_vectorcall_class($module, base=, /)\n" "--\n" "\n" @@ -173,7 +173,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_has_vectorcall_flag__doc__, +TyDoc_STRVAR(_testcapi_has_vectorcall_flag__doc__, "has_vectorcall_flag($module, type, /)\n" "--\n" "\n" diff --git a/Modules/_testcapi/clinic/watchers.c.h b/Modules/_testcapi/clinic/watchers.c.h index a2ef42e..8010a63 100644 --- a/Modules/_testcapi/clinic/watchers.c.h +++ b/Modules/_testcapi/clinic/watchers.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_testcapi_watch_dict__doc__, +TyDoc_STRVAR(_testcapi_watch_dict__doc__, "watch_dict($module, watcher_id, dict, /)\n" "--\n" "\n"); @@ -36,7 +36,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_unwatch_dict__doc__, +TyDoc_STRVAR(_testcapi_unwatch_dict__doc__, "unwatch_dict($module, watcher_id, dict, /)\n" "--\n" "\n"); @@ -68,7 +68,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_watch_type__doc__, +TyDoc_STRVAR(_testcapi_watch_type__doc__, "watch_type($module, watcher_id, type, /)\n" "--\n" "\n"); @@ -100,7 +100,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_unwatch_type__doc__, +TyDoc_STRVAR(_testcapi_unwatch_type__doc__, "unwatch_type($module, watcher_id, type, /)\n" "--\n" "\n"); @@ -132,7 +132,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_set_func_defaults_via_capi__doc__, +TyDoc_STRVAR(_testcapi_set_func_defaults_via_capi__doc__, "set_func_defaults_via_capi($module, func, defaults, /)\n" "--\n" "\n"); @@ -162,7 +162,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_set_func_kwdefaults_via_capi__doc__, +TyDoc_STRVAR(_testcapi_set_func_kwdefaults_via_capi__doc__, "set_func_kwdefaults_via_capi($module, func, defaults, /)\n" "--\n" "\n"); diff --git a/Modules/_testcapi/code.c b/Modules/_testcapi/code.c index 3ea5982..9fa0534 100644 --- a/Modules/_testcapi/code.c +++ b/Modules/_testcapi/code.c @@ -2,7 +2,7 @@ #include "util.h" static Ty_ssize_t -get_code_extra_index(PyInterpreterState* interp) { +get_code_extra_index(TyInterpreterState* interp) { Ty_ssize_t result = -1; static const char *key = "_testcapi.frame_evaluation.code_index"; @@ -50,7 +50,7 @@ test_code_extra(TyObject* self, TyObject *Py_UNUSED(callable)) TyObject *test_func = NULL; // Get or initialize interpreter-specific code object storage index - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); if (!interp) { return NULL; } diff --git a/Modules/_testcapi/docstring.c b/Modules/_testcapi/docstring.c index af51248..798ebee 100644 --- a/Modules/_testcapi/docstring.c +++ b/Modules/_testcapi/docstring.c @@ -1,21 +1,21 @@ #include "parts.h" -PyDoc_STRVAR(docstring_empty, +TyDoc_STRVAR(docstring_empty, "" ); -PyDoc_STRVAR(docstring_no_signature, +TyDoc_STRVAR(docstring_no_signature, "This docstring has no signature." ); -PyDoc_STRVAR(docstring_with_invalid_signature, +TyDoc_STRVAR(docstring_with_invalid_signature, "docstring_with_invalid_signature($module, /, boo)\n" "\n" "This docstring has an invalid signature." ); -PyDoc_STRVAR(docstring_with_invalid_signature2, +TyDoc_STRVAR(docstring_with_invalid_signature2, "docstring_with_invalid_signature2($module, /, boo)\n" "\n" "--\n" @@ -23,20 +23,20 @@ PyDoc_STRVAR(docstring_with_invalid_signature2, "This docstring also has an invalid signature." ); -PyDoc_STRVAR(docstring_with_signature, +TyDoc_STRVAR(docstring_with_signature, "docstring_with_signature($module, /, sig)\n" "--\n" "\n" "This docstring has a valid signature." ); -PyDoc_STRVAR(docstring_with_signature_but_no_doc, +TyDoc_STRVAR(docstring_with_signature_but_no_doc, "docstring_with_signature_but_no_doc($module, /, sig)\n" "--\n" "\n" ); -PyDoc_STRVAR(docstring_with_signature_and_extra_newlines, +TyDoc_STRVAR(docstring_with_signature_and_extra_newlines, "docstring_with_signature_and_extra_newlines($module, /, parameter)\n" "--\n" "\n" @@ -44,7 +44,7 @@ PyDoc_STRVAR(docstring_with_signature_and_extra_newlines, "This docstring has a valid signature and some extra newlines." ); -PyDoc_STRVAR(docstring_with_signature_with_defaults, +TyDoc_STRVAR(docstring_with_signature_with_defaults, "docstring_with_signature_with_defaults(module, s='avocado',\n" " b=b'bytes', d=3.14, i=35, n=None, t=True, f=False,\n" " local=the_number_three, sys=sys.maxsize,\n" @@ -99,10 +99,10 @@ static TyMethodDef test_methods[] = { test_with_docstring, METH_VARARGS}, {"test_with_docstring", test_with_docstring, METH_VARARGS, - PyDoc_STR("This is a pretty normal docstring.")}, + TyDoc_STR("This is a pretty normal docstring.")}, {"func_with_unrepresentable_signature", test_with_docstring, METH_VARARGS, - PyDoc_STR( + TyDoc_STR( "func_with_unrepresentable_signature($module, /, a, b=)\n" "--\n\n" "This docstring has a signature with unrepresentable default." @@ -139,7 +139,7 @@ static TyMethodDef DocStringNoSignatureTest_methods[] = { }; static TyTypeObject DocStringNoSignatureTest = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testcapi.DocStringNoSignatureTest", .tp_basicsize = sizeof(TyObject), .tp_flags = Ty_TPFLAGS_DEFAULT, @@ -150,28 +150,28 @@ static TyTypeObject DocStringNoSignatureTest = { static TyMethodDef DocStringUnrepresentableSignatureTest_methods[] = { {"meth", test_with_docstring, METH_VARARGS, - PyDoc_STR( + TyDoc_STR( "meth($self, /, a, b=)\n" "--\n\n" "This docstring has a signature with unrepresentable default." )}, {"classmeth", test_with_docstring, METH_VARARGS|METH_CLASS, - PyDoc_STR( + TyDoc_STR( "classmeth($type, /, a, b=)\n" "--\n\n" "This docstring has a signature with unrepresentable default." )}, {"staticmeth", test_with_docstring, METH_VARARGS|METH_STATIC, - PyDoc_STR( + TyDoc_STR( "staticmeth(a, b=)\n" "--\n\n" "This docstring has a signature with unrepresentable default." )}, {"with_default", test_with_docstring, METH_VARARGS, - PyDoc_STR( + TyDoc_STR( "with_default($self, /, x=ONE)\n" "--\n\n" "This instance method has a default parameter value from the module scope." @@ -180,7 +180,7 @@ static TyMethodDef DocStringUnrepresentableSignatureTest_methods[] = { }; static TyTypeObject DocStringUnrepresentableSignatureTest = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testcapi.DocStringUnrepresentableSignatureTest", .tp_basicsize = sizeof(TyObject), .tp_flags = Ty_TPFLAGS_DEFAULT, diff --git a/Modules/_testcapi/exceptions.c b/Modules/_testcapi/exceptions.c index 7a6efa1..131c33d 100644 --- a/Modules/_testcapi/exceptions.c +++ b/Modules/_testcapi/exceptions.c @@ -535,9 +535,9 @@ recurse_infinitely_error_init(TyObject *self, TyObject *args, TyObject *kwds) static TyTypeObject PyRecursingInfinitelyError_Type = { .tp_name = "RecursingInfinitelyError", - .tp_basicsize = sizeof(PyBaseExceptionObject), + .tp_basicsize = sizeof(TyBaseExceptionObject), .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE, - .tp_doc = PyDoc_STR("Instantiating this exception starts infinite recursion."), + .tp_doc = TyDoc_STR("Instantiating this exception starts infinite recursion."), .tp_init = recurse_infinitely_error_init, }; diff --git a/Modules/_testcapi/heaptype.c b/Modules/_testcapi/heaptype.c index 050d4b2..1e63505 100644 --- a/Modules/_testcapi/heaptype.c +++ b/Modules/_testcapi/heaptype.c @@ -550,7 +550,7 @@ static TyMethodDef TestMethods[] = { }; -PyDoc_STRVAR(heapdocctype__doc__, +TyDoc_STRVAR(heapdocctype__doc__, "HeapDocCType(arg1, arg2)\n" "--\n" "\n" @@ -591,7 +591,7 @@ static TyType_Spec NullTpDocType_spec = { }; -PyDoc_STRVAR(heapgctype__doc__, +TyDoc_STRVAR(heapgctype__doc__, "A heap type with GC, and with overridden dealloc.\n\n" "The 'value' attribute is set to 10 in __init__."); @@ -647,7 +647,7 @@ static TyType_Spec HeapGcCType_spec = { HeapGcCType_slots }; -PyDoc_STRVAR(heapctype__doc__, +TyDoc_STRVAR(heapctype__doc__, "A heap type without GC, but with overridden dealloc.\n\n" "The 'value' attribute is set to 10 in __init__."); @@ -676,7 +676,7 @@ static TyType_Spec HeapCType_spec = { HeapCType_slots }; -PyDoc_STRVAR(heapctypesubclass__doc__, +TyDoc_STRVAR(heapctypesubclass__doc__, "Subclass of HeapCType, without GC.\n\n" "__init__ sets the 'value' attribute to 10 and 'value2' to 20."); @@ -717,7 +717,7 @@ static TyType_Spec HeapCTypeSubclass_spec = { HeapCTypeSubclass_slots }; -PyDoc_STRVAR(heapctypewithbuffer__doc__, +TyDoc_STRVAR(heapctypewithbuffer__doc__, "Heap type with buffer support.\n\n" "The buffer is set to [b'1', b'2', b'3', b'4']"); @@ -760,7 +760,7 @@ static TyType_Spec HeapCTypeWithBuffer_spec = { HeapCTypeWithBuffer_slots }; -PyDoc_STRVAR(heapctypesubclasswithfinalizer__doc__, +TyDoc_STRVAR(heapctypesubclasswithfinalizer__doc__, "Subclass of HeapCType with a finalizer that reassigns __class__.\n\n" "__class__ is set to plain HeapCTypeSubclass during finalization.\n" "__init__ sets the 'value' attribute to 10 and 'value2' to 20."); @@ -1063,7 +1063,7 @@ static TyType_Spec HeapCTypeWithWeakref2_spec = { HeapCTypeWithWeakref_slots }; -PyDoc_STRVAR(heapctypesetattr__doc__, +TyDoc_STRVAR(heapctypesetattr__doc__, "A heap type without GC, but with overridden __setattr__.\n\n" "The 'value' attribute is set to 10 in __init__ and updated via attribute setting."); @@ -1222,7 +1222,7 @@ static TyType_Spec HeapCTypeVectorcall_spec = { HeapCTypeVectorcall_slots }; -PyDoc_STRVAR(HeapCCollection_doc, +TyDoc_STRVAR(HeapCCollection_doc, "Tuple-like heap type that uses PyObject_GetItemData for items."); static TyObject* diff --git a/Modules/_testcapi/mem.c b/Modules/_testcapi/mem.c index 777a2b2..5e0adc3 100644 --- a/Modules/_testcapi/mem.c +++ b/Modules/_testcapi/mem.c @@ -591,8 +591,8 @@ tracemalloc_track_race_thread(void *data) PyTraceMalloc_Track(123, 10, 1); PyTraceMalloc_Untrack(123, 10); - PyThread_type_lock lock = (PyThread_type_lock)data; - PyThread_release_lock(lock); + TyThread_type_lock lock = (TyThread_type_lock)data; + TyThread_release_lock(lock); } // gh-128679: Test fix for tracemalloc.stop() race condition @@ -602,7 +602,7 @@ tracemalloc_track_race(TyObject *self, TyObject *args) #define NTHREAD 50 TyObject *tracemalloc = NULL; TyObject *stop = NULL; - PyThread_type_lock locks[NTHREAD]; + TyThread_type_lock locks[NTHREAD]; memset(locks, 0, sizeof(locks)); // Call tracemalloc.start() @@ -629,16 +629,16 @@ tracemalloc_track_race(TyObject *self, TyObject *args) // Start threads for (size_t i = 0; i < NTHREAD; i++) { - PyThread_type_lock lock = PyThread_allocate_lock(); + TyThread_type_lock lock = TyThread_allocate_lock(); if (!lock) { TyErr_NoMemory(); goto error; } locks[i] = lock; - PyThread_acquire_lock(lock, 1); + TyThread_acquire_lock(lock, 1); unsigned long thread; - thread = PyThread_start_new_thread(tracemalloc_track_race_thread, + thread = TyThread_start_new_thread(tracemalloc_track_race_thread, (void*)lock); if (thread == (unsigned long)-1) { TyErr_SetString(TyExc_RuntimeError, "can't start new thread"); @@ -657,16 +657,16 @@ tracemalloc_track_race(TyObject *self, TyObject *args) // Wait until threads complete with the GIL released Ty_BEGIN_ALLOW_THREADS for (size_t i = 0; i < NTHREAD; i++) { - PyThread_type_lock lock = locks[i]; - PyThread_acquire_lock(lock, 1); - PyThread_release_lock(lock); + TyThread_type_lock lock = locks[i]; + TyThread_acquire_lock(lock, 1); + TyThread_release_lock(lock); } Ty_END_ALLOW_THREADS // Free threads locks for (size_t i=0; i < NTHREAD; i++) { - PyThread_type_lock lock = locks[i]; - PyThread_free_lock(lock); + TyThread_type_lock lock = locks[i]; + TyThread_free_lock(lock); } Py_RETURN_NONE; @@ -674,9 +674,9 @@ error: Ty_CLEAR(tracemalloc); Ty_CLEAR(stop); for (size_t i=0; i < NTHREAD; i++) { - PyThread_type_lock lock = locks[i]; + TyThread_type_lock lock = locks[i]; if (lock) { - PyThread_free_lock(lock); + TyThread_free_lock(lock); } } return NULL; @@ -690,9 +690,9 @@ static TyMethodDef test_methods[] = { {"pymem_malloc_without_gil", pymem_malloc_without_gil, METH_NOARGS}, {"pyobject_malloc_without_gil", pyobject_malloc_without_gil, METH_NOARGS}, {"remove_mem_hooks", remove_mem_hooks, METH_NOARGS, - PyDoc_STR("Remove memory hooks.")}, + TyDoc_STR("Remove memory hooks.")}, {"set_nomemory", set_nomemory, METH_VARARGS, - PyDoc_STR("set_nomemory(start:int, stop:int = 0)")}, + TyDoc_STR("set_nomemory(start:int, stop:int = 0)")}, {"test_pymem_alloc0", test_pymem_alloc0, METH_NOARGS}, {"test_pymem_setallocators", test_pymem_setallocators, METH_NOARGS}, {"test_pymem_setrawallocators", test_pymem_setrawallocators, METH_NOARGS}, diff --git a/Modules/_testcapi/monitoring.c b/Modules/_testcapi/monitoring.c index ce24067..b5ed74b 100644 --- a/Modules/_testcapi/monitoring.c +++ b/Modules/_testcapi/monitoring.c @@ -97,9 +97,9 @@ end: } static TyTypeObject PyCodeLike_Type = { - .ob_base = PyVarObject_HEAD_INIT(NULL, 0) + .ob_base = TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "monitoring.CodeLike", - .tp_doc = PyDoc_STR("CodeLike objects"), + .tp_doc = TyDoc_STR("CodeLike objects"), .tp_basicsize = sizeof(PyCodeLikeObject), .tp_itemsize = 0, .tp_flags = Ty_TPFLAGS_DEFAULT, diff --git a/Modules/_testcapi/object.c b/Modules/_testcapi/object.c index 9810384..0762467 100644 --- a/Modules/_testcapi/object.c +++ b/Modules/_testcapi/object.c @@ -153,7 +153,7 @@ MyObject_dealloc(TyObject *op) } static TyTypeObject MyType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "MyType", .tp_basicsize = sizeof(TyObject), .tp_dealloc = MyObject_dealloc, diff --git a/Modules/_testcapi/structmember.c b/Modules/_testcapi/structmember.c index 5f9cbdd..1ee971e 100644 --- a/Modules/_testcapi/structmember.c +++ b/Modules/_testcapi/structmember.c @@ -148,7 +148,7 @@ test_structmembers_free(TyObject *ob) /* Designated initializers would work too, but this does test the *old* API */ static TyTypeObject test_structmembersType_OldAPI= { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "test_structmembersType_OldAPI", sizeof(test_structmembers), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Modules/_testcapi/time.c b/Modules/_testcapi/time.c index 524b381..0998859 100644 --- a/Modules/_testcapi/time.c +++ b/Modules/_testcapi/time.c @@ -2,7 +2,7 @@ static int -pytime_from_nanoseconds(PyTime_t *tp, TyObject *obj) +pytime_from_nanoseconds(TyTime_t *tp, TyObject *obj) { if (!TyLong_Check(obj)) { TyErr_Format(TyExc_TypeError, "expect int, got %s", @@ -15,8 +15,8 @@ pytime_from_nanoseconds(PyTime_t *tp, TyObject *obj) return -1; } - Ty_BUILD_ASSERT(sizeof(long long) == sizeof(PyTime_t)); - *tp = (PyTime_t)nsec; + Ty_BUILD_ASSERT(sizeof(long long) == sizeof(TyTime_t)); + *tp = (TyTime_t)nsec; return 0; } @@ -28,7 +28,7 @@ test_pytime_assecondsdouble(TyObject *Py_UNUSED(self), TyObject *args) if (!TyArg_ParseTuple(args, "O", &obj)) { return NULL; } - PyTime_t ts; + TyTime_t ts; if (pytime_from_nanoseconds(&ts, obj) < 0) { return NULL; } @@ -38,7 +38,7 @@ test_pytime_assecondsdouble(TyObject *Py_UNUSED(self), TyObject *args) static TyObject* -pytime_as_float(PyTime_t t) +pytime_as_float(TyTime_t t) { return TyFloat_FromDouble(PyTime_AsSecondsDouble(t)); } @@ -48,7 +48,7 @@ pytime_as_float(PyTime_t t) static TyObject* test_pytime_monotonic(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyTime_t t; + TyTime_t t; int res = PyTime_Monotonic(&t); if (res < 0) { assert(t == 0); @@ -62,7 +62,7 @@ test_pytime_monotonic(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) static TyObject* test_pytime_monotonic_raw(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyTime_t t; + TyTime_t t; int res; Ty_BEGIN_ALLOW_THREADS res = PyTime_MonotonicRaw(&t); @@ -80,7 +80,7 @@ test_pytime_monotonic_raw(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) static TyObject* test_pytime_perf_counter(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyTime_t t; + TyTime_t t; int res = PyTime_PerfCounter(&t); if (res < 0) { assert(t == 0); @@ -94,7 +94,7 @@ test_pytime_perf_counter(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) static TyObject* test_pytime_perf_counter_raw(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyTime_t t; + TyTime_t t; int res; Ty_BEGIN_ALLOW_THREADS res = PyTime_PerfCounterRaw(&t); @@ -112,7 +112,7 @@ test_pytime_perf_counter_raw(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args static TyObject* test_pytime_time(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyTime_t t; + TyTime_t t; int res = PyTime_Time(&t); if (res < 0) { assert(t == 0); @@ -126,7 +126,7 @@ test_pytime_time(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) static TyObject* test_pytime_time_raw(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyTime_t t; + TyTime_t t; int res; Ty_BEGIN_ALLOW_THREADS res = PyTime_TimeRaw(&t); @@ -158,7 +158,7 @@ _PyTestCapi_Init_Time(TyObject *m) if (TyModule_AddFunctions(m, test_methods) < 0) { return -1; } - Ty_BUILD_ASSERT(sizeof(long long) == sizeof(PyTime_t)); + Ty_BUILD_ASSERT(sizeof(long long) == sizeof(TyTime_t)); if (TyModule_AddObject(m, "PyTime_MIN", TyLong_FromLongLong(PyTime_MIN)) < 0) { return 1; } diff --git a/Modules/_testcapi/type.c b/Modules/_testcapi/type.c index 5ff4d8a..a826525 100644 --- a/Modules/_testcapi/type.c +++ b/Modules/_testcapi/type.c @@ -235,9 +235,9 @@ static TyMethodDef test_methods[] = { {"get_type_module_name", get_type_module_name, METH_O}, {"test_get_type_dict", test_get_type_dict, METH_NOARGS}, {"test_get_statictype_slots", test_get_statictype_slots, METH_NOARGS}, - {"type_get_version", type_get_version, METH_O, PyDoc_STR("type->tp_version_tag")}, - {"type_modified", type_modified, METH_O, PyDoc_STR("TyType_Modified")}, - {"type_assign_version", type_assign_version, METH_O, PyDoc_STR("PyUnstable_Type_AssignVersionTag")}, + {"type_get_version", type_get_version, METH_O, TyDoc_STR("type->tp_version_tag")}, + {"type_modified", type_modified, METH_O, TyDoc_STR("TyType_Modified")}, + {"type_assign_version", type_assign_version, METH_O, TyDoc_STR("PyUnstable_Type_AssignVersionTag")}, {"type_get_tp_bases", type_get_tp_bases, METH_O}, {"type_get_tp_mro", type_get_tp_mro, METH_O}, {"type_freeze", type_freeze, METH_O}, diff --git a/Modules/_testcapi/vectorcall.c b/Modules/_testcapi/vectorcall.c index 03451a0..41514c7 100644 --- a/Modules/_testcapi/vectorcall.c +++ b/Modules/_testcapi/vectorcall.c @@ -314,7 +314,7 @@ call_return_args(TyObject *self, TyObject *args, TyObject *kwargs) } static TyTypeObject MethodDescriptorBase_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MethodDescriptorBase", sizeof(MethodDescriptorObject), .tp_new = MethodDescriptor_new, @@ -326,13 +326,13 @@ static TyTypeObject MethodDescriptorBase_Type = { }; static TyTypeObject MethodDescriptorDerived_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MethodDescriptorDerived", .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE, }; static TyTypeObject MethodDescriptorNopGet_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MethodDescriptorNopGet", .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE, .tp_call = call_return_args, @@ -357,7 +357,7 @@ MethodDescriptor2_new(TyTypeObject* type, TyObject* args, TyObject *kw) } static TyTypeObject MethodDescriptor2_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MethodDescriptor2", sizeof(MethodDescriptor2Object), .tp_new = MethodDescriptor2_new, diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index c7049cb..93bdac5 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -173,7 +173,7 @@ test_sizeof_c_types(TyObject *self, TyObject *Py_UNUSED(ignored)) * TyType_Ready if it hasn't already been called */ static TyTypeObject _HashInheritanceTester_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "hashinheritancetester", /* Name of this type */ sizeof(TyObject), /* Basic object size */ 0, /* Item size for varobject */ @@ -480,7 +480,7 @@ set_errno(TyObject *self, TyObject *args) * synchronization caused rare segfaults, so rare that they were seen only * on a Mac buildbot (although they were possible on any box). */ -static PyThread_type_lock thread_done = NULL; +static TyThread_type_lock thread_done = NULL; static int _make_call(void *callable) @@ -502,7 +502,7 @@ static void _make_call_from_thread(void *callable) { _make_call(callable); - PyThread_release_lock(thread_done); + TyThread_release_lock(thread_done); } static TyObject * @@ -520,19 +520,19 @@ test_thread_state(TyObject *self, TyObject *args) return NULL; } - thread_done = PyThread_allocate_lock(); + thread_done = TyThread_allocate_lock(); if (thread_done == NULL) return TyErr_NoMemory(); - PyThread_acquire_lock(thread_done, 1); + TyThread_acquire_lock(thread_done, 1); /* Start a new thread with our callback. */ - PyThread_start_new_thread(_make_call_from_thread, fn); + TyThread_start_new_thread(_make_call_from_thread, fn); /* Make the callback with the thread lock held by this thread */ success &= _make_call(fn); /* Do it all again, but this time with the thread-lock released */ Ty_BEGIN_ALLOW_THREADS success &= _make_call(fn); - PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */ + TyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */ Ty_END_ALLOW_THREADS /* And once more with and without a thread @@ -540,15 +540,15 @@ test_thread_state(TyObject *self, TyObject *args) to test */ Ty_BEGIN_ALLOW_THREADS - PyThread_start_new_thread(_make_call_from_thread, fn); + TyThread_start_new_thread(_make_call_from_thread, fn); success &= _make_call(fn); - PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */ + TyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */ Ty_END_ALLOW_THREADS /* Release lock we acquired above. This is required on HP-UX. */ - PyThread_release_lock(thread_done); + TyThread_release_lock(thread_done); - PyThread_free_lock(thread_done); + TyThread_free_lock(thread_done); if (!success) return NULL; Py_RETURN_NONE; @@ -563,12 +563,12 @@ gilstate_ensure_release(TyObject *module, TyObject *Py_UNUSED(ignored)) } #ifndef MS_WINDOWS -static PyThread_type_lock wait_done = NULL; +static TyThread_type_lock wait_done = NULL; static void wait_for_lock(void *unused) { - PyThread_acquire_lock(wait_done, 1); - PyThread_release_lock(wait_done); - PyThread_free_lock(wait_done); + TyThread_acquire_lock(wait_done, 1); + TyThread_release_lock(wait_done); + TyThread_free_lock(wait_done); wait_done = NULL; } @@ -582,11 +582,11 @@ spawn_pthread_waiter(TyObject *self, TyObject *Py_UNUSED(ignored)) TyErr_SetString(TyExc_RuntimeError, "thread already running"); return NULL; } - wait_done = PyThread_allocate_lock(); + wait_done = TyThread_allocate_lock(); if (wait_done == NULL) return TyErr_NoMemory(); - PyThread_acquire_lock(wait_done, 1); - PyThread_start_new_thread(wait_for_lock, NULL); + TyThread_acquire_lock(wait_done, 1); + TyThread_start_new_thread(wait_for_lock, NULL); Py_RETURN_NONE; } @@ -597,7 +597,7 @@ end_spawned_pthread(TyObject *self, TyObject *Py_UNUSED(ignored)) TyErr_SetString(TyExc_RuntimeError, "call _spawn_pthread_waiter 1st"); return NULL; } - PyThread_release_lock(wait_done); + TyThread_release_lock(wait_done); Py_RETURN_NONE; } #endif // not MS_WINDOWS @@ -1248,19 +1248,19 @@ static TyObject * test_structseq_newtype_doesnt_leak(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyStructSequence_Desc descr; - PyStructSequence_Field descr_fields[3]; + TyStructSequence_Desc descr; + TyStructSequence_Field descr_fields[3]; - descr_fields[0] = (PyStructSequence_Field){"foo", "foo value"}; - descr_fields[1] = (PyStructSequence_Field){NULL, "some hidden value"}; - descr_fields[2] = (PyStructSequence_Field){0, NULL}; + descr_fields[0] = (TyStructSequence_Field){"foo", "foo value"}; + descr_fields[1] = (TyStructSequence_Field){NULL, "some hidden value"}; + descr_fields[2] = (TyStructSequence_Field){0, NULL}; descr.name = "_testcapi.test_descr"; descr.doc = "This is used to test for memory leaks in NewType"; descr.fields = descr_fields; descr.n_in_sequence = 1; - TyTypeObject* structseq_type = PyStructSequence_NewType(&descr); + TyTypeObject* structseq_type = TyStructSequence_NewType(&descr); if (structseq_type == NULL) { return NULL; } @@ -1275,13 +1275,13 @@ static TyObject * test_structseq_newtype_null_descr_doc(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(args)) { - PyStructSequence_Field descr_fields[1] = { - (PyStructSequence_Field){NULL, NULL} + TyStructSequence_Field descr_fields[1] = { + (TyStructSequence_Field){NULL, NULL} }; // Test specifically for NULL .doc field. - PyStructSequence_Desc descr = {"_testcapi.test_descr", NULL, &descr_fields[0], 0}; + TyStructSequence_Desc descr = {"_testcapi.test_descr", NULL, &descr_fields[0], 0}; - TyTypeObject* structseq_type = PyStructSequence_NewType(&descr); + TyTypeObject* structseq_type = TyStructSequence_NewType(&descr); assert(structseq_type != NULL); assert(TyType_Check(structseq_type)); assert(TyType_FastSubclass(structseq_type, Ty_TPFLAGS_TUPLE_SUBCLASS)); @@ -1291,8 +1291,8 @@ test_structseq_newtype_null_descr_doc(TyObject *Py_UNUSED(self), } typedef struct { - PyThread_type_lock start_event; - PyThread_type_lock exit_event; + TyThread_type_lock start_event; + TyThread_type_lock exit_event; TyObject *callback; } test_c_thread_t; @@ -1303,7 +1303,7 @@ temporary_c_thread(void *data) TyGILState_STATE state; TyObject *res; - PyThread_release_lock(test_c_thread->start_event); + TyThread_release_lock(test_c_thread->start_event); /* Allocate a Python thread state for this thread */ state = TyGILState_Ensure(); @@ -1321,7 +1321,7 @@ temporary_c_thread(void *data) /* Destroy the Python thread state for this thread */ TyGILState_Release(state); - PyThread_release_lock(test_c_thread->exit_event); + TyThread_release_lock(test_c_thread->exit_event); } static test_c_thread_t test_c_thread; @@ -1338,8 +1338,8 @@ call_in_temporary_c_thread(TyObject *self, TyObject *args) return NULL; } - test_c_thread.start_event = PyThread_allocate_lock(); - test_c_thread.exit_event = PyThread_allocate_lock(); + test_c_thread.start_event = TyThread_allocate_lock(); + test_c_thread.exit_event = TyThread_allocate_lock(); test_c_thread.callback = NULL; if (!test_c_thread.start_event || !test_c_thread.exit_event) { TyErr_SetString(TyExc_RuntimeError, "could not allocate lock"); @@ -1348,27 +1348,27 @@ call_in_temporary_c_thread(TyObject *self, TyObject *args) test_c_thread.callback = Ty_NewRef(callback); - PyThread_acquire_lock(test_c_thread.start_event, 1); - PyThread_acquire_lock(test_c_thread.exit_event, 1); + TyThread_acquire_lock(test_c_thread.start_event, 1); + TyThread_acquire_lock(test_c_thread.exit_event, 1); - thread = PyThread_start_new_thread(temporary_c_thread, &test_c_thread); + thread = TyThread_start_new_thread(temporary_c_thread, &test_c_thread); if (thread == -1) { TyErr_SetString(TyExc_RuntimeError, "unable to start the thread"); - PyThread_release_lock(test_c_thread.start_event); - PyThread_release_lock(test_c_thread.exit_event); + TyThread_release_lock(test_c_thread.start_event); + TyThread_release_lock(test_c_thread.exit_event); goto exit; } - PyThread_acquire_lock(test_c_thread.start_event, 1); - PyThread_release_lock(test_c_thread.start_event); + TyThread_acquire_lock(test_c_thread.start_event, 1); + TyThread_release_lock(test_c_thread.start_event); if (!wait) { Py_RETURN_NONE; } Ty_BEGIN_ALLOW_THREADS - PyThread_acquire_lock(test_c_thread.exit_event, 1); - PyThread_release_lock(test_c_thread.exit_event); + TyThread_acquire_lock(test_c_thread.exit_event, 1); + TyThread_release_lock(test_c_thread.exit_event); Ty_END_ALLOW_THREADS res = Ty_NewRef(Ty_None); @@ -1376,11 +1376,11 @@ call_in_temporary_c_thread(TyObject *self, TyObject *args) exit: Ty_CLEAR(test_c_thread.callback); if (test_c_thread.start_event) { - PyThread_free_lock(test_c_thread.start_event); + TyThread_free_lock(test_c_thread.start_event); test_c_thread.start_event = NULL; } if (test_c_thread.exit_event) { - PyThread_free_lock(test_c_thread.exit_event); + TyThread_free_lock(test_c_thread.exit_event); test_c_thread.exit_event = NULL; } return res; @@ -1390,13 +1390,13 @@ static TyObject * join_temporary_c_thread(TyObject *self, TyObject *Py_UNUSED(ignored)) { Ty_BEGIN_ALLOW_THREADS - PyThread_acquire_lock(test_c_thread.exit_event, 1); - PyThread_release_lock(test_c_thread.exit_event); + TyThread_acquire_lock(test_c_thread.exit_event, 1); + TyThread_release_lock(test_c_thread.exit_event); Ty_END_ALLOW_THREADS Ty_CLEAR(test_c_thread.callback); - PyThread_free_lock(test_c_thread.start_event); + TyThread_free_lock(test_c_thread.start_event); test_c_thread.start_event = NULL; - PyThread_free_lock(test_c_thread.exit_event); + TyThread_free_lock(test_c_thread.exit_event); test_c_thread.exit_event = NULL; Py_RETURN_NONE; } @@ -1630,56 +1630,56 @@ static TyObject * test_pythread_tss_key_state(TyObject *self, TyObject *args) { Ty_tss_t tss_key = Ty_tss_NEEDS_INIT; - if (PyThread_tss_is_created(&tss_key)) { + if (TyThread_tss_is_created(&tss_key)) { return raiseTestError(self, "test_pythread_tss_key_state", "TSS key not in an uninitialized state at " "creation time"); } - if (PyThread_tss_create(&tss_key) != 0) { - TyErr_SetString(TyExc_RuntimeError, "PyThread_tss_create failed"); + if (TyThread_tss_create(&tss_key) != 0) { + TyErr_SetString(TyExc_RuntimeError, "TyThread_tss_create failed"); return NULL; } - if (!PyThread_tss_is_created(&tss_key)) { + if (!TyThread_tss_is_created(&tss_key)) { return raiseTestError(self, "test_pythread_tss_key_state", - "PyThread_tss_create succeeded, " + "TyThread_tss_create succeeded, " "but with TSS key in an uninitialized state"); } - if (PyThread_tss_create(&tss_key) != 0) { + if (TyThread_tss_create(&tss_key) != 0) { return raiseTestError(self, "test_pythread_tss_key_state", - "PyThread_tss_create unsuccessful with " + "TyThread_tss_create unsuccessful with " "an already initialized key"); } #define CHECK_TSS_API(expr) \ do { \ (void)(expr); \ - if (!PyThread_tss_is_created(&tss_key)) { \ + if (!TyThread_tss_is_created(&tss_key)) { \ return raiseTestError(self, "test_pythread_tss_key_state", \ "TSS key initialization state was not " \ "preserved after calling " #expr); \ } \ } while (0) - CHECK_TSS_API(PyThread_tss_set(&tss_key, NULL)); - CHECK_TSS_API(PyThread_tss_get(&tss_key)); + CHECK_TSS_API(TyThread_tss_set(&tss_key, NULL)); + CHECK_TSS_API(TyThread_tss_get(&tss_key)); #undef CHECK_TSS_API - PyThread_tss_delete(&tss_key); - if (PyThread_tss_is_created(&tss_key)) { + TyThread_tss_delete(&tss_key); + if (TyThread_tss_is_created(&tss_key)) { return raiseTestError(self, "test_pythread_tss_key_state", - "PyThread_tss_delete called, but did not " + "TyThread_tss_delete called, but did not " "set the key state to uninitialized"); } - Ty_tss_t *ptr_key = PyThread_tss_alloc(); + Ty_tss_t *ptr_key = TyThread_tss_alloc(); if (ptr_key == NULL) { - TyErr_SetString(TyExc_RuntimeError, "PyThread_tss_alloc failed"); + TyErr_SetString(TyExc_RuntimeError, "TyThread_tss_alloc failed"); return NULL; } - if (PyThread_tss_is_created(ptr_key)) { + if (TyThread_tss_is_created(ptr_key)) { return raiseTestError(self, "test_pythread_tss_key_state", "TSS key not in an uninitialized state at " "allocation time"); } - PyThread_tss_free(ptr_key); + TyThread_tss_free(ptr_key); ptr_key = NULL; Py_RETURN_NONE; } @@ -1815,7 +1815,7 @@ pynumber_tobase(TyObject *module, TyObject *args) static TyTypeObject BasicStaticTypes[NUM_BASIC_STATIC_TYPES] = { #define INIT_BASIC_STATIC_TYPE \ { \ - PyVarObject_HEAD_INIT(NULL, 0) \ + TyVarObject_HEAD_INIT(NULL, 0) \ .tp_name = "BasicStaticType", \ .tp_basicsize = sizeof(TyObject), \ } @@ -1885,7 +1885,7 @@ test_tstate_capi(TyObject *self, TyObject *Py_UNUSED(args)) // dict is a borrowed reference // TyThreadState_GetInterpreter() - PyInterpreterState *interp = TyThreadState_GetInterpreter(tstate); + TyInterpreterState *interp = TyThreadState_GetInterpreter(tstate); assert(interp != NULL); // TyThreadState_GetFrame() @@ -2455,7 +2455,7 @@ finalize_thread_hang(TyObject *self, TyObject *callback) struct atexit_data { int called; TyThreadState *tstate; - PyInterpreterState *interp; + TyInterpreterState *interp; }; static void @@ -2592,7 +2592,7 @@ static TyMethodDef TestMethods[] = { {"run_in_subinterp", run_in_subinterp, METH_VARARGS}, {"create_cfunction", create_cfunction, METH_NOARGS}, {"call_in_temporary_c_thread", call_in_temporary_c_thread, METH_VARARGS, - PyDoc_STR("set_error_class(error_class) -> None")}, + TyDoc_STR("set_error_class(error_class) -> None")}, {"join_temporary_c_thread", join_temporary_c_thread, METH_NOARGS}, {"pymarshal_write_long_to_file", pymarshal_write_long_to_file, METH_VARARGS}, @@ -2706,7 +2706,7 @@ static PyNumberMethods matmulType_as_number = { }; static TyTypeObject matmulType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "matmulType", sizeof(matmulObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2762,7 +2762,7 @@ static PyNumberMethods ipowType_as_number = { }; static TyTypeObject ipowType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "ipowType", .tp_basicsize = sizeof(ipowObject), .tp_as_number = &ipowType_as_number, @@ -2821,7 +2821,7 @@ static PyAsyncMethods awaitType_as_async = { static TyTypeObject awaitType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "awaitType", sizeof(awaitObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2893,7 +2893,7 @@ MyList_dealloc(TyObject *self) } static TyTypeObject MyList_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MyList", sizeof(MyListObject), 0, @@ -2961,7 +2961,7 @@ static TyMethodDef generic_alias_methods[] = { }; static TyTypeObject GenericAlias_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "GenericAlias", sizeof(PyGenericAliasObject), 0, @@ -2997,7 +2997,7 @@ static TyMethodDef generic_methods[] = { }; static TyTypeObject Generic_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "Generic", sizeof(PyGenericObject), 0, @@ -3017,13 +3017,13 @@ static TyMethodDef meth_instance_methods[] = { static TyTypeObject MethInstance_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MethInstance", sizeof(TyObject), .tp_new = TyType_GenericNew, .tp_flags = Ty_TPFLAGS_DEFAULT, .tp_methods = meth_instance_methods, - .tp_doc = (char*)PyDoc_STR( + .tp_doc = (char*)TyDoc_STR( "Class with normal (instance) methods to test calling conventions"), }; @@ -3039,13 +3039,13 @@ static TyMethodDef meth_class_methods[] = { static TyTypeObject MethClass_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MethClass", sizeof(TyObject), .tp_new = TyType_GenericNew, .tp_flags = Ty_TPFLAGS_DEFAULT, .tp_methods = meth_class_methods, - .tp_doc = PyDoc_STR( + .tp_doc = TyDoc_STR( "Class with class methods to test calling conventions"), }; @@ -3061,13 +3061,13 @@ static TyMethodDef meth_static_methods[] = { static TyTypeObject MethStatic_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MethStatic", sizeof(TyObject), .tp_new = TyType_GenericNew, .tp_flags = Ty_TPFLAGS_DEFAULT, .tp_methods = meth_static_methods, - .tp_doc = PyDoc_STR( + .tp_doc = TyDoc_STR( "Class with static methods to test calling conventions"), }; @@ -3105,12 +3105,12 @@ ContainerNoGC_dealloc(TyObject *op) static TyMemberDef ContainerNoGC_members[] = { {"value", _Ty_T_OBJECT, offsetof(ContainerNoGCobject, value), Py_READONLY, - PyDoc_STR("a container value for test purposes")}, + TyDoc_STR("a container value for test purposes")}, {0} }; static TyTypeObject ContainerNoGC_type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "_testcapi.ContainerNoGC", sizeof(ContainerNoGCobject), .tp_dealloc = ContainerNoGC_dealloc, diff --git a/Modules/_testclinic.c b/Modules/_testclinic.c index cc0edde..8c131b5 100644 --- a/Modules/_testclinic.c +++ b/Modules/_testclinic.c @@ -1700,7 +1700,7 @@ static struct TyMethodDef test_class_methods[] = { }; static TyTypeObject TestClass = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testclinic.TestClass", .tp_basicsize = sizeof(TyObject), .tp_flags = Ty_TPFLAGS_DEFAULT, @@ -1763,7 +1763,7 @@ static struct TyMethodDef depr_star_new_methods[] = { }; static TyTypeObject DeprStarNew = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testclinic.DeprStarNew", .tp_basicsize = sizeof(TyObject), .tp_new = depr_star_new, @@ -1804,7 +1804,7 @@ static struct TyMethodDef depr_star_init_methods[] = { }; static TyTypeObject DeprStarInit = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testclinic.DeprStarInit", .tp_basicsize = sizeof(TyObject), .tp_new = TyType_GenericNew, @@ -1835,7 +1835,7 @@ depr_star_init_noinline_impl(TyObject *self, TyObject *a, TyObject *b, } static TyTypeObject DeprStarInitNoInline = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testclinic.DeprStarInitNoInline", .tp_basicsize = sizeof(TyObject), .tp_new = TyType_GenericNew, @@ -1861,7 +1861,7 @@ depr_kwd_new_impl(TyTypeObject *type, TyObject *a) } static TyTypeObject DeprKwdNew = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testclinic.DeprKwdNew", .tp_basicsize = sizeof(TyObject), .tp_new = depr_kwd_new, @@ -1885,7 +1885,7 @@ depr_kwd_init_impl(TyObject *self, TyObject *a) } static TyTypeObject DeprKwdInit = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testclinic.DeprKwdInit", .tp_basicsize = sizeof(TyObject), .tp_new = TyType_GenericNew, @@ -1915,7 +1915,7 @@ depr_kwd_init_noinline_impl(TyObject *self, TyObject *a, TyObject *b, } static TyTypeObject DeprKwdInitNoInline = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "_testclinic.DeprKwdInitNoInline", .tp_basicsize = sizeof(TyObject), .tp_new = TyType_GenericNew, diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index 15d36a2..ac2319c 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -21,7 +21,7 @@ #include "pycore_fileutils.h" // _Ty_normpath() #include "pycore_flowgraph.h" // _PyCompile_OptimizeCfg() #include "pycore_frame.h" // _PyInterpreterFrame -#include "pycore_function.h" // _PyFunction_GET_BUILTINS +#include "pycore_function.h" // _TyFunction_GET_BUILTINS #include "pycore_gc.h" // TyGC_Head #include "pycore_hashtable.h" // _Ty_hashtable_new() #include "pycore_import.h" // _TyImport_ClearExtension() @@ -826,7 +826,7 @@ get_interp_settings(TyObject *self, TyObject *args) return NULL; } - PyInterpreterState *interp = NULL; + TyInterpreterState *interp = NULL; if (interpid < 0) { TyThreadState *tstate = _TyThreadState_GET(); interp = tstate ? tstate->interp : _TyInterpreterState_Main(); @@ -1023,7 +1023,7 @@ get_code_var_counts(TyObject *self, TyObject *_args, TyObject *_kwargs) globalsns = TyFunction_GET_GLOBALS(codearg); } if (builtinsns == NULL) { - builtinsns = _PyFunction_GET_BUILTINS(codearg); + builtinsns = _TyFunction_GET_BUILTINS(codearg); } codearg = TyFunction_GET_CODE(codearg); } @@ -1191,7 +1191,7 @@ verify_stateless_code(TyObject *self, TyObject *args, TyObject *kwargs) globalsns = TyFunction_GET_GLOBALS(codearg); } if (builtinsns == NULL) { - builtinsns = _PyFunction_GET_BUILTINS(codearg); + builtinsns = _TyFunction_GET_BUILTINS(codearg); } codearg = TyFunction_GET_CODE(codearg); } @@ -1227,7 +1227,7 @@ add_executor_dependency(TyObject *self, TyObject *args) static TyObject * invalidate_executors(TyObject *self, TyObject *obj) { - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); _Ty_Executors_InvalidateDependency(interp, obj, 1); Py_RETURN_NONE; } @@ -1262,7 +1262,7 @@ pending_threadfunc(TyObject *self, TyObject *args, TyObject *kwargs) { return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* create the reference for the callbackwhile we hold the lock */ for (unsigned int i = 0; i < num; i++) { @@ -1311,11 +1311,11 @@ static struct { static int _pending_identify_callback(void *arg) { - PyThread_type_lock mutex = (PyThread_type_lock)arg; + TyThread_type_lock mutex = (TyThread_type_lock)arg; assert(pending_identify_result.interpid == -1); TyThreadState *tstate = TyThreadState_Get(); pending_identify_result.interpid = TyInterpreterState_GetID(tstate->interp); - PyThread_release_lock(mutex); + TyThread_release_lock(mutex); return 0; } @@ -1326,7 +1326,7 @@ pending_identify(TyObject *self, TyObject *args) if (!TyArg_ParseTuple(args, "O:pending_identify", &interpid)) { return NULL; } - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(interpid); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(interpid); if (interp == NULL) { if (!TyErr_Occurred()) { TyErr_SetString(TyExc_ValueError, "interpreter not found"); @@ -1336,11 +1336,11 @@ pending_identify(TyObject *self, TyObject *args) pending_identify_result.interpid = -1; - PyThread_type_lock mutex = PyThread_allocate_lock(); + TyThread_type_lock mutex = TyThread_allocate_lock(); if (mutex == NULL) { return NULL; } - PyThread_acquire_lock(mutex, WAIT_LOCK); + TyThread_acquire_lock(mutex, WAIT_LOCK); /* It gets released in _pending_identify_callback(). */ _Ty_add_pending_call_result r; @@ -1355,9 +1355,9 @@ pending_identify(TyObject *self, TyObject *args) } while (r == _Ty_ADD_PENDING_FULL); /* Wait for the pending call to complete. */ - PyThread_acquire_lock(mutex, WAIT_LOCK); - PyThread_release_lock(mutex); - PyThread_free_lock(mutex); + TyThread_acquire_lock(mutex, WAIT_LOCK); + TyThread_release_lock(mutex); + TyThread_free_lock(mutex); TyObject *res = TyLong_FromLongLong(pending_identify_result.interpid); pending_identify_result.interpid = -1; @@ -1581,14 +1581,14 @@ _init_interp_config_from_object(PyInterpreterConfig *config, TyObject *obj) return 0; } -static PyInterpreterState * +static TyInterpreterState * _new_interpreter(PyInterpreterConfig *config, long whence) { if (whence == _TyInterpreterState_WHENCE_XI) { return _PyXI_NewInterpreter(config, &whence, NULL, NULL); } TyObject *exc = NULL; - PyInterpreterState *interp = NULL; + TyInterpreterState *interp = NULL; if (whence == _TyInterpreterState_WHENCE_UNKNOWN) { assert(config == NULL); interp = TyInterpreterState_New(); @@ -1674,7 +1674,7 @@ create_interpreter(TyObject *self, TyObject *args, TyObject *kwargs) } // Create the interpreter. - PyInterpreterState *interp = _new_interpreter(config, whence); + TyInterpreterState *interp = _new_interpreter(config, whence); if (interp == NULL) { return NULL; } @@ -1704,7 +1704,7 @@ destroy_interpreter(TyObject *self, TyObject *args, TyObject *kwargs) return NULL; } - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); if (interp == NULL) { return NULL; } @@ -1749,7 +1749,7 @@ exec_interpreter(TyObject *self, TyObject *args, TyObject *kwargs) return NULL; } - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); if (interp == NULL) { return NULL; } @@ -1821,7 +1821,7 @@ run_in_subinterp_with_config(TyObject *self, TyObject *args, TyObject *kwargs) TyThreadState *tstate; /* Create an interpreter, staying switched to it. */ - PyInterpreterState *interp = \ + TyInterpreterState *interp = \ _PyXI_NewInterpreter(&config, NULL, &tstate, &save_tstate); if (interp == NULL) { return NULL; @@ -1892,7 +1892,7 @@ unused_interpreter_id(TyObject *self, TyObject *Py_UNUSED(ignored)) static TyObject * interpreter_exists(TyObject *self, TyObject *idobj) { - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); if (interp == NULL) { if (TyErr_ExceptionMatches(TyExc_InterpreterNotFoundError)) { TyErr_Clear(); @@ -1907,7 +1907,7 @@ interpreter_exists(TyObject *self, TyObject *idobj) static TyObject * get_interpreter_refcount(TyObject *self, TyObject *idobj) { - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); if (interp == NULL) { return NULL; } @@ -1917,7 +1917,7 @@ get_interpreter_refcount(TyObject *self, TyObject *idobj) static TyObject * link_interpreter_refcount(TyObject *self, TyObject *idobj) { - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); if (interp == NULL) { assert(TyErr_Occurred()); return NULL; @@ -1929,7 +1929,7 @@ link_interpreter_refcount(TyObject *self, TyObject *idobj) static TyObject * unlink_interpreter_refcount(TyObject *self, TyObject *idobj) { - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); if (interp == NULL) { assert(TyErr_Occurred()); return NULL; @@ -1941,7 +1941,7 @@ unlink_interpreter_refcount(TyObject *self, TyObject *idobj) static TyObject * interpreter_refcount_linked(TyObject *self, TyObject *idobj) { - PyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); + TyInterpreterState *interp = _TyInterpreterState_LookUpIDObject(idobj); if (interp == NULL) { return NULL; } @@ -2022,7 +2022,7 @@ get_crossinterp_data(TyObject *self, TyObject *args, TyObject *kwargs) } } else if (strcmp(mode, "func") == 0) { - if (_PyFunction_GetXIData(tstate, obj, xidata) != 0) { + if (_TyFunction_GetXIData(tstate, obj, xidata) != 0) { goto error; } } @@ -2161,7 +2161,7 @@ perf_trampoline_set_persist_after_fork(TyObject *self, TyObject *args) static TyObject * get_rare_event_counters(TyObject *self, TyObject *type) { - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); return Ty_BuildValue( "{sksksksksk}", @@ -2176,7 +2176,7 @@ get_rare_event_counters(TyObject *self, TyObject *type) static TyObject * reset_rare_event_counters(TyObject *self, TyObject *Py_UNUSED(type)) { - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); interp->rare_events.set_class = 0; interp->rare_events.set_bases = 0; @@ -2299,7 +2299,7 @@ static TyObject * get_next_dict_keys_version_impl(TyObject *module) /*[clinic end generated code: output=e5405a509cf9d423 input=bd1cee7c6b9d3a3c]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); uint32_t keys_version = interp->dict_state.next_keys_version; return TyLong_FromLong(keys_version); } @@ -2430,7 +2430,7 @@ static TyMethodDef module_functions[] = { {"has_inline_values", has_inline_values, METH_O}, {"has_split_table", has_split_table, METH_O}, {"type_assign_specific_version_unsafe", type_assign_specific_version_unsafe, METH_VARARGS, - PyDoc_STR("forcefully assign type->tp_version_tag")}, + TyDoc_STR("forcefully assign type->tp_version_tag")}, #ifdef Ty_GIL_DISABLED {"py_thread_id", get_py_thread_id, METH_NOARGS}, diff --git a/Modules/_testinternalcapi/clinic/test_lock.c.h b/Modules/_testinternalcapi/clinic/test_lock.c.h index 78e27f8..c3741a1 100644 --- a/Modules/_testinternalcapi/clinic/test_lock.c.h +++ b/Modules/_testinternalcapi/clinic/test_lock.c.h @@ -5,7 +5,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_testinternalcapi_benchmark_locks__doc__, +TyDoc_STRVAR(_testinternalcapi_benchmark_locks__doc__, "benchmark_locks($module, num_threads, use_pymutex=True,\n" " critical_section_length=1, time_ms=1000, /)\n" "--\n" diff --git a/Modules/_testinternalcapi/pytime.c b/Modules/_testinternalcapi/pytime.c index 54097a6..31da315 100644 --- a/Modules/_testinternalcapi/pytime.c +++ b/Modules/_testinternalcapi/pytime.c @@ -16,7 +16,7 @@ test_pytime_fromseconds(TyObject *self, TyObject *args) if (!TyArg_ParseTuple(args, "i", &seconds)) { return NULL; } - PyTime_t ts = _TyTime_FromSeconds(seconds); + TyTime_t ts = _TyTime_FromSeconds(seconds); return _TyTime_AsLong(ts); } @@ -45,7 +45,7 @@ test_pytime_fromsecondsobject(TyObject *self, TyObject *args) if (check_time_rounding(round) < 0) { return NULL; } - PyTime_t ts; + TyTime_t ts; if (_TyTime_FromSecondsObject(&ts, obj, round) == -1) { return NULL; } @@ -63,7 +63,7 @@ test_PyTime_AsTimeval(TyObject *self, TyObject *args) if (check_time_rounding(round) < 0) { return NULL; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromLong(&t, obj) < 0) { return NULL; } @@ -90,7 +90,7 @@ test_PyTime_AsTimeval_clamp(TyObject *self, TyObject *args) if (check_time_rounding(round) < 0) { return NULL; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromLong(&t, obj) < 0) { return NULL; } @@ -112,7 +112,7 @@ test_PyTime_AsTimespec(TyObject *self, TyObject *args) if (!TyArg_ParseTuple(args, "O", &obj)) { return NULL; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromLong(&t, obj) < 0) { return NULL; } @@ -130,7 +130,7 @@ test_PyTime_AsTimespec_clamp(TyObject *self, TyObject *args) if (!TyArg_ParseTuple(args, "O", &obj)) { return NULL; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromLong(&t, obj) < 0) { return NULL; } @@ -148,14 +148,14 @@ test_PyTime_AsMilliseconds(TyObject *self, TyObject *args) if (!TyArg_ParseTuple(args, "Oi", &obj, &round)) { return NULL; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromLong(&t, obj) < 0) { return NULL; } if (check_time_rounding(round) < 0) { return NULL; } - PyTime_t ms = _TyTime_AsMilliseconds(t, round); + TyTime_t ms = _TyTime_AsMilliseconds(t, round); return _TyTime_AsLong(ms); } @@ -167,14 +167,14 @@ test_PyTime_AsMicroseconds(TyObject *self, TyObject *args) if (!TyArg_ParseTuple(args, "Oi", &obj, &round)) { return NULL; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromLong(&t, obj) < 0) { return NULL; } if (check_time_rounding(round) < 0) { return NULL; } - PyTime_t us = _TyTime_AsMicroseconds(t, round); + TyTime_t us = _TyTime_AsMicroseconds(t, round); return _TyTime_AsLong(us); } diff --git a/Modules/_testinternalcapi/test_critical_sections.c b/Modules/_testinternalcapi/test_critical_sections.c index ecf07fd..745c33c 100644 --- a/Modules/_testinternalcapi/test_critical_sections.c +++ b/Modules/_testinternalcapi/test_critical_sections.c @@ -189,7 +189,7 @@ test_critical_sections_threads(TyObject *self, TyObject *Py_UNUSED(args)) assert(test_data.obj3 != NULL); for (Ty_ssize_t i = 0; i < NUM_THREADS; i++) { - PyThread_start_new_thread(&thread_critical_sections, &test_data); + TyThread_start_new_thread(&thread_critical_sections, &test_data); } PyEvent_Wait(&test_data.done_event); @@ -275,7 +275,7 @@ test_critical_sections_gc(TyObject *self, TyObject *Py_UNUSED(args)) assert(test_data.obj != NULL); for (Ty_ssize_t i = 0; i < NUM_THREADS; i++) { - PyThread_start_new_thread(&thread_gc, &test_data); + TyThread_start_new_thread(&thread_gc, &test_data); } PyEvent_Wait(&test_data.done_event); Ty_DECREF(test_data.obj); diff --git a/Modules/_testinternalcapi/test_lock.c b/Modules/_testinternalcapi/test_lock.c index 9af00f2..966c546 100644 --- a/Modules/_testinternalcapi/test_lock.c +++ b/Modules/_testinternalcapi/test_lock.c @@ -2,7 +2,7 @@ #include "parts.h" #include "pycore_lock.h" -#include "pycore_pythread.h" // PyThread_get_thread_ident_ex() +#include "pycore_pythread.h" // TyThread_get_thread_ident_ex() #include "clinic/test_lock.c.h" @@ -78,7 +78,7 @@ test_lock_two_threads(TyObject *self, TyObject *obj) PyMutex_Lock(&test_data.m); assert(test_data.m._bits == 1); - PyThread_start_new_thread(lock_thread, &test_data); + TyThread_start_new_thread(lock_thread, &test_data); // wait up to two seconds for the lock_thread to attempt to lock "m" int iters = 0; @@ -139,7 +139,7 @@ test_lock_counter(TyObject *self, TyObject *obj) for (Ty_ssize_t i = 0; i < COUNTER_THREADS; i++) { thread_data[i].test_data = &test_data; - PyThread_start_new_thread(counter_thread, &thread_data[i]); + TyThread_start_new_thread(counter_thread, &thread_data[i]); } for (Ty_ssize_t i = 0; i < COUNTER_THREADS; i++) { @@ -182,7 +182,7 @@ test_lock_counter_slow(TyObject *self, TyObject *obj) for (Ty_ssize_t i = 0; i < COUNTER_THREADS; i++) { thread_data[i].test_data = &test_data; - PyThread_start_new_thread(slow_counter_thread, &thread_data[i]); + TyThread_start_new_thread(slow_counter_thread, &thread_data[i]); } for (Ty_ssize_t i = 0; i < COUNTER_THREADS; i++) { @@ -198,7 +198,7 @@ struct bench_data_locks { int use_pymutex; int critical_section_length; char padding[200]; - PyThread_type_lock lock; + TyThread_type_lock lock; PyMutex m; double value; Ty_ssize_t total_iters; @@ -230,12 +230,12 @@ thread_benchmark_locks(void *arg) PyMutex_Unlock(&bench_data->m); } else { - PyThread_acquire_lock(bench_data->lock, 1); + TyThread_acquire_lock(bench_data->lock, 1); for (int i = 0; i < critical_section_length; i++) { bench_data->value += my_value; my_value = bench_data->value; } - PyThread_release_lock(bench_data->lock); + TyThread_release_lock(bench_data->lock); } iters++; } @@ -276,7 +276,7 @@ _testinternalcapi_benchmark_locks_impl(TyObject *module, bench_data.use_pymutex = use_pymutex; bench_data.critical_section_length = critical_section_length; - bench_data.lock = PyThread_allocate_lock(); + bench_data.lock = TyThread_allocate_lock(); if (bench_data.lock == NULL) { return TyErr_NoMemory(); } @@ -293,14 +293,14 @@ _testinternalcapi_benchmark_locks_impl(TyObject *module, goto exit; } - PyTime_t start, end; + TyTime_t start, end; if (PyTime_PerfCounter(&start) < 0) { goto exit; } for (Ty_ssize_t i = 0; i < num_threads; i++) { thread_data[i].bench_data = &bench_data; - PyThread_start_new_thread(thread_benchmark_locks, &thread_data[i]); + TyThread_start_new_thread(thread_benchmark_locks, &thread_data[i]); } // Let the threads run for `time_ms` milliseconds @@ -332,7 +332,7 @@ _testinternalcapi_benchmark_locks_impl(TyObject *module, res = Ty_BuildValue("(dO)", rate, thread_iters); exit: - PyThread_free_lock(bench_data.lock); + TyThread_free_lock(bench_data.lock); TyMem_Free(thread_data); Ty_XDECREF(thread_iters); return res; @@ -449,15 +449,15 @@ test_lock_rwlock(TyObject *self, TyObject *obj) assert(test_data.rw.bits == 0); // Start two readers - PyThread_start_new_thread(rdlock_thread, &test_data); - PyThread_start_new_thread(rdlock_thread, &test_data); + TyThread_start_new_thread(rdlock_thread, &test_data); + TyThread_start_new_thread(rdlock_thread, &test_data); // wait up to two seconds for the threads to attempt to read-lock "rw" wait_until(&test_data.rw.bits, 8); assert(test_data.rw.bits == 8); // start writer (while readers hold lock) - PyThread_start_new_thread(wrlock_thread, &test_data); + TyThread_start_new_thread(wrlock_thread, &test_data); wait_until(&test_data.rw.bits, 10); assert(test_data.rw.bits == 10); @@ -487,7 +487,7 @@ test_lock_recursive(TyObject *self, TyObject *obj) assert(!_PyRecursiveMutex_IsLockedByCurrentThread(&m)); _PyRecursiveMutex_Lock(&m); - assert(m.thread == PyThread_get_thread_ident_ex()); + assert(m.thread == TyThread_get_thread_ident_ex()); assert(PyMutex_IsLocked(&m.mutex)); assert(m.level == 0); diff --git a/Modules/_testlimitedcapi/clinic/file.c.h b/Modules/_testlimitedcapi/clinic/file.c.h index ef6d4ce..65a0394 100644 --- a/Modules/_testlimitedcapi/clinic/file.c.h +++ b/Modules/_testlimitedcapi/clinic/file.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_testcapi_pyfile_getline__doc__, +TyDoc_STRVAR(_testcapi_pyfile_getline__doc__, "pyfile_getline($module, file, n, /)\n" "--\n" "\n"); @@ -35,7 +35,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_pyfile_writeobject__doc__, +TyDoc_STRVAR(_testcapi_pyfile_writeobject__doc__, "pyfile_writeobject($module, obj, file, flags, /)\n" "--\n" "\n"); @@ -71,7 +71,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testcapi_pyobject_asfiledescriptor__doc__, +TyDoc_STRVAR(_testcapi_pyobject_asfiledescriptor__doc__, "pyobject_asfiledescriptor($module, obj, /)\n" "--\n" "\n"); diff --git a/Modules/_testlimitedcapi/clinic/heaptype_relative.c.h b/Modules/_testlimitedcapi/clinic/heaptype_relative.c.h index 21b7aa8..e932790 100644 --- a/Modules/_testlimitedcapi/clinic/heaptype_relative.c.h +++ b/Modules/_testlimitedcapi/clinic/heaptype_relative.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(make_heaptype_with_member__doc__, +TyDoc_STRVAR(make_heaptype_with_member__doc__, "make_heaptype_with_member($module, /, extra_base_size=0, basicsize=0,\n" " member_offset=0, add_relative_flag=False, *,\n" " member_name=\'memb\', member_flags=0,\n" diff --git a/Modules/_testlimitedcapi/clinic/long.c.h b/Modules/_testlimitedcapi/clinic/long.c.h index 1e6acc4..1c1f19e 100644 --- a/Modules/_testlimitedcapi/clinic/long.c.h +++ b/Modules/_testlimitedcapi/clinic/long.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_testlimitedcapi_test_long_api__doc__, +TyDoc_STRVAR(_testlimitedcapi_test_long_api__doc__, "test_long_api($module, /)\n" "--\n" "\n"); @@ -19,7 +19,7 @@ _testlimitedcapi_test_long_api(TyObject *module, TyObject *Py_UNUSED(ignored)) return _testlimitedcapi_test_long_api_impl(module); } -PyDoc_STRVAR(_testlimitedcapi_test_longlong_api__doc__, +TyDoc_STRVAR(_testlimitedcapi_test_longlong_api__doc__, "test_longlong_api($module, /)\n" "--\n" "\n"); @@ -36,7 +36,7 @@ _testlimitedcapi_test_longlong_api(TyObject *module, TyObject *Py_UNUSED(ignored return _testlimitedcapi_test_longlong_api_impl(module); } -PyDoc_STRVAR(_testlimitedcapi_test_long_and_overflow__doc__, +TyDoc_STRVAR(_testlimitedcapi_test_long_and_overflow__doc__, "test_long_and_overflow($module, /)\n" "--\n" "\n" @@ -57,7 +57,7 @@ _testlimitedcapi_test_long_and_overflow(TyObject *module, TyObject *Py_UNUSED(ig return _testlimitedcapi_test_long_and_overflow_impl(module); } -PyDoc_STRVAR(_testlimitedcapi_test_long_long_and_overflow__doc__, +TyDoc_STRVAR(_testlimitedcapi_test_long_long_and_overflow__doc__, "test_long_long_and_overflow($module, /)\n" "--\n" "\n" @@ -78,7 +78,7 @@ _testlimitedcapi_test_long_long_and_overflow(TyObject *module, TyObject *Py_UNUS return _testlimitedcapi_test_long_long_and_overflow_impl(module); } -PyDoc_STRVAR(_testlimitedcapi_test_long_as_size_t__doc__, +TyDoc_STRVAR(_testlimitedcapi_test_long_as_size_t__doc__, "test_long_as_size_t($module, /)\n" "--\n" "\n" @@ -99,7 +99,7 @@ _testlimitedcapi_test_long_as_size_t(TyObject *module, TyObject *Py_UNUSED(ignor return _testlimitedcapi_test_long_as_size_t_impl(module); } -PyDoc_STRVAR(_testlimitedcapi_test_long_as_unsigned_long_long_mask__doc__, +TyDoc_STRVAR(_testlimitedcapi_test_long_as_unsigned_long_long_mask__doc__, "test_long_as_unsigned_long_long_mask($module, /)\n" "--\n" "\n"); @@ -116,7 +116,7 @@ _testlimitedcapi_test_long_as_unsigned_long_long_mask(TyObject *module, TyObject return _testlimitedcapi_test_long_as_unsigned_long_long_mask_impl(module); } -PyDoc_STRVAR(_testlimitedcapi_test_long_as_double__doc__, +TyDoc_STRVAR(_testlimitedcapi_test_long_as_double__doc__, "test_long_as_double($module, /)\n" "--\n" "\n"); @@ -133,7 +133,7 @@ _testlimitedcapi_test_long_as_double(TyObject *module, TyObject *Py_UNUSED(ignor return _testlimitedcapi_test_long_as_double_impl(module); } -PyDoc_STRVAR(_testlimitedcapi_PyLong_AsInt__doc__, +TyDoc_STRVAR(_testlimitedcapi_PyLong_AsInt__doc__, "TyLong_AsInt($module, arg, /)\n" "--\n" "\n"); diff --git a/Modules/_testlimitedcapi/clinic/vectorcall_limited.c.h b/Modules/_testlimitedcapi/clinic/vectorcall_limited.c.h index 6631a9c..5f70f75 100644 --- a/Modules/_testlimitedcapi/clinic/vectorcall_limited.c.h +++ b/Modules/_testlimitedcapi/clinic/vectorcall_limited.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_testlimitedcapi_call_vectorcall__doc__, +TyDoc_STRVAR(_testlimitedcapi_call_vectorcall__doc__, "call_vectorcall($module, callable, /)\n" "--\n" "\n"); @@ -10,7 +10,7 @@ PyDoc_STRVAR(_testlimitedcapi_call_vectorcall__doc__, #define _TESTLIMITEDCAPI_CALL_VECTORCALL_METHODDEF \ {"call_vectorcall", (PyCFunction)_testlimitedcapi_call_vectorcall, METH_O, _testlimitedcapi_call_vectorcall__doc__}, -PyDoc_STRVAR(_testlimitedcapi_call_vectorcall_method__doc__, +TyDoc_STRVAR(_testlimitedcapi_call_vectorcall_method__doc__, "call_vectorcall_method($module, callable, /)\n" "--\n" "\n"); diff --git a/Modules/_testlimitedcapi/clinic/version.c.h b/Modules/_testlimitedcapi/clinic/version.c.h index 2b5a732..65bdad4 100644 --- a/Modules/_testlimitedcapi/clinic/version.c.h +++ b/Modules/_testlimitedcapi/clinic/version.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_testlimitedcapi_pack_full_version__doc__, +TyDoc_STRVAR(_testlimitedcapi_pack_full_version__doc__, "pack_full_version($module, major, minor, micro, level, serial, /)\n" "--\n" "\n"); @@ -55,7 +55,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testlimitedcapi_pack_version__doc__, +TyDoc_STRVAR(_testlimitedcapi_pack_version__doc__, "pack_version($module, major, minor, /)\n" "--\n" "\n"); diff --git a/Modules/_testlimitedcapi/heaptype_relative.c b/Modules/_testlimitedcapi/heaptype_relative.c index b36ab32..545fd1d 100644 --- a/Modules/_testlimitedcapi/heaptype_relative.c +++ b/Modules/_testlimitedcapi/heaptype_relative.c @@ -275,7 +275,7 @@ static TyType_Spec HeapCTypeWithRelativeDict_spec = { {NULL} /* Sentinel */ }}, {Ty_tp_members, (TyMemberDef[]) { - {"dictobj", _Py_T_OBJECT, + {"dictobj", _Ty_T_OBJECT, offsetof(HeapCTypeWithDictStruct, dict), Ty_RELATIVE_OFFSET}, {"__dictoffset__", Ty_T_PYSSIZET, @@ -312,7 +312,7 @@ static TyType_Spec HeapCTypeWithRelativeWeakref_spec = { .slots = (TyType_Slot[]) { {Ty_tp_dealloc, heapctypewithrelativeweakref_dealloc}, {Ty_tp_members, (TyMemberDef[]) { - {"weakreflist", _Py_T_OBJECT, + {"weakreflist", _Ty_T_OBJECT, offsetof(HeapCTypeWithWeakrefStruct, weakreflist), Ty_RELATIVE_OFFSET}, {"__weaklistoffset__", Ty_T_PYSSIZET, diff --git a/Modules/_testmultiphase.c b/Modules/_testmultiphase.c index b4086c9..46c88af 100644 --- a/Modules/_testmultiphase.c +++ b/Modules/_testmultiphase.c @@ -71,7 +71,7 @@ Example_demo(TyObject *op, TyObject *args) static TyMethodDef Example_methods[] = { {"demo", Example_demo, METH_VARARGS, - PyDoc_STR("demo() -> None")}, + TyDoc_STR("demo() -> None")}, {NULL, NULL} /* sentinel */ }; @@ -208,7 +208,7 @@ _testmultiphase_StateAccessType_increment_count_clinic_impl(StateAccessTypeObjec Py_RETURN_NONE; } -PyDoc_STRVAR(_StateAccessType_decrement_count__doc__, +TyDoc_STRVAR(_StateAccessType_decrement_count__doc__, "decrement_count($self, /, n=1, *, twice=None)\n" "--\n" "\n" @@ -301,7 +301,7 @@ static TyType_Spec StateAccessType_spec = { /* Function of two integers returning integer */ -PyDoc_STRVAR(testexport_foo_doc, +TyDoc_STRVAR(testexport_foo_doc, "foo(i,j)\n\ \n\ Return the sum of i and j."); @@ -319,7 +319,7 @@ testexport_foo(TyObject *self, TyObject *args) /* Test that PyState registration fails */ -PyDoc_STRVAR(call_state_registration_func_doc, +TyDoc_STRVAR(call_state_registration_func_doc, "register_state(0): call PyState_FindModule()\n\ register_state(1): call PyState_AddModule()\n\ register_state(2): call PyState_RemoveModule()"); @@ -425,7 +425,7 @@ static int execfunc(TyObject *m) #define TEST_MODULE_DEF(name, slots, methods) { \ PyModuleDef_HEAD_INIT, /* m_base */ \ name, /* m_name */ \ - PyDoc_STR("Test module " name), /* m_doc */ \ + TyDoc_STR("Test module " name), /* m_doc */ \ 0, /* m_size */ \ methods, /* m_methods */ \ slots, /* m_slots */ \ @@ -494,7 +494,7 @@ PyInit__testmultiphase_nonmodule(void) return PyModuleDef_Init(&def_nonmodule); } -PyDoc_STRVAR(nonmodule_bar_doc, +TyDoc_STRVAR(nonmodule_bar_doc, "bar(i,j)\n\ \n\ Return the difference of i - j."); @@ -534,7 +534,7 @@ static PyModuleDef_Slot nonascii_slots[] = { static TyModuleDef def_nonascii_latin = { \ PyModuleDef_HEAD_INIT, /* m_base */ "_testmultiphase_nonascii_latin", /* m_name */ - PyDoc_STR("Module named in Czech"), /* m_doc */ + TyDoc_STR("Module named in Czech"), /* m_doc */ 0, /* m_size */ NULL, /* m_methods */ nonascii_slots, /* m_slots */ @@ -552,7 +552,7 @@ PyInitU__testmultiphase_zkouka_naten_evc07gi8e(void) static TyModuleDef def_nonascii_kana = { \ PyModuleDef_HEAD_INIT, /* m_base */ "_testmultiphase_nonascii_kana", /* m_name */ - PyDoc_STR("Module named in Japanese"), /* m_doc */ + TyDoc_STR("Module named in Japanese"), /* m_doc */ 0, /* m_size */ NULL, /* m_methods */ nonascii_slots, /* m_slots */ @@ -619,7 +619,7 @@ PyInit__testmultiphase_bad_slot_negative(void) static TyModuleDef def_create_int_with_state = { \ PyModuleDef_HEAD_INIT, /* m_base */ "create_with_state", /* m_name */ - PyDoc_STR("Not a PyModuleObject object, but requests per-module state"), + TyDoc_STR("Not a PyModuleObject object, but requests per-module state"), 10, /* m_size */ NULL, /* m_methods */ slots_create_nonmodule, /* m_slots */ @@ -638,7 +638,7 @@ PyInit__testmultiphase_create_int_with_state(void) static TyModuleDef def_negative_size = { \ PyModuleDef_HEAD_INIT, /* m_base */ "negative_size", /* m_name */ - PyDoc_STR("TyModuleDef with negative m_size"), + TyDoc_STR("TyModuleDef with negative m_size"), -1, /* m_size */ NULL, /* m_methods */ slots_create_nonmodule, /* m_slots */ @@ -880,7 +880,7 @@ static PyModuleDef_Slot meth_state_access_slots[] = { static TyModuleDef def_meth_state_access = { PyModuleDef_HEAD_INIT, .m_name = "_testmultiphase_meth_state_access", - .m_doc = PyDoc_STR("Module testing access" + .m_doc = TyDoc_STR("Module testing access" " to state from methods."), .m_size = sizeof(meth_state), .m_slots = meth_state_access_slots, @@ -895,7 +895,7 @@ PyInit__testmultiphase_meth_state_access(void) static TyModuleDef def_module_state_shared = { PyModuleDef_HEAD_INIT, .m_name = "_test_module_state_shared", - .m_doc = PyDoc_STR("Regression Test module for single-phase init."), + .m_doc = TyDoc_STR("Regression Test module for single-phase init."), .m_size = -1, }; diff --git a/Modules/_testsinglephase.c b/Modules/_testsinglephase.c index 3672723..a97bd14 100644 --- a/Modules/_testsinglephase.c +++ b/Modules/_testsinglephase.c @@ -175,7 +175,7 @@ Here are the modules: Module state: * fields - * initialized - when the module was first initialized + * initialized - when the module was first initialized * *error * *int_const * *str_const @@ -212,7 +212,7 @@ single-phase init modules. typedef struct { - PyTime_t initialized; + TyTime_t initialized; TyObject *error; TyObject *int_const; TyObject *str_const; @@ -267,15 +267,15 @@ clear_state(module_state *state) } static int -_set_initialized(PyTime_t *initialized) +_set_initialized(TyTime_t *initialized) { /* We go strictly monotonic to ensure each time is unique. */ - PyTime_t prev; + TyTime_t prev; if (PyTime_Monotonic(&prev) != 0) { return -1; } /* We do a busy sleep since the interval should be super short. */ - PyTime_t t; + TyTime_t t; do { if (PyTime_Monotonic(&t) != 0) { return -1; @@ -345,7 +345,7 @@ init_module(TyObject *module, module_state *state) } -PyDoc_STRVAR(common_state_initialized_doc, +TyDoc_STRVAR(common_state_initialized_doc, "state_initialized()\n\ \n\ Return the seconds-since-epoch when the module state was initialized."); @@ -366,7 +366,7 @@ common_state_initialized(TyObject *self, TyObject *Py_UNUSED(ignored)) common_state_initialized_doc} -PyDoc_STRVAR(common_look_up_self_doc, +TyDoc_STRVAR(common_look_up_self_doc, "look_up_self()\n\ \n\ Return the module associated with this module's def.m_base.m_index."); @@ -388,7 +388,7 @@ common_look_up_self(TyObject *self, TyObject *Py_UNUSED(ignored)) /* Function of two integers returning integer */ -PyDoc_STRVAR(common_sum_doc, +TyDoc_STRVAR(common_sum_doc, "sum(i,j)\n\ \n\ Return the sum of i and j."); @@ -408,7 +408,7 @@ common_sum(TyObject *self, TyObject *args) {"sum", common_sum, METH_VARARGS, common_sum_doc} -PyDoc_STRVAR(basic_initialized_count_doc, +TyDoc_STRVAR(basic_initialized_count_doc, "initialized_count()\n\ \n\ Return how many times the module has been initialized."); @@ -425,7 +425,7 @@ basic_initialized_count(TyObject *self, TyObject *Py_UNUSED(ignored)) basic_initialized_count_doc} -PyDoc_STRVAR(basic__clear_globals_doc, +TyDoc_STRVAR(basic__clear_globals_doc, "_clear_globals()\n\ \n\ Free all global state and set it to uninitialized."); @@ -443,7 +443,7 @@ basic__clear_globals(TyObject *self, TyObject *Py_UNUSED(ignored)) basic__clear_globals_doc} -PyDoc_STRVAR(basic__clear_module_state_doc, "_clear_module_state()\n\ +TyDoc_STRVAR(basic__clear_module_state_doc, "_clear_module_state()\n\ \n\ Free the module state and set it to uninitialized."); @@ -490,7 +490,7 @@ static TyMethodDef TestMethods_Basic[] = { static struct TyModuleDef _testsinglephase_basic = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase", - .m_doc = PyDoc_STR("Test module _testsinglephase"), + .m_doc = TyDoc_STR("Test module _testsinglephase"), .m_size = -1, // no module state .m_methods = TestMethods_Basic, }; @@ -549,7 +549,7 @@ PyInit__testsinglephase_basic_copy(void) static struct TyModuleDef def = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase_basic_copy", - .m_doc = PyDoc_STR("Test module _testsinglephase_basic_copy"), + .m_doc = TyDoc_STR("Test module _testsinglephase_basic_copy"), .m_size = -1, // no module state .m_methods = TestMethods_Basic, }; @@ -586,7 +586,7 @@ static TyMethodDef TestMethods_Reinit[] = { static struct TyModuleDef _testsinglephase_with_reinit = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase_with_reinit", - .m_doc = PyDoc_STR("Test module _testsinglephase_with_reinit"), + .m_doc = TyDoc_STR("Test module _testsinglephase_with_reinit"), .m_size = 0, .m_methods = TestMethods_Reinit, }; @@ -651,7 +651,7 @@ static TyMethodDef TestMethods_WithState[] = { static struct TyModuleDef _testsinglephase_with_state = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase_with_state", - .m_doc = PyDoc_STR("Test module _testsinglephase_with_state"), + .m_doc = TyDoc_STR("Test module _testsinglephase_with_state"), .m_size = sizeof(module_state), .m_methods = TestMethods_WithState, }; @@ -697,7 +697,7 @@ finally: static struct TyModuleDef _testsinglephase_check_cache_first = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase_check_cache_first", - .m_doc = PyDoc_STR("Test module _testsinglephase_check_cache_first"), + .m_doc = TyDoc_STR("Test module _testsinglephase_check_cache_first"), .m_size = -1, // no module state }; @@ -716,7 +716,7 @@ PyInit__testsinglephase_check_cache_first(void) static struct TyModuleDef _testsinglephase_with_reinit_check_cache_first = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase_with_reinit_check_cache_first", - .m_doc = PyDoc_STR("Test module _testsinglephase_with_reinit_check_cache_first"), + .m_doc = TyDoc_STR("Test module _testsinglephase_with_reinit_check_cache_first"), .m_size = 0, // no module state }; @@ -735,7 +735,7 @@ PyInit__testsinglephase_with_reinit_check_cache_first(void) static struct TyModuleDef _testsinglephase_with_state_check_cache_first = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase_with_state_check_cache_first", - .m_doc = PyDoc_STR("Test module _testsinglephase_with_state_check_cache_first"), + .m_doc = TyDoc_STR("Test module _testsinglephase_with_state_check_cache_first"), .m_size = 42, // not used }; @@ -768,7 +768,7 @@ circularmod_clear_static_var(TyObject *self, TyObject *arg) static struct TyModuleDef _testsinglephase_circular = { PyModuleDef_HEAD_INIT, .m_name = "_testsinglephase_circular", - .m_doc = PyDoc_STR("Test module _testsinglephase_circular"), + .m_doc = TyDoc_STR("Test module _testsinglephase_circular"), .m_methods = (TyMethodDef[]) { {"clear_static_var", circularmod_clear_static_var, METH_NOARGS, "Clear the static variable and return its previous value."}, diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index e94d398..8d2979a 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -102,8 +102,8 @@ typedef struct { // The `ident`, `os_handle`, `has_os_handle`, and `state` fields are // protected by `mutex`. - PyThread_ident_t ident; - PyThread_handle_t os_handle; + TyThread_ident_t ident; + TyThread_handle_t os_handle; int has_os_handle; // Holds a value from the `ThreadHandleState` enum. @@ -140,17 +140,17 @@ set_thread_handle_state(ThreadHandle *handle, ThreadHandleState state) PyMutex_Unlock(&handle->mutex); } -static PyThread_ident_t +static TyThread_ident_t ThreadHandle_ident(ThreadHandle *handle) { PyMutex_Lock(&handle->mutex); - PyThread_ident_t ident = handle->ident; + TyThread_ident_t ident = handle->ident; PyMutex_Unlock(&handle->mutex); return ident; } static int -ThreadHandle_get_os_handle(ThreadHandle *handle, PyThread_handle_t *os_handle) +ThreadHandle_get_os_handle(ThreadHandle *handle, TyThread_handle_t *os_handle) { PyMutex_Lock(&handle->mutex); int has_os_handle = handle->has_os_handle; @@ -228,7 +228,7 @@ detach_thread(ThreadHandle *self) return 0; } // This is typically short so no need to release the GIL - if (PyThread_detach_thread(self->os_handle)) { + if (TyThread_detach_thread(self->os_handle)) { fprintf(stderr, "detach_thread: failed detaching thread\n"); return -1; } @@ -272,7 +272,7 @@ _PyThread_AfterFork(struct _pythread_runtime_state *state) // after-fork handler. We do this before calling any Python code to ensure // that it happens before any ThreadHandles are deallocated, such as by a // GC cycle. - PyThread_ident_t current = PyThread_get_thread_ident_ex(); + TyThread_ident_t current = TyThread_get_thread_ident_ex(); struct llist_node *node; llist_for_each_safe(node, &state->handles) { @@ -383,7 +383,7 @@ exit: _PyEvent_Notify(&handle->thread_is_exiting); ThreadHandle_decref(handle); - // bpo-44434: Don't call explicitly PyThread_exit_thread(). On Linux with + // bpo-44434: Don't call explicitly TyThread_exit_thread(). On Linux with // the glibc, pthread_exit() can abort the whole process if dlopen() fails // to open the libgcc_s.so library (ex: EMFILE error). return; @@ -424,7 +424,7 @@ ThreadHandle_start(ThreadHandle *self, TyObject *func, TyObject *args, TyErr_NoMemory(); goto start_failed; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); boot->tstate = _TyThreadState_New(interp, _TyThreadState_WHENCE_THREADING); if (boot->tstate == NULL) { TyMem_RawFree(boot); @@ -440,9 +440,9 @@ ThreadHandle_start(ThreadHandle *self, TyObject *func, TyObject *args, ThreadHandle_incref(self); boot->handle_ready = (PyEvent){0}; - PyThread_ident_t ident; - PyThread_handle_t os_handle; - if (PyThread_start_joinable_thread(thread_run, boot, &ident, &os_handle)) { + TyThread_ident_t ident; + TyThread_handle_t os_handle; + if (TyThread_start_joinable_thread(thread_run, boot, &ident, &os_handle)) { TyThreadState_Clear(boot->tstate); TyThreadState_Delete(boot->tstate); thread_bootstate_free(boot, 1); @@ -474,11 +474,11 @@ join_thread(void *arg) { ThreadHandle *handle = (ThreadHandle*)arg; assert(get_thread_handle_state(handle) == THREAD_HANDLE_RUNNING); - PyThread_handle_t os_handle; + TyThread_handle_t os_handle; if (ThreadHandle_get_os_handle(handle, &os_handle)) { int err = 0; Ty_BEGIN_ALLOW_THREADS - err = PyThread_join_thread(os_handle); + err = TyThread_join_thread(os_handle); Ty_END_ALLOW_THREADS if (err) { TyErr_SetString(ThreadError, "Failed joining thread"); @@ -501,7 +501,7 @@ check_started(ThreadHandle *self) } static int -ThreadHandle_join(ThreadHandle *self, PyTime_t timeout_ns) +ThreadHandle_join(ThreadHandle *self, TyTime_t timeout_ns) { if (check_started(self) < 0) { return -1; @@ -518,8 +518,8 @@ ThreadHandle_join(ThreadHandle *self, PyTime_t timeout_ns) // `thread_run` returns. We can be sure that we are not attempting to join // ourselves if the handle's thread is about to exit. if (!_PyEvent_IsSet(&self->thread_is_exiting)) { - if (ThreadHandle_ident(self) == PyThread_get_thread_ident_ex()) { - // PyThread_join_thread() would deadlock or error out. + if (ThreadHandle_ident(self) == TyThread_get_thread_ident_ex()) { + // TyThread_join_thread() would deadlock or error out. TyErr_SetString(ThreadError, "Cannot join current thread"); return -1; } @@ -535,7 +535,7 @@ ThreadHandle_join(ThreadHandle *self, PyTime_t timeout_ns) } // Wait until the deadline for the thread to exit. - PyTime_t deadline = timeout_ns != -1 ? _PyDeadline_Init(timeout_ns) : 0; + TyTime_t deadline = timeout_ns != -1 ? _PyDeadline_Init(timeout_ns) : 0; int detach = 1; while (!PyEvent_WaitTimed(&self->thread_is_exiting, timeout_ns, detach)) { if (deadline) { @@ -649,7 +649,7 @@ static TyObject * PyThreadHandleObject_repr(TyObject *op) { PyThreadHandleObject *self = PyThreadHandleObject_CAST(op); - PyThread_ident_t ident = ThreadHandle_ident(self->handle); + TyThread_ident_t ident = ThreadHandle_ident(self->handle); return TyUnicode_FromFormat("<%s object: ident=%" PY_FORMAT_THREAD_IDENT_T ">", Ty_TYPE(self)->tp_name, ident); } @@ -671,7 +671,7 @@ PyThreadHandleObject_join(TyObject *op, TyObject *args) return NULL; } - PyTime_t timeout_ns = -1; + TyTime_t timeout_ns = -1; if (timeout_obj != NULL) { if (_TyTime_FromSecondsObject(&timeout_ns, timeout_obj, _TyTime_ROUND_TIMEOUT) < 0) { @@ -766,7 +766,7 @@ lock_dealloc(TyObject *self) static int lock_acquire_parse_args(TyObject *args, TyObject *kwds, - PyTime_t *timeout) + TyTime_t *timeout) { char *kwlist[] = {"blocking", "timeout", NULL}; int blocking = 1; @@ -775,9 +775,9 @@ lock_acquire_parse_args(TyObject *args, TyObject *kwds, &blocking, &timeout_obj)) return -1; - // XXX Use PyThread_ParseTimeoutArg(). + // XXX Use TyThread_ParseTimeoutArg(). - const PyTime_t unset_timeout = _TyTime_FromSeconds(-1); + const TyTime_t unset_timeout = _TyTime_FromSeconds(-1); *timeout = unset_timeout; if (timeout_obj @@ -798,7 +798,7 @@ lock_acquire_parse_args(TyObject *args, TyObject *kwds, if (!blocking) *timeout = 0; else if (*timeout != unset_timeout) { - PyTime_t microseconds; + TyTime_t microseconds; microseconds = _TyTime_AsMicroseconds(*timeout, _TyTime_ROUND_TIMEOUT); if (microseconds > PY_TIMEOUT_MAX) { @@ -815,12 +815,12 @@ lock_PyThread_acquire_lock(TyObject *op, TyObject *args, TyObject *kwds) { lockobject *self = lockobject_CAST(op); - PyTime_t timeout; + TyTime_t timeout; if (lock_acquire_parse_args(args, kwds, &timeout) < 0) { return NULL; } - PyLockStatus r = _PyMutex_LockTimed(&self->lock, timeout, + TyLockStatus r = _PyMutex_LockTimed(&self->lock, timeout, _PY_LOCK_HANDLE_SIGNALS | _PY_LOCK_DETACH); if (r == PY_LOCK_INTR) { return NULL; @@ -829,7 +829,7 @@ lock_PyThread_acquire_lock(TyObject *op, TyObject *args, TyObject *kwds) return TyBool_FromLong(r == PY_LOCK_ACQUIRED); } -PyDoc_STRVAR(acquire_doc, +TyDoc_STRVAR(acquire_doc, "acquire($self, /, blocking=True, timeout=-1)\n\ --\n\ \n\ @@ -840,13 +840,13 @@ With an argument, this will only block if the argument is true,\n\ and the return value reflects whether the lock is acquired.\n\ The blocking operation is interruptible."); -PyDoc_STRVAR(acquire_lock_doc, +TyDoc_STRVAR(acquire_lock_doc, "acquire_lock($self, /, blocking=True, timeout=-1)\n\ --\n\ \n\ An obsolete synonym of acquire()."); -PyDoc_STRVAR(enter_doc, +TyDoc_STRVAR(enter_doc, "__enter__($self, /)\n\ --\n\ \n\ @@ -865,7 +865,7 @@ lock_PyThread_release_lock(TyObject *op, TyObject *Py_UNUSED(dummy)) Py_RETURN_NONE; } -PyDoc_STRVAR(release_doc, +TyDoc_STRVAR(release_doc, "release($self, /)\n\ --\n\ \n\ @@ -873,13 +873,13 @@ Release the lock, allowing another thread that is blocked waiting for\n\ the lock to acquire the lock. The lock must be in the locked state,\n\ but it needn't be locked by the same thread that unlocks it."); -PyDoc_STRVAR(release_lock_doc, +TyDoc_STRVAR(release_lock_doc, "release_lock($self, /)\n\ --\n\ \n\ An obsolete synonym of release()."); -PyDoc_STRVAR(lock_exit_doc, +TyDoc_STRVAR(lock_exit_doc, "__exit__($self, /, *exc_info)\n\ --\n\ \n\ @@ -892,13 +892,13 @@ lock_locked_lock(TyObject *op, TyObject *Py_UNUSED(dummy)) return TyBool_FromLong(PyMutex_IsLocked(&self->lock)); } -PyDoc_STRVAR(locked_doc, +TyDoc_STRVAR(locked_doc, "locked($self, /)\n\ --\n\ \n\ Return whether the lock is in the locked state."); -PyDoc_STRVAR(locked_lock_doc, +TyDoc_STRVAR(locked_lock_doc, "locked_lock($self, /)\n\ --\n\ \n\ @@ -968,7 +968,7 @@ static TyMethodDef lock_methods[] = { {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(lock_doc, +TyDoc_STRVAR(lock_doc, "lock()\n\ --\n\ \n\ @@ -1038,13 +1038,13 @@ static TyObject * rlock_acquire(TyObject *op, TyObject *args, TyObject *kwds) { rlockobject *self = rlockobject_CAST(op); - PyTime_t timeout; + TyTime_t timeout; if (lock_acquire_parse_args(args, kwds, &timeout) < 0) { return NULL; } - PyLockStatus r = _PyRecursiveMutex_LockTimed(&self->lock, timeout, + TyLockStatus r = _PyRecursiveMutex_LockTimed(&self->lock, timeout, _PY_LOCK_HANDLE_SIGNALS | _PY_LOCK_DETACH); if (r == PY_LOCK_INTR) { return NULL; @@ -1053,7 +1053,7 @@ rlock_acquire(TyObject *op, TyObject *args, TyObject *kwds) return TyBool_FromLong(r == PY_LOCK_ACQUIRED); } -PyDoc_STRVAR(rlock_acquire_doc, +TyDoc_STRVAR(rlock_acquire_doc, "acquire($self, /, blocking=True, timeout=-1)\n\ --\n\ \n\ @@ -1070,7 +1070,7 @@ Precisely, if the current thread already holds the lock, its\n\ internal counter is simply incremented. If nobody holds the lock,\n\ the lock is taken and its internal counter initialized to 1."); -PyDoc_STRVAR(rlock_enter_doc, +TyDoc_STRVAR(rlock_enter_doc, "__enter__($self, /)\n\ --\n\ \n\ @@ -1088,7 +1088,7 @@ rlock_release(TyObject *op, TyObject *Py_UNUSED(dummy)) Py_RETURN_NONE; } -PyDoc_STRVAR(rlock_release_doc, +TyDoc_STRVAR(rlock_release_doc, "release($self, /)\n\ --\n\ \n\ @@ -1101,7 +1101,7 @@ Do note that if the lock was acquire()d several times in a row by the\n\ current thread, release() needs to be called as many times for the lock\n\ to be available for other threads."); -PyDoc_STRVAR(rlock_exit_doc, +TyDoc_STRVAR(rlock_exit_doc, "__exit__($self, /, *exc_info)\n\ --\n\ \n\ @@ -1115,7 +1115,7 @@ rlock_locked(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyBool_FromLong(is_locked); } -PyDoc_STRVAR(rlock_locked_doc, +TyDoc_STRVAR(rlock_locked_doc, "locked()\n\ \n\ Return a boolean indicating whether this object is locked right now."); @@ -1124,7 +1124,7 @@ static TyObject * rlock_acquire_restore(TyObject *op, TyObject *args) { rlockobject *self = rlockobject_CAST(op); - PyThread_ident_t owner; + TyThread_ident_t owner; Ty_ssize_t count; if (!TyArg_ParseTuple(args, "(n" Ty_PARSE_THREAD_IDENT_T "):_acquire_restore", @@ -1137,7 +1137,7 @@ rlock_acquire_restore(TyObject *op, TyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(rlock_acquire_restore_doc, +TyDoc_STRVAR(rlock_acquire_restore_doc, "_acquire_restore($self, state, /)\n\ --\n\ \n\ @@ -1154,14 +1154,14 @@ rlock_release_save(TyObject *op, TyObject *Py_UNUSED(dummy)) return NULL; } - PyThread_ident_t owner = self->lock.thread; + TyThread_ident_t owner = self->lock.thread; Ty_ssize_t count = self->lock.level + 1; self->lock.level = 0; // ensure the unlock releases the lock _PyRecursiveMutex_Unlock(&self->lock); return Ty_BuildValue("n" Ty_PARSE_THREAD_IDENT_T, count, owner); } -PyDoc_STRVAR(rlock_release_save_doc, +TyDoc_STRVAR(rlock_release_save_doc, "_release_save($self, /)\n\ --\n\ \n\ @@ -1177,7 +1177,7 @@ rlock_recursion_count(TyObject *op, TyObject *Py_UNUSED(dummy)) return TyLong_FromLong(0); } -PyDoc_STRVAR(rlock_recursion_count_doc, +TyDoc_STRVAR(rlock_recursion_count_doc, "_recursion_count($self, /)\n\ --\n\ \n\ @@ -1191,7 +1191,7 @@ rlock_is_owned(TyObject *op, TyObject *Py_UNUSED(dummy)) return TyBool_FromLong(owned); } -PyDoc_STRVAR(rlock_is_owned_doc, +TyDoc_STRVAR(rlock_is_owned_doc, "_is_owned($self, /)\n\ --\n\ \n\ @@ -1212,7 +1212,7 @@ static TyObject * rlock_repr(TyObject *op) { rlockobject *self = rlockobject_CAST(op); - PyThread_ident_t owner = self->lock.thread; + TyThread_ident_t owner = self->lock.thread; int locked = rlock_locked_impl(self); size_t count; if (locked) { @@ -1823,7 +1823,7 @@ clear_locals(TyObject *locals_and_key, TyObject *dummyweakref) static TyObject * thread_daemon_threads_allowed(TyObject *module, TyObject *Py_UNUSED(ignored)) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (interp->feature_flags & Ty_RTFLAGS_DAEMON_THREADS) { Py_RETURN_TRUE; } @@ -1832,7 +1832,7 @@ thread_daemon_threads_allowed(TyObject *module, TyObject *Py_UNUSED(ignored)) } } -PyDoc_STRVAR(daemon_threads_allowed_doc, +TyDoc_STRVAR(daemon_threads_allowed_doc, "daemon_threads_allowed($module, /)\n\ --\n\ \n\ @@ -1843,7 +1843,7 @@ static int do_start_new_thread(thread_module_state *state, TyObject *func, TyObject *args, TyObject *kwargs, ThreadHandle *handle, int daemon) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (!_TyInterpreterState_HasFeature(interp, Ty_RTFLAGS_THREADS)) { TyErr_SetString(TyExc_RuntimeError, "thread is not supported for isolated subinterpreters"); @@ -1913,12 +1913,12 @@ thread_PyThread_start_new_thread(TyObject *module, TyObject *fargs) ThreadHandle_decref(handle); return NULL; } - PyThread_ident_t ident = ThreadHandle_ident(handle); + TyThread_ident_t ident = ThreadHandle_ident(handle); ThreadHandle_decref(handle); return TyLong_FromUnsignedLongLong(ident); } -PyDoc_STRVAR(start_new_thread_doc, +TyDoc_STRVAR(start_new_thread_doc, "start_new_thread($module, function, args, kwargs={}, /)\n\ --\n\ \n\ @@ -1931,7 +1931,7 @@ is ignored. The thread will also exit when the function raises an\n\ unhandled exception; a stack trace will be printed unless the exception\n\ is SystemExit."); -PyDoc_STRVAR(start_new_doc, +TyDoc_STRVAR(start_new_doc, "start_new($module, function, args, kwargs={}, /)\n\ --\n\ \n\ @@ -1987,7 +1987,7 @@ thread_PyThread_start_joinable_thread(TyObject *module, TyObject *fargs, return (TyObject *) hobj; } -PyDoc_STRVAR(start_joinable_doc, +TyDoc_STRVAR(start_joinable_doc, "start_joinable_thread($module, /, function, handle=None, daemon=True)\n\ --\n\ \n\ @@ -2008,14 +2008,14 @@ thread_PyThread_exit_thread(TyObject *self, TyObject *Py_UNUSED(ignored)) return NULL; } -PyDoc_STRVAR(exit_doc, +TyDoc_STRVAR(exit_doc, "exit($module, /)\n\ --\n\ \n\ This is synonymous to ``raise SystemExit''. It will cause the current\n\ thread to exit silently unless the exception is caught."); -PyDoc_STRVAR(exit_thread_doc, +TyDoc_STRVAR(exit_thread_doc, "exit_thread($module, /)\n\ --\n\ \n\ @@ -2036,7 +2036,7 @@ thread_PyThread_interrupt_main(TyObject *self, TyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(interrupt_doc, +TyDoc_STRVAR(interrupt_doc, "interrupt_main($module, signum=signal.SIGINT, /)\n\ --\n\ \n\ @@ -2054,14 +2054,14 @@ thread_PyThread_allocate_lock(TyObject *module, TyObject *Py_UNUSED(ignored)) return (TyObject *) newlockobject(module); } -PyDoc_STRVAR(allocate_lock_doc, +TyDoc_STRVAR(allocate_lock_doc, "allocate_lock($module, /)\n\ --\n\ \n\ Create a new lock object. See help(type(threading.Lock())) for\n\ information about locks."); -PyDoc_STRVAR(allocate_doc, +TyDoc_STRVAR(allocate_doc, "allocate($module, /)\n\ --\n\ \n\ @@ -2070,7 +2070,7 @@ An obsolete synonym of allocate_lock()."); static TyObject * thread_get_ident(TyObject *self, TyObject *Py_UNUSED(ignored)) { - PyThread_ident_t ident = PyThread_get_thread_ident_ex(); + TyThread_ident_t ident = TyThread_get_thread_ident_ex(); if (ident == PYTHREAD_INVALID_THREAD_ID) { TyErr_SetString(ThreadError, "no current thread ident"); return NULL; @@ -2078,7 +2078,7 @@ thread_get_ident(TyObject *self, TyObject *Py_UNUSED(ignored)) return TyLong_FromUnsignedLongLong(ident); } -PyDoc_STRVAR(get_ident_doc, +TyDoc_STRVAR(get_ident_doc, "get_ident($module, /)\n\ --\n\ \n\ @@ -2094,11 +2094,11 @@ A thread's identity may be reused for another thread after it exits."); static TyObject * thread_get_native_id(TyObject *self, TyObject *Py_UNUSED(ignored)) { - unsigned long native_id = PyThread_get_thread_native_id(); + unsigned long native_id = TyThread_get_thread_native_id(); return TyLong_FromUnsignedLong(native_id); } -PyDoc_STRVAR(get_native_id_doc, +TyDoc_STRVAR(get_native_id_doc, "get_native_id($module, /)\n\ --\n\ \n\ @@ -2110,11 +2110,11 @@ particular thread within a system."); static TyObject * thread__count(TyObject *self, TyObject *Py_UNUSED(ignored)) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return TyLong_FromSsize_t(_Ty_atomic_load_ssize(&interp->threads.count)); } -PyDoc_STRVAR(_count_doc, +TyDoc_STRVAR(_count_doc, "_count($module, /)\n\ --\n\ \n\ @@ -2142,9 +2142,9 @@ thread_stack_size(TyObject *self, TyObject *args) return NULL; } - old_size = PyThread_get_stacksize(); + old_size = TyThread_get_stacksize(); - rc = PyThread_set_stacksize((size_t) new_size); + rc = TyThread_set_stacksize((size_t) new_size); if (rc == -1) { TyErr_Format(TyExc_ValueError, "size not valid: %zd bytes", @@ -2160,7 +2160,7 @@ thread_stack_size(TyObject *self, TyObject *args) return TyLong_FromSsize_t((Ty_ssize_t) old_size); } -PyDoc_STRVAR(stack_size_doc, +TyDoc_STRVAR(stack_size_doc, "stack_size($module, size=0, /)\n\ --\n\ \n\ @@ -2204,7 +2204,7 @@ thread_excepthook_file(TyObject *file, TyObject *exc_type, TyObject *exc_value, Ty_DECREF(name); } else { - PyThread_ident_t ident = PyThread_get_thread_ident_ex(); + TyThread_ident_t ident = TyThread_get_thread_ident_ex(); TyObject *str = TyUnicode_FromFormat("%" PY_FORMAT_THREAD_IDENT_T, ident); if (str != NULL) { if (TyFile_WriteObject(str, file, Ty_PRINT_RAW) < 0) { @@ -2238,12 +2238,12 @@ thread_excepthook_file(TyObject *file, TyObject *exc_type, TyObject *exc_value, } -PyDoc_STRVAR(ExceptHookArgs__doc__, +TyDoc_STRVAR(ExceptHookArgs__doc__, "ExceptHookArgs\n\ \n\ Type used to pass arguments to threading.excepthook."); -static PyStructSequence_Field ExceptHookArgs_fields[] = { +static TyStructSequence_Field ExceptHookArgs_fields[] = { {"exc_type", "Exception type"}, {"exc_value", "Exception value"}, {"exc_traceback", "Exception traceback"}, @@ -2251,7 +2251,7 @@ static PyStructSequence_Field ExceptHookArgs_fields[] = { {0} }; -static PyStructSequence_Desc ExceptHookArgs_desc = { +static TyStructSequence_Desc ExceptHookArgs_desc = { .name = "_thread._ExceptHookArgs", .doc = ExceptHookArgs__doc__, .fields = ExceptHookArgs_fields, @@ -2272,16 +2272,16 @@ thread_excepthook(TyObject *module, TyObject *args) } /* Borrowed reference */ - TyObject *exc_type = PyStructSequence_GET_ITEM(args, 0); + TyObject *exc_type = TyStructSequence_GET_ITEM(args, 0); if (exc_type == TyExc_SystemExit) { /* silently ignore SystemExit */ Py_RETURN_NONE; } /* Borrowed references */ - TyObject *exc_value = PyStructSequence_GET_ITEM(args, 1); - TyObject *exc_tb = PyStructSequence_GET_ITEM(args, 2); - TyObject *thread = PyStructSequence_GET_ITEM(args, 3); + TyObject *exc_value = TyStructSequence_GET_ITEM(args, 1); + TyObject *exc_tb = TyStructSequence_GET_ITEM(args, 2); + TyObject *thread = TyStructSequence_GET_ITEM(args, 3); TyObject *file; if (_TySys_GetOptionalAttr( &_Ty_ID(stderr), &file) < 0) { @@ -2316,7 +2316,7 @@ thread_excepthook(TyObject *module, TyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(excepthook_doc, +TyDoc_STRVAR(excepthook_doc, "_excepthook($module, args, /)\n\ --\n\ \n\ @@ -2325,11 +2325,11 @@ Handle uncaught Thread.run() exception."); static TyObject * thread__is_main_interpreter(TyObject *module, TyObject *Py_UNUSED(ignored)) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return TyBool_FromLong(_Ty_IsMainInterpreter(interp)); } -PyDoc_STRVAR(thread__is_main_interpreter_doc, +TyDoc_STRVAR(thread__is_main_interpreter_doc, "_is_main_interpreter($module, /)\n\ --\n\ \n\ @@ -2338,7 +2338,7 @@ Return True if the current interpreter is the main Python interpreter."); static TyObject * thread_shutdown(TyObject *self, TyObject *args) { - PyThread_ident_t ident = PyThread_get_thread_ident_ex(); + TyThread_ident_t ident = TyThread_get_thread_ident_ex(); thread_module_state *state = get_thread_state(self); for (;;) { @@ -2377,7 +2377,7 @@ thread_shutdown(TyObject *self, TyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(shutdown_doc, +TyDoc_STRVAR(shutdown_doc, "_shutdown($module, /)\n\ --\n\ \n\ @@ -2391,7 +2391,7 @@ thread__make_thread_handle(TyObject *module, TyObject *identobj) TyErr_SetString(TyExc_TypeError, "ident must be an integer"); return NULL; } - PyThread_ident_t ident = TyLong_AsUnsignedLongLong(identobj); + TyThread_ident_t ident = TyLong_AsUnsignedLongLong(identobj); if (TyErr_Occurred()) { return NULL; } @@ -2407,7 +2407,7 @@ thread__make_thread_handle(TyObject *module, TyObject *identobj) return (TyObject*) hobj; } -PyDoc_STRVAR(thread__make_thread_handle_doc, +TyDoc_STRVAR(thread__make_thread_handle_doc, "_make_thread_handle($module, ident, /)\n\ --\n\ \n\ @@ -2420,7 +2420,7 @@ thread__get_main_thread_ident(TyObject *module, TyObject *Py_UNUSED(ignored)) return TyLong_FromUnsignedLongLong(_PyRuntime.main_thread); } -PyDoc_STRVAR(thread__get_main_thread_ident_doc, +TyDoc_STRVAR(thread__get_main_thread_ident_doc, "_get_main_thread_ident($module, /)\n\ --\n\ \n\ @@ -2506,7 +2506,7 @@ _thread_set_name_impl(TyObject *module, TyObject *name_obj) #else // Encode the thread name to the filesystem encoding using the "replace" // error handler - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); const char *encoding = interp->unicode.fs_codec.encoding; #endif TyObject *name_encoded; @@ -2636,7 +2636,7 @@ thread_module_exec(TyObject *module) TyObject *d = TyModule_GetDict(module); // Initialize the C thread library - PyThread_init_thread(); + TyThread_init_thread(); // _ThreadHandle state->thread_handle_type = (TyTypeObject *)TyType_FromSpec(&ThreadHandle_Type_spec); @@ -2692,7 +2692,7 @@ thread_module_exec(TyObject *module) } // _ExceptHookArgs type - state->excepthook_type = PyStructSequence_NewType(&ExceptHookArgs_desc); + state->excepthook_type = TyStructSequence_NewType(&ExceptHookArgs_desc); if (state->excepthook_type == NULL) { return -1; } @@ -2786,7 +2786,7 @@ thread_module_free(void *module) -PyDoc_STRVAR(thread_doc, +TyDoc_STRVAR(thread_doc, "This module provides primitive operations to write multi-threaded programs.\n\ The 'threading' module provides a more convenient interface."); diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 0bdb7be..f520268 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -255,7 +255,7 @@ _get_tcl_lib_path(void) */ -static PyThread_type_lock tcl_lock = 0; +static TyThread_type_lock tcl_lock = 0; #ifdef TCL_THREADS static Tcl_ThreadDataKey state_key; @@ -269,29 +269,29 @@ static TyThreadState *tcl_tstate = NULL; #define ENTER_TCL \ { TyThreadState *tstate = TyThreadState_Get(); \ Ty_BEGIN_ALLOW_THREADS \ - if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); \ + if(tcl_lock)TyThread_acquire_lock(tcl_lock, 1); \ tcl_tstate = tstate; #define LEAVE_TCL \ tcl_tstate = NULL; \ - if(tcl_lock)PyThread_release_lock(tcl_lock); \ + if(tcl_lock)TyThread_release_lock(tcl_lock); \ Ty_END_ALLOW_THREADS} #define ENTER_OVERLAP \ Ty_END_ALLOW_THREADS #define LEAVE_OVERLAP_TCL \ - tcl_tstate = NULL; if(tcl_lock)PyThread_release_lock(tcl_lock); } + tcl_tstate = NULL; if(tcl_lock)TyThread_release_lock(tcl_lock); } #define ENTER_PYTHON \ { TyThreadState *tstate = tcl_tstate; tcl_tstate = NULL; \ if(tcl_lock) \ - PyThread_release_lock(tcl_lock); \ + TyThread_release_lock(tcl_lock); \ TyEval_RestoreThread((tstate)); } #define LEAVE_PYTHON \ { TyThreadState *tstate = TyEval_SaveThread(); \ - if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); \ + if(tcl_lock)TyThread_acquire_lock(tcl_lock, 1); \ tcl_tstate = tstate; } #ifndef FREECAST @@ -615,7 +615,7 @@ Tkapp_New(const char *screenName, const char *className, #endif if (v->threaded && tcl_lock) { /* If Tcl is threaded, we don't need the lock. */ - PyThread_free_lock(tcl_lock); + TyThread_free_lock(tcl_lock); tcl_lock = NULL; } @@ -811,7 +811,7 @@ PyTclObject_dealloc(TyObject *_self) } /* Like _str, but create Unicode if necessary. */ -PyDoc_STRVAR(PyTclObject_string__doc__, +TyDoc_STRVAR(PyTclObject_string__doc__, "the string representation of this object, either as str or bytes"); static TyObject * @@ -879,7 +879,7 @@ PyTclObject_richcompare(TyObject *self, TyObject *other, int op) Py_RETURN_RICHCOMPARE(result, 0, op); } -PyDoc_STRVAR(get_typename__doc__, "name of the Tcl type"); +TyDoc_STRVAR(get_typename__doc__, "name of the Tcl type"); static TyObject* get_typename(TyObject *self, void *Py_UNUSED(closure)) @@ -2877,11 +2877,11 @@ _tkinter_tkapp_mainloop_impl(TkappObject *self, int threshold) } else { Ty_BEGIN_ALLOW_THREADS - if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); + if(tcl_lock)TyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; result = Tcl_DoOneEvent(TCL_DONT_WAIT); tcl_tstate = NULL; - if(tcl_lock)PyThread_release_lock(tcl_lock); + if(tcl_lock)TyThread_release_lock(tcl_lock); if (result == 0) Sleep(Tkinter_busywaitinterval); Ty_END_ALLOW_THREADS @@ -3373,13 +3373,13 @@ EventHook(void) } #endif Ty_BEGIN_ALLOW_THREADS - if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); + if(tcl_lock)TyThread_acquire_lock(tcl_lock, 1); tcl_tstate = event_tstate; result = Tcl_DoOneEvent(TCL_DONT_WAIT); tcl_tstate = NULL; - if(tcl_lock)PyThread_release_lock(tcl_lock); + if(tcl_lock)TyThread_release_lock(tcl_lock); if (result == 0) Sleep(Tkinter_busywaitinterval); Ty_END_ALLOW_THREADS @@ -3464,7 +3464,7 @@ PyInit__tkinter(void) { TyObject *m, *uexe, *cexe; - tcl_lock = PyThread_allocate_lock(); + tcl_lock = TyThread_allocate_lock(); if (tcl_lock == NULL) return NULL; diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 594901f..723edef 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -200,7 +200,7 @@ static TyMethodDef module_methods[] = { {NULL, NULL} }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "Debug module to trace memory blocks allocated by Python."); static struct TyModuleDef module_def = { diff --git a/Modules/_typingmodule.c b/Modules/_typingmodule.c index 64dce7a..55ae65a 100644 --- a/Modules/_typingmodule.c +++ b/Modules/_typingmodule.c @@ -40,13 +40,13 @@ static TyMethodDef typing_methods[] = { {NULL, NULL, 0, NULL} }; -PyDoc_STRVAR(typing_doc, +TyDoc_STRVAR(typing_doc, "Primitives and accelerators for the typing module.\n"); static int _typing_exec(TyObject *m) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); #define EXPORT_TYPE(name, typename) \ if (TyModule_AddObjectRef(m, name, \ diff --git a/Modules/_zoneinfo.c b/Modules/_zoneinfo.c index 9a0cd73..3a7c62b 100644 --- a/Modules/_zoneinfo.c +++ b/Modules/_zoneinfo.c @@ -2605,14 +2605,14 @@ static TyMethodDef zoneinfo_methods[] = { ZONEINFO_ZONEINFO_DST_METHODDEF ZONEINFO_ZONEINFO_TZNAME_METHODDEF {"fromutc", zoneinfo_fromutc, METH_O, - PyDoc_STR("Given a datetime with local time in UTC, retrieve an adjusted " + TyDoc_STR("Given a datetime with local time in UTC, retrieve an adjusted " "datetime in local time.")}, {"__reduce__", zoneinfo_reduce, METH_NOARGS, - PyDoc_STR("Function for serialization with the pickle protocol.")}, + TyDoc_STR("Function for serialization with the pickle protocol.")}, ZONEINFO_ZONEINFO__UNPICKLE_METHODDEF {"__init_subclass__", _PyCFunction_CAST(zoneinfo_init_subclass), METH_VARARGS | METH_KEYWORDS | METH_CLASS, - PyDoc_STR("Function to initialize subclasses.")}, + TyDoc_STR("Function to initialize subclasses.")}, {NULL} /* Sentinel */ }; diff --git a/Modules/_zstd/clinic/_zstdmodule.c.h b/Modules/_zstd/clinic/_zstdmodule.c.h index 4d8710d..b981f5b 100644 --- a/Modules/_zstd/clinic/_zstdmodule.c.h +++ b/Modules/_zstd/clinic/_zstdmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_zstd_train_dict__doc__, +TyDoc_STRVAR(_zstd_train_dict__doc__, "train_dict($module, samples_bytes, samples_sizes, dict_size, /)\n" "--\n" "\n" @@ -68,7 +68,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_finalize_dict__doc__, +TyDoc_STRVAR(_zstd_finalize_dict__doc__, "finalize_dict($module, custom_dict_bytes, samples_bytes, samples_sizes,\n" " dict_size, compression_level, /)\n" "--\n" @@ -145,7 +145,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_get_param_bounds__doc__, +TyDoc_STRVAR(_zstd_get_param_bounds__doc__, "get_param_bounds($module, /, parameter, is_compress)\n" "--\n" "\n" @@ -175,7 +175,7 @@ _zstd_get_param_bounds(TyObject *module, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(parameter), &_Ty_ID(is_compress), }, }; @@ -216,7 +216,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_get_frame_size__doc__, +TyDoc_STRVAR(_zstd_get_frame_size__doc__, "get_frame_size($module, /, frame_buffer)\n" "--\n" "\n" @@ -245,7 +245,7 @@ _zstd_get_frame_size(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(frame_buffer), }, }; @@ -285,7 +285,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_get_frame_info__doc__, +TyDoc_STRVAR(_zstd_get_frame_info__doc__, "get_frame_info($module, /, frame_buffer)\n" "--\n" "\n" @@ -313,7 +313,7 @@ _zstd_get_frame_info(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(frame_buffer), }, }; @@ -353,7 +353,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_set_parameter_types__doc__, +TyDoc_STRVAR(_zstd_set_parameter_types__doc__, "set_parameter_types($module, /, c_parameter_type, d_parameter_type)\n" "--\n" "\n" @@ -384,7 +384,7 @@ _zstd_set_parameter_types(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(c_parameter_type), &_Ty_ID(d_parameter_type), }, }; diff --git a/Modules/_zstd/clinic/compressor.c.h b/Modules/_zstd/clinic/compressor.c.h index 7c410f9..50c1551 100644 --- a/Modules/_zstd/clinic/compressor.c.h +++ b/Modules/_zstd/clinic/compressor.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_zstd_ZstdCompressor_new__doc__, +TyDoc_STRVAR(_zstd_ZstdCompressor_new__doc__, "ZstdCompressor(level=None, options=None, zstd_dict=None)\n" "--\n" "\n" @@ -41,7 +41,7 @@ _zstd_ZstdCompressor_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(level), &_Ty_ID(options), &_Ty_ID(zstd_dict), }, }; @@ -95,7 +95,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_ZstdCompressor_compress__doc__, +TyDoc_STRVAR(_zstd_ZstdCompressor_compress__doc__, "compress($self, /, data, mode=ZstdCompressor.CONTINUE)\n" "--\n" "\n" @@ -129,7 +129,7 @@ _zstd_ZstdCompressor_compress(TyObject *self, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(mode), }, }; @@ -179,7 +179,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_ZstdCompressor_flush__doc__, +TyDoc_STRVAR(_zstd_ZstdCompressor_flush__doc__, "flush($self, /, mode=ZstdCompressor.FLUSH_FRAME)\n" "--\n" "\n" @@ -212,7 +212,7 @@ _zstd_ZstdCompressor_flush(TyObject *self, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(mode), }, }; @@ -253,7 +253,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_ZstdCompressor_set_pledged_input_size__doc__, +TyDoc_STRVAR(_zstd_ZstdCompressor_set_pledged_input_size__doc__, "set_pledged_input_size($self, size, /)\n" "--\n" "\n" diff --git a/Modules/_zstd/clinic/decompressor.c.h b/Modules/_zstd/clinic/decompressor.c.h index 548b0e9..55e6f5e 100644 --- a/Modules/_zstd/clinic/decompressor.c.h +++ b/Modules/_zstd/clinic/decompressor.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_zstd_ZstdDecompressor_new__doc__, +TyDoc_STRVAR(_zstd_ZstdDecompressor_new__doc__, "ZstdDecompressor(zstd_dict=None, options=None)\n" "--\n" "\n" @@ -40,7 +40,7 @@ _zstd_ZstdDecompressor_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(zstd_dict), &_Ty_ID(options), }, }; @@ -87,7 +87,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_ZstdDecompressor_unused_data__doc__, +TyDoc_STRVAR(_zstd_ZstdDecompressor_unused_data__doc__, "A bytes object of un-consumed input data.\n" "\n" "When ZstdDecompressor object stops after a frame is\n" @@ -116,7 +116,7 @@ _zstd_ZstdDecompressor_unused_data_get(TyObject *self, void *Py_UNUSED(context)) return _zstd_ZstdDecompressor_unused_data_get_impl((ZstdDecompressor *)self); } -PyDoc_STRVAR(_zstd_ZstdDecompressor_decompress__doc__, +TyDoc_STRVAR(_zstd_ZstdDecompressor_decompress__doc__, "decompress($self, /, data, max_length=-1)\n" "--\n" "\n" @@ -163,7 +163,7 @@ _zstd_ZstdDecompressor_decompress(TyObject *self, TyObject *const *args, Ty_ssiz Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(max_length), }, }; diff --git a/Modules/_zstd/clinic/zstddict.c.h b/Modules/_zstd/clinic/zstddict.c.h index f98b62f..55d50b3 100644 --- a/Modules/_zstd/clinic/zstddict.c.h +++ b/Modules/_zstd/clinic/zstddict.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_zstd_ZstdDict_new__doc__, +TyDoc_STRVAR(_zstd_ZstdDict_new__doc__, "ZstdDict(dict_content, /, *, is_raw=False)\n" "--\n" "\n" @@ -41,7 +41,7 @@ _zstd_ZstdDict_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(is_raw), }, }; @@ -93,7 +93,7 @@ exit: return return_value; } -PyDoc_STRVAR(_zstd_ZstdDict_dict_content__doc__, +TyDoc_STRVAR(_zstd_ZstdDict_dict_content__doc__, "The content of a Zstandard dictionary, as a bytes object."); #if defined(_zstd_ZstdDict_dict_content_DOCSTR) # undef _zstd_ZstdDict_dict_content_DOCSTR @@ -119,7 +119,7 @@ _zstd_ZstdDict_dict_content_get(TyObject *self, void *Py_UNUSED(context)) return _zstd_ZstdDict_dict_content_get_impl((ZstdDict *)self); } -PyDoc_STRVAR(_zstd_ZstdDict_as_digested_dict__doc__, +TyDoc_STRVAR(_zstd_ZstdDict_as_digested_dict__doc__, "Load as a digested dictionary to compressor.\n" "\n" "Pass this attribute as zstd_dict argument:\n" @@ -155,7 +155,7 @@ _zstd_ZstdDict_as_digested_dict_get(TyObject *self, void *Py_UNUSED(context)) return _zstd_ZstdDict_as_digested_dict_get_impl((ZstdDict *)self); } -PyDoc_STRVAR(_zstd_ZstdDict_as_undigested_dict__doc__, +TyDoc_STRVAR(_zstd_ZstdDict_as_undigested_dict__doc__, "Load as an undigested dictionary to compressor.\n" "\n" "Pass this attribute as zstd_dict argument:\n" @@ -189,7 +189,7 @@ _zstd_ZstdDict_as_undigested_dict_get(TyObject *self, void *Py_UNUSED(context)) return _zstd_ZstdDict_as_undigested_dict_get_impl((ZstdDict *)self); } -PyDoc_STRVAR(_zstd_ZstdDict_as_prefix__doc__, +TyDoc_STRVAR(_zstd_ZstdDict_as_prefix__doc__, "Load as a prefix to compressor/decompressor.\n" "\n" "Pass this attribute as zstd_dict argument:\n" diff --git a/Modules/_zstd/compressor.c b/Modules/_zstd/compressor.c index e226735..ace77d3 100644 --- a/Modules/_zstd/compressor.c +++ b/Modules/_zstd/compressor.c @@ -747,7 +747,7 @@ static TyMethodDef ZstdCompressor_methods[] = { {NULL, NULL} }; -PyDoc_STRVAR(ZstdCompressor_last_mode_doc, +TyDoc_STRVAR(ZstdCompressor_last_mode_doc, "The last mode used to this compressor object, its value can be .CONTINUE,\n" ".FLUSH_BLOCK, .FLUSH_FRAME. Initialized to .FLUSH_FRAME.\n\n" "It can be used to get the current state of a compressor, such as, data\n" diff --git a/Modules/_zstd/decompressor.c b/Modules/_zstd/decompressor.c index ad1ab84..96b38ad 100644 --- a/Modules/_zstd/decompressor.c +++ b/Modules/_zstd/decompressor.c @@ -656,11 +656,11 @@ static TyMethodDef ZstdDecompressor_methods[] = { {NULL, NULL} }; -PyDoc_STRVAR(ZstdDecompressor_eof_doc, +TyDoc_STRVAR(ZstdDecompressor_eof_doc, "True means the end of the first frame has been reached. If decompress data\n" "after that, an EOFError exception will be raised."); -PyDoc_STRVAR(ZstdDecompressor_needs_input_doc, +TyDoc_STRVAR(ZstdDecompressor_needs_input_doc, "If the max_length output limit in .decompress() method has been reached,\n" "and the decompressor has (or may has) unconsumed input data, it will be set\n" "to False. In this case, passing b'' to the .decompress() method may output\n" diff --git a/Modules/_zstd/zstddict.c b/Modules/_zstd/zstddict.c index a9cff6e..a8fe465 100644 --- a/Modules/_zstd/zstddict.c +++ b/Modules/_zstd/zstddict.c @@ -118,7 +118,7 @@ ZstdDict_dealloc(TyObject *ob) Ty_DECREF(tp); } -PyDoc_STRVAR(ZstdDict_dictid_doc, +TyDoc_STRVAR(ZstdDict_dictid_doc, "the Zstandard dictionary, an int between 0 and 2**32.\n\n" "A non-zero value represents an ordinary Zstandard dictionary, " "conforming to the standardised format.\n\n" diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 7443a8c..037d888 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2405,7 +2405,7 @@ static TyMethodDef array_methods[] = { ARRAY_ARRAY_TOBYTES_METHODDEF ARRAY_ARRAY_TOUNICODE_METHODDEF ARRAY_ARRAY___SIZEOF___METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -2877,13 +2877,13 @@ array_new(TyTypeObject *type, TyObject *args, TyObject *kwds) } -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module defines an object type which can efficiently represent\n\ an array of basic values: characters, integers, floating-point\n\ numbers. Arrays are sequence types and behave very much like lists,\n\ except that the type of objects stored in them is constrained.\n"); -PyDoc_STRVAR(arraytype_doc, +TyDoc_STRVAR(arraytype_doc, "array(typecode [, initializer]) -> array\n\ \n\ Return a new array whose items are restricted by typecode, and\n\ diff --git a/Modules/atexitmodule.c b/Modules/atexitmodule.c index c65d22a..f59a280 100644 --- a/Modules/atexitmodule.c +++ b/Modules/atexitmodule.c @@ -9,7 +9,7 @@ #include "Python.h" #include "pycore_atexit.h" // export _Ty_AtExit() #include "pycore_initconfig.h" // _TyStatus_NO_MEMORY -#include "pycore_interp.h" // PyInterpreterState.atexit +#include "pycore_interp.h" // TyInterpreterState.atexit #include "pycore_pystate.h" // _TyInterpreterState_GET /* ===================================================================== */ @@ -18,13 +18,13 @@ static inline struct atexit_state* get_atexit_state(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return &interp->atexit; } int -PyUnstable_AtExit(PyInterpreterState *interp, +PyUnstable_AtExit(TyInterpreterState *interp, atexit_datacallbackfunc func, void *data) { TyThreadState *tstate = _TyThreadState_GET(); @@ -64,7 +64,7 @@ atexit_cleanup(struct atexit_state *state) TyStatus -_PyAtExit_Init(PyInterpreterState *interp) +_PyAtExit_Init(TyInterpreterState *interp) { struct atexit_state *state = &interp->atexit; // _PyAtExit_Init() must only be called once @@ -78,7 +78,7 @@ _PyAtExit_Init(PyInterpreterState *interp) } void -_PyAtExit_Fini(PyInterpreterState *interp) +_PyAtExit_Fini(TyInterpreterState *interp) { // In theory, there shouldn't be any threads left by now, so we // won't lock this. @@ -145,7 +145,7 @@ atexit_callfuncs(struct atexit_state *state) void -_PyAtExit_Call(PyInterpreterState *interp) +_PyAtExit_Call(TyInterpreterState *interp) { struct atexit_state *state = &interp->atexit; atexit_callfuncs(state); @@ -156,7 +156,7 @@ _PyAtExit_Call(PyInterpreterState *interp) /* Module methods. */ -PyDoc_STRVAR(atexit_register__doc__, +TyDoc_STRVAR(atexit_register__doc__, "register($module, func, /, *args, **kwargs)\n\ --\n\ \n\ @@ -208,7 +208,7 @@ atexit_register(TyObject *module, TyObject *args, TyObject *kwargs) return Ty_NewRef(func); } -PyDoc_STRVAR(atexit_run_exitfuncs__doc__, +TyDoc_STRVAR(atexit_run_exitfuncs__doc__, "_run_exitfuncs($module, /)\n\ --\n\ \n\ @@ -224,7 +224,7 @@ atexit_run_exitfuncs(TyObject *module, TyObject *Py_UNUSED(dummy)) Py_RETURN_NONE; } -PyDoc_STRVAR(atexit_clear__doc__, +TyDoc_STRVAR(atexit_clear__doc__, "_clear($module, /)\n\ --\n\ \n\ @@ -237,7 +237,7 @@ atexit_clear(TyObject *module, TyObject *Py_UNUSED(dummy)) Py_RETURN_NONE; } -PyDoc_STRVAR(atexit_ncallbacks__doc__, +TyDoc_STRVAR(atexit_ncallbacks__doc__, "_ncallbacks($module, /)\n\ --\n\ \n\ @@ -276,7 +276,7 @@ atexit_unregister_locked(TyObject *callbacks, TyObject *func) return 0; } -PyDoc_STRVAR(atexit_unregister__doc__, +TyDoc_STRVAR(atexit_unregister__doc__, "unregister($module, func, /)\n\ --\n\ \n\ @@ -313,7 +313,7 @@ static TyMethodDef atexit_methods[] = { /* ===================================================================== */ /* Initialization function. */ -PyDoc_STRVAR(atexit__doc__, +TyDoc_STRVAR(atexit__doc__, "allow programmer to define multiple exit functions to be executed\n\ upon normal program termination.\n\ \n\ diff --git a/Modules/binascii.c b/Modules/binascii.c index afbee08..69d38bd 100644 --- a/Modules/binascii.c +++ b/Modules/binascii.c @@ -1259,7 +1259,7 @@ static struct TyMethodDef binascii_module_methods[] = { /* Initialization function for the module (*must* be called PyInit_binascii) */ -PyDoc_STRVAR(doc_binascii, "Conversion between binary data and ASCII"); +TyDoc_STRVAR(doc_binascii, "Conversion between binary data and ASCII"); static int binascii_exec(TyObject *module) diff --git a/Modules/blake2module.c b/Modules/blake2module.c index 5d0a9ae..ac36577 100644 --- a/Modules/blake2module.c +++ b/Modules/blake2module.c @@ -147,7 +147,7 @@ static inline bool has_simd256(cpu_flags *flags) { static TyType_Spec blake2b_type_spec; static TyType_Spec blake2s_type_spec; -PyDoc_STRVAR(blake2mod__doc__, +TyDoc_STRVAR(blake2mod__doc__, "_blake2b provides BLAKE2b for hashlib\n" ); diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index bee16d3..f10d5e7 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_multibytecodec_MultibyteCodec_encode__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteCodec_encode__doc__, "encode($self, /, input, errors=None)\n" "--\n" "\n" @@ -40,7 +40,7 @@ _multibytecodec_MultibyteCodec_encode(TyObject *self, TyObject *const *args, Ty_ Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(input), &_Ty_ID(errors), }, }; @@ -97,7 +97,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteCodec_decode__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteCodec_decode__doc__, "decode($self, /, input, errors=None)\n" "--\n" "\n" @@ -129,7 +129,7 @@ _multibytecodec_MultibyteCodec_decode(TyObject *self, TyObject *const *args, Ty_ Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(input), &_Ty_ID(errors), }, }; @@ -193,7 +193,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_encode__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_encode__doc__, "encode($self, /, input, final=False)\n" "--\n" "\n"); @@ -219,7 +219,7 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(TyObject *self, TyObject *con Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(input), &_Ty_ID(final), }, }; @@ -262,7 +262,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_getstate__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_getstate__doc__, "getstate($self, /)\n" "--\n" "\n"); @@ -279,7 +279,7 @@ _multibytecodec_MultibyteIncrementalEncoder_getstate(TyObject *self, TyObject *P return _multibytecodec_MultibyteIncrementalEncoder_getstate_impl((MultibyteIncrementalEncoderObject *)self); } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_setstate__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_setstate__doc__, "setstate($self, state, /)\n" "--\n" "\n"); @@ -308,7 +308,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_reset__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_reset__doc__, "reset($self, /)\n" "--\n" "\n"); @@ -325,7 +325,7 @@ _multibytecodec_MultibyteIncrementalEncoder_reset(TyObject *self, TyObject *Py_U return _multibytecodec_MultibyteIncrementalEncoder_reset_impl((MultibyteIncrementalEncoderObject *)self); } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_decode__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_decode__doc__, "decode($self, /, input, final=False)\n" "--\n" "\n"); @@ -351,7 +351,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(TyObject *self, TyObject *con Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(input), &_Ty_ID(final), }, }; @@ -401,7 +401,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_getstate__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_getstate__doc__, "getstate($self, /)\n" "--\n" "\n"); @@ -418,7 +418,7 @@ _multibytecodec_MultibyteIncrementalDecoder_getstate(TyObject *self, TyObject *P return _multibytecodec_MultibyteIncrementalDecoder_getstate_impl((MultibyteIncrementalDecoderObject *)self); } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_setstate__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_setstate__doc__, "setstate($self, state, /)\n" "--\n" "\n"); @@ -447,7 +447,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_reset__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_reset__doc__, "reset($self, /)\n" "--\n" "\n"); @@ -464,7 +464,7 @@ _multibytecodec_MultibyteIncrementalDecoder_reset(TyObject *self, TyObject *Py_U return _multibytecodec_MultibyteIncrementalDecoder_reset_impl((MultibyteIncrementalDecoderObject *)self); } -PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_read__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_read__doc__, "read($self, sizeobj=None, /)\n" "--\n" "\n"); @@ -496,7 +496,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readline__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readline__doc__, "readline($self, sizeobj=None, /)\n" "--\n" "\n"); @@ -528,7 +528,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readlines__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readlines__doc__, "readlines($self, sizehintobj=None, /)\n" "--\n" "\n"); @@ -560,7 +560,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_reset__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_reset__doc__, "reset($self, /)\n" "--\n" "\n"); @@ -577,7 +577,7 @@ _multibytecodec_MultibyteStreamReader_reset(TyObject *self, TyObject *Py_UNUSED( return _multibytecodec_MultibyteStreamReader_reset_impl((MultibyteStreamReaderObject *)self); } -PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_write__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_write__doc__, "write($self, strobj, /)\n" "--\n" "\n"); @@ -622,7 +622,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_writelines__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_writelines__doc__, "writelines($self, lines, /)\n" "--\n" "\n"); @@ -667,7 +667,7 @@ exit: return return_value; } -PyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_reset__doc__, +TyDoc_STRVAR(_multibytecodec_MultibyteStreamWriter_reset__doc__, "reset($self, /)\n" "--\n" "\n"); @@ -689,7 +689,7 @@ _multibytecodec_MultibyteStreamWriter_reset(TyObject *self, TyTypeObject *cls, T return _multibytecodec_MultibyteStreamWriter_reset_impl((MultibyteStreamWriterObject *)self, cls); } -PyDoc_STRVAR(_multibytecodec___create_codec__doc__, +TyDoc_STRVAR(_multibytecodec___create_codec__doc__, "__create_codec($module, arg, /)\n" "--\n" "\n"); diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 7e7f05c..f30e5ad 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -207,7 +207,7 @@ codecctx_errors_set(TyObject *op, TyObject *value, void *Py_UNUSED(closure)) /* This getset handlers list is used by all the stateful codec objects */ static TyGetSetDef codecctx_getsets[] = { {"errors", codecctx_errors_get, codecctx_errors_set, - PyDoc_STR("how to treat errors")}, + TyDoc_STR("how to treat errors")}, {NULL,} }; diff --git a/Modules/clinic/_abc.c.h b/Modules/clinic/_abc.c.h index e7a0a96..246fb43 100644 --- a/Modules/clinic/_abc.c.h +++ b/Modules/clinic/_abc.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_abc__reset_registry__doc__, +TyDoc_STRVAR(_abc__reset_registry__doc__, "_reset_registry($module, self, /)\n" "--\n" "\n" @@ -15,7 +15,7 @@ PyDoc_STRVAR(_abc__reset_registry__doc__, #define _ABC__RESET_REGISTRY_METHODDEF \ {"_reset_registry", (PyCFunction)_abc__reset_registry, METH_O, _abc__reset_registry__doc__}, -PyDoc_STRVAR(_abc__reset_caches__doc__, +TyDoc_STRVAR(_abc__reset_caches__doc__, "_reset_caches($module, self, /)\n" "--\n" "\n" @@ -26,7 +26,7 @@ PyDoc_STRVAR(_abc__reset_caches__doc__, #define _ABC__RESET_CACHES_METHODDEF \ {"_reset_caches", (PyCFunction)_abc__reset_caches, METH_O, _abc__reset_caches__doc__}, -PyDoc_STRVAR(_abc__get_dump__doc__, +TyDoc_STRVAR(_abc__get_dump__doc__, "_get_dump($module, self, /)\n" "--\n" "\n" @@ -39,7 +39,7 @@ PyDoc_STRVAR(_abc__get_dump__doc__, #define _ABC__GET_DUMP_METHODDEF \ {"_get_dump", (PyCFunction)_abc__get_dump, METH_O, _abc__get_dump__doc__}, -PyDoc_STRVAR(_abc__abc_init__doc__, +TyDoc_STRVAR(_abc__abc_init__doc__, "_abc_init($module, self, /)\n" "--\n" "\n" @@ -48,7 +48,7 @@ PyDoc_STRVAR(_abc__abc_init__doc__, #define _ABC__ABC_INIT_METHODDEF \ {"_abc_init", (PyCFunction)_abc__abc_init, METH_O, _abc__abc_init__doc__}, -PyDoc_STRVAR(_abc__abc_register__doc__, +TyDoc_STRVAR(_abc__abc_register__doc__, "_abc_register($module, self, subclass, /)\n" "--\n" "\n" @@ -78,7 +78,7 @@ exit: return return_value; } -PyDoc_STRVAR(_abc__abc_instancecheck__doc__, +TyDoc_STRVAR(_abc__abc_instancecheck__doc__, "_abc_instancecheck($module, self, instance, /)\n" "--\n" "\n" @@ -109,7 +109,7 @@ exit: return return_value; } -PyDoc_STRVAR(_abc__abc_subclasscheck__doc__, +TyDoc_STRVAR(_abc__abc_subclasscheck__doc__, "_abc_subclasscheck($module, self, subclass, /)\n" "--\n" "\n" @@ -140,7 +140,7 @@ exit: return return_value; } -PyDoc_STRVAR(_abc_get_cache_token__doc__, +TyDoc_STRVAR(_abc_get_cache_token__doc__, "get_cache_token($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_asynciomodule.c.h b/Modules/clinic/_asynciomodule.c.h index 0a7693b..a9a8a23 100644 --- a/Modules/clinic/_asynciomodule.c.h +++ b/Modules/clinic/_asynciomodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_asyncio_Future___init____doc__, +TyDoc_STRVAR(_asyncio_Future___init____doc__, "Future(*, loop=None)\n" "--\n" "\n" @@ -42,7 +42,7 @@ _asyncio_Future___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(loop), }, }; @@ -82,7 +82,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Future_result__doc__, +TyDoc_STRVAR(_asyncio_Future_result__doc__, "result($self, /)\n" "--\n" "\n" @@ -110,7 +110,7 @@ _asyncio_Future_result(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_asyncio_Future_exception__doc__, +TyDoc_STRVAR(_asyncio_Future_exception__doc__, "exception($self, /)\n" "--\n" "\n" @@ -144,7 +144,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Future_set_result__doc__, +TyDoc_STRVAR(_asyncio_Future_set_result__doc__, "set_result($self, result, /)\n" "--\n" "\n" @@ -194,7 +194,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Future_set_exception__doc__, +TyDoc_STRVAR(_asyncio_Future_set_exception__doc__, "set_exception($self, exception, /)\n" "--\n" "\n" @@ -244,7 +244,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Future_add_done_callback__doc__, +TyDoc_STRVAR(_asyncio_Future_add_done_callback__doc__, "add_done_callback($self, fn, /, *, context=)\n" "--\n" "\n" @@ -274,7 +274,7 @@ _asyncio_Future_add_done_callback(TyObject *self, TyTypeObject *cls, TyObject *c Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(context), }, }; @@ -316,7 +316,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Future_remove_done_callback__doc__, +TyDoc_STRVAR(_asyncio_Future_remove_done_callback__doc__, "remove_done_callback($self, fn, /)\n" "--\n" "\n" @@ -365,7 +365,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Future_cancel__doc__, +TyDoc_STRVAR(_asyncio_Future_cancel__doc__, "cancel($self, /, msg=None)\n" "--\n" "\n" @@ -395,7 +395,7 @@ _asyncio_Future_cancel(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(msg), }, }; @@ -435,7 +435,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Future_cancelled__doc__, +TyDoc_STRVAR(_asyncio_Future_cancelled__doc__, "cancelled($self, /)\n" "--\n" "\n" @@ -459,7 +459,7 @@ _asyncio_Future_cancelled(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_asyncio_Future_done__doc__, +TyDoc_STRVAR(_asyncio_Future_done__doc__, "done($self, /)\n" "--\n" "\n" @@ -486,7 +486,7 @@ _asyncio_Future_done(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_asyncio_Future_get_loop__doc__, +TyDoc_STRVAR(_asyncio_Future_get_loop__doc__, "get_loop($self, /)\n" "--\n" "\n" @@ -841,7 +841,7 @@ _asyncio_Future__state_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_asyncio_Future__make_cancelled_error__doc__, +TyDoc_STRVAR(_asyncio_Future__make_cancelled_error__doc__, "_make_cancelled_error($self, /)\n" "--\n" "\n" @@ -868,7 +868,7 @@ _asyncio_Future__make_cancelled_error(TyObject *self, TyObject *Py_UNUSED(ignore return return_value; } -PyDoc_STRVAR(_asyncio_Task___init____doc__, +TyDoc_STRVAR(_asyncio_Task___init____doc__, "Task(coro, *, loop=None, name=None, context=None, eager_start=False)\n" "--\n" "\n" @@ -892,7 +892,7 @@ _asyncio_Task___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(coro), &_Ty_ID(loop), &_Ty_ID(name), &_Ty_ID(context), &_Ty_ID(eager_start), }, }; @@ -1083,7 +1083,7 @@ _asyncio_Task__fut_waiter_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_asyncio_Task__make_cancelled_error__doc__, +TyDoc_STRVAR(_asyncio_Task__make_cancelled_error__doc__, "_make_cancelled_error($self, /)\n" "--\n" "\n" @@ -1110,7 +1110,7 @@ _asyncio_Task__make_cancelled_error(TyObject *self, TyObject *Py_UNUSED(ignored) return return_value; } -PyDoc_STRVAR(_asyncio_Task_cancel__doc__, +TyDoc_STRVAR(_asyncio_Task_cancel__doc__, "cancel($self, /, msg=None)\n" "--\n" "\n" @@ -1154,7 +1154,7 @@ _asyncio_Task_cancel(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(msg), }, }; @@ -1194,7 +1194,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Task_cancelling__doc__, +TyDoc_STRVAR(_asyncio_Task_cancelling__doc__, "cancelling($self, /)\n" "--\n" "\n" @@ -1221,7 +1221,7 @@ _asyncio_Task_cancelling(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_asyncio_Task_uncancel__doc__, +TyDoc_STRVAR(_asyncio_Task_uncancel__doc__, "uncancel($self, /)\n" "--\n" "\n" @@ -1250,7 +1250,7 @@ _asyncio_Task_uncancel(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_asyncio_Task_get_stack__doc__, +TyDoc_STRVAR(_asyncio_Task_get_stack__doc__, "get_stack($self, /, *, limit=None)\n" "--\n" "\n" @@ -1294,7 +1294,7 @@ _asyncio_Task_get_stack(TyObject *self, TyTypeObject *cls, TyObject *const *args Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(limit), }, }; @@ -1332,7 +1332,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Task_print_stack__doc__, +TyDoc_STRVAR(_asyncio_Task_print_stack__doc__, "print_stack($self, /, *, limit=None, file=None)\n" "--\n" "\n" @@ -1364,7 +1364,7 @@ _asyncio_Task_print_stack(TyObject *self, TyTypeObject *cls, TyObject *const *ar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(limit), &_Ty_ID(file), }, }; @@ -1409,7 +1409,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_Task_set_result__doc__, +TyDoc_STRVAR(_asyncio_Task_set_result__doc__, "set_result($self, result, /)\n" "--\n" "\n"); @@ -1430,7 +1430,7 @@ _asyncio_Task_set_result(TyObject *self, TyObject *result) return return_value; } -PyDoc_STRVAR(_asyncio_Task_set_exception__doc__, +TyDoc_STRVAR(_asyncio_Task_set_exception__doc__, "set_exception($self, exception, /)\n" "--\n" "\n"); @@ -1451,7 +1451,7 @@ _asyncio_Task_set_exception(TyObject *self, TyObject *exception) return return_value; } -PyDoc_STRVAR(_asyncio_Task_get_coro__doc__, +TyDoc_STRVAR(_asyncio_Task_get_coro__doc__, "get_coro($self, /)\n" "--\n" "\n"); @@ -1474,7 +1474,7 @@ _asyncio_Task_get_coro(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_asyncio_Task_get_context__doc__, +TyDoc_STRVAR(_asyncio_Task_get_context__doc__, "get_context($self, /)\n" "--\n" "\n"); @@ -1491,7 +1491,7 @@ _asyncio_Task_get_context(TyObject *self, TyObject *Py_UNUSED(ignored)) return _asyncio_Task_get_context_impl((TaskObj *)self); } -PyDoc_STRVAR(_asyncio_Task_get_name__doc__, +TyDoc_STRVAR(_asyncio_Task_get_name__doc__, "get_name($self, /)\n" "--\n" "\n"); @@ -1514,7 +1514,7 @@ _asyncio_Task_get_name(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_asyncio_Task_set_name__doc__, +TyDoc_STRVAR(_asyncio_Task_set_name__doc__, "set_name($self, value, /)\n" "--\n" "\n"); @@ -1537,7 +1537,7 @@ _asyncio_Task_set_name(TyObject *self, TyObject *value) return return_value; } -PyDoc_STRVAR(_asyncio__get_running_loop__doc__, +TyDoc_STRVAR(_asyncio__get_running_loop__doc__, "_get_running_loop($module, /)\n" "--\n" "\n" @@ -1558,7 +1558,7 @@ _asyncio__get_running_loop(TyObject *module, TyObject *Py_UNUSED(ignored)) return _asyncio__get_running_loop_impl(module); } -PyDoc_STRVAR(_asyncio__set_running_loop__doc__, +TyDoc_STRVAR(_asyncio__set_running_loop__doc__, "_set_running_loop($module, loop, /)\n" "--\n" "\n" @@ -1570,7 +1570,7 @@ PyDoc_STRVAR(_asyncio__set_running_loop__doc__, #define _ASYNCIO__SET_RUNNING_LOOP_METHODDEF \ {"_set_running_loop", (PyCFunction)_asyncio__set_running_loop, METH_O, _asyncio__set_running_loop__doc__}, -PyDoc_STRVAR(_asyncio_get_event_loop__doc__, +TyDoc_STRVAR(_asyncio_get_event_loop__doc__, "get_event_loop($module, /)\n" "--\n" "\n" @@ -1595,7 +1595,7 @@ _asyncio_get_event_loop(TyObject *module, TyObject *Py_UNUSED(ignored)) return _asyncio_get_event_loop_impl(module); } -PyDoc_STRVAR(_asyncio_get_running_loop__doc__, +TyDoc_STRVAR(_asyncio_get_running_loop__doc__, "get_running_loop($module, /)\n" "--\n" "\n" @@ -1615,7 +1615,7 @@ _asyncio_get_running_loop(TyObject *module, TyObject *Py_UNUSED(ignored)) return _asyncio_get_running_loop_impl(module); } -PyDoc_STRVAR(_asyncio__register_task__doc__, +TyDoc_STRVAR(_asyncio__register_task__doc__, "_register_task($module, /, task)\n" "--\n" "\n" @@ -1642,7 +1642,7 @@ _asyncio__register_task(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(task), }, }; @@ -1675,7 +1675,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio__register_eager_task__doc__, +TyDoc_STRVAR(_asyncio__register_eager_task__doc__, "_register_eager_task($module, /, task)\n" "--\n" "\n" @@ -1702,7 +1702,7 @@ _asyncio__register_eager_task(TyObject *module, TyObject *const *args, Ty_ssize_ Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(task), }, }; @@ -1735,7 +1735,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio__unregister_task__doc__, +TyDoc_STRVAR(_asyncio__unregister_task__doc__, "_unregister_task($module, /, task)\n" "--\n" "\n" @@ -1762,7 +1762,7 @@ _asyncio__unregister_task(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(task), }, }; @@ -1795,7 +1795,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio__unregister_eager_task__doc__, +TyDoc_STRVAR(_asyncio__unregister_eager_task__doc__, "_unregister_eager_task($module, /, task)\n" "--\n" "\n" @@ -1822,7 +1822,7 @@ _asyncio__unregister_eager_task(TyObject *module, TyObject *const *args, Ty_ssiz Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(task), }, }; @@ -1855,7 +1855,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio__enter_task__doc__, +TyDoc_STRVAR(_asyncio__enter_task__doc__, "_enter_task($module, /, loop, task)\n" "--\n" "\n" @@ -1884,7 +1884,7 @@ _asyncio__enter_task(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(loop), &_Ty_ID(task), }, }; @@ -1919,7 +1919,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio__leave_task__doc__, +TyDoc_STRVAR(_asyncio__leave_task__doc__, "_leave_task($module, /, loop, task)\n" "--\n" "\n" @@ -1948,7 +1948,7 @@ _asyncio__leave_task(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(loop), &_Ty_ID(task), }, }; @@ -1983,7 +1983,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio__swap_current_task__doc__, +TyDoc_STRVAR(_asyncio__swap_current_task__doc__, "_swap_current_task($module, /, loop, task)\n" "--\n" "\n" @@ -2011,7 +2011,7 @@ _asyncio__swap_current_task(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(loop), &_Ty_ID(task), }, }; @@ -2046,7 +2046,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_current_task__doc__, +TyDoc_STRVAR(_asyncio_current_task__doc__, "current_task($module, /, loop=None)\n" "--\n" "\n" @@ -2071,7 +2071,7 @@ _asyncio_current_task(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(loop), }, }; @@ -2109,7 +2109,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_all_tasks__doc__, +TyDoc_STRVAR(_asyncio_all_tasks__doc__, "all_tasks($module, /, loop=None)\n" "--\n" "\n" @@ -2134,7 +2134,7 @@ _asyncio_all_tasks(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(loop), }, }; @@ -2172,7 +2172,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_future_add_to_awaited_by__doc__, +TyDoc_STRVAR(_asyncio_future_add_to_awaited_by__doc__, "future_add_to_awaited_by($module, fut, waiter, /)\n" "--\n" "\n" @@ -2203,7 +2203,7 @@ exit: return return_value; } -PyDoc_STRVAR(_asyncio_future_discard_from_awaited_by__doc__, +TyDoc_STRVAR(_asyncio_future_discard_from_awaited_by__doc__, "future_discard_from_awaited_by($module, fut, waiter, /)\n" "--\n" "\n"); diff --git a/Modules/clinic/_bisectmodule.c.h b/Modules/clinic/_bisectmodule.c.h index c881339..2f528f4 100644 --- a/Modules/clinic/_bisectmodule.c.h +++ b/Modules/clinic/_bisectmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_bisect_bisect_right__doc__, +TyDoc_STRVAR(_bisect_bisect_right__doc__, "bisect_right($module, /, a, x, lo=0, hi=None, *, key=None)\n" "--\n" "\n" @@ -44,7 +44,7 @@ _bisect_bisect_right(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('x'), &_Ty_ID(lo), &_Ty_ID(hi), &_Ty_ID(key), }, }; @@ -122,7 +122,7 @@ exit: return return_value; } -PyDoc_STRVAR(_bisect_insort_right__doc__, +TyDoc_STRVAR(_bisect_insort_right__doc__, "insort_right($module, /, a, x, lo=0, hi=None, *, key=None)\n" "--\n" "\n" @@ -155,7 +155,7 @@ _bisect_insort_right(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('x'), &_Ty_ID(lo), &_Ty_ID(hi), &_Ty_ID(key), }, }; @@ -228,7 +228,7 @@ exit: return return_value; } -PyDoc_STRVAR(_bisect_bisect_left__doc__, +TyDoc_STRVAR(_bisect_bisect_left__doc__, "bisect_left($module, /, a, x, lo=0, hi=None, *, key=None)\n" "--\n" "\n" @@ -263,7 +263,7 @@ _bisect_bisect_left(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('x'), &_Ty_ID(lo), &_Ty_ID(hi), &_Ty_ID(key), }, }; @@ -341,7 +341,7 @@ exit: return return_value; } -PyDoc_STRVAR(_bisect_insort_left__doc__, +TyDoc_STRVAR(_bisect_insort_left__doc__, "insort_left($module, /, a, x, lo=0, hi=None, *, key=None)\n" "--\n" "\n" @@ -374,7 +374,7 @@ _bisect_insort_left(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('x'), &_Ty_ID(lo), &_Ty_ID(hi), &_Ty_ID(key), }, }; diff --git a/Modules/clinic/_bz2module.c.h b/Modules/clinic/_bz2module.c.h index 7901b09..9d1c463 100644 --- a/Modules/clinic/_bz2module.c.h +++ b/Modules/clinic/_bz2module.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(_bz2_BZ2Compressor_compress__doc__, +TyDoc_STRVAR(_bz2_BZ2Compressor_compress__doc__, "compress($self, data, /)\n" "--\n" "\n" @@ -46,7 +46,7 @@ exit: return return_value; } -PyDoc_STRVAR(_bz2_BZ2Compressor_flush__doc__, +TyDoc_STRVAR(_bz2_BZ2Compressor_flush__doc__, "flush($self, /)\n" "--\n" "\n" @@ -68,7 +68,7 @@ _bz2_BZ2Compressor_flush(TyObject *self, TyObject *Py_UNUSED(ignored)) return _bz2_BZ2Compressor_flush_impl((BZ2Compressor *)self); } -PyDoc_STRVAR(_bz2_BZ2Compressor__doc__, +TyDoc_STRVAR(_bz2_BZ2Compressor__doc__, "BZ2Compressor(compresslevel=9, /)\n" "--\n" "\n" @@ -110,7 +110,7 @@ exit: return return_value; } -PyDoc_STRVAR(_bz2_BZ2Decompressor_decompress__doc__, +TyDoc_STRVAR(_bz2_BZ2Decompressor_decompress__doc__, "decompress($self, /, data, max_length=-1)\n" "--\n" "\n" @@ -149,7 +149,7 @@ _bz2_BZ2Decompressor_decompress(TyObject *self, TyObject *const *args, Ty_ssize_ Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(max_length), }, }; @@ -207,7 +207,7 @@ exit: return return_value; } -PyDoc_STRVAR(_bz2_BZ2Decompressor__doc__, +TyDoc_STRVAR(_bz2_BZ2Decompressor__doc__, "BZ2Decompressor()\n" "--\n" "\n" diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index 25f3505..e026717 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(_codecs_register__doc__, +TyDoc_STRVAR(_codecs_register__doc__, "register($module, search_function, /)\n" "--\n" "\n" @@ -21,7 +21,7 @@ PyDoc_STRVAR(_codecs_register__doc__, #define _CODECS_REGISTER_METHODDEF \ {"register", (PyCFunction)_codecs_register, METH_O, _codecs_register__doc__}, -PyDoc_STRVAR(_codecs_unregister__doc__, +TyDoc_STRVAR(_codecs_unregister__doc__, "unregister($module, search_function, /)\n" "--\n" "\n" @@ -32,7 +32,7 @@ PyDoc_STRVAR(_codecs_unregister__doc__, #define _CODECS_UNREGISTER_METHODDEF \ {"unregister", (PyCFunction)_codecs_unregister, METH_O, _codecs_unregister__doc__}, -PyDoc_STRVAR(_codecs_lookup__doc__, +TyDoc_STRVAR(_codecs_lookup__doc__, "lookup($module, encoding, /)\n" "--\n" "\n" @@ -69,7 +69,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_encode__doc__, +TyDoc_STRVAR(_codecs_encode__doc__, "encode($module, /, obj, encoding=\'utf-8\', errors=\'strict\')\n" "--\n" "\n" @@ -101,7 +101,7 @@ _codecs_encode(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(obj), &_Ty_ID(encoding), &_Ty_ID(errors), }, }; @@ -172,7 +172,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_decode__doc__, +TyDoc_STRVAR(_codecs_decode__doc__, "decode($module, /, obj, encoding=\'utf-8\', errors=\'strict\')\n" "--\n" "\n" @@ -204,7 +204,7 @@ _codecs_decode(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(obj), &_Ty_ID(encoding), &_Ty_ID(errors), }, }; @@ -275,7 +275,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_escape_decode__doc__, +TyDoc_STRVAR(_codecs_escape_decode__doc__, "escape_decode($module, data, errors=None, /)\n" "--\n" "\n"); @@ -345,7 +345,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_escape_encode__doc__, +TyDoc_STRVAR(_codecs_escape_encode__doc__, "escape_encode($module, data, errors=None, /)\n" "--\n" "\n"); @@ -400,7 +400,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_7_decode__doc__, +TyDoc_STRVAR(_codecs_utf_7_decode__doc__, "utf_7_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -466,7 +466,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_8_decode__doc__, +TyDoc_STRVAR(_codecs_utf_8_decode__doc__, "utf_8_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -532,7 +532,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_16_decode__doc__, +TyDoc_STRVAR(_codecs_utf_16_decode__doc__, "utf_16_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -598,7 +598,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_16_le_decode__doc__, +TyDoc_STRVAR(_codecs_utf_16_le_decode__doc__, "utf_16_le_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -664,7 +664,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_16_be_decode__doc__, +TyDoc_STRVAR(_codecs_utf_16_be_decode__doc__, "utf_16_be_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -730,7 +730,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_16_ex_decode__doc__, +TyDoc_STRVAR(_codecs_utf_16_ex_decode__doc__, "utf_16_ex_decode($module, data, errors=None, byteorder=0, final=False,\n" " /)\n" "--\n" @@ -805,7 +805,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_32_decode__doc__, +TyDoc_STRVAR(_codecs_utf_32_decode__doc__, "utf_32_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -871,7 +871,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_32_le_decode__doc__, +TyDoc_STRVAR(_codecs_utf_32_le_decode__doc__, "utf_32_le_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -937,7 +937,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_32_be_decode__doc__, +TyDoc_STRVAR(_codecs_utf_32_be_decode__doc__, "utf_32_be_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -1003,7 +1003,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_32_ex_decode__doc__, +TyDoc_STRVAR(_codecs_utf_32_ex_decode__doc__, "utf_32_ex_decode($module, data, errors=None, byteorder=0, final=False,\n" " /)\n" "--\n" @@ -1078,7 +1078,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_unicode_escape_decode__doc__, +TyDoc_STRVAR(_codecs_unicode_escape_decode__doc__, "unicode_escape_decode($module, data, errors=None, final=True, /)\n" "--\n" "\n"); @@ -1156,7 +1156,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_raw_unicode_escape_decode__doc__, +TyDoc_STRVAR(_codecs_raw_unicode_escape_decode__doc__, "raw_unicode_escape_decode($module, data, errors=None, final=True, /)\n" "--\n" "\n"); @@ -1234,7 +1234,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_latin_1_decode__doc__, +TyDoc_STRVAR(_codecs_latin_1_decode__doc__, "latin_1_decode($module, data, errors=None, /)\n" "--\n" "\n"); @@ -1292,7 +1292,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_ascii_decode__doc__, +TyDoc_STRVAR(_codecs_ascii_decode__doc__, "ascii_decode($module, data, errors=None, /)\n" "--\n" "\n"); @@ -1350,7 +1350,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_charmap_decode__doc__, +TyDoc_STRVAR(_codecs_charmap_decode__doc__, "charmap_decode($module, data, errors=None, mapping=None, /)\n" "--\n" "\n"); @@ -1415,7 +1415,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_codecs_mbcs_decode__doc__, +TyDoc_STRVAR(_codecs_mbcs_decode__doc__, "mbcs_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -1485,7 +1485,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_codecs_oem_decode__doc__, +TyDoc_STRVAR(_codecs_oem_decode__doc__, "oem_decode($module, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -1555,7 +1555,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_codecs_code_page_decode__doc__, +TyDoc_STRVAR(_codecs_code_page_decode__doc__, "code_page_decode($module, codepage, data, errors=None, final=False, /)\n" "--\n" "\n"); @@ -1628,7 +1628,7 @@ exit: #endif /* defined(MS_WINDOWS) */ -PyDoc_STRVAR(_codecs_readbuffer_encode__doc__, +TyDoc_STRVAR(_codecs_readbuffer_encode__doc__, "readbuffer_encode($module, data, errors=None, /)\n" "--\n" "\n"); @@ -1698,7 +1698,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_7_encode__doc__, +TyDoc_STRVAR(_codecs_utf_7_encode__doc__, "utf_7_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -1753,7 +1753,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_8_encode__doc__, +TyDoc_STRVAR(_codecs_utf_8_encode__doc__, "utf_8_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -1808,7 +1808,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_16_encode__doc__, +TyDoc_STRVAR(_codecs_utf_16_encode__doc__, "utf_16_encode($module, str, errors=None, byteorder=0, /)\n" "--\n" "\n"); @@ -1871,7 +1871,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_16_le_encode__doc__, +TyDoc_STRVAR(_codecs_utf_16_le_encode__doc__, "utf_16_le_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -1926,7 +1926,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_16_be_encode__doc__, +TyDoc_STRVAR(_codecs_utf_16_be_encode__doc__, "utf_16_be_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -1981,7 +1981,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_32_encode__doc__, +TyDoc_STRVAR(_codecs_utf_32_encode__doc__, "utf_32_encode($module, str, errors=None, byteorder=0, /)\n" "--\n" "\n"); @@ -2044,7 +2044,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_32_le_encode__doc__, +TyDoc_STRVAR(_codecs_utf_32_le_encode__doc__, "utf_32_le_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2099,7 +2099,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_utf_32_be_encode__doc__, +TyDoc_STRVAR(_codecs_utf_32_be_encode__doc__, "utf_32_be_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2154,7 +2154,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_unicode_escape_encode__doc__, +TyDoc_STRVAR(_codecs_unicode_escape_encode__doc__, "unicode_escape_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2209,7 +2209,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_raw_unicode_escape_encode__doc__, +TyDoc_STRVAR(_codecs_raw_unicode_escape_encode__doc__, "raw_unicode_escape_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2264,7 +2264,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_latin_1_encode__doc__, +TyDoc_STRVAR(_codecs_latin_1_encode__doc__, "latin_1_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2319,7 +2319,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_ascii_encode__doc__, +TyDoc_STRVAR(_codecs_ascii_encode__doc__, "ascii_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2374,7 +2374,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_charmap_encode__doc__, +TyDoc_STRVAR(_codecs_charmap_encode__doc__, "charmap_encode($module, str, errors=None, mapping=None, /)\n" "--\n" "\n"); @@ -2434,7 +2434,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_charmap_build__doc__, +TyDoc_STRVAR(_codecs_charmap_build__doc__, "charmap_build($module, map, /)\n" "--\n" "\n"); @@ -2464,7 +2464,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_codecs_mbcs_encode__doc__, +TyDoc_STRVAR(_codecs_mbcs_encode__doc__, "mbcs_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2522,7 +2522,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_codecs_oem_encode__doc__, +TyDoc_STRVAR(_codecs_oem_encode__doc__, "oem_encode($module, str, errors=None, /)\n" "--\n" "\n"); @@ -2580,7 +2580,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_codecs_code_page_encode__doc__, +TyDoc_STRVAR(_codecs_code_page_encode__doc__, "code_page_encode($module, code_page, str, errors=None, /)\n" "--\n" "\n"); @@ -2642,7 +2642,7 @@ exit: #endif /* defined(MS_WINDOWS) */ -PyDoc_STRVAR(_codecs_register_error__doc__, +TyDoc_STRVAR(_codecs_register_error__doc__, "register_error($module, errors, handler, /)\n" "--\n" "\n" @@ -2689,7 +2689,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs__unregister_error__doc__, +TyDoc_STRVAR(_codecs__unregister_error__doc__, "_unregister_error($module, errors, /)\n" "--\n" "\n" @@ -2739,7 +2739,7 @@ exit: return return_value; } -PyDoc_STRVAR(_codecs_lookup_error__doc__, +TyDoc_STRVAR(_codecs_lookup_error__doc__, "lookup_error($module, name, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_collectionsmodule.c.h b/Modules/clinic/_collectionsmodule.c.h index 1a5789a..25daa7e 100644 --- a/Modules/clinic/_collectionsmodule.c.h +++ b/Modules/clinic/_collectionsmodule.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(deque_pop__doc__, +TyDoc_STRVAR(deque_pop__doc__, "pop($self, /)\n" "--\n" "\n" @@ -34,7 +34,7 @@ deque_pop(TyObject *deque, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(deque_popleft__doc__, +TyDoc_STRVAR(deque_popleft__doc__, "popleft($self, /)\n" "--\n" "\n" @@ -58,7 +58,7 @@ deque_popleft(TyObject *deque, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(deque_append__doc__, +TyDoc_STRVAR(deque_append__doc__, "append($self, item, /)\n" "--\n" "\n" @@ -82,7 +82,7 @@ deque_append(TyObject *deque, TyObject *item) return return_value; } -PyDoc_STRVAR(deque_appendleft__doc__, +TyDoc_STRVAR(deque_appendleft__doc__, "appendleft($self, item, /)\n" "--\n" "\n" @@ -106,7 +106,7 @@ deque_appendleft(TyObject *deque, TyObject *item) return return_value; } -PyDoc_STRVAR(deque_extend__doc__, +TyDoc_STRVAR(deque_extend__doc__, "extend($self, iterable, /)\n" "--\n" "\n" @@ -130,7 +130,7 @@ deque_extend(TyObject *deque, TyObject *iterable) return return_value; } -PyDoc_STRVAR(deque_extendleft__doc__, +TyDoc_STRVAR(deque_extendleft__doc__, "extendleft($self, iterable, /)\n" "--\n" "\n" @@ -154,7 +154,7 @@ deque_extendleft(TyObject *deque, TyObject *iterable) return return_value; } -PyDoc_STRVAR(deque_copy__doc__, +TyDoc_STRVAR(deque_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -178,7 +178,7 @@ deque_copy(TyObject *deque, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(deque___copy____doc__, +TyDoc_STRVAR(deque___copy____doc__, "__copy__($self, /)\n" "--\n" "\n" @@ -202,7 +202,7 @@ deque___copy__(TyObject *deque, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(deque_clearmethod__doc__, +TyDoc_STRVAR(deque_clearmethod__doc__, "clear($self, /)\n" "--\n" "\n" @@ -226,7 +226,7 @@ deque_clearmethod(TyObject *deque, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(deque_rotate__doc__, +TyDoc_STRVAR(deque_rotate__doc__, "rotate($self, n=1, /)\n" "--\n" "\n" @@ -271,7 +271,7 @@ exit: return return_value; } -PyDoc_STRVAR(deque_reverse__doc__, +TyDoc_STRVAR(deque_reverse__doc__, "reverse($self, /)\n" "--\n" "\n" @@ -295,7 +295,7 @@ deque_reverse(TyObject *deque, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(deque_count__doc__, +TyDoc_STRVAR(deque_count__doc__, "count($self, value, /)\n" "--\n" "\n" @@ -319,7 +319,7 @@ deque_count(TyObject *deque, TyObject *v) return return_value; } -PyDoc_STRVAR(deque_index__doc__, +TyDoc_STRVAR(deque_index__doc__, "index($self, value, [start, [stop]])\n" "--\n" "\n" @@ -367,7 +367,7 @@ exit: return return_value; } -PyDoc_STRVAR(deque_insert__doc__, +TyDoc_STRVAR(deque_insert__doc__, "insert($self, index, value, /)\n" "--\n" "\n" @@ -410,7 +410,7 @@ exit: return return_value; } -PyDoc_STRVAR(deque_remove__doc__, +TyDoc_STRVAR(deque_remove__doc__, "remove($self, value, /)\n" "--\n" "\n" @@ -434,7 +434,7 @@ deque_remove(TyObject *deque, TyObject *value) return return_value; } -PyDoc_STRVAR(deque___reduce____doc__, +TyDoc_STRVAR(deque___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n" @@ -452,7 +452,7 @@ deque___reduce__(TyObject *deque, TyObject *Py_UNUSED(ignored)) return deque___reduce___impl((dequeobject *)deque); } -PyDoc_STRVAR(deque_init__doc__, +TyDoc_STRVAR(deque_init__doc__, "deque([iterable[, maxlen]])\n" "--\n" "\n" @@ -474,7 +474,7 @@ deque_init(TyObject *deque, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), &_Ty_ID(maxlen), }, }; @@ -523,7 +523,7 @@ exit: return return_value; } -PyDoc_STRVAR(deque___sizeof____doc__, +TyDoc_STRVAR(deque___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -547,7 +547,7 @@ deque___sizeof__(TyObject *deque, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(deque___reversed____doc__, +TyDoc_STRVAR(deque___reversed____doc__, "__reversed__($self, /)\n" "--\n" "\n" @@ -565,7 +565,7 @@ deque___reversed__(TyObject *deque, TyObject *Py_UNUSED(ignored)) return deque___reversed___impl((dequeobject *)deque); } -PyDoc_STRVAR(_collections__count_elements__doc__, +TyDoc_STRVAR(_collections__count_elements__doc__, "_count_elements($module, mapping, iterable, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_csv.c.h b/Modules/clinic/_csv.c.h index acd2da1..6f2daa4 100644 --- a/Modules/clinic/_csv.c.h +++ b/Modules/clinic/_csv.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_csv_list_dialects__doc__, +TyDoc_STRVAR(_csv_list_dialects__doc__, "list_dialects($module, /)\n" "--\n" "\n" @@ -28,7 +28,7 @@ _csv_list_dialects(TyObject *module, TyObject *Py_UNUSED(ignored)) return _csv_list_dialects_impl(module); } -PyDoc_STRVAR(_csv_unregister_dialect__doc__, +TyDoc_STRVAR(_csv_unregister_dialect__doc__, "unregister_dialect($module, /, name)\n" "--\n" "\n" @@ -55,7 +55,7 @@ _csv_unregister_dialect(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), }, }; @@ -88,7 +88,7 @@ exit: return return_value; } -PyDoc_STRVAR(_csv_get_dialect__doc__, +TyDoc_STRVAR(_csv_get_dialect__doc__, "get_dialect($module, /, name)\n" "--\n" "\n" @@ -115,7 +115,7 @@ _csv_get_dialect(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), }, }; @@ -148,7 +148,7 @@ exit: return return_value; } -PyDoc_STRVAR(_csv_field_size_limit__doc__, +TyDoc_STRVAR(_csv_field_size_limit__doc__, "field_size_limit($module, /, new_limit=)\n" "--\n" "\n" @@ -178,7 +178,7 @@ _csv_field_size_limit(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(new_limit), }, }; diff --git a/Modules/clinic/_curses_panel.c.h b/Modules/clinic/_curses_panel.c.h index 77143a4..96bd53d 100644 --- a/Modules/clinic/_curses_panel.c.h +++ b/Modules/clinic/_curses_panel.c.h @@ -7,7 +7,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_curses_panel_panel_bottom__doc__, +TyDoc_STRVAR(_curses_panel_panel_bottom__doc__, "bottom($self, /)\n" "--\n" "\n" @@ -29,7 +29,7 @@ _curses_panel_panel_bottom(TyObject *self, TyTypeObject *cls, TyObject *const *a return _curses_panel_panel_bottom_impl((PyCursesPanelObject *)self, cls); } -PyDoc_STRVAR(_curses_panel_panel_hide__doc__, +TyDoc_STRVAR(_curses_panel_panel_hide__doc__, "hide($self, /)\n" "--\n" "\n" @@ -53,7 +53,7 @@ _curses_panel_panel_hide(TyObject *self, TyTypeObject *cls, TyObject *const *arg return _curses_panel_panel_hide_impl((PyCursesPanelObject *)self, cls); } -PyDoc_STRVAR(_curses_panel_panel_show__doc__, +TyDoc_STRVAR(_curses_panel_panel_show__doc__, "show($self, /)\n" "--\n" "\n" @@ -75,7 +75,7 @@ _curses_panel_panel_show(TyObject *self, TyTypeObject *cls, TyObject *const *arg return _curses_panel_panel_show_impl((PyCursesPanelObject *)self, cls); } -PyDoc_STRVAR(_curses_panel_panel_top__doc__, +TyDoc_STRVAR(_curses_panel_panel_top__doc__, "top($self, /)\n" "--\n" "\n" @@ -97,7 +97,7 @@ _curses_panel_panel_top(TyObject *self, TyTypeObject *cls, TyObject *const *args return _curses_panel_panel_top_impl((PyCursesPanelObject *)self, cls); } -PyDoc_STRVAR(_curses_panel_panel_above__doc__, +TyDoc_STRVAR(_curses_panel_panel_above__doc__, "above($self, /)\n" "--\n" "\n" @@ -115,7 +115,7 @@ _curses_panel_panel_above(TyObject *self, TyObject *Py_UNUSED(ignored)) return _curses_panel_panel_above_impl((PyCursesPanelObject *)self); } -PyDoc_STRVAR(_curses_panel_panel_below__doc__, +TyDoc_STRVAR(_curses_panel_panel_below__doc__, "below($self, /)\n" "--\n" "\n" @@ -133,7 +133,7 @@ _curses_panel_panel_below(TyObject *self, TyObject *Py_UNUSED(ignored)) return _curses_panel_panel_below_impl((PyCursesPanelObject *)self); } -PyDoc_STRVAR(_curses_panel_panel_hidden__doc__, +TyDoc_STRVAR(_curses_panel_panel_hidden__doc__, "hidden($self, /)\n" "--\n" "\n" @@ -151,7 +151,7 @@ _curses_panel_panel_hidden(TyObject *self, TyObject *Py_UNUSED(ignored)) return _curses_panel_panel_hidden_impl((PyCursesPanelObject *)self); } -PyDoc_STRVAR(_curses_panel_panel_move__doc__, +TyDoc_STRVAR(_curses_panel_panel_move__doc__, "move($self, y, x, /)\n" "--\n" "\n" @@ -204,7 +204,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_panel_panel_window__doc__, +TyDoc_STRVAR(_curses_panel_panel_window__doc__, "window($self, /)\n" "--\n" "\n" @@ -222,7 +222,7 @@ _curses_panel_panel_window(TyObject *self, TyObject *Py_UNUSED(ignored)) return _curses_panel_panel_window_impl((PyCursesPanelObject *)self); } -PyDoc_STRVAR(_curses_panel_panel_replace__doc__, +TyDoc_STRVAR(_curses_panel_panel_replace__doc__, "replace($self, win, /)\n" "--\n" "\n" @@ -272,7 +272,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_panel_panel_set_userptr__doc__, +TyDoc_STRVAR(_curses_panel_panel_set_userptr__doc__, "set_userptr($self, obj, /)\n" "--\n" "\n" @@ -317,7 +317,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_panel_panel_userptr__doc__, +TyDoc_STRVAR(_curses_panel_panel_userptr__doc__, "userptr($self, /)\n" "--\n" "\n" @@ -340,7 +340,7 @@ _curses_panel_panel_userptr(TyObject *self, TyTypeObject *cls, TyObject *const * return _curses_panel_panel_userptr_impl((PyCursesPanelObject *)self, cls); } -PyDoc_STRVAR(_curses_panel_bottom_panel__doc__, +TyDoc_STRVAR(_curses_panel_bottom_panel__doc__, "bottom_panel($module, /)\n" "--\n" "\n" @@ -358,7 +358,7 @@ _curses_panel_bottom_panel(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_panel_bottom_panel_impl(module); } -PyDoc_STRVAR(_curses_panel_new_panel__doc__, +TyDoc_STRVAR(_curses_panel_new_panel__doc__, "new_panel($module, win, /)\n" "--\n" "\n" @@ -387,7 +387,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_panel_top_panel__doc__, +TyDoc_STRVAR(_curses_panel_top_panel__doc__, "top_panel($module, /)\n" "--\n" "\n" @@ -405,7 +405,7 @@ _curses_panel_top_panel(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_panel_top_panel_impl(module); } -PyDoc_STRVAR(_curses_panel_update_panels__doc__, +TyDoc_STRVAR(_curses_panel_update_panels__doc__, "update_panels($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_cursesmodule.c.h b/Modules/clinic/_cursesmodule.c.h index 8376023..3979626 100644 --- a/Modules/clinic/_cursesmodule.c.h +++ b/Modules/clinic/_cursesmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_curses_window_addch__doc__, +TyDoc_STRVAR(_curses_window_addch__doc__, "addch([y, x,] ch, [attr=_curses.A_NORMAL])\n" "Paint the character.\n" "\n" @@ -80,7 +80,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_addstr__doc__, +TyDoc_STRVAR(_curses_window_addstr__doc__, "addstr([y, x,] str, [attr])\n" "Paint the string.\n" "\n" @@ -152,7 +152,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_addnstr__doc__, +TyDoc_STRVAR(_curses_window_addnstr__doc__, "addnstr([y, x,] str, n, [attr])\n" "Paint at most n characters of the string.\n" "\n" @@ -227,7 +227,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_bkgd__doc__, +TyDoc_STRVAR(_curses_window_bkgd__doc__, "bkgd($self, ch, attr=_curses.A_NORMAL, /)\n" "--\n" "\n" @@ -269,7 +269,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_attroff__doc__, +TyDoc_STRVAR(_curses_window_attroff__doc__, "attroff($self, attr, /)\n" "--\n" "\n" @@ -297,7 +297,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_attron__doc__, +TyDoc_STRVAR(_curses_window_attron__doc__, "attron($self, attr, /)\n" "--\n" "\n" @@ -325,7 +325,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_attrset__doc__, +TyDoc_STRVAR(_curses_window_attrset__doc__, "attrset($self, attr, /)\n" "--\n" "\n" @@ -353,7 +353,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_bkgdset__doc__, +TyDoc_STRVAR(_curses_window_bkgdset__doc__, "bkgdset($self, ch, attr=_curses.A_NORMAL, /)\n" "--\n" "\n" @@ -396,7 +396,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_border__doc__, +TyDoc_STRVAR(_curses_window_border__doc__, "border($self, ls=_curses.ACS_VLINE, rs=_curses.ACS_VLINE,\n" " ts=_curses.ACS_HLINE, bs=_curses.ACS_HLINE,\n" " tl=_curses.ACS_ULCORNER, tr=_curses.ACS_URCORNER,\n" @@ -491,7 +491,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_box__doc__, +TyDoc_STRVAR(_curses_window_box__doc__, "box([verch=0, horch=0])\n" "Draw a border around the edges of the window.\n" "\n" @@ -537,7 +537,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_delch__doc__, +TyDoc_STRVAR(_curses_window_delch__doc__, "delch([y, x])\n" "Delete any character at (y, x).\n" "\n" @@ -580,7 +580,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_derwin__doc__, +TyDoc_STRVAR(_curses_window_derwin__doc__, "derwin([nlines=0, ncols=0,] begin_y, begin_x)\n" "Create a sub-window (window-relative coordinates).\n" "\n" @@ -636,7 +636,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_echochar__doc__, +TyDoc_STRVAR(_curses_window_echochar__doc__, "echochar($self, ch, attr=_curses.A_NORMAL, /)\n" "--\n" "\n" @@ -681,7 +681,7 @@ exit: #if defined(NCURSES_MOUSE_VERSION) -PyDoc_STRVAR(_curses_window_enclose__doc__, +TyDoc_STRVAR(_curses_window_enclose__doc__, "enclose($self, y, x, /)\n" "--\n" "\n" @@ -724,7 +724,7 @@ exit: #endif /* defined(NCURSES_MOUSE_VERSION) */ -PyDoc_STRVAR(_curses_window_getbkgd__doc__, +TyDoc_STRVAR(_curses_window_getbkgd__doc__, "getbkgd($self, /)\n" "--\n" "\n" @@ -752,7 +752,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_getch__doc__, +TyDoc_STRVAR(_curses_window_getch__doc__, "getch([y, x])\n" "Get a character code from terminal keyboard.\n" "\n" @@ -799,7 +799,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_getkey__doc__, +TyDoc_STRVAR(_curses_window_getkey__doc__, "getkey([y, x])\n" "Get a character (string) from terminal keyboard.\n" "\n" @@ -848,7 +848,7 @@ exit: #if defined(HAVE_NCURSESW) -PyDoc_STRVAR(_curses_window_get_wch__doc__, +TyDoc_STRVAR(_curses_window_get_wch__doc__, "get_wch([y, x])\n" "Get a wide character from terminal keyboard.\n" "\n" @@ -896,7 +896,7 @@ exit: #endif /* defined(HAVE_NCURSESW) */ -PyDoc_STRVAR(_curses_window_hline__doc__, +TyDoc_STRVAR(_curses_window_hline__doc__, "hline([y, x,] ch, n, [attr=_curses.A_NORMAL])\n" "Display a horizontal line.\n" "\n" @@ -966,7 +966,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_insch__doc__, +TyDoc_STRVAR(_curses_window_insch__doc__, "insch([y, x,] ch, [attr=_curses.A_NORMAL])\n" "Insert a character before the current or specified position.\n" "\n" @@ -1036,7 +1036,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_inch__doc__, +TyDoc_STRVAR(_curses_window_inch__doc__, "inch([y, x])\n" "Return the character at the given position in the window.\n" "\n" @@ -1086,7 +1086,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_insstr__doc__, +TyDoc_STRVAR(_curses_window_insstr__doc__, "insstr([y, x,] str, [attr])\n" "Insert the string before the current or specified position.\n" "\n" @@ -1159,7 +1159,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_insnstr__doc__, +TyDoc_STRVAR(_curses_window_insnstr__doc__, "insnstr([y, x,] str, n, [attr])\n" "Insert at most n characters of the string.\n" "\n" @@ -1236,7 +1236,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_is_linetouched__doc__, +TyDoc_STRVAR(_curses_window_is_linetouched__doc__, "is_linetouched($self, line, /)\n" "--\n" "\n" @@ -1271,7 +1271,7 @@ exit: #if defined(py_is_pad) -PyDoc_STRVAR(_curses_window_noutrefresh__doc__, +TyDoc_STRVAR(_curses_window_noutrefresh__doc__, "noutrefresh([pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol])\n" "Mark for refresh but wait.\n" "\n" @@ -1323,7 +1323,7 @@ exit: #if !defined(py_is_pad) -PyDoc_STRVAR(_curses_window_noutrefresh__doc__, +TyDoc_STRVAR(_curses_window_noutrefresh__doc__, "noutrefresh($self, /)\n" "--\n" "\n" @@ -1347,7 +1347,7 @@ _curses_window_noutrefresh(TyObject *self, TyObject *Py_UNUSED(ignored)) #endif /* !defined(py_is_pad) */ -PyDoc_STRVAR(_curses_window_overlay__doc__, +TyDoc_STRVAR(_curses_window_overlay__doc__, "overlay(destwin, [sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol])\n" "Overlay the window on top of destwin.\n" "\n" @@ -1404,7 +1404,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_overwrite__doc__, +TyDoc_STRVAR(_curses_window_overwrite__doc__, "overwrite(destwin, [sminrow, smincol, dminrow, dmincol, dmaxrow,\n" " dmaxcol])\n" "Overwrite the window on top of destwin.\n" @@ -1463,7 +1463,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_putwin__doc__, +TyDoc_STRVAR(_curses_window_putwin__doc__, "putwin($self, file, /)\n" "--\n" "\n" @@ -1487,7 +1487,7 @@ _curses_window_putwin(TyObject *self, TyObject *file) return return_value; } -PyDoc_STRVAR(_curses_window_redrawln__doc__, +TyDoc_STRVAR(_curses_window_redrawln__doc__, "redrawln($self, beg, num, /)\n" "--\n" "\n" @@ -1530,7 +1530,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_refresh__doc__, +TyDoc_STRVAR(_curses_window_refresh__doc__, "refresh([pminrow, pmincol, sminrow, smincol, smaxrow, smaxcol])\n" "Update the display immediately.\n" "\n" @@ -1585,7 +1585,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_setscrreg__doc__, +TyDoc_STRVAR(_curses_window_setscrreg__doc__, "setscrreg($self, top, bottom, /)\n" "--\n" "\n" @@ -1629,7 +1629,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_subwin__doc__, +TyDoc_STRVAR(_curses_window_subwin__doc__, "subwin([nlines=0, ncols=0,] begin_y, begin_x)\n" "Create a sub-window (screen-relative coordinates).\n" "\n" @@ -1684,7 +1684,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_scroll__doc__, +TyDoc_STRVAR(_curses_window_scroll__doc__, "scroll([lines=1])\n" "Scroll the screen or scrolling region.\n" "\n" @@ -1726,7 +1726,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_touchline__doc__, +TyDoc_STRVAR(_curses_window_touchline__doc__, "touchline(start, count, [changed=True])\n" "Pretend count lines have been changed, starting with line start.\n" "\n" @@ -1771,7 +1771,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_window_vline__doc__, +TyDoc_STRVAR(_curses_window_vline__doc__, "vline([y, x,] ch, n, [attr=_curses.A_NORMAL])\n" "Display a vertical line.\n" "\n" @@ -1843,7 +1843,7 @@ exit: #if defined(HAVE_CURSES_FILTER) -PyDoc_STRVAR(_curses_filter__doc__, +TyDoc_STRVAR(_curses_filter__doc__, "filter($module, /)\n" "--\n" "\n"); @@ -1862,7 +1862,7 @@ _curses_filter(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_CURSES_FILTER) */ -PyDoc_STRVAR(_curses_baudrate__doc__, +TyDoc_STRVAR(_curses_baudrate__doc__, "baudrate($module, /)\n" "--\n" "\n" @@ -1880,7 +1880,7 @@ _curses_baudrate(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_baudrate_impl(module); } -PyDoc_STRVAR(_curses_beep__doc__, +TyDoc_STRVAR(_curses_beep__doc__, "beep($module, /)\n" "--\n" "\n" @@ -1898,7 +1898,7 @@ _curses_beep(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_beep_impl(module); } -PyDoc_STRVAR(_curses_can_change_color__doc__, +TyDoc_STRVAR(_curses_can_change_color__doc__, "can_change_color($module, /)\n" "--\n" "\n" @@ -1916,7 +1916,7 @@ _curses_can_change_color(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_can_change_color_impl(module); } -PyDoc_STRVAR(_curses_cbreak__doc__, +TyDoc_STRVAR(_curses_cbreak__doc__, "cbreak($module, flag=True, /)\n" "--\n" "\n" @@ -1960,7 +1960,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_color_content__doc__, +TyDoc_STRVAR(_curses_color_content__doc__, "color_content($module, color_number, /)\n" "--\n" "\n" @@ -1993,7 +1993,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_color_pair__doc__, +TyDoc_STRVAR(_curses_color_pair__doc__, "color_pair($module, pair_number, /)\n" "--\n" "\n" @@ -2027,7 +2027,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_curs_set__doc__, +TyDoc_STRVAR(_curses_curs_set__doc__, "curs_set($module, visibility, /)\n" "--\n" "\n" @@ -2063,7 +2063,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_def_prog_mode__doc__, +TyDoc_STRVAR(_curses_def_prog_mode__doc__, "def_prog_mode($module, /)\n" "--\n" "\n" @@ -2085,7 +2085,7 @@ _curses_def_prog_mode(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_def_prog_mode_impl(module); } -PyDoc_STRVAR(_curses_def_shell_mode__doc__, +TyDoc_STRVAR(_curses_def_shell_mode__doc__, "def_shell_mode($module, /)\n" "--\n" "\n" @@ -2107,7 +2107,7 @@ _curses_def_shell_mode(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_def_shell_mode_impl(module); } -PyDoc_STRVAR(_curses_delay_output__doc__, +TyDoc_STRVAR(_curses_delay_output__doc__, "delay_output($module, ms, /)\n" "--\n" "\n" @@ -2138,7 +2138,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_doupdate__doc__, +TyDoc_STRVAR(_curses_doupdate__doc__, "doupdate($module, /)\n" "--\n" "\n" @@ -2156,7 +2156,7 @@ _curses_doupdate(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_doupdate_impl(module); } -PyDoc_STRVAR(_curses_echo__doc__, +TyDoc_STRVAR(_curses_echo__doc__, "echo($module, flag=True, /)\n" "--\n" "\n" @@ -2196,7 +2196,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_endwin__doc__, +TyDoc_STRVAR(_curses_endwin__doc__, "endwin($module, /)\n" "--\n" "\n" @@ -2214,7 +2214,7 @@ _curses_endwin(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_endwin_impl(module); } -PyDoc_STRVAR(_curses_erasechar__doc__, +TyDoc_STRVAR(_curses_erasechar__doc__, "erasechar($module, /)\n" "--\n" "\n" @@ -2232,7 +2232,7 @@ _curses_erasechar(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_erasechar_impl(module); } -PyDoc_STRVAR(_curses_flash__doc__, +TyDoc_STRVAR(_curses_flash__doc__, "flash($module, /)\n" "--\n" "\n" @@ -2252,7 +2252,7 @@ _curses_flash(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_flash_impl(module); } -PyDoc_STRVAR(_curses_flushinp__doc__, +TyDoc_STRVAR(_curses_flushinp__doc__, "flushinp($module, /)\n" "--\n" "\n" @@ -2275,7 +2275,7 @@ _curses_flushinp(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(getsyx) -PyDoc_STRVAR(_curses_getsyx__doc__, +TyDoc_STRVAR(_curses_getsyx__doc__, "getsyx($module, /)\n" "--\n" "\n" @@ -2299,7 +2299,7 @@ _curses_getsyx(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(NCURSES_MOUSE_VERSION) -PyDoc_STRVAR(_curses_getmouse__doc__, +TyDoc_STRVAR(_curses_getmouse__doc__, "getmouse($module, /)\n" "--\n" "\n" @@ -2324,7 +2324,7 @@ _curses_getmouse(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(NCURSES_MOUSE_VERSION) -PyDoc_STRVAR(_curses_ungetmouse__doc__, +TyDoc_STRVAR(_curses_ungetmouse__doc__, "ungetmouse($module, id, x, y, z, bstate, /)\n" "--\n" "\n" @@ -2396,7 +2396,7 @@ exit: #endif /* defined(NCURSES_MOUSE_VERSION) */ -PyDoc_STRVAR(_curses_getwin__doc__, +TyDoc_STRVAR(_curses_getwin__doc__, "getwin($module, file, /)\n" "--\n" "\n" @@ -2408,7 +2408,7 @@ PyDoc_STRVAR(_curses_getwin__doc__, #define _CURSES_GETWIN_METHODDEF \ {"getwin", (PyCFunction)_curses_getwin, METH_O, _curses_getwin__doc__}, -PyDoc_STRVAR(_curses_halfdelay__doc__, +TyDoc_STRVAR(_curses_halfdelay__doc__, "halfdelay($module, tenths, /)\n" "--\n" "\n" @@ -2456,7 +2456,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_has_colors__doc__, +TyDoc_STRVAR(_curses_has_colors__doc__, "has_colors($module, /)\n" "--\n" "\n" @@ -2474,7 +2474,7 @@ _curses_has_colors(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_has_colors_impl(module); } -PyDoc_STRVAR(_curses_has_ic__doc__, +TyDoc_STRVAR(_curses_has_ic__doc__, "has_ic($module, /)\n" "--\n" "\n" @@ -2492,7 +2492,7 @@ _curses_has_ic(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_has_ic_impl(module); } -PyDoc_STRVAR(_curses_has_il__doc__, +TyDoc_STRVAR(_curses_has_il__doc__, "has_il($module, /)\n" "--\n" "\n" @@ -2512,7 +2512,7 @@ _curses_has_il(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_CURSES_HAS_KEY) -PyDoc_STRVAR(_curses_has_key__doc__, +TyDoc_STRVAR(_curses_has_key__doc__, "has_key($module, key, /)\n" "--\n" "\n" @@ -2545,7 +2545,7 @@ exit: #endif /* defined(HAVE_CURSES_HAS_KEY) */ -PyDoc_STRVAR(_curses_init_color__doc__, +TyDoc_STRVAR(_curses_init_color__doc__, "init_color($module, color_number, r, g, b, /)\n" "--\n" "\n" @@ -2601,7 +2601,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_init_pair__doc__, +TyDoc_STRVAR(_curses_init_pair__doc__, "init_pair($module, pair_number, fg, bg, /)\n" "--\n" "\n" @@ -2649,7 +2649,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_initscr__doc__, +TyDoc_STRVAR(_curses_initscr__doc__, "initscr($module, /)\n" "--\n" "\n" @@ -2669,7 +2669,7 @@ _curses_initscr(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_initscr_impl(module); } -PyDoc_STRVAR(_curses_setupterm__doc__, +TyDoc_STRVAR(_curses_setupterm__doc__, "setupterm($module, /, term=None, fd=-1)\n" "--\n" "\n" @@ -2701,7 +2701,7 @@ _curses_setupterm(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(term), &_Ty_ID(fd), }, }; @@ -2768,7 +2768,7 @@ exit: #if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081102) -PyDoc_STRVAR(_curses_get_escdelay__doc__, +TyDoc_STRVAR(_curses_get_escdelay__doc__, "get_escdelay($module, /)\n" "--\n" "\n" @@ -2794,7 +2794,7 @@ _curses_get_escdelay(TyObject *module, TyObject *Py_UNUSED(ignored)) #if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081102) -PyDoc_STRVAR(_curses_set_escdelay__doc__, +TyDoc_STRVAR(_curses_set_escdelay__doc__, "set_escdelay($module, ms, /)\n" "--\n" "\n" @@ -2833,7 +2833,7 @@ exit: #if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081102) -PyDoc_STRVAR(_curses_get_tabsize__doc__, +TyDoc_STRVAR(_curses_get_tabsize__doc__, "get_tabsize($module, /)\n" "--\n" "\n" @@ -2858,7 +2858,7 @@ _curses_get_tabsize(TyObject *module, TyObject *Py_UNUSED(ignored)) #if (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081102) -PyDoc_STRVAR(_curses_set_tabsize__doc__, +TyDoc_STRVAR(_curses_set_tabsize__doc__, "set_tabsize($module, size, /)\n" "--\n" "\n" @@ -2894,7 +2894,7 @@ exit: #endif /* (defined(NCURSES_EXT_FUNCS) && NCURSES_EXT_FUNCS >= 20081102) */ -PyDoc_STRVAR(_curses_intrflush__doc__, +TyDoc_STRVAR(_curses_intrflush__doc__, "intrflush($module, flag, /)\n" "--\n" "\n"); @@ -2921,7 +2921,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_isendwin__doc__, +TyDoc_STRVAR(_curses_isendwin__doc__, "isendwin($module, /)\n" "--\n" "\n" @@ -2941,7 +2941,7 @@ _curses_isendwin(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_CURSES_IS_TERM_RESIZED) -PyDoc_STRVAR(_curses_is_term_resized__doc__, +TyDoc_STRVAR(_curses_is_term_resized__doc__, "is_term_resized($module, nlines, ncols, /)\n" "--\n" "\n" @@ -2984,7 +2984,7 @@ exit: #endif /* defined(HAVE_CURSES_IS_TERM_RESIZED) */ -PyDoc_STRVAR(_curses_keyname__doc__, +TyDoc_STRVAR(_curses_keyname__doc__, "keyname($module, key, /)\n" "--\n" "\n" @@ -3015,7 +3015,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_killchar__doc__, +TyDoc_STRVAR(_curses_killchar__doc__, "killchar($module, /)\n" "--\n" "\n" @@ -3033,7 +3033,7 @@ _curses_killchar(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_killchar_impl(module); } -PyDoc_STRVAR(_curses_longname__doc__, +TyDoc_STRVAR(_curses_longname__doc__, "longname($module, /)\n" "--\n" "\n" @@ -3054,7 +3054,7 @@ _curses_longname(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_longname_impl(module); } -PyDoc_STRVAR(_curses_meta__doc__, +TyDoc_STRVAR(_curses_meta__doc__, "meta($module, yes, /)\n" "--\n" "\n" @@ -3087,7 +3087,7 @@ exit: #if defined(NCURSES_MOUSE_VERSION) -PyDoc_STRVAR(_curses_mouseinterval__doc__, +TyDoc_STRVAR(_curses_mouseinterval__doc__, "mouseinterval($module, interval, /)\n" "--\n" "\n" @@ -3126,7 +3126,7 @@ exit: #if defined(NCURSES_MOUSE_VERSION) -PyDoc_STRVAR(_curses_mousemask__doc__, +TyDoc_STRVAR(_curses_mousemask__doc__, "mousemask($module, newmask, /)\n" "--\n" "\n" @@ -3162,7 +3162,7 @@ exit: #endif /* defined(NCURSES_MOUSE_VERSION) */ -PyDoc_STRVAR(_curses_napms__doc__, +TyDoc_STRVAR(_curses_napms__doc__, "napms($module, ms, /)\n" "--\n" "\n" @@ -3198,7 +3198,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_newpad__doc__, +TyDoc_STRVAR(_curses_newpad__doc__, "newpad($module, nlines, ncols, /)\n" "--\n" "\n" @@ -3239,7 +3239,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_newwin__doc__, +TyDoc_STRVAR(_curses_newwin__doc__, "newwin(nlines, ncols, [begin_y=0, begin_x=0])\n" "Return a new window.\n" "\n" @@ -3294,7 +3294,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_nl__doc__, +TyDoc_STRVAR(_curses_nl__doc__, "nl($module, flag=True, /)\n" "--\n" "\n" @@ -3335,7 +3335,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_nocbreak__doc__, +TyDoc_STRVAR(_curses_nocbreak__doc__, "nocbreak($module, /)\n" "--\n" "\n" @@ -3355,7 +3355,7 @@ _curses_nocbreak(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_nocbreak_impl(module); } -PyDoc_STRVAR(_curses_noecho__doc__, +TyDoc_STRVAR(_curses_noecho__doc__, "noecho($module, /)\n" "--\n" "\n" @@ -3375,7 +3375,7 @@ _curses_noecho(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_noecho_impl(module); } -PyDoc_STRVAR(_curses_nonl__doc__, +TyDoc_STRVAR(_curses_nonl__doc__, "nonl($module, /)\n" "--\n" "\n" @@ -3396,7 +3396,7 @@ _curses_nonl(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_nonl_impl(module); } -PyDoc_STRVAR(_curses_noqiflush__doc__, +TyDoc_STRVAR(_curses_noqiflush__doc__, "noqiflush($module, /)\n" "--\n" "\n" @@ -3417,7 +3417,7 @@ _curses_noqiflush(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_noqiflush_impl(module); } -PyDoc_STRVAR(_curses_noraw__doc__, +TyDoc_STRVAR(_curses_noraw__doc__, "noraw($module, /)\n" "--\n" "\n" @@ -3437,7 +3437,7 @@ _curses_noraw(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_noraw_impl(module); } -PyDoc_STRVAR(_curses_pair_content__doc__, +TyDoc_STRVAR(_curses_pair_content__doc__, "pair_content($module, pair_number, /)\n" "--\n" "\n" @@ -3467,7 +3467,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_pair_number__doc__, +TyDoc_STRVAR(_curses_pair_number__doc__, "pair_number($module, attr, /)\n" "--\n" "\n" @@ -3497,7 +3497,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_putp__doc__, +TyDoc_STRVAR(_curses_putp__doc__, "putp($module, string, /)\n" "--\n" "\n" @@ -3526,7 +3526,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_qiflush__doc__, +TyDoc_STRVAR(_curses_qiflush__doc__, "qiflush($module, flag=True, /)\n" "--\n" "\n" @@ -3569,7 +3569,7 @@ exit: #if (defined(HAVE_CURSES_RESIZETERM) || defined(HAVE_CURSES_RESIZE_TERM)) -PyDoc_STRVAR(_curses_update_lines_cols__doc__, +TyDoc_STRVAR(_curses_update_lines_cols__doc__, "update_lines_cols($module, /)\n" "--\n" "\n"); @@ -3588,7 +3588,7 @@ _curses_update_lines_cols(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* (defined(HAVE_CURSES_RESIZETERM) || defined(HAVE_CURSES_RESIZE_TERM)) */ -PyDoc_STRVAR(_curses_raw__doc__, +TyDoc_STRVAR(_curses_raw__doc__, "raw($module, flag=True, /)\n" "--\n" "\n" @@ -3630,7 +3630,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_reset_prog_mode__doc__, +TyDoc_STRVAR(_curses_reset_prog_mode__doc__, "reset_prog_mode($module, /)\n" "--\n" "\n" @@ -3648,7 +3648,7 @@ _curses_reset_prog_mode(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_reset_prog_mode_impl(module); } -PyDoc_STRVAR(_curses_reset_shell_mode__doc__, +TyDoc_STRVAR(_curses_reset_shell_mode__doc__, "reset_shell_mode($module, /)\n" "--\n" "\n" @@ -3666,7 +3666,7 @@ _curses_reset_shell_mode(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_reset_shell_mode_impl(module); } -PyDoc_STRVAR(_curses_resetty__doc__, +TyDoc_STRVAR(_curses_resetty__doc__, "resetty($module, /)\n" "--\n" "\n" @@ -3686,7 +3686,7 @@ _curses_resetty(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_CURSES_RESIZETERM) -PyDoc_STRVAR(_curses_resizeterm__doc__, +TyDoc_STRVAR(_curses_resizeterm__doc__, "resizeterm($module, nlines, ncols, /)\n" "--\n" "\n" @@ -3764,7 +3764,7 @@ exit: #if defined(HAVE_CURSES_RESIZE_TERM) -PyDoc_STRVAR(_curses_resize_term__doc__, +TyDoc_STRVAR(_curses_resize_term__doc__, "resize_term($module, nlines, ncols, /)\n" "--\n" "\n" @@ -3843,7 +3843,7 @@ exit: #endif /* defined(HAVE_CURSES_RESIZE_TERM) */ -PyDoc_STRVAR(_curses_savetty__doc__, +TyDoc_STRVAR(_curses_savetty__doc__, "savetty($module, /)\n" "--\n" "\n" @@ -3863,7 +3863,7 @@ _curses_savetty(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(getsyx) -PyDoc_STRVAR(_curses_setsyx__doc__, +TyDoc_STRVAR(_curses_setsyx__doc__, "setsyx($module, y, x, /)\n" "--\n" "\n" @@ -3908,7 +3908,7 @@ exit: #endif /* defined(getsyx) */ -PyDoc_STRVAR(_curses_start_color__doc__, +TyDoc_STRVAR(_curses_start_color__doc__, "start_color($module, /)\n" "--\n" "\n" @@ -3933,7 +3933,7 @@ _curses_start_color(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_start_color_impl(module); } -PyDoc_STRVAR(_curses_termattrs__doc__, +TyDoc_STRVAR(_curses_termattrs__doc__, "termattrs($module, /)\n" "--\n" "\n" @@ -3951,7 +3951,7 @@ _curses_termattrs(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_termattrs_impl(module); } -PyDoc_STRVAR(_curses_termname__doc__, +TyDoc_STRVAR(_curses_termname__doc__, "termname($module, /)\n" "--\n" "\n" @@ -3969,7 +3969,7 @@ _curses_termname(TyObject *module, TyObject *Py_UNUSED(ignored)) return _curses_termname_impl(module); } -PyDoc_STRVAR(_curses_tigetflag__doc__, +TyDoc_STRVAR(_curses_tigetflag__doc__, "tigetflag($module, capname, /)\n" "--\n" "\n" @@ -4012,7 +4012,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_tigetnum__doc__, +TyDoc_STRVAR(_curses_tigetnum__doc__, "tigetnum($module, capname, /)\n" "--\n" "\n" @@ -4055,7 +4055,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_tigetstr__doc__, +TyDoc_STRVAR(_curses_tigetstr__doc__, "tigetstr($module, capname, /)\n" "--\n" "\n" @@ -4098,7 +4098,7 @@ exit: return return_value; } -PyDoc_STRVAR(_curses_tparm__doc__, +TyDoc_STRVAR(_curses_tparm__doc__, "tparm($module, str, i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0,\n" " i9=0, /)\n" "--\n" @@ -4142,7 +4142,7 @@ exit: #if defined(HAVE_CURSES_TYPEAHEAD) -PyDoc_STRVAR(_curses_typeahead__doc__, +TyDoc_STRVAR(_curses_typeahead__doc__, "typeahead($module, fd, /)\n" "--\n" "\n" @@ -4177,7 +4177,7 @@ exit: #endif /* defined(HAVE_CURSES_TYPEAHEAD) */ -PyDoc_STRVAR(_curses_unctrl__doc__, +TyDoc_STRVAR(_curses_unctrl__doc__, "unctrl($module, ch, /)\n" "--\n" "\n" @@ -4189,7 +4189,7 @@ PyDoc_STRVAR(_curses_unctrl__doc__, #define _CURSES_UNCTRL_METHODDEF \ {"unctrl", (PyCFunction)_curses_unctrl, METH_O, _curses_unctrl__doc__}, -PyDoc_STRVAR(_curses_ungetch__doc__, +TyDoc_STRVAR(_curses_ungetch__doc__, "ungetch($module, ch, /)\n" "--\n" "\n" @@ -4200,7 +4200,7 @@ PyDoc_STRVAR(_curses_ungetch__doc__, #if defined(HAVE_NCURSESW) -PyDoc_STRVAR(_curses_unget_wch__doc__, +TyDoc_STRVAR(_curses_unget_wch__doc__, "unget_wch($module, ch, /)\n" "--\n" "\n" @@ -4213,7 +4213,7 @@ PyDoc_STRVAR(_curses_unget_wch__doc__, #if defined(HAVE_CURSES_USE_ENV) -PyDoc_STRVAR(_curses_use_env__doc__, +TyDoc_STRVAR(_curses_use_env__doc__, "use_env($module, flag, /)\n" "--\n" "\n" @@ -4254,7 +4254,7 @@ exit: #if !defined(STRICT_SYSV_CURSES) -PyDoc_STRVAR(_curses_use_default_colors__doc__, +TyDoc_STRVAR(_curses_use_default_colors__doc__, "use_default_colors($module, /)\n" "--\n" "\n" @@ -4276,7 +4276,7 @@ _curses_use_default_colors(TyObject *module, TyObject *Py_UNUSED(ignored)) #if !defined(STRICT_SYSV_CURSES) -PyDoc_STRVAR(_curses_assume_default_colors__doc__, +TyDoc_STRVAR(_curses_assume_default_colors__doc__, "assume_default_colors($module, fg, bg, /)\n" "--\n" "\n" @@ -4319,7 +4319,7 @@ exit: #endif /* !defined(STRICT_SYSV_CURSES) */ -PyDoc_STRVAR(_curses_has_extended_color_support__doc__, +TyDoc_STRVAR(_curses_has_extended_color_support__doc__, "has_extended_color_support($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_datetimemodule.c.h b/Modules/clinic/_datetimemodule.c.h index 6393741..c0efa9e 100644 --- a/Modules/clinic/_datetimemodule.c.h +++ b/Modules/clinic/_datetimemodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(datetime_date_fromtimestamp__doc__, +TyDoc_STRVAR(datetime_date_fromtimestamp__doc__, "fromtimestamp($type, timestamp, /)\n" "--\n" "\n" @@ -50,7 +50,7 @@ iso_calendar_date_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(year), &_Ty_ID(week), &_Ty_ID(weekday), }, }; @@ -98,7 +98,7 @@ exit: return return_value; } -PyDoc_STRVAR(datetime_date_replace__doc__, +TyDoc_STRVAR(datetime_date_replace__doc__, "replace($self, /, year=unchanged, month=unchanged, day=unchanged)\n" "--\n" "\n" @@ -124,7 +124,7 @@ datetime_date_replace(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(year), &_Ty_ID(month), &_Ty_ID(day), }, }; @@ -185,7 +185,7 @@ exit: return return_value; } -PyDoc_STRVAR(datetime_time_replace__doc__, +TyDoc_STRVAR(datetime_time_replace__doc__, "replace($self, /, hour=unchanged, minute=unchanged, second=unchanged,\n" " microsecond=unchanged, tzinfo=unchanged, *, fold=unchanged)\n" "--\n" @@ -213,7 +213,7 @@ datetime_time_replace(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(hour), &_Ty_ID(minute), &_Ty_ID(second), &_Ty_ID(microsecond), &_Ty_ID(tzinfo), &_Ty_ID(fold), }, }; @@ -305,7 +305,7 @@ exit: return return_value; } -PyDoc_STRVAR(datetime_datetime_now__doc__, +TyDoc_STRVAR(datetime_datetime_now__doc__, "now($type, /, tz=None)\n" "--\n" "\n" @@ -335,7 +335,7 @@ datetime_datetime_now(TyObject *type, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(tz), }, }; @@ -373,7 +373,7 @@ exit: return return_value; } -PyDoc_STRVAR(datetime_datetime_replace__doc__, +TyDoc_STRVAR(datetime_datetime_replace__doc__, "replace($self, /, year=unchanged, month=unchanged, day=unchanged,\n" " hour=unchanged, minute=unchanged, second=unchanged,\n" " microsecond=unchanged, tzinfo=unchanged, *, fold=unchanged)\n" @@ -403,7 +403,7 @@ datetime_datetime_replace(TyObject *self, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(year), &_Ty_ID(month), &_Ty_ID(day), &_Ty_ID(hour), &_Ty_ID(minute), &_Ty_ID(second), &_Ty_ID(microsecond), &_Ty_ID(tzinfo), &_Ty_ID(fold), }, }; diff --git a/Modules/clinic/_dbmmodule.c.h b/Modules/clinic/_dbmmodule.c.h index cb278a3..430344c 100644 --- a/Modules/clinic/_dbmmodule.c.h +++ b/Modules/clinic/_dbmmodule.c.h @@ -7,7 +7,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_dbm_dbm_close__doc__, +TyDoc_STRVAR(_dbm_dbm_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -25,7 +25,7 @@ _dbm_dbm_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return _dbm_dbm_close_impl((dbmobject *)self); } -PyDoc_STRVAR(_dbm_dbm_keys__doc__, +TyDoc_STRVAR(_dbm_dbm_keys__doc__, "keys($self, /)\n" "--\n" "\n" @@ -47,7 +47,7 @@ _dbm_dbm_keys(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssize return _dbm_dbm_keys_impl((dbmobject *)self, cls); } -PyDoc_STRVAR(_dbm_dbm_get__doc__, +TyDoc_STRVAR(_dbm_dbm_get__doc__, "get($self, key, default=None, /)\n" "--\n" "\n" @@ -91,7 +91,7 @@ exit: return return_value; } -PyDoc_STRVAR(_dbm_dbm_setdefault__doc__, +TyDoc_STRVAR(_dbm_dbm_setdefault__doc__, "setdefault($self, key, default=b\'\', /)\n" "--\n" "\n" @@ -137,7 +137,7 @@ exit: return return_value; } -PyDoc_STRVAR(_dbm_dbm_clear__doc__, +TyDoc_STRVAR(_dbm_dbm_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -159,7 +159,7 @@ _dbm_dbm_clear(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssiz return _dbm_dbm_clear_impl((dbmobject *)self, cls); } -PyDoc_STRVAR(dbmopen__doc__, +TyDoc_STRVAR(dbmopen__doc__, "open($module, filename, flags=\'r\', mode=0o666, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_elementtree.c.h b/Modules/clinic/_elementtree.c.h index 66a2858..737f20f 100644 --- a/Modules/clinic/_elementtree.c.h +++ b/Modules/clinic/_elementtree.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_elementtree_Element_append__doc__, +TyDoc_STRVAR(_elementtree_Element_append__doc__, "append($self, subelement, /)\n" "--\n" "\n"); @@ -57,7 +57,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_clear__doc__, +TyDoc_STRVAR(_elementtree_Element_clear__doc__, "clear($self, /)\n" "--\n" "\n"); @@ -74,7 +74,7 @@ _elementtree_Element_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return _elementtree_Element_clear_impl((ElementObject *)self); } -PyDoc_STRVAR(_elementtree_Element___copy____doc__, +TyDoc_STRVAR(_elementtree_Element___copy____doc__, "__copy__($self, /)\n" "--\n" "\n"); @@ -95,7 +95,7 @@ _elementtree_Element___copy__(TyObject *self, TyTypeObject *cls, TyObject *const return _elementtree_Element___copy___impl((ElementObject *)self, cls); } -PyDoc_STRVAR(_elementtree_Element___deepcopy____doc__, +TyDoc_STRVAR(_elementtree_Element___deepcopy____doc__, "__deepcopy__($self, memo, /)\n" "--\n" "\n"); @@ -123,7 +123,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element___sizeof____doc__, +TyDoc_STRVAR(_elementtree_Element___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n"); @@ -150,7 +150,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element___getstate____doc__, +TyDoc_STRVAR(_elementtree_Element___getstate____doc__, "__getstate__($self, /)\n" "--\n" "\n"); @@ -167,7 +167,7 @@ _elementtree_Element___getstate__(TyObject *self, TyObject *Py_UNUSED(ignored)) return _elementtree_Element___getstate___impl((ElementObject *)self); } -PyDoc_STRVAR(_elementtree_Element___setstate____doc__, +TyDoc_STRVAR(_elementtree_Element___setstate____doc__, "__setstate__($self, state, /)\n" "--\n" "\n"); @@ -211,7 +211,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_extend__doc__, +TyDoc_STRVAR(_elementtree_Element_extend__doc__, "extend($self, elements, /)\n" "--\n" "\n"); @@ -255,7 +255,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_find__doc__, +TyDoc_STRVAR(_elementtree_Element_find__doc__, "find($self, /, path, namespaces=None)\n" "--\n" "\n"); @@ -280,7 +280,7 @@ _elementtree_Element_find(TyObject *self, TyTypeObject *cls, TyObject *const *ar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(namespaces), }, }; @@ -320,7 +320,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_findtext__doc__, +TyDoc_STRVAR(_elementtree_Element_findtext__doc__, "findtext($self, /, path, default=None, namespaces=None)\n" "--\n" "\n"); @@ -346,7 +346,7 @@ _elementtree_Element_findtext(TyObject *self, TyTypeObject *cls, TyObject *const Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(default), &_Ty_ID(namespaces), }, }; @@ -393,7 +393,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_findall__doc__, +TyDoc_STRVAR(_elementtree_Element_findall__doc__, "findall($self, /, path, namespaces=None)\n" "--\n" "\n"); @@ -418,7 +418,7 @@ _elementtree_Element_findall(TyObject *self, TyTypeObject *cls, TyObject *const Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(namespaces), }, }; @@ -458,7 +458,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_iterfind__doc__, +TyDoc_STRVAR(_elementtree_Element_iterfind__doc__, "iterfind($self, /, path, namespaces=None)\n" "--\n" "\n"); @@ -483,7 +483,7 @@ _elementtree_Element_iterfind(TyObject *self, TyTypeObject *cls, TyObject *const Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(namespaces), }, }; @@ -523,7 +523,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_get__doc__, +TyDoc_STRVAR(_elementtree_Element_get__doc__, "get($self, /, key, default=None)\n" "--\n" "\n"); @@ -548,7 +548,7 @@ _elementtree_Element_get(TyObject *self, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(default), }, }; @@ -588,7 +588,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_iter__doc__, +TyDoc_STRVAR(_elementtree_Element_iter__doc__, "iter($self, /, tag=None)\n" "--\n" "\n"); @@ -613,7 +613,7 @@ _elementtree_Element_iter(TyObject *self, TyTypeObject *cls, TyObject *const *ar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(tag), }, }; @@ -651,7 +651,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_itertext__doc__, +TyDoc_STRVAR(_elementtree_Element_itertext__doc__, "itertext($self, /)\n" "--\n" "\n"); @@ -672,7 +672,7 @@ _elementtree_Element_itertext(TyObject *self, TyTypeObject *cls, TyObject *const return _elementtree_Element_itertext_impl((ElementObject *)self, cls); } -PyDoc_STRVAR(_elementtree_Element_insert__doc__, +TyDoc_STRVAR(_elementtree_Element_insert__doc__, "insert($self, index, subelement, /)\n" "--\n" "\n"); @@ -717,7 +717,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_items__doc__, +TyDoc_STRVAR(_elementtree_Element_items__doc__, "items($self, /)\n" "--\n" "\n"); @@ -734,7 +734,7 @@ _elementtree_Element_items(TyObject *self, TyObject *Py_UNUSED(ignored)) return _elementtree_Element_items_impl((ElementObject *)self); } -PyDoc_STRVAR(_elementtree_Element_keys__doc__, +TyDoc_STRVAR(_elementtree_Element_keys__doc__, "keys($self, /)\n" "--\n" "\n"); @@ -751,7 +751,7 @@ _elementtree_Element_keys(TyObject *self, TyObject *Py_UNUSED(ignored)) return _elementtree_Element_keys_impl((ElementObject *)self); } -PyDoc_STRVAR(_elementtree_Element_makeelement__doc__, +TyDoc_STRVAR(_elementtree_Element_makeelement__doc__, "makeelement($self, tag, attrib, /)\n" "--\n" "\n"); @@ -801,7 +801,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_remove__doc__, +TyDoc_STRVAR(_elementtree_Element_remove__doc__, "remove($self, subelement, /)\n" "--\n" "\n"); @@ -829,7 +829,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_Element_set__doc__, +TyDoc_STRVAR(_elementtree_Element_set__doc__, "set($self, key, value, /)\n" "--\n" "\n"); @@ -879,7 +879,7 @@ _elementtree_TreeBuilder___init__(TyObject *self, TyObject *args, TyObject *kwar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(element_factory), &_Ty_ID(comment_factory), &_Ty_ID(pi_factory), &_Ty_ID(insert_comments), &_Ty_ID(insert_pis), }, }; @@ -957,7 +957,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree__set_factories__doc__, +TyDoc_STRVAR(_elementtree__set_factories__doc__, "_set_factories($module, comment_factory, pi_factory, /)\n" "--\n" "\n" @@ -990,7 +990,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_TreeBuilder_data__doc__, +TyDoc_STRVAR(_elementtree_TreeBuilder_data__doc__, "data($self, data, /)\n" "--\n" "\n"); @@ -1011,7 +1011,7 @@ _elementtree_TreeBuilder_data(TyObject *self, TyObject *data) return return_value; } -PyDoc_STRVAR(_elementtree_TreeBuilder_end__doc__, +TyDoc_STRVAR(_elementtree_TreeBuilder_end__doc__, "end($self, tag, /)\n" "--\n" "\n"); @@ -1032,7 +1032,7 @@ _elementtree_TreeBuilder_end(TyObject *self, TyObject *tag) return return_value; } -PyDoc_STRVAR(_elementtree_TreeBuilder_comment__doc__, +TyDoc_STRVAR(_elementtree_TreeBuilder_comment__doc__, "comment($self, text, /)\n" "--\n" "\n"); @@ -1054,7 +1054,7 @@ _elementtree_TreeBuilder_comment(TyObject *self, TyObject *text) return return_value; } -PyDoc_STRVAR(_elementtree_TreeBuilder_pi__doc__, +TyDoc_STRVAR(_elementtree_TreeBuilder_pi__doc__, "pi($self, target, text=None, /)\n" "--\n" "\n"); @@ -1088,7 +1088,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_TreeBuilder_close__doc__, +TyDoc_STRVAR(_elementtree_TreeBuilder_close__doc__, "close($self, /)\n" "--\n" "\n"); @@ -1105,7 +1105,7 @@ _elementtree_TreeBuilder_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return _elementtree_TreeBuilder_close_impl((TreeBuilderObject *)self); } -PyDoc_STRVAR(_elementtree_TreeBuilder_start__doc__, +TyDoc_STRVAR(_elementtree_TreeBuilder_start__doc__, "start($self, tag, attrs, /)\n" "--\n" "\n"); @@ -1156,7 +1156,7 @@ _elementtree_XMLParser___init__(TyObject *self, TyObject *args, TyObject *kwargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(target), &_Ty_ID(encoding), }, }; @@ -1220,7 +1220,7 @@ exit: return return_value; } -PyDoc_STRVAR(_elementtree_XMLParser_close__doc__, +TyDoc_STRVAR(_elementtree_XMLParser_close__doc__, "close($self, /)\n" "--\n" "\n"); @@ -1237,7 +1237,7 @@ _elementtree_XMLParser_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return _elementtree_XMLParser_close_impl((XMLParserObject *)self); } -PyDoc_STRVAR(_elementtree_XMLParser_flush__doc__, +TyDoc_STRVAR(_elementtree_XMLParser_flush__doc__, "flush($self, /)\n" "--\n" "\n"); @@ -1254,7 +1254,7 @@ _elementtree_XMLParser_flush(TyObject *self, TyObject *Py_UNUSED(ignored)) return _elementtree_XMLParser_flush_impl((XMLParserObject *)self); } -PyDoc_STRVAR(_elementtree_XMLParser_feed__doc__, +TyDoc_STRVAR(_elementtree_XMLParser_feed__doc__, "feed($self, data, /)\n" "--\n" "\n"); @@ -1275,7 +1275,7 @@ _elementtree_XMLParser_feed(TyObject *self, TyObject *data) return return_value; } -PyDoc_STRVAR(_elementtree_XMLParser__parse_whole__doc__, +TyDoc_STRVAR(_elementtree_XMLParser__parse_whole__doc__, "_parse_whole($self, file, /)\n" "--\n" "\n"); @@ -1297,7 +1297,7 @@ _elementtree_XMLParser__parse_whole(TyObject *self, TyObject *file) return return_value; } -PyDoc_STRVAR(_elementtree_XMLParser__setevents__doc__, +TyDoc_STRVAR(_elementtree_XMLParser__setevents__doc__, "_setevents($self, events_queue, events_to_report=None, /)\n" "--\n" "\n"); diff --git a/Modules/clinic/_functoolsmodule.c.h b/Modules/clinic/_functoolsmodule.c.h index 4dcce11..5f10073 100644 --- a/Modules/clinic/_functoolsmodule.c.h +++ b/Modules/clinic/_functoolsmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_functools_cmp_to_key__doc__, +TyDoc_STRVAR(_functools_cmp_to_key__doc__, "cmp_to_key($module, /, mycmp)\n" "--\n" "\n" @@ -37,7 +37,7 @@ _functools_cmp_to_key(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(mycmp), }, }; @@ -70,7 +70,7 @@ exit: return return_value; } -PyDoc_STRVAR(_functools_reduce__doc__, +TyDoc_STRVAR(_functools_reduce__doc__, "reduce($module, function, iterable, /, initial=)\n" "--\n" "\n" @@ -103,7 +103,7 @@ _functools_reduce(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(initial), }, }; @@ -145,7 +145,7 @@ exit: return return_value; } -PyDoc_STRVAR(_functools__lru_cache_wrapper_cache_info__doc__, +TyDoc_STRVAR(_functools__lru_cache_wrapper_cache_info__doc__, "cache_info($self, /)\n" "--\n" "\n" @@ -169,7 +169,7 @@ _functools__lru_cache_wrapper_cache_info(TyObject *self, TyObject *Py_UNUSED(ign return return_value; } -PyDoc_STRVAR(_functools__lru_cache_wrapper_cache_clear__doc__, +TyDoc_STRVAR(_functools__lru_cache_wrapper_cache_clear__doc__, "cache_clear($self, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_gdbmmodule.c.h b/Modules/clinic/_gdbmmodule.c.h index 4c9ff19..59ddd38 100644 --- a/Modules/clinic/_gdbmmodule.c.h +++ b/Modules/clinic/_gdbmmodule.c.h @@ -7,7 +7,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_gdbm_gdbm_get__doc__, +TyDoc_STRVAR(_gdbm_gdbm_get__doc__, "get($self, key, default=None, /)\n" "--\n" "\n" @@ -41,7 +41,7 @@ exit: return return_value; } -PyDoc_STRVAR(_gdbm_gdbm_setdefault__doc__, +TyDoc_STRVAR(_gdbm_gdbm_setdefault__doc__, "setdefault($self, key, default=None, /)\n" "--\n" "\n" @@ -76,7 +76,7 @@ exit: return return_value; } -PyDoc_STRVAR(_gdbm_gdbm_close__doc__, +TyDoc_STRVAR(_gdbm_gdbm_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -94,7 +94,7 @@ _gdbm_gdbm_close(TyObject *self, TyObject *Py_UNUSED(ignored)) return _gdbm_gdbm_close_impl((gdbmobject *)self); } -PyDoc_STRVAR(_gdbm_gdbm_keys__doc__, +TyDoc_STRVAR(_gdbm_gdbm_keys__doc__, "keys($self, /)\n" "--\n" "\n" @@ -116,7 +116,7 @@ _gdbm_gdbm_keys(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssi return _gdbm_gdbm_keys_impl((gdbmobject *)self, cls); } -PyDoc_STRVAR(_gdbm_gdbm_firstkey__doc__, +TyDoc_STRVAR(_gdbm_gdbm_firstkey__doc__, "firstkey($self, /)\n" "--\n" "\n" @@ -142,7 +142,7 @@ _gdbm_gdbm_firstkey(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty return _gdbm_gdbm_firstkey_impl((gdbmobject *)self, cls); } -PyDoc_STRVAR(_gdbm_gdbm_nextkey__doc__, +TyDoc_STRVAR(_gdbm_gdbm_nextkey__doc__, "nextkey($self, key, /)\n" "--\n" "\n" @@ -193,7 +193,7 @@ exit: return return_value; } -PyDoc_STRVAR(_gdbm_gdbm_reorganize__doc__, +TyDoc_STRVAR(_gdbm_gdbm_reorganize__doc__, "reorganize($self, /)\n" "--\n" "\n" @@ -221,7 +221,7 @@ _gdbm_gdbm_reorganize(TyObject *self, TyTypeObject *cls, TyObject *const *args, return _gdbm_gdbm_reorganize_impl((gdbmobject *)self, cls); } -PyDoc_STRVAR(_gdbm_gdbm_sync__doc__, +TyDoc_STRVAR(_gdbm_gdbm_sync__doc__, "sync($self, /)\n" "--\n" "\n" @@ -246,7 +246,7 @@ _gdbm_gdbm_sync(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssi return _gdbm_gdbm_sync_impl((gdbmobject *)self, cls); } -PyDoc_STRVAR(_gdbm_gdbm_clear__doc__, +TyDoc_STRVAR(_gdbm_gdbm_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -268,7 +268,7 @@ _gdbm_gdbm_clear(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ss return _gdbm_gdbm_clear_impl((gdbmobject *)self, cls); } -PyDoc_STRVAR(dbmopen__doc__, +TyDoc_STRVAR(dbmopen__doc__, "open($module, filename, flags=\'r\', mode=0o666, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_hashopenssl.c.h b/Modules/clinic/_hashopenssl.c.h index 4a0d6ea..0bb1731 100644 --- a/Modules/clinic/_hashopenssl.c.h +++ b/Modules/clinic/_hashopenssl.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_long.h" // _TyLong_UnsignedLong_Converter() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(EVP_copy__doc__, +TyDoc_STRVAR(EVP_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -28,7 +28,7 @@ EVP_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return EVP_copy_impl((EVPobject *)self); } -PyDoc_STRVAR(EVP_digest__doc__, +TyDoc_STRVAR(EVP_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -46,7 +46,7 @@ EVP_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return EVP_digest_impl((EVPobject *)self); } -PyDoc_STRVAR(EVP_hexdigest__doc__, +TyDoc_STRVAR(EVP_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -64,7 +64,7 @@ EVP_hexdigest(TyObject *self, TyObject *Py_UNUSED(ignored)) return EVP_hexdigest_impl((EVPobject *)self); } -PyDoc_STRVAR(EVP_update__doc__, +TyDoc_STRVAR(EVP_update__doc__, "update($self, obj, /)\n" "--\n" "\n" @@ -88,7 +88,7 @@ EVP_update(TyObject *self, TyObject *obj) #if defined(PY_OPENSSL_HAS_SHAKE) -PyDoc_STRVAR(EVPXOF_digest__doc__, +TyDoc_STRVAR(EVPXOF_digest__doc__, "digest($self, /, length)\n" "--\n" "\n" @@ -113,7 +113,7 @@ EVPXOF_digest(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(length), }, }; @@ -161,7 +161,7 @@ exit: #if defined(PY_OPENSSL_HAS_SHAKE) -PyDoc_STRVAR(EVPXOF_hexdigest__doc__, +TyDoc_STRVAR(EVPXOF_hexdigest__doc__, "hexdigest($self, /, length)\n" "--\n" "\n" @@ -186,7 +186,7 @@ EVPXOF_hexdigest(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(length), }, }; @@ -232,7 +232,7 @@ exit: #endif /* defined(PY_OPENSSL_HAS_SHAKE) */ -PyDoc_STRVAR(_hashlib_new__doc__, +TyDoc_STRVAR(_hashlib_new__doc__, "new($module, /, name, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -263,7 +263,7 @@ _hashlib_new(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -336,7 +336,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_openssl_md5__doc__, +TyDoc_STRVAR(_hashlib_openssl_md5__doc__, "openssl_md5($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -362,7 +362,7 @@ _hashlib_openssl_md5(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -421,7 +421,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_openssl_sha1__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha1__doc__, "openssl_sha1($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -447,7 +447,7 @@ _hashlib_openssl_sha1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -506,7 +506,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_openssl_sha224__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha224__doc__, "openssl_sha224($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -533,7 +533,7 @@ _hashlib_openssl_sha224(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -592,7 +592,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_openssl_sha256__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha256__doc__, "openssl_sha256($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -619,7 +619,7 @@ _hashlib_openssl_sha256(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -678,7 +678,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_openssl_sha384__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha384__doc__, "openssl_sha384($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -705,7 +705,7 @@ _hashlib_openssl_sha384(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -764,7 +764,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_openssl_sha512__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha512__doc__, "openssl_sha512($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -791,7 +791,7 @@ _hashlib_openssl_sha512(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -852,7 +852,7 @@ exit: #if defined(PY_OPENSSL_HAS_SHA3) -PyDoc_STRVAR(_hashlib_openssl_sha3_224__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha3_224__doc__, "openssl_sha3_224($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -879,7 +879,7 @@ _hashlib_openssl_sha3_224(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -942,7 +942,7 @@ exit: #if defined(PY_OPENSSL_HAS_SHA3) -PyDoc_STRVAR(_hashlib_openssl_sha3_256__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha3_256__doc__, "openssl_sha3_256($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -969,7 +969,7 @@ _hashlib_openssl_sha3_256(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -1032,7 +1032,7 @@ exit: #if defined(PY_OPENSSL_HAS_SHA3) -PyDoc_STRVAR(_hashlib_openssl_sha3_384__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha3_384__doc__, "openssl_sha3_384($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -1059,7 +1059,7 @@ _hashlib_openssl_sha3_384(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -1122,7 +1122,7 @@ exit: #if defined(PY_OPENSSL_HAS_SHA3) -PyDoc_STRVAR(_hashlib_openssl_sha3_512__doc__, +TyDoc_STRVAR(_hashlib_openssl_sha3_512__doc__, "openssl_sha3_512($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -1149,7 +1149,7 @@ _hashlib_openssl_sha3_512(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -1212,7 +1212,7 @@ exit: #if defined(PY_OPENSSL_HAS_SHAKE) -PyDoc_STRVAR(_hashlib_openssl_shake_128__doc__, +TyDoc_STRVAR(_hashlib_openssl_shake_128__doc__, "openssl_shake_128($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -1239,7 +1239,7 @@ _hashlib_openssl_shake_128(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -1302,7 +1302,7 @@ exit: #if defined(PY_OPENSSL_HAS_SHAKE) -PyDoc_STRVAR(_hashlib_openssl_shake_256__doc__, +TyDoc_STRVAR(_hashlib_openssl_shake_256__doc__, "openssl_shake_256($module, /, data=b\'\', *, usedforsecurity=True,\n" " string=None)\n" "--\n" @@ -1329,7 +1329,7 @@ _hashlib_openssl_shake_256(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -1390,7 +1390,7 @@ exit: #endif /* defined(PY_OPENSSL_HAS_SHAKE) */ -PyDoc_STRVAR(pbkdf2_hmac__doc__, +TyDoc_STRVAR(pbkdf2_hmac__doc__, "pbkdf2_hmac($module, /, hash_name, password, salt, iterations,\n" " dklen=None)\n" "--\n" @@ -1418,7 +1418,7 @@ pbkdf2_hmac(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(hash_name), &_Ty_ID(password), &_Ty_ID(salt), &_Ty_ID(iterations), &_Ty_ID(dklen), }, }; @@ -1494,7 +1494,7 @@ exit: #if defined(PY_OPENSSL_HAS_SCRYPT) -PyDoc_STRVAR(_hashlib_scrypt__doc__, +TyDoc_STRVAR(_hashlib_scrypt__doc__, "scrypt($module, /, password, *, salt, n, r, p, maxmem=0, dklen=64)\n" "--\n" "\n" @@ -1521,7 +1521,7 @@ _hashlib_scrypt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(password), &_Ty_ID(salt), _Ty_LATIN1_CHR('n'), _Ty_LATIN1_CHR('r'), _Ty_LATIN1_CHR('p'), &_Ty_ID(maxmem), &_Ty_ID(dklen), }, }; @@ -1603,7 +1603,7 @@ exit: #endif /* defined(PY_OPENSSL_HAS_SCRYPT) */ -PyDoc_STRVAR(_hashlib_hmac_singleshot__doc__, +TyDoc_STRVAR(_hashlib_hmac_singleshot__doc__, "hmac_digest($module, /, key, msg, digest)\n" "--\n" "\n" @@ -1629,7 +1629,7 @@ _hashlib_hmac_singleshot(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(msg), &_Ty_ID(digest), }, }; @@ -1679,7 +1679,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_hmac_new__doc__, +TyDoc_STRVAR(_hashlib_hmac_new__doc__, "hmac_new($module, /, key, msg=b\'\', digestmod=None)\n" "--\n" "\n" @@ -1705,7 +1705,7 @@ _hashlib_hmac_new(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(msg), &_Ty_ID(digestmod), }, }; @@ -1759,7 +1759,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_HMAC_copy__doc__, +TyDoc_STRVAR(_hashlib_HMAC_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -1777,7 +1777,7 @@ _hashlib_HMAC_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return _hashlib_HMAC_copy_impl((HMACobject *)self); } -PyDoc_STRVAR(_hashlib_HMAC_update__doc__, +TyDoc_STRVAR(_hashlib_HMAC_update__doc__, "update($self, /, msg)\n" "--\n" "\n" @@ -1802,7 +1802,7 @@ _hashlib_HMAC_update(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(msg), }, }; @@ -1835,7 +1835,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_HMAC_digest__doc__, +TyDoc_STRVAR(_hashlib_HMAC_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -1853,7 +1853,7 @@ _hashlib_HMAC_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return _hashlib_HMAC_digest_impl((HMACobject *)self); } -PyDoc_STRVAR(_hashlib_HMAC_hexdigest__doc__, +TyDoc_STRVAR(_hashlib_HMAC_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -1874,7 +1874,7 @@ _hashlib_HMAC_hexdigest(TyObject *self, TyObject *Py_UNUSED(ignored)) return _hashlib_HMAC_hexdigest_impl((HMACobject *)self); } -PyDoc_STRVAR(_hashlib_get_fips_mode__doc__, +TyDoc_STRVAR(_hashlib_get_fips_mode__doc__, "get_fips_mode($module, /)\n" "--\n" "\n" @@ -1909,7 +1909,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hashlib_compare_digest__doc__, +TyDoc_STRVAR(_hashlib_compare_digest__doc__, "compare_digest($module, a, b, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_heapqmodule.c.h b/Modules/clinic/_heapqmodule.c.h index f4ed5f3..a25797e 100644 --- a/Modules/clinic/_heapqmodule.c.h +++ b/Modules/clinic/_heapqmodule.c.h @@ -5,7 +5,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_heapq_heappush__doc__, +TyDoc_STRVAR(_heapq_heappush__doc__, "heappush($module, heap, item, /)\n" "--\n" "\n" @@ -41,7 +41,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heappop__doc__, +TyDoc_STRVAR(_heapq_heappop__doc__, "heappop($module, heap, /)\n" "--\n" "\n" @@ -72,7 +72,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heapreplace__doc__, +TyDoc_STRVAR(_heapq_heapreplace__doc__, "heapreplace($module, heap, item, /)\n" "--\n" "\n" @@ -116,7 +116,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heappushpop__doc__, +TyDoc_STRVAR(_heapq_heappushpop__doc__, "heappushpop($module, heap, item, /)\n" "--\n" "\n" @@ -155,7 +155,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heapify__doc__, +TyDoc_STRVAR(_heapq_heapify__doc__, "heapify($module, heap, /)\n" "--\n" "\n" @@ -186,7 +186,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heappush_max__doc__, +TyDoc_STRVAR(_heapq_heappush_max__doc__, "heappush_max($module, heap, item, /)\n" "--\n" "\n" @@ -222,7 +222,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heappop_max__doc__, +TyDoc_STRVAR(_heapq_heappop_max__doc__, "heappop_max($module, heap, /)\n" "--\n" "\n" @@ -253,7 +253,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heapreplace_max__doc__, +TyDoc_STRVAR(_heapq_heapreplace_max__doc__, "heapreplace_max($module, heap, item, /)\n" "--\n" "\n" @@ -289,7 +289,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heapify_max__doc__, +TyDoc_STRVAR(_heapq_heapify_max__doc__, "heapify_max($module, heap, /)\n" "--\n" "\n" @@ -320,7 +320,7 @@ exit: return return_value; } -PyDoc_STRVAR(_heapq_heappushpop_max__doc__, +TyDoc_STRVAR(_heapq_heappushpop_max__doc__, "heappushpop_max($module, heap, item, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_localemodule.c.h b/Modules/clinic/_localemodule.c.h index c1cbf8a..641dfd5 100644 --- a/Modules/clinic/_localemodule.c.h +++ b/Modules/clinic/_localemodule.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_locale_setlocale__doc__, +TyDoc_STRVAR(_locale_setlocale__doc__, "setlocale($module, category, locale=, /)\n" "--\n" "\n" @@ -58,7 +58,7 @@ exit: return return_value; } -PyDoc_STRVAR(_locale_localeconv__doc__, +TyDoc_STRVAR(_locale_localeconv__doc__, "localeconv($module, /)\n" "--\n" "\n" @@ -78,7 +78,7 @@ _locale_localeconv(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_WCSCOLL) -PyDoc_STRVAR(_locale_strcoll__doc__, +TyDoc_STRVAR(_locale_strcoll__doc__, "strcoll($module, os1, os2, /)\n" "--\n" "\n" @@ -120,7 +120,7 @@ exit: #if defined(HAVE_WCSXFRM) -PyDoc_STRVAR(_locale_strxfrm__doc__, +TyDoc_STRVAR(_locale_strxfrm__doc__, "strxfrm($module, string, /)\n" "--\n" "\n" @@ -153,7 +153,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_locale__getdefaultlocale__doc__, +TyDoc_STRVAR(_locale__getdefaultlocale__doc__, "_getdefaultlocale($module, /)\n" "--\n" "\n"); @@ -174,7 +174,7 @@ _locale__getdefaultlocale(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_LANGINFO_H) -PyDoc_STRVAR(_locale_nl_langinfo__doc__, +TyDoc_STRVAR(_locale_nl_langinfo__doc__, "nl_langinfo($module, key, /)\n" "--\n" "\n" @@ -206,7 +206,7 @@ exit: #if defined(HAVE_LIBINTL_H) -PyDoc_STRVAR(_locale_gettext__doc__, +TyDoc_STRVAR(_locale_gettext__doc__, "gettext($module, msg, /)\n" "--\n" "\n" @@ -249,7 +249,7 @@ exit: #if defined(HAVE_LIBINTL_H) -PyDoc_STRVAR(_locale_dgettext__doc__, +TyDoc_STRVAR(_locale_dgettext__doc__, "dgettext($module, domain, msg, /)\n" "--\n" "\n" @@ -314,7 +314,7 @@ exit: #if defined(HAVE_LIBINTL_H) -PyDoc_STRVAR(_locale_dcgettext__doc__, +TyDoc_STRVAR(_locale_dcgettext__doc__, "dcgettext($module, domain, msg, category, /)\n" "--\n" "\n" @@ -383,7 +383,7 @@ exit: #if defined(HAVE_LIBINTL_H) -PyDoc_STRVAR(_locale_textdomain__doc__, +TyDoc_STRVAR(_locale_textdomain__doc__, "textdomain($module, domain, /)\n" "--\n" "\n" @@ -429,7 +429,7 @@ exit: #if defined(HAVE_LIBINTL_H) -PyDoc_STRVAR(_locale_bindtextdomain__doc__, +TyDoc_STRVAR(_locale_bindtextdomain__doc__, "bindtextdomain($module, domain, dir, /)\n" "--\n" "\n" @@ -476,7 +476,7 @@ exit: #if defined(HAVE_LIBINTL_H) && defined(HAVE_BIND_TEXTDOMAIN_CODESET) -PyDoc_STRVAR(_locale_bind_textdomain_codeset__doc__, +TyDoc_STRVAR(_locale_bind_textdomain_codeset__doc__, "bind_textdomain_codeset($module, domain, codeset, /)\n" "--\n" "\n" @@ -538,7 +538,7 @@ exit: #endif /* defined(HAVE_LIBINTL_H) && defined(HAVE_BIND_TEXTDOMAIN_CODESET) */ -PyDoc_STRVAR(_locale_getencoding__doc__, +TyDoc_STRVAR(_locale_getencoding__doc__, "getencoding($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_lsprof.c.h b/Modules/clinic/_lsprof.c.h index ad74309..51c5c91 100644 --- a/Modules/clinic/_lsprof.c.h +++ b/Modules/clinic/_lsprof.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_lsprof_Profiler_getstats__doc__, +TyDoc_STRVAR(_lsprof_Profiler_getstats__doc__, "getstats($self, /)\n" "--\n" "\n" @@ -52,7 +52,7 @@ _lsprof_Profiler_getstats(TyObject *self, TyTypeObject *cls, TyObject *const *ar return _lsprof_Profiler_getstats_impl((ProfilerObject *)self, cls); } -PyDoc_STRVAR(_lsprof_Profiler__pystart_callback__doc__, +TyDoc_STRVAR(_lsprof_Profiler__pystart_callback__doc__, "_pystart_callback($self, code, instruction_offset, /)\n" "--\n" "\n"); @@ -82,7 +82,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lsprof_Profiler__pythrow_callback__doc__, +TyDoc_STRVAR(_lsprof_Profiler__pythrow_callback__doc__, "_pythrow_callback($self, code, instruction_offset, exception, /)\n" "--\n" "\n"); @@ -115,7 +115,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lsprof_Profiler__pyreturn_callback__doc__, +TyDoc_STRVAR(_lsprof_Profiler__pyreturn_callback__doc__, "_pyreturn_callback($self, code, instruction_offset, retval, /)\n" "--\n" "\n"); @@ -149,7 +149,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lsprof_Profiler__ccall_callback__doc__, +TyDoc_STRVAR(_lsprof_Profiler__ccall_callback__doc__, "_ccall_callback($self, code, instruction_offset, callable, self_arg, /)\n" "--\n" "\n"); @@ -184,7 +184,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lsprof_Profiler__creturn_callback__doc__, +TyDoc_STRVAR(_lsprof_Profiler__creturn_callback__doc__, "_creturn_callback($self, code, instruction_offset, callable, self_arg,\n" " /)\n" "--\n" @@ -221,7 +221,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lsprof_Profiler_enable__doc__, +TyDoc_STRVAR(_lsprof_Profiler_enable__doc__, "enable($self, /, subcalls=True, builtins=True)\n" "--\n" "\n" @@ -254,7 +254,7 @@ _lsprof_Profiler_enable(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(subcalls), &_Ty_ID(builtins), }, }; @@ -305,7 +305,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lsprof_Profiler_disable__doc__, +TyDoc_STRVAR(_lsprof_Profiler_disable__doc__, "disable($self, /)\n" "--\n" "\n" @@ -323,7 +323,7 @@ _lsprof_Profiler_disable(TyObject *self, TyObject *Py_UNUSED(ignored)) return _lsprof_Profiler_disable_impl((ProfilerObject *)self); } -PyDoc_STRVAR(_lsprof_Profiler_clear__doc__, +TyDoc_STRVAR(_lsprof_Profiler_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -341,7 +341,7 @@ _lsprof_Profiler_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return _lsprof_Profiler_clear_impl((ProfilerObject *)self); } -PyDoc_STRVAR(profiler_init__doc__, +TyDoc_STRVAR(profiler_init__doc__, "Profiler(timer=None, timeunit=0.0, subcalls=True, builtins=True)\n" "--\n" "\n" @@ -369,7 +369,7 @@ profiler_init(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(timer), &_Ty_ID(timeunit), &_Ty_ID(subcalls), &_Ty_ID(builtins), }, }; diff --git a/Modules/clinic/_lzmamodule.c.h b/Modules/clinic/_lzmamodule.c.h index fa073ea..90033e6 100644 --- a/Modules/clinic/_lzmamodule.c.h +++ b/Modules/clinic/_lzmamodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(_lzma_LZMACompressor_compress__doc__, +TyDoc_STRVAR(_lzma_LZMACompressor_compress__doc__, "compress($self, data, /)\n" "--\n" "\n" @@ -46,7 +46,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lzma_LZMACompressor_flush__doc__, +TyDoc_STRVAR(_lzma_LZMACompressor_flush__doc__, "flush($self, /)\n" "--\n" "\n" @@ -68,7 +68,7 @@ _lzma_LZMACompressor_flush(TyObject *self, TyObject *Py_UNUSED(ignored)) return _lzma_LZMACompressor_flush_impl((Compressor *)self); } -PyDoc_STRVAR(_lzma_LZMADecompressor_decompress__doc__, +TyDoc_STRVAR(_lzma_LZMADecompressor_decompress__doc__, "decompress($self, /, data, max_length=-1)\n" "--\n" "\n" @@ -107,7 +107,7 @@ _lzma_LZMADecompressor_decompress(TyObject *self, TyObject *const *args, Ty_ssiz Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(max_length), }, }; @@ -165,7 +165,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lzma_LZMADecompressor__doc__, +TyDoc_STRVAR(_lzma_LZMADecompressor__doc__, "LZMADecompressor(format=FORMAT_AUTO, memlimit=None, filters=None)\n" "--\n" "\n" @@ -205,7 +205,7 @@ _lzma_LZMADecompressor(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(format), &_Ty_ID(memlimit), &_Ty_ID(filters), }, }; @@ -262,7 +262,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lzma_is_check_supported__doc__, +TyDoc_STRVAR(_lzma_is_check_supported__doc__, "is_check_supported($module, check_id, /)\n" "--\n" "\n" @@ -292,7 +292,7 @@ exit: return return_value; } -PyDoc_STRVAR(_lzma__decode_filter_properties__doc__, +TyDoc_STRVAR(_lzma__decode_filter_properties__doc__, "_decode_filter_properties($module, filter_id, encoded_props, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_opcode.c.h b/Modules/clinic/_opcode.c.h index 9c21f0d..8893cd5 100644 --- a/Modules/clinic/_opcode.c.h +++ b/Modules/clinic/_opcode.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_opcode_stack_effect__doc__, +TyDoc_STRVAR(_opcode_stack_effect__doc__, "stack_effect($module, opcode, oparg=None, /, *, jump=None)\n" "--\n" "\n" @@ -34,7 +34,7 @@ _opcode_stack_effect(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(jump), }, }; @@ -89,7 +89,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_is_valid__doc__, +TyDoc_STRVAR(_opcode_is_valid__doc__, "is_valid($module, /, opcode)\n" "--\n" "\n" @@ -114,7 +114,7 @@ _opcode_is_valid(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -155,7 +155,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_has_arg__doc__, +TyDoc_STRVAR(_opcode_has_arg__doc__, "has_arg($module, /, opcode)\n" "--\n" "\n" @@ -180,7 +180,7 @@ _opcode_has_arg(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -221,7 +221,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_has_const__doc__, +TyDoc_STRVAR(_opcode_has_const__doc__, "has_const($module, /, opcode)\n" "--\n" "\n" @@ -246,7 +246,7 @@ _opcode_has_const(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -287,7 +287,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_has_name__doc__, +TyDoc_STRVAR(_opcode_has_name__doc__, "has_name($module, /, opcode)\n" "--\n" "\n" @@ -312,7 +312,7 @@ _opcode_has_name(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -353,7 +353,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_has_jump__doc__, +TyDoc_STRVAR(_opcode_has_jump__doc__, "has_jump($module, /, opcode)\n" "--\n" "\n" @@ -378,7 +378,7 @@ _opcode_has_jump(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -419,7 +419,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_has_free__doc__, +TyDoc_STRVAR(_opcode_has_free__doc__, "has_free($module, /, opcode)\n" "--\n" "\n" @@ -449,7 +449,7 @@ _opcode_has_free(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -490,7 +490,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_has_local__doc__, +TyDoc_STRVAR(_opcode_has_local__doc__, "has_local($module, /, opcode)\n" "--\n" "\n" @@ -515,7 +515,7 @@ _opcode_has_local(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -556,7 +556,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_has_exc__doc__, +TyDoc_STRVAR(_opcode_has_exc__doc__, "has_exc($module, /, opcode)\n" "--\n" "\n" @@ -581,7 +581,7 @@ _opcode_has_exc(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), }, }; @@ -622,7 +622,7 @@ exit: return return_value; } -PyDoc_STRVAR(_opcode_get_specialization_stats__doc__, +TyDoc_STRVAR(_opcode_get_specialization_stats__doc__, "get_specialization_stats($module, /)\n" "--\n" "\n" @@ -640,7 +640,7 @@ _opcode_get_specialization_stats(TyObject *module, TyObject *Py_UNUSED(ignored)) return _opcode_get_specialization_stats_impl(module); } -PyDoc_STRVAR(_opcode_get_nb_ops__doc__, +TyDoc_STRVAR(_opcode_get_nb_ops__doc__, "get_nb_ops($module, /)\n" "--\n" "\n" @@ -660,7 +660,7 @@ _opcode_get_nb_ops(TyObject *module, TyObject *Py_UNUSED(ignored)) return _opcode_get_nb_ops_impl(module); } -PyDoc_STRVAR(_opcode_get_intrinsic1_descs__doc__, +TyDoc_STRVAR(_opcode_get_intrinsic1_descs__doc__, "get_intrinsic1_descs($module, /)\n" "--\n" "\n" @@ -678,7 +678,7 @@ _opcode_get_intrinsic1_descs(TyObject *module, TyObject *Py_UNUSED(ignored)) return _opcode_get_intrinsic1_descs_impl(module); } -PyDoc_STRVAR(_opcode_get_intrinsic2_descs__doc__, +TyDoc_STRVAR(_opcode_get_intrinsic2_descs__doc__, "get_intrinsic2_descs($module, /)\n" "--\n" "\n" @@ -696,7 +696,7 @@ _opcode_get_intrinsic2_descs(TyObject *module, TyObject *Py_UNUSED(ignored)) return _opcode_get_intrinsic2_descs_impl(module); } -PyDoc_STRVAR(_opcode_get_special_method_names__doc__, +TyDoc_STRVAR(_opcode_get_special_method_names__doc__, "get_special_method_names($module, /)\n" "--\n" "\n" @@ -714,7 +714,7 @@ _opcode_get_special_method_names(TyObject *module, TyObject *Py_UNUSED(ignored)) return _opcode_get_special_method_names_impl(module); } -PyDoc_STRVAR(_opcode_get_executor__doc__, +TyDoc_STRVAR(_opcode_get_executor__doc__, "get_executor($module, /, code, offset)\n" "--\n" "\n" @@ -739,7 +739,7 @@ _opcode_get_executor(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(code), &_Ty_ID(offset), }, }; diff --git a/Modules/clinic/_operator.c.h b/Modules/clinic/_operator.c.h index b73efdb..24c9733 100644 --- a/Modules/clinic/_operator.c.h +++ b/Modules/clinic/_operator.c.h @@ -5,7 +5,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_operator_truth__doc__, +TyDoc_STRVAR(_operator_truth__doc__, "truth($module, a, /)\n" "--\n" "\n" @@ -33,7 +33,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_add__doc__, +TyDoc_STRVAR(_operator_add__doc__, "add($module, a, b, /)\n" "--\n" "\n" @@ -63,7 +63,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_sub__doc__, +TyDoc_STRVAR(_operator_sub__doc__, "sub($module, a, b, /)\n" "--\n" "\n" @@ -93,7 +93,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_mul__doc__, +TyDoc_STRVAR(_operator_mul__doc__, "mul($module, a, b, /)\n" "--\n" "\n" @@ -123,7 +123,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_matmul__doc__, +TyDoc_STRVAR(_operator_matmul__doc__, "matmul($module, a, b, /)\n" "--\n" "\n" @@ -153,7 +153,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_floordiv__doc__, +TyDoc_STRVAR(_operator_floordiv__doc__, "floordiv($module, a, b, /)\n" "--\n" "\n" @@ -183,7 +183,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_truediv__doc__, +TyDoc_STRVAR(_operator_truediv__doc__, "truediv($module, a, b, /)\n" "--\n" "\n" @@ -213,7 +213,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_mod__doc__, +TyDoc_STRVAR(_operator_mod__doc__, "mod($module, a, b, /)\n" "--\n" "\n" @@ -243,7 +243,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_neg__doc__, +TyDoc_STRVAR(_operator_neg__doc__, "neg($module, a, /)\n" "--\n" "\n" @@ -252,7 +252,7 @@ PyDoc_STRVAR(_operator_neg__doc__, #define _OPERATOR_NEG_METHODDEF \ {"neg", (PyCFunction)_operator_neg, METH_O, _operator_neg__doc__}, -PyDoc_STRVAR(_operator_pos__doc__, +TyDoc_STRVAR(_operator_pos__doc__, "pos($module, a, /)\n" "--\n" "\n" @@ -261,7 +261,7 @@ PyDoc_STRVAR(_operator_pos__doc__, #define _OPERATOR_POS_METHODDEF \ {"pos", (PyCFunction)_operator_pos, METH_O, _operator_pos__doc__}, -PyDoc_STRVAR(_operator_abs__doc__, +TyDoc_STRVAR(_operator_abs__doc__, "abs($module, a, /)\n" "--\n" "\n" @@ -270,7 +270,7 @@ PyDoc_STRVAR(_operator_abs__doc__, #define _OPERATOR_ABS_METHODDEF \ {"abs", (PyCFunction)_operator_abs, METH_O, _operator_abs__doc__}, -PyDoc_STRVAR(_operator_inv__doc__, +TyDoc_STRVAR(_operator_inv__doc__, "inv($module, a, /)\n" "--\n" "\n" @@ -279,7 +279,7 @@ PyDoc_STRVAR(_operator_inv__doc__, #define _OPERATOR_INV_METHODDEF \ {"inv", (PyCFunction)_operator_inv, METH_O, _operator_inv__doc__}, -PyDoc_STRVAR(_operator_invert__doc__, +TyDoc_STRVAR(_operator_invert__doc__, "invert($module, a, /)\n" "--\n" "\n" @@ -288,7 +288,7 @@ PyDoc_STRVAR(_operator_invert__doc__, #define _OPERATOR_INVERT_METHODDEF \ {"invert", (PyCFunction)_operator_invert, METH_O, _operator_invert__doc__}, -PyDoc_STRVAR(_operator_lshift__doc__, +TyDoc_STRVAR(_operator_lshift__doc__, "lshift($module, a, b, /)\n" "--\n" "\n" @@ -318,7 +318,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_rshift__doc__, +TyDoc_STRVAR(_operator_rshift__doc__, "rshift($module, a, b, /)\n" "--\n" "\n" @@ -348,7 +348,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_not___doc__, +TyDoc_STRVAR(_operator_not___doc__, "not_($module, a, /)\n" "--\n" "\n" @@ -376,7 +376,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_and___doc__, +TyDoc_STRVAR(_operator_and___doc__, "and_($module, a, b, /)\n" "--\n" "\n" @@ -406,7 +406,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_xor__doc__, +TyDoc_STRVAR(_operator_xor__doc__, "xor($module, a, b, /)\n" "--\n" "\n" @@ -436,7 +436,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_or___doc__, +TyDoc_STRVAR(_operator_or___doc__, "or_($module, a, b, /)\n" "--\n" "\n" @@ -466,7 +466,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_iadd__doc__, +TyDoc_STRVAR(_operator_iadd__doc__, "iadd($module, a, b, /)\n" "--\n" "\n" @@ -496,7 +496,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_isub__doc__, +TyDoc_STRVAR(_operator_isub__doc__, "isub($module, a, b, /)\n" "--\n" "\n" @@ -526,7 +526,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_imul__doc__, +TyDoc_STRVAR(_operator_imul__doc__, "imul($module, a, b, /)\n" "--\n" "\n" @@ -556,7 +556,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_imatmul__doc__, +TyDoc_STRVAR(_operator_imatmul__doc__, "imatmul($module, a, b, /)\n" "--\n" "\n" @@ -586,7 +586,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_ifloordiv__doc__, +TyDoc_STRVAR(_operator_ifloordiv__doc__, "ifloordiv($module, a, b, /)\n" "--\n" "\n" @@ -616,7 +616,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_itruediv__doc__, +TyDoc_STRVAR(_operator_itruediv__doc__, "itruediv($module, a, b, /)\n" "--\n" "\n" @@ -646,7 +646,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_imod__doc__, +TyDoc_STRVAR(_operator_imod__doc__, "imod($module, a, b, /)\n" "--\n" "\n" @@ -676,7 +676,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_ilshift__doc__, +TyDoc_STRVAR(_operator_ilshift__doc__, "ilshift($module, a, b, /)\n" "--\n" "\n" @@ -706,7 +706,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_irshift__doc__, +TyDoc_STRVAR(_operator_irshift__doc__, "irshift($module, a, b, /)\n" "--\n" "\n" @@ -736,7 +736,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_iand__doc__, +TyDoc_STRVAR(_operator_iand__doc__, "iand($module, a, b, /)\n" "--\n" "\n" @@ -766,7 +766,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_ixor__doc__, +TyDoc_STRVAR(_operator_ixor__doc__, "ixor($module, a, b, /)\n" "--\n" "\n" @@ -796,7 +796,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_ior__doc__, +TyDoc_STRVAR(_operator_ior__doc__, "ior($module, a, b, /)\n" "--\n" "\n" @@ -826,7 +826,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_concat__doc__, +TyDoc_STRVAR(_operator_concat__doc__, "concat($module, a, b, /)\n" "--\n" "\n" @@ -856,7 +856,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_iconcat__doc__, +TyDoc_STRVAR(_operator_iconcat__doc__, "iconcat($module, a, b, /)\n" "--\n" "\n" @@ -886,7 +886,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_contains__doc__, +TyDoc_STRVAR(_operator_contains__doc__, "contains($module, a, b, /)\n" "--\n" "\n" @@ -921,7 +921,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_indexOf__doc__, +TyDoc_STRVAR(_operator_indexOf__doc__, "indexOf($module, a, b, /)\n" "--\n" "\n" @@ -956,7 +956,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_countOf__doc__, +TyDoc_STRVAR(_operator_countOf__doc__, "countOf($module, a, b, /)\n" "--\n" "\n" @@ -991,7 +991,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_getitem__doc__, +TyDoc_STRVAR(_operator_getitem__doc__, "getitem($module, a, b, /)\n" "--\n" "\n" @@ -1021,7 +1021,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_setitem__doc__, +TyDoc_STRVAR(_operator_setitem__doc__, "setitem($module, a, b, c, /)\n" "--\n" "\n" @@ -1054,7 +1054,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_delitem__doc__, +TyDoc_STRVAR(_operator_delitem__doc__, "delitem($module, a, b, /)\n" "--\n" "\n" @@ -1084,7 +1084,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_eq__doc__, +TyDoc_STRVAR(_operator_eq__doc__, "eq($module, a, b, /)\n" "--\n" "\n" @@ -1114,7 +1114,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_ne__doc__, +TyDoc_STRVAR(_operator_ne__doc__, "ne($module, a, b, /)\n" "--\n" "\n" @@ -1144,7 +1144,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_lt__doc__, +TyDoc_STRVAR(_operator_lt__doc__, "lt($module, a, b, /)\n" "--\n" "\n" @@ -1174,7 +1174,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_le__doc__, +TyDoc_STRVAR(_operator_le__doc__, "le($module, a, b, /)\n" "--\n" "\n" @@ -1204,7 +1204,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_gt__doc__, +TyDoc_STRVAR(_operator_gt__doc__, "gt($module, a, b, /)\n" "--\n" "\n" @@ -1234,7 +1234,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_ge__doc__, +TyDoc_STRVAR(_operator_ge__doc__, "ge($module, a, b, /)\n" "--\n" "\n" @@ -1264,7 +1264,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_pow__doc__, +TyDoc_STRVAR(_operator_pow__doc__, "pow($module, a, b, /)\n" "--\n" "\n" @@ -1294,7 +1294,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_ipow__doc__, +TyDoc_STRVAR(_operator_ipow__doc__, "ipow($module, a, b, /)\n" "--\n" "\n" @@ -1324,7 +1324,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_index__doc__, +TyDoc_STRVAR(_operator_index__doc__, "index($module, a, /)\n" "--\n" "\n" @@ -1333,7 +1333,7 @@ PyDoc_STRVAR(_operator_index__doc__, #define _OPERATOR_INDEX_METHODDEF \ {"index", (PyCFunction)_operator_index, METH_O, _operator_index__doc__}, -PyDoc_STRVAR(_operator_is___doc__, +TyDoc_STRVAR(_operator_is___doc__, "is_($module, a, b, /)\n" "--\n" "\n" @@ -1363,7 +1363,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_is_not__doc__, +TyDoc_STRVAR(_operator_is_not__doc__, "is_not($module, a, b, /)\n" "--\n" "\n" @@ -1393,7 +1393,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator_is_none__doc__, +TyDoc_STRVAR(_operator_is_none__doc__, "is_none($module, a, /)\n" "--\n" "\n" @@ -1402,7 +1402,7 @@ PyDoc_STRVAR(_operator_is_none__doc__, #define _OPERATOR_IS_NONE_METHODDEF \ {"is_none", (PyCFunction)_operator_is_none, METH_O, _operator_is_none__doc__}, -PyDoc_STRVAR(_operator_is_not_none__doc__, +TyDoc_STRVAR(_operator_is_not_none__doc__, "is_not_none($module, a, /)\n" "--\n" "\n" @@ -1411,7 +1411,7 @@ PyDoc_STRVAR(_operator_is_not_none__doc__, #define _OPERATOR_IS_NOT_NONE_METHODDEF \ {"is_not_none", (PyCFunction)_operator_is_not_none, METH_O, _operator_is_not_none__doc__}, -PyDoc_STRVAR(_operator_length_hint__doc__, +TyDoc_STRVAR(_operator_length_hint__doc__, "length_hint($module, obj, default=0, /)\n" "--\n" "\n" @@ -1468,7 +1468,7 @@ exit: return return_value; } -PyDoc_STRVAR(_operator__compare_digest__doc__, +TyDoc_STRVAR(_operator__compare_digest__doc__, "_compare_digest($module, a, b, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_pickle.c.h b/Modules/clinic/_pickle.c.h index ff6dd1c..5ebcde8 100644 --- a/Modules/clinic/_pickle.c.h +++ b/Modules/clinic/_pickle.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_pickle_Pickler_clear_memo__doc__, +TyDoc_STRVAR(_pickle_Pickler_clear_memo__doc__, "clear_memo($self, /)\n" "--\n" "\n" @@ -31,7 +31,7 @@ _pickle_Pickler_clear_memo(TyObject *self, TyObject *Py_UNUSED(ignored)) return _pickle_Pickler_clear_memo_impl((PicklerObject *)self); } -PyDoc_STRVAR(_pickle_Pickler_dump__doc__, +TyDoc_STRVAR(_pickle_Pickler_dump__doc__, "dump($self, obj, /)\n" "--\n" "\n" @@ -76,7 +76,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_Pickler___sizeof____doc__, +TyDoc_STRVAR(_pickle_Pickler___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -104,7 +104,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_Pickler___init____doc__, +TyDoc_STRVAR(_pickle_Pickler___init____doc__, "Pickler(file, protocol=None, fix_imports=True, buffer_callback=None)\n" "--\n" "\n" @@ -157,7 +157,7 @@ _pickle_Pickler___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file), &_Ty_ID(protocol), &_Ty_ID(fix_imports), &_Ty_ID(buffer_callback), }, }; @@ -216,7 +216,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_PicklerMemoProxy_clear__doc__, +TyDoc_STRVAR(_pickle_PicklerMemoProxy_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -234,7 +234,7 @@ _pickle_PicklerMemoProxy_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return _pickle_PicklerMemoProxy_clear_impl((PicklerMemoProxyObject *)self); } -PyDoc_STRVAR(_pickle_PicklerMemoProxy_copy__doc__, +TyDoc_STRVAR(_pickle_PicklerMemoProxy_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -252,7 +252,7 @@ _pickle_PicklerMemoProxy_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return _pickle_PicklerMemoProxy_copy_impl((PicklerMemoProxyObject *)self); } -PyDoc_STRVAR(_pickle_PicklerMemoProxy___reduce____doc__, +TyDoc_STRVAR(_pickle_PicklerMemoProxy___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n" @@ -270,7 +270,7 @@ _pickle_PicklerMemoProxy___reduce__(TyObject *self, TyObject *Py_UNUSED(ignored) return _pickle_PicklerMemoProxy___reduce___impl((PicklerMemoProxyObject *)self); } -PyDoc_STRVAR(_pickle_Unpickler_persistent_load__doc__, +TyDoc_STRVAR(_pickle_Unpickler_persistent_load__doc__, "persistent_load($self, pid, /)\n" "--\n" "\n"); @@ -314,7 +314,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_Unpickler_load__doc__, +TyDoc_STRVAR(_pickle_Unpickler_load__doc__, "load($self, /)\n" "--\n" "\n" @@ -340,7 +340,7 @@ _pickle_Unpickler_load(TyObject *self, TyTypeObject *cls, TyObject *const *args, return _pickle_Unpickler_load_impl((UnpicklerObject *)self, cls); } -PyDoc_STRVAR(_pickle_Unpickler_find_class__doc__, +TyDoc_STRVAR(_pickle_Unpickler_find_class__doc__, "find_class($self, module_name, global_name, /)\n" "--\n" "\n" @@ -395,7 +395,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_Unpickler___sizeof____doc__, +TyDoc_STRVAR(_pickle_Unpickler___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -423,7 +423,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_Unpickler___init____doc__, +TyDoc_STRVAR(_pickle_Unpickler___init____doc__, "Unpickler(file, *, fix_imports=True, encoding=\'ASCII\', errors=\'strict\',\n" " buffers=())\n" "--\n" @@ -467,7 +467,7 @@ _pickle_Unpickler___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file), &_Ty_ID(fix_imports), &_Ty_ID(encoding), &_Ty_ID(errors), &_Ty_ID(buffers), }, }; @@ -557,7 +557,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_UnpicklerMemoProxy_clear__doc__, +TyDoc_STRVAR(_pickle_UnpicklerMemoProxy_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -575,7 +575,7 @@ _pickle_UnpicklerMemoProxy_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return _pickle_UnpicklerMemoProxy_clear_impl((UnpicklerMemoProxyObject *)self); } -PyDoc_STRVAR(_pickle_UnpicklerMemoProxy_copy__doc__, +TyDoc_STRVAR(_pickle_UnpicklerMemoProxy_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -593,7 +593,7 @@ _pickle_UnpicklerMemoProxy_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return _pickle_UnpicklerMemoProxy_copy_impl((UnpicklerMemoProxyObject *)self); } -PyDoc_STRVAR(_pickle_UnpicklerMemoProxy___reduce____doc__, +TyDoc_STRVAR(_pickle_UnpicklerMemoProxy___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n" @@ -611,7 +611,7 @@ _pickle_UnpicklerMemoProxy___reduce__(TyObject *self, TyObject *Py_UNUSED(ignore return _pickle_UnpicklerMemoProxy___reduce___impl((UnpicklerMemoProxyObject *)self); } -PyDoc_STRVAR(_pickle_dump__doc__, +TyDoc_STRVAR(_pickle_dump__doc__, "dump($module, /, obj, file, protocol=None, *, fix_imports=True,\n" " buffer_callback=None)\n" "--\n" @@ -664,7 +664,7 @@ _pickle_dump(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(obj), &_Ty_ID(file), &_Ty_ID(protocol), &_Ty_ID(fix_imports), &_Ty_ID(buffer_callback), }, }; @@ -727,7 +727,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_dumps__doc__, +TyDoc_STRVAR(_pickle_dumps__doc__, "dumps($module, /, obj, protocol=None, *, fix_imports=True,\n" " buffer_callback=None)\n" "--\n" @@ -771,7 +771,7 @@ _pickle_dumps(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(obj), &_Ty_ID(protocol), &_Ty_ID(fix_imports), &_Ty_ID(buffer_callback), }, }; @@ -832,7 +832,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_load__doc__, +TyDoc_STRVAR(_pickle_load__doc__, "load($module, /, file, *, fix_imports=True, encoding=\'ASCII\',\n" " errors=\'strict\', buffers=())\n" "--\n" @@ -882,7 +882,7 @@ _pickle_load(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file), &_Ty_ID(fix_imports), &_Ty_ID(encoding), &_Ty_ID(errors), &_Ty_ID(buffers), }, }; @@ -970,7 +970,7 @@ exit: return return_value; } -PyDoc_STRVAR(_pickle_loads__doc__, +TyDoc_STRVAR(_pickle_loads__doc__, "loads($module, data, /, *, fix_imports=True, encoding=\'ASCII\',\n" " errors=\'strict\', buffers=())\n" "--\n" @@ -1011,7 +1011,7 @@ _pickle_loads(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fix_imports), &_Ty_ID(encoding), &_Ty_ID(errors), &_Ty_ID(buffers), }, }; diff --git a/Modules/clinic/_posixsubprocess.c.h b/Modules/clinic/_posixsubprocess.c.h index bc5c8dc..e652fe5 100644 --- a/Modules/clinic/_posixsubprocess.c.h +++ b/Modules/clinic/_posixsubprocess.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(subprocess_fork_exec__doc__, +TyDoc_STRVAR(subprocess_fork_exec__doc__, "fork_exec($module, args, executable_list, close_fds, pass_fds, cwd,\n" " env, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite,\n" " errpipe_read, errpipe_write, restore_signals, call_setsid,\n" diff --git a/Modules/clinic/_queuemodule.c.h b/Modules/clinic/_queuemodule.c.h index 6e0cfab..e61e787 100644 --- a/Modules/clinic/_queuemodule.c.h +++ b/Modules/clinic/_queuemodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_NoKeywords() -PyDoc_STRVAR(simplequeue_new__doc__, +TyDoc_STRVAR(simplequeue_new__doc__, "SimpleQueue()\n" "--\n" "\n" @@ -38,7 +38,7 @@ exit: return return_value; } -PyDoc_STRVAR(_queue_SimpleQueue_put__doc__, +TyDoc_STRVAR(_queue_SimpleQueue_put__doc__, "put($self, /, item, block=True, timeout=None)\n" "--\n" "\n" @@ -67,7 +67,7 @@ _queue_SimpleQueue_put(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(item), &_Ty_ID(block), &_Ty_ID(timeout), }, }; @@ -119,7 +119,7 @@ exit: return return_value; } -PyDoc_STRVAR(_queue_SimpleQueue_put_nowait__doc__, +TyDoc_STRVAR(_queue_SimpleQueue_put_nowait__doc__, "put_nowait($self, /, item)\n" "--\n" "\n" @@ -147,7 +147,7 @@ _queue_SimpleQueue_put_nowait(TyObject *self, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(item), }, }; @@ -182,7 +182,7 @@ exit: return return_value; } -PyDoc_STRVAR(_queue_SimpleQueue_get__doc__, +TyDoc_STRVAR(_queue_SimpleQueue_get__doc__, "get($self, /, block=True, timeout=None)\n" "--\n" "\n" @@ -216,7 +216,7 @@ _queue_SimpleQueue_get(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(block), &_Ty_ID(timeout), }, }; @@ -266,7 +266,7 @@ exit: return return_value; } -PyDoc_STRVAR(_queue_SimpleQueue_get_nowait__doc__, +TyDoc_STRVAR(_queue_SimpleQueue_get_nowait__doc__, "get_nowait($self, /)\n" "--\n" "\n" @@ -299,7 +299,7 @@ exit: return return_value; } -PyDoc_STRVAR(_queue_SimpleQueue_empty__doc__, +TyDoc_STRVAR(_queue_SimpleQueue_empty__doc__, "empty($self, /)\n" "--\n" "\n" @@ -329,7 +329,7 @@ exit: return return_value; } -PyDoc_STRVAR(_queue_SimpleQueue_qsize__doc__, +TyDoc_STRVAR(_queue_SimpleQueue_qsize__doc__, "qsize($self, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_randommodule.c.h b/Modules/clinic/_randommodule.c.h index d45efac..0d7f8ad 100644 --- a/Modules/clinic/_randommodule.c.h +++ b/Modules/clinic/_randommodule.c.h @@ -6,7 +6,7 @@ preserve #include "pycore_long.h" // _TyLong_UInt64_Converter() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_random_Random_random__doc__, +TyDoc_STRVAR(_random_Random_random__doc__, "random($self, /)\n" "--\n" "\n" @@ -30,7 +30,7 @@ _random_Random_random(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_random_Random_seed__doc__, +TyDoc_STRVAR(_random_Random_seed__doc__, "seed($self, n=None, /)\n" "--\n" "\n" @@ -67,7 +67,7 @@ exit: return return_value; } -PyDoc_STRVAR(_random_Random_getstate__doc__, +TyDoc_STRVAR(_random_Random_getstate__doc__, "getstate($self, /)\n" "--\n" "\n" @@ -91,7 +91,7 @@ _random_Random_getstate(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_random_Random_setstate__doc__, +TyDoc_STRVAR(_random_Random_setstate__doc__, "setstate($self, state, /)\n" "--\n" "\n" @@ -115,7 +115,7 @@ _random_Random_setstate(TyObject *self, TyObject *state) return return_value; } -PyDoc_STRVAR(_random_Random_getrandbits__doc__, +TyDoc_STRVAR(_random_Random_getrandbits__doc__, "getrandbits($self, k, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_remote_debugging_module.c.h b/Modules/clinic/_remote_debugging_module.c.h index 47a753f..f7054f4 100644 --- a/Modules/clinic/_remote_debugging_module.c.h +++ b/Modules/clinic/_remote_debugging_module.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_remote_debugging_RemoteUnwinder___init____doc__, +TyDoc_STRVAR(_remote_debugging_RemoteUnwinder___init____doc__, "RemoteUnwinder(pid, *, all_threads=False, only_active_thread=False,\n" " debug=False)\n" "--\n" @@ -53,7 +53,7 @@ _remote_debugging_RemoteUnwinder___init__(TyObject *self, TyObject *args, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pid), &_Ty_ID(all_threads), &_Ty_ID(only_active_thread), &_Ty_ID(debug), }, }; @@ -121,7 +121,7 @@ exit: return return_value; } -PyDoc_STRVAR(_remote_debugging_RemoteUnwinder_get_stack_trace__doc__, +TyDoc_STRVAR(_remote_debugging_RemoteUnwinder_get_stack_trace__doc__, "get_stack_trace($self, /)\n" "--\n" "\n" @@ -174,7 +174,7 @@ _remote_debugging_RemoteUnwinder_get_stack_trace(TyObject *self, TyObject *Py_UN return return_value; } -PyDoc_STRVAR(_remote_debugging_RemoteUnwinder_get_all_awaited_by__doc__, +TyDoc_STRVAR(_remote_debugging_RemoteUnwinder_get_all_awaited_by__doc__, "get_all_awaited_by($self, /)\n" "--\n" "\n" @@ -231,7 +231,7 @@ _remote_debugging_RemoteUnwinder_get_all_awaited_by(TyObject *self, TyObject *Py return return_value; } -PyDoc_STRVAR(_remote_debugging_RemoteUnwinder_get_async_stack_trace__doc__, +TyDoc_STRVAR(_remote_debugging_RemoteUnwinder_get_async_stack_trace__doc__, "get_async_stack_trace($self, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h index f2202c8..fb3a5e5 100644 --- a/Modules/clinic/_ssl.c.h +++ b/Modules/clinic/_ssl.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_ssl__SSLSocket_do_handshake__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_do_handshake__doc__, "do_handshake($self, /)\n" "--\n" "\n"); @@ -32,7 +32,7 @@ _ssl__SSLSocket_do_handshake(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__test_decode_cert__doc__, +TyDoc_STRVAR(_ssl__test_decode_cert__doc__, "_test_decode_cert($module, path, /)\n" "--\n" "\n"); @@ -58,7 +58,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_getpeercert__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_getpeercert__doc__, "getpeercert($self, der=False, /)\n" "--\n" "\n" @@ -103,7 +103,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_get_verified_chain__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_get_verified_chain__doc__, "get_verified_chain($self, /)\n" "--\n" "\n"); @@ -126,7 +126,7 @@ _ssl__SSLSocket_get_verified_chain(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_get_unverified_chain__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_get_unverified_chain__doc__, "get_unverified_chain($self, /)\n" "--\n" "\n"); @@ -149,7 +149,7 @@ _ssl__SSLSocket_get_unverified_chain(TyObject *self, TyObject *Py_UNUSED(ignored return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_shared_ciphers__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_shared_ciphers__doc__, "shared_ciphers($self, /)\n" "--\n" "\n"); @@ -172,7 +172,7 @@ _ssl__SSLSocket_shared_ciphers(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_cipher__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_cipher__doc__, "cipher($self, /)\n" "--\n" "\n"); @@ -195,7 +195,7 @@ _ssl__SSLSocket_cipher(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_version__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_version__doc__, "version($self, /)\n" "--\n" "\n"); @@ -218,7 +218,7 @@ _ssl__SSLSocket_version(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_selected_alpn_protocol__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_selected_alpn_protocol__doc__, "selected_alpn_protocol($self, /)\n" "--\n" "\n"); @@ -241,7 +241,7 @@ _ssl__SSLSocket_selected_alpn_protocol(TyObject *self, TyObject *Py_UNUSED(ignor return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_compression__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_compression__doc__, "compression($self, /)\n" "--\n" "\n"); @@ -258,7 +258,7 @@ _ssl__SSLSocket_compression(TyObject *self, TyObject *Py_UNUSED(ignored)) return _ssl__SSLSocket_compression_impl((PySSLSocket *)self); } -PyDoc_STRVAR(_ssl__SSLSocket_context__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_context__doc__, "This changes the context associated with the SSLSocket.\n" "\n" "This is typically used from within a callback function set by the sni_callback\n" @@ -319,7 +319,7 @@ _ssl__SSLSocket_context_set(TyObject *self, TyObject *value, void *Py_UNUSED(con return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_server_side__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_server_side__doc__, "Whether this is a server-side socket."); #if defined(_ssl__SSLSocket_server_side_DOCSTR) # undef _ssl__SSLSocket_server_side_DOCSTR @@ -351,7 +351,7 @@ _ssl__SSLSocket_server_side_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_server_hostname__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_server_hostname__doc__, "The currently set server hostname (for SNI)."); #if defined(_ssl__SSLSocket_server_hostname_DOCSTR) # undef _ssl__SSLSocket_server_hostname_DOCSTR @@ -383,7 +383,7 @@ _ssl__SSLSocket_server_hostname_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_owner__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_owner__doc__, "The Python-level owner of this object.\n" "\n" "Passed as \"self\" in servername callback."); @@ -442,7 +442,7 @@ _ssl__SSLSocket_owner_set(TyObject *self, TyObject *value, void *Py_UNUSED(conte return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_write__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_write__doc__, "write($self, b, /)\n" "--\n" "\n" @@ -478,7 +478,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_pending__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_pending__doc__, "pending($self, /)\n" "--\n" "\n" @@ -502,7 +502,7 @@ _ssl__SSLSocket_pending(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_read__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_read__doc__, "read(size, [buffer])\n" "Read up to size bytes from the SSL socket."); @@ -550,7 +550,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_shutdown__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_shutdown__doc__, "shutdown($self, /)\n" "--\n" "\n" @@ -574,7 +574,7 @@ _ssl__SSLSocket_shutdown(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_get_channel_binding__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_get_channel_binding__doc__, "get_channel_binding($self, /, cb_type=\'tls-unique\')\n" "--\n" "\n" @@ -604,7 +604,7 @@ _ssl__SSLSocket_get_channel_binding(TyObject *self, TyObject *const *args, Ty_ss Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(cb_type), }, }; @@ -656,7 +656,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_verify_client_post_handshake__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_verify_client_post_handshake__doc__, "verify_client_post_handshake($self, /)\n" "--\n" "\n" @@ -680,7 +680,7 @@ _ssl__SSLSocket_verify_client_post_handshake(TyObject *self, TyObject *Py_UNUSED return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_session__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_session__doc__, "The underlying SSLSession object."); #if defined(_ssl__SSLSocket_session_DOCSTR) # undef _ssl__SSLSocket_session_DOCSTR @@ -737,7 +737,7 @@ _ssl__SSLSocket_session_set(TyObject *self, TyObject *value, void *Py_UNUSED(con return return_value; } -PyDoc_STRVAR(_ssl__SSLSocket_session_reused__doc__, +TyDoc_STRVAR(_ssl__SSLSocket_session_reused__doc__, "Was the client session reused during handshake?"); #if defined(_ssl__SSLSocket_session_reused_DOCSTR) # undef _ssl__SSLSocket_session_reused_DOCSTR @@ -798,7 +798,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_set_ciphers__doc__, +TyDoc_STRVAR(_ssl__SSLContext_set_ciphers__doc__, "set_ciphers($self, cipherlist, /)\n" "--\n" "\n"); @@ -836,7 +836,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_get_ciphers__doc__, +TyDoc_STRVAR(_ssl__SSLContext_get_ciphers__doc__, "get_ciphers($self, /)\n" "--\n" "\n"); @@ -859,7 +859,7 @@ _ssl__SSLContext_get_ciphers(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLContext__set_alpn_protocols__doc__, +TyDoc_STRVAR(_ssl__SSLContext__set_alpn_protocols__doc__, "_set_alpn_protocols($self, protos, /)\n" "--\n" "\n"); @@ -1095,7 +1095,7 @@ _ssl__SSLContext_maximum_version_set(TyObject *self, TyObject *value, void *Py_U return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_num_tickets__doc__, +TyDoc_STRVAR(_ssl__SSLContext_num_tickets__doc__, "Control the number of TLSv1.3 session tickets."); #if defined(_ssl__SSLContext_num_tickets_DOCSTR) # undef _ssl__SSLContext_num_tickets_DOCSTR @@ -1152,7 +1152,7 @@ _ssl__SSLContext_num_tickets_set(TyObject *self, TyObject *value, void *Py_UNUSE return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_security_level__doc__, +TyDoc_STRVAR(_ssl__SSLContext_security_level__doc__, "The current security level."); #if defined(_ssl__SSLContext_security_level_DOCSTR) # undef _ssl__SSLContext_security_level_DOCSTR @@ -1359,7 +1359,7 @@ _ssl__SSLContext_protocol_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_load_cert_chain__doc__, +TyDoc_STRVAR(_ssl__SSLContext_load_cert_chain__doc__, "load_cert_chain($self, /, certfile, keyfile=None, password=None)\n" "--\n" "\n"); @@ -1384,7 +1384,7 @@ _ssl__SSLContext_load_cert_chain(TyObject *self, TyObject *const *args, Ty_ssize Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(certfile), &_Ty_ID(keyfile), &_Ty_ID(password), }, }; @@ -1433,7 +1433,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_load_verify_locations__doc__, +TyDoc_STRVAR(_ssl__SSLContext_load_verify_locations__doc__, "load_verify_locations($self, /, cafile=None, capath=None, cadata=None)\n" "--\n" "\n"); @@ -1460,7 +1460,7 @@ _ssl__SSLContext_load_verify_locations(TyObject *self, TyObject *const *args, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(cafile), &_Ty_ID(capath), &_Ty_ID(cadata), }, }; @@ -1514,7 +1514,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_load_dh_params__doc__, +TyDoc_STRVAR(_ssl__SSLContext_load_dh_params__doc__, "load_dh_params($self, path, /)\n" "--\n" "\n"); @@ -1537,7 +1537,7 @@ _ssl__SSLContext_load_dh_params(TyObject *self, TyObject *filepath) return return_value; } -PyDoc_STRVAR(_ssl__SSLContext__wrap_socket__doc__, +TyDoc_STRVAR(_ssl__SSLContext__wrap_socket__doc__, "_wrap_socket($self, /, sock, server_side, server_hostname=None, *,\n" " owner=None, session=None)\n" "--\n" @@ -1564,7 +1564,7 @@ _ssl__SSLContext__wrap_socket(TyObject *self, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sock), &_Ty_ID(server_side), &_Ty_ID(server_hostname), &_Ty_ID(owner), &_Ty_ID(session), }, }; @@ -1633,7 +1633,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext__wrap_bio__doc__, +TyDoc_STRVAR(_ssl__SSLContext__wrap_bio__doc__, "_wrap_bio($self, /, incoming, outgoing, server_side,\n" " server_hostname=None, *, owner=None, session=None)\n" "--\n" @@ -1661,7 +1661,7 @@ _ssl__SSLContext__wrap_bio(TyObject *self, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(incoming), &_Ty_ID(outgoing), &_Ty_ID(server_side), &_Ty_ID(server_hostname), &_Ty_ID(owner), &_Ty_ID(session), }, }; @@ -1736,7 +1736,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_session_stats__doc__, +TyDoc_STRVAR(_ssl__SSLContext_session_stats__doc__, "session_stats($self, /)\n" "--\n" "\n"); @@ -1759,7 +1759,7 @@ _ssl__SSLContext_session_stats(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_set_default_verify_paths__doc__, +TyDoc_STRVAR(_ssl__SSLContext_set_default_verify_paths__doc__, "set_default_verify_paths($self, /)\n" "--\n" "\n"); @@ -1782,7 +1782,7 @@ _ssl__SSLContext_set_default_verify_paths(TyObject *self, TyObject *Py_UNUSED(ig return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_set_ecdh_curve__doc__, +TyDoc_STRVAR(_ssl__SSLContext_set_ecdh_curve__doc__, "set_ecdh_curve($self, name, /)\n" "--\n" "\n"); @@ -1805,7 +1805,7 @@ _ssl__SSLContext_set_ecdh_curve(TyObject *self, TyObject *name) return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_sni_callback__doc__, +TyDoc_STRVAR(_ssl__SSLContext_sni_callback__doc__, "Set a callback that will be called when a server name is provided by the SSL/TLS client in the SNI extension.\n" "\n" "If the argument is None then the callback is disabled. The method is called\n" @@ -1867,7 +1867,7 @@ _ssl__SSLContext_sni_callback_set(TyObject *self, TyObject *value, void *Py_UNUS return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_cert_store_stats__doc__, +TyDoc_STRVAR(_ssl__SSLContext_cert_store_stats__doc__, "cert_store_stats($self, /)\n" "--\n" "\n" @@ -1897,7 +1897,7 @@ _ssl__SSLContext_cert_store_stats(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_get_ca_certs__doc__, +TyDoc_STRVAR(_ssl__SSLContext_get_ca_certs__doc__, "get_ca_certs($self, /, binary_form=False)\n" "--\n" "\n" @@ -1928,7 +1928,7 @@ _ssl__SSLContext_get_ca_certs(TyObject *self, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(binary_form), }, }; @@ -1971,7 +1971,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_set_psk_client_callback__doc__, +TyDoc_STRVAR(_ssl__SSLContext_set_psk_client_callback__doc__, "set_psk_client_callback($self, /, callback)\n" "--\n" "\n"); @@ -1996,7 +1996,7 @@ _ssl__SSLContext_set_psk_client_callback(TyObject *self, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(callback), }, }; @@ -2031,7 +2031,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl__SSLContext_set_psk_server_callback__doc__, +TyDoc_STRVAR(_ssl__SSLContext_set_psk_server_callback__doc__, "set_psk_server_callback($self, /, callback, identity_hint=None)\n" "--\n" "\n"); @@ -2057,7 +2057,7 @@ _ssl__SSLContext_set_psk_server_callback(TyObject *self, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(callback), &_Ty_ID(identity_hint), }, }; @@ -2141,7 +2141,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl_MemoryBIO_pending__doc__, +TyDoc_STRVAR(_ssl_MemoryBIO_pending__doc__, "The number of bytes pending in the memory BIO."); #if defined(_ssl_MemoryBIO_pending_DOCSTR) # undef _ssl_MemoryBIO_pending_DOCSTR @@ -2173,7 +2173,7 @@ _ssl_MemoryBIO_pending_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl_MemoryBIO_eof__doc__, +TyDoc_STRVAR(_ssl_MemoryBIO_eof__doc__, "Whether the memory BIO is at EOF."); #if defined(_ssl_MemoryBIO_eof_DOCSTR) # undef _ssl_MemoryBIO_eof_DOCSTR @@ -2205,7 +2205,7 @@ _ssl_MemoryBIO_eof_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl_MemoryBIO_read__doc__, +TyDoc_STRVAR(_ssl_MemoryBIO_read__doc__, "read($self, size=-1, /)\n" "--\n" "\n" @@ -2247,7 +2247,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl_MemoryBIO_write__doc__, +TyDoc_STRVAR(_ssl_MemoryBIO_write__doc__, "write($self, b, /)\n" "--\n" "\n" @@ -2283,7 +2283,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl_MemoryBIO_write_eof__doc__, +TyDoc_STRVAR(_ssl_MemoryBIO_write_eof__doc__, "write_eof($self, /)\n" "--\n" "\n" @@ -2309,7 +2309,7 @@ _ssl_MemoryBIO_write_eof(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl_SSLSession_time__doc__, +TyDoc_STRVAR(_ssl_SSLSession_time__doc__, "Session creation time (seconds since epoch)."); #if defined(_ssl_SSLSession_time_DOCSTR) # undef _ssl_SSLSession_time_DOCSTR @@ -2341,7 +2341,7 @@ _ssl_SSLSession_time_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl_SSLSession_timeout__doc__, +TyDoc_STRVAR(_ssl_SSLSession_timeout__doc__, "Session timeout (delta in seconds)."); #if defined(_ssl_SSLSession_timeout_DOCSTR) # undef _ssl_SSLSession_timeout_DOCSTR @@ -2373,7 +2373,7 @@ _ssl_SSLSession_timeout_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl_SSLSession_ticket_lifetime_hint__doc__, +TyDoc_STRVAR(_ssl_SSLSession_ticket_lifetime_hint__doc__, "Ticket life time hint."); #if defined(_ssl_SSLSession_ticket_lifetime_hint_DOCSTR) # undef _ssl_SSLSession_ticket_lifetime_hint_DOCSTR @@ -2405,7 +2405,7 @@ _ssl_SSLSession_ticket_lifetime_hint_get(TyObject *self, void *Py_UNUSED(context return return_value; } -PyDoc_STRVAR(_ssl_SSLSession_id__doc__, +TyDoc_STRVAR(_ssl_SSLSession_id__doc__, "Session ID."); #if defined(_ssl_SSLSession_id_DOCSTR) # undef _ssl_SSLSession_id_DOCSTR @@ -2437,7 +2437,7 @@ _ssl_SSLSession_id_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl_SSLSession_has_ticket__doc__, +TyDoc_STRVAR(_ssl_SSLSession_has_ticket__doc__, "Does the session contain a ticket?"); #if defined(_ssl_SSLSession_has_ticket_DOCSTR) # undef _ssl_SSLSession_has_ticket_DOCSTR @@ -2469,7 +2469,7 @@ _ssl_SSLSession_has_ticket_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(_ssl_RAND_add__doc__, +TyDoc_STRVAR(_ssl_RAND_add__doc__, "RAND_add($module, string, entropy, /)\n" "--\n" "\n" @@ -2532,7 +2532,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl_RAND_bytes__doc__, +TyDoc_STRVAR(_ssl_RAND_bytes__doc__, "RAND_bytes($module, n, /)\n" "--\n" "\n" @@ -2562,7 +2562,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl_RAND_status__doc__, +TyDoc_STRVAR(_ssl_RAND_status__doc__, "RAND_status($module, /)\n" "--\n" "\n" @@ -2589,7 +2589,7 @@ _ssl_RAND_status(TyObject *module, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl_get_default_verify_paths__doc__, +TyDoc_STRVAR(_ssl_get_default_verify_paths__doc__, "get_default_verify_paths($module, /)\n" "--\n" "\n" @@ -2615,7 +2615,7 @@ _ssl_get_default_verify_paths(TyObject *module, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(_ssl_txt2obj__doc__, +TyDoc_STRVAR(_ssl_txt2obj__doc__, "txt2obj($module, /, txt, name=False)\n" "--\n" "\n" @@ -2643,7 +2643,7 @@ _ssl_txt2obj(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(txt), &_Ty_ID(name), }, }; @@ -2700,7 +2700,7 @@ exit: return return_value; } -PyDoc_STRVAR(_ssl_nid2obj__doc__, +TyDoc_STRVAR(_ssl_nid2obj__doc__, "nid2obj($module, nid, /)\n" "--\n" "\n" @@ -2732,7 +2732,7 @@ exit: #if defined(_MSC_VER) -PyDoc_STRVAR(_ssl_enum_certificates__doc__, +TyDoc_STRVAR(_ssl_enum_certificates__doc__, "enum_certificates($module, /, store_name)\n" "--\n" "\n" @@ -2763,7 +2763,7 @@ _ssl_enum_certificates(TyObject *module, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(store_name), }, }; @@ -2814,7 +2814,7 @@ exit: #if defined(_MSC_VER) -PyDoc_STRVAR(_ssl_enum_crls__doc__, +TyDoc_STRVAR(_ssl_enum_crls__doc__, "enum_crls($module, /, store_name)\n" "--\n" "\n" @@ -2844,7 +2844,7 @@ _ssl_enum_crls(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(store_name), }, }; diff --git a/Modules/clinic/_statisticsmodule.c.h b/Modules/clinic/_statisticsmodule.c.h index 8b8a148..481110e 100644 --- a/Modules/clinic/_statisticsmodule.c.h +++ b/Modules/clinic/_statisticsmodule.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_statistics__normal_dist_inv_cdf__doc__, +TyDoc_STRVAR(_statistics__normal_dist_inv_cdf__doc__, "_normal_dist_inv_cdf($module, p, mu, sigma, /)\n" "--\n" "\n"); diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index 3b6ccb7..c94008a 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(Struct___init____doc__, +TyDoc_STRVAR(Struct___init____doc__, "Struct(format)\n" "--\n" "\n" @@ -36,7 +36,7 @@ Struct___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(format), }, }; @@ -71,7 +71,7 @@ exit: return return_value; } -PyDoc_STRVAR(Struct_unpack__doc__, +TyDoc_STRVAR(Struct_unpack__doc__, "unpack($self, buffer, /)\n" "--\n" "\n" @@ -108,7 +108,7 @@ exit: return return_value; } -PyDoc_STRVAR(Struct_unpack_from__doc__, +TyDoc_STRVAR(Struct_unpack_from__doc__, "unpack_from($self, /, buffer, offset=0)\n" "--\n" "\n" @@ -141,7 +141,7 @@ Struct_unpack_from(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(buffer), &_Ty_ID(offset), }, }; @@ -199,7 +199,7 @@ exit: return return_value; } -PyDoc_STRVAR(Struct_iter_unpack__doc__, +TyDoc_STRVAR(Struct_iter_unpack__doc__, "iter_unpack($self, buffer, /)\n" "--\n" "\n" @@ -226,7 +226,7 @@ Struct_iter_unpack(TyObject *self, TyObject *buffer) return return_value; } -PyDoc_STRVAR(_clearcache__doc__, +TyDoc_STRVAR(_clearcache__doc__, "_clearcache($module, /)\n" "--\n" "\n" @@ -244,7 +244,7 @@ _clearcache(TyObject *module, TyObject *Py_UNUSED(ignored)) return _clearcache_impl(module); } -PyDoc_STRVAR(calcsize__doc__, +TyDoc_STRVAR(calcsize__doc__, "calcsize($module, format, /)\n" "--\n" "\n" @@ -279,7 +279,7 @@ exit: return return_value; } -PyDoc_STRVAR(unpack__doc__, +TyDoc_STRVAR(unpack__doc__, "unpack($module, format, buffer, /)\n" "--\n" "\n" @@ -324,7 +324,7 @@ exit: return return_value; } -PyDoc_STRVAR(unpack_from__doc__, +TyDoc_STRVAR(unpack_from__doc__, "unpack_from($module, format, /, buffer, offset=0)\n" "--\n" "\n" @@ -354,7 +354,7 @@ unpack_from(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(buffer), &_Ty_ID(offset), }, }; @@ -418,7 +418,7 @@ exit: return return_value; } -PyDoc_STRVAR(iter_unpack__doc__, +TyDoc_STRVAR(iter_unpack__doc__, "iter_unpack($module, format, buffer, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_suggestions.c.h b/Modules/clinic/_suggestions.c.h index 23a4b9b..c3edd6b 100644 --- a/Modules/clinic/_suggestions.c.h +++ b/Modules/clinic/_suggestions.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_suggestions__generate_suggestions__doc__, +TyDoc_STRVAR(_suggestions__generate_suggestions__doc__, "_generate_suggestions($module, candidates, item, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_sysconfig.c.h b/Modules/clinic/_sysconfig.c.h index 7510042..196af81 100644 --- a/Modules/clinic/_sysconfig.c.h +++ b/Modules/clinic/_sysconfig.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_sysconfig_config_vars__doc__, +TyDoc_STRVAR(_sysconfig_config_vars__doc__, "config_vars($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index d61455e..e96ad65 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -11,7 +11,7 @@ preserve #include "pycore_runtime.h" // _Ty_ID() #include "pycore_tuple.h" // _TyTuple_FromArray() -PyDoc_STRVAR(test_empty_function__doc__, +TyDoc_STRVAR(test_empty_function__doc__, "test_empty_function($module, /)\n" "--\n" "\n"); @@ -28,7 +28,7 @@ test_empty_function(TyObject *module, TyObject *Py_UNUSED(ignored)) return test_empty_function_impl(module); } -PyDoc_STRVAR(objects_converter__doc__, +TyDoc_STRVAR(objects_converter__doc__, "objects_converter($module, a, b=, /)\n" "--\n" "\n"); @@ -61,7 +61,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_object_converter__doc__, +TyDoc_STRVAR(bytes_object_converter__doc__, "bytes_object_converter($module, a, /)\n" "--\n" "\n"); @@ -89,7 +89,7 @@ exit: return return_value; } -PyDoc_STRVAR(byte_array_object_converter__doc__, +TyDoc_STRVAR(byte_array_object_converter__doc__, "byte_array_object_converter($module, a, /)\n" "--\n" "\n"); @@ -117,7 +117,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_converter__doc__, +TyDoc_STRVAR(unicode_converter__doc__, "unicode_converter($module, a, /)\n" "--\n" "\n"); @@ -145,7 +145,7 @@ exit: return return_value; } -PyDoc_STRVAR(bool_converter__doc__, +TyDoc_STRVAR(bool_converter__doc__, "bool_converter($module, a=True, b=True, c=True, /)\n" "--\n" "\n"); @@ -195,7 +195,7 @@ exit: return return_value; } -PyDoc_STRVAR(bool_converter_c_default__doc__, +TyDoc_STRVAR(bool_converter_c_default__doc__, "bool_converter_c_default($module, a=True, b=False, c=True, d=x, /)\n" "--\n" "\n"); @@ -253,7 +253,7 @@ exit: return return_value; } -PyDoc_STRVAR(char_converter__doc__, +TyDoc_STRVAR(char_converter__doc__, "char_converter($module, a=b\'A\', b=b\'\\x07\', c=b\'\\x08\', d=b\'\\t\', e=b\'\\n\',\n" " f=b\'\\x0b\', g=b\'\\x0c\', h=b\'\\r\', i=b\'\"\', j=b\"\'\", k=b\'?\',\n" " l=b\'\\\\\', m=b\'\\x00\', n=b\'\\xff\', /)\n" @@ -675,7 +675,7 @@ exit: return return_value; } -PyDoc_STRVAR(unsigned_char_converter__doc__, +TyDoc_STRVAR(unsigned_char_converter__doc__, "unsigned_char_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -761,7 +761,7 @@ exit: return return_value; } -PyDoc_STRVAR(short_converter__doc__, +TyDoc_STRVAR(short_converter__doc__, "short_converter($module, a=12, /)\n" "--\n" "\n"); @@ -810,7 +810,7 @@ exit: return return_value; } -PyDoc_STRVAR(unsigned_short_converter__doc__, +TyDoc_STRVAR(unsigned_short_converter__doc__, "unsigned_short_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -859,7 +859,7 @@ exit: return return_value; } -PyDoc_STRVAR(int_converter__doc__, +TyDoc_STRVAR(int_converter__doc__, "int_converter($module, a=12, b=34, c=45, /)\n" "--\n" "\n"); @@ -917,7 +917,7 @@ exit: return return_value; } -PyDoc_STRVAR(unsigned_int_converter__doc__, +TyDoc_STRVAR(unsigned_int_converter__doc__, "unsigned_int_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -966,7 +966,7 @@ exit: return return_value; } -PyDoc_STRVAR(long_converter__doc__, +TyDoc_STRVAR(long_converter__doc__, "long_converter($module, a=12, /)\n" "--\n" "\n"); @@ -1000,7 +1000,7 @@ exit: return return_value; } -PyDoc_STRVAR(unsigned_long_converter__doc__, +TyDoc_STRVAR(unsigned_long_converter__doc__, "unsigned_long_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1050,7 +1050,7 @@ exit: return return_value; } -PyDoc_STRVAR(long_long_converter__doc__, +TyDoc_STRVAR(long_long_converter__doc__, "long_long_converter($module, a=12, /)\n" "--\n" "\n"); @@ -1084,7 +1084,7 @@ exit: return return_value; } -PyDoc_STRVAR(unsigned_long_long_converter__doc__, +TyDoc_STRVAR(unsigned_long_long_converter__doc__, "unsigned_long_long_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1134,7 +1134,7 @@ exit: return return_value; } -PyDoc_STRVAR(py_ssize_t_converter__doc__, +TyDoc_STRVAR(py_ssize_t_converter__doc__, "py_ssize_t_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1200,7 +1200,7 @@ exit: return return_value; } -PyDoc_STRVAR(slice_index_converter__doc__, +TyDoc_STRVAR(slice_index_converter__doc__, "slice_index_converter($module, a=12, b=34, c=56, /)\n" "--\n" "\n"); @@ -1248,7 +1248,7 @@ exit: return return_value; } -PyDoc_STRVAR(size_t_converter__doc__, +TyDoc_STRVAR(size_t_converter__doc__, "size_t_converter($module, a=12, /)\n" "--\n" "\n"); @@ -1281,7 +1281,7 @@ exit: return return_value; } -PyDoc_STRVAR(float_converter__doc__, +TyDoc_STRVAR(float_converter__doc__, "float_converter($module, a=12.5, /)\n" "--\n" "\n"); @@ -1321,7 +1321,7 @@ exit: return return_value; } -PyDoc_STRVAR(double_converter__doc__, +TyDoc_STRVAR(double_converter__doc__, "double_converter($module, a=12.5, /)\n" "--\n" "\n"); @@ -1361,7 +1361,7 @@ exit: return return_value; } -PyDoc_STRVAR(py_complex_converter__doc__, +TyDoc_STRVAR(py_complex_converter__doc__, "py_complex_converter($module, a, /)\n" "--\n" "\n"); @@ -1388,7 +1388,7 @@ exit: return return_value; } -PyDoc_STRVAR(str_converter__doc__, +TyDoc_STRVAR(str_converter__doc__, "str_converter($module, a=\'a\', b=\'b\', c=\'c\', /)\n" "--\n" "\n"); @@ -1419,7 +1419,7 @@ exit: return return_value; } -PyDoc_STRVAR(str_converter_encoding__doc__, +TyDoc_STRVAR(str_converter_encoding__doc__, "str_converter_encoding($module, a, b, c, /)\n" "--\n" "\n"); @@ -1456,7 +1456,7 @@ exit: return return_value; } -PyDoc_STRVAR(py_buffer_converter__doc__, +TyDoc_STRVAR(py_buffer_converter__doc__, "py_buffer_converter($module, a, b, /)\n" "--\n" "\n"); @@ -1493,7 +1493,7 @@ exit: return return_value; } -PyDoc_STRVAR(keywords__doc__, +TyDoc_STRVAR(keywords__doc__, "keywords($module, /, a, b)\n" "--\n" "\n"); @@ -1517,7 +1517,7 @@ keywords(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -1552,7 +1552,7 @@ exit: return return_value; } -PyDoc_STRVAR(keywords_kwonly__doc__, +TyDoc_STRVAR(keywords_kwonly__doc__, "keywords_kwonly($module, /, a, *, b)\n" "--\n" "\n"); @@ -1576,7 +1576,7 @@ keywords_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -1611,7 +1611,7 @@ exit: return return_value; } -PyDoc_STRVAR(keywords_opt__doc__, +TyDoc_STRVAR(keywords_opt__doc__, "keywords_opt($module, /, a, b=None, c=None)\n" "--\n" "\n"); @@ -1635,7 +1635,7 @@ keywords_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -1682,7 +1682,7 @@ exit: return return_value; } -PyDoc_STRVAR(keywords_opt_kwonly__doc__, +TyDoc_STRVAR(keywords_opt_kwonly__doc__, "keywords_opt_kwonly($module, /, a, b=None, *, c=None, d=None)\n" "--\n" "\n"); @@ -1707,7 +1707,7 @@ keywords_opt_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -1765,7 +1765,7 @@ exit: return return_value; } -PyDoc_STRVAR(keywords_kwonly_opt__doc__, +TyDoc_STRVAR(keywords_kwonly_opt__doc__, "keywords_kwonly_opt($module, /, a, *, b=None, c=None)\n" "--\n" "\n"); @@ -1790,7 +1790,7 @@ keywords_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -1837,7 +1837,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_keywords__doc__, +TyDoc_STRVAR(posonly_keywords__doc__, "posonly_keywords($module, a, /, b)\n" "--\n" "\n"); @@ -1861,7 +1861,7 @@ posonly_keywords(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -1896,7 +1896,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_kwonly__doc__, +TyDoc_STRVAR(posonly_kwonly__doc__, "posonly_kwonly($module, a, /, *, b)\n" "--\n" "\n"); @@ -1920,7 +1920,7 @@ posonly_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -1955,7 +1955,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_keywords_kwonly__doc__, +TyDoc_STRVAR(posonly_keywords_kwonly__doc__, "posonly_keywords_kwonly($module, a, /, b, *, c)\n" "--\n" "\n"); @@ -1980,7 +1980,7 @@ posonly_keywords_kwonly(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -2017,7 +2017,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_keywords_opt__doc__, +TyDoc_STRVAR(posonly_keywords_opt__doc__, "posonly_keywords_opt($module, a, /, b, c=None, d=None)\n" "--\n" "\n"); @@ -2042,7 +2042,7 @@ posonly_keywords_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2091,7 +2091,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_opt_keywords_opt__doc__, +TyDoc_STRVAR(posonly_opt_keywords_opt__doc__, "posonly_opt_keywords_opt($module, a, b=None, /, c=None, d=None)\n" "--\n" "\n"); @@ -2116,7 +2116,7 @@ posonly_opt_keywords_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2170,7 +2170,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_kwonly_opt__doc__, +TyDoc_STRVAR(posonly_kwonly_opt__doc__, "posonly_kwonly_opt($module, a, /, *, b, c=None, d=None)\n" "--\n" "\n"); @@ -2195,7 +2195,7 @@ posonly_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2244,7 +2244,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_opt_kwonly_opt__doc__, +TyDoc_STRVAR(posonly_opt_kwonly_opt__doc__, "posonly_opt_kwonly_opt($module, a, b=None, /, *, c=None, d=None)\n" "--\n" "\n"); @@ -2269,7 +2269,7 @@ posonly_opt_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2323,7 +2323,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_keywords_kwonly_opt__doc__, +TyDoc_STRVAR(posonly_keywords_kwonly_opt__doc__, "posonly_keywords_kwonly_opt($module, a, /, b, *, c, d=None, e=None)\n" "--\n" "\n"); @@ -2348,7 +2348,7 @@ posonly_keywords_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), }, }; @@ -2399,7 +2399,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_keywords_opt_kwonly_opt__doc__, +TyDoc_STRVAR(posonly_keywords_opt_kwonly_opt__doc__, "posonly_keywords_opt_kwonly_opt($module, a, /, b, c=None, *, d=None,\n" " e=None)\n" "--\n" @@ -2426,7 +2426,7 @@ posonly_keywords_opt_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssiz Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), }, }; @@ -2486,7 +2486,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_opt_keywords_opt_kwonly_opt__doc__, +TyDoc_STRVAR(posonly_opt_keywords_opt_kwonly_opt__doc__, "posonly_opt_keywords_opt_kwonly_opt($module, a, b=None, /, c=None, *,\n" " d=None)\n" "--\n" @@ -2513,7 +2513,7 @@ posonly_opt_keywords_opt_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2571,7 +2571,7 @@ exit: return return_value; } -PyDoc_STRVAR(keyword_only_parameter__doc__, +TyDoc_STRVAR(keyword_only_parameter__doc__, "keyword_only_parameter($module, /, *, a)\n" "--\n" "\n"); @@ -2595,7 +2595,7 @@ keyword_only_parameter(TyObject *module, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -2628,7 +2628,7 @@ exit: return return_value; } -PyDoc_STRVAR(varpos__doc__, +TyDoc_STRVAR(varpos__doc__, "varpos($module, /, *args)\n" "--\n" "\n"); @@ -2658,7 +2658,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_varpos__doc__, +TyDoc_STRVAR(posonly_varpos__doc__, "posonly_varpos($module, a, b, /, *args)\n" "--\n" "\n"); @@ -2696,7 +2696,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_req_opt_varpos__doc__, +TyDoc_STRVAR(posonly_req_opt_varpos__doc__, "posonly_req_opt_varpos($module, a, b=False, /, *args)\n" "--\n" "\n"); @@ -2740,7 +2740,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_poskw_varpos__doc__, +TyDoc_STRVAR(posonly_poskw_varpos__doc__, "posonly_poskw_varpos($module, a, /, b, *args)\n" "--\n" "\n"); @@ -2765,7 +2765,7 @@ posonly_poskw_varpos(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -2811,7 +2811,7 @@ exit: return return_value; } -PyDoc_STRVAR(poskw_varpos__doc__, +TyDoc_STRVAR(poskw_varpos__doc__, "poskw_varpos($module, /, a, *args)\n" "--\n" "\n"); @@ -2835,7 +2835,7 @@ poskw_varpos(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -2879,7 +2879,7 @@ exit: return return_value; } -PyDoc_STRVAR(poskw_varpos_kwonly_opt__doc__, +TyDoc_STRVAR(poskw_varpos_kwonly_opt__doc__, "poskw_varpos_kwonly_opt($module, /, a, *args, b=False)\n" "--\n" "\n"); @@ -2904,7 +2904,7 @@ poskw_varpos_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -2958,7 +2958,7 @@ exit: return return_value; } -PyDoc_STRVAR(poskw_varpos_kwonly_opt2__doc__, +TyDoc_STRVAR(poskw_varpos_kwonly_opt2__doc__, "poskw_varpos_kwonly_opt2($module, /, a, *args, b=False, c=False)\n" "--\n" "\n"); @@ -2983,7 +2983,7 @@ poskw_varpos_kwonly_opt2(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -3041,7 +3041,7 @@ exit: return return_value; } -PyDoc_STRVAR(varpos_kwonly_opt__doc__, +TyDoc_STRVAR(varpos_kwonly_opt__doc__, "varpos_kwonly_opt($module, /, *args, b=False)\n" "--\n" "\n"); @@ -3065,7 +3065,7 @@ varpos_kwonly_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -3112,7 +3112,7 @@ exit: return return_value; } -PyDoc_STRVAR(varpos_kwonly_req_opt__doc__, +TyDoc_STRVAR(varpos_kwonly_req_opt__doc__, "varpos_kwonly_req_opt($module, /, *args, a, b=False, c=False)\n" "--\n" "\n"); @@ -3137,7 +3137,7 @@ varpos_kwonly_req_opt(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -3193,7 +3193,7 @@ exit: return return_value; } -PyDoc_STRVAR(varpos_array__doc__, +TyDoc_STRVAR(varpos_array__doc__, "varpos_array($module, /, *args)\n" "--\n" "\n"); @@ -3219,7 +3219,7 @@ varpos_array(TyObject *module, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(posonly_varpos_array__doc__, +TyDoc_STRVAR(posonly_varpos_array__doc__, "posonly_varpos_array($module, a, b, /, *args)\n" "--\n" "\n"); @@ -3253,7 +3253,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_req_opt_varpos_array__doc__, +TyDoc_STRVAR(posonly_req_opt_varpos_array__doc__, "posonly_req_opt_varpos_array($module, a, b=False, /, *args)\n" "--\n" "\n"); @@ -3292,7 +3292,7 @@ exit: return return_value; } -PyDoc_STRVAR(posonly_poskw_varpos_array__doc__, +TyDoc_STRVAR(posonly_poskw_varpos_array__doc__, "posonly_poskw_varpos_array($module, a, /, b, *args)\n" "--\n" "\n"); @@ -3318,7 +3318,7 @@ posonly_poskw_varpos_array(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -3358,7 +3358,7 @@ exit: return return_value; } -PyDoc_STRVAR(gh_32092_oob__doc__, +TyDoc_STRVAR(gh_32092_oob__doc__, "gh_32092_oob($module, /, pos1, pos2, *varargs, kw1=None, kw2=None)\n" "--\n" "\n" @@ -3384,7 +3384,7 @@ gh_32092_oob(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pos1), &_Ty_ID(pos2), &_Ty_ID(kw1), &_Ty_ID(kw2), }, }; @@ -3444,7 +3444,7 @@ exit: return return_value; } -PyDoc_STRVAR(gh_32092_kw_pass__doc__, +TyDoc_STRVAR(gh_32092_kw_pass__doc__, "gh_32092_kw_pass($module, /, pos, *args, kw=None)\n" "--\n" "\n" @@ -3470,7 +3470,7 @@ gh_32092_kw_pass(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pos), &_Ty_ID(kw), }, }; @@ -3521,7 +3521,7 @@ exit: return return_value; } -PyDoc_STRVAR(gh_99233_refcount__doc__, +TyDoc_STRVAR(gh_99233_refcount__doc__, "gh_99233_refcount($module, /, *args)\n" "--\n" "\n" @@ -3552,7 +3552,7 @@ exit: return return_value; } -PyDoc_STRVAR(gh_99240_double_free__doc__, +TyDoc_STRVAR(gh_99240_double_free__doc__, "gh_99240_double_free($module, a, b, /)\n" "--\n" "\n" @@ -3585,7 +3585,7 @@ exit: return return_value; } -PyDoc_STRVAR(null_or_tuple_for_varargs__doc__, +TyDoc_STRVAR(null_or_tuple_for_varargs__doc__, "null_or_tuple_for_varargs($module, /, name, *constraints,\n" " covariant=False)\n" "--\n" @@ -3612,7 +3612,7 @@ null_or_tuple_for_varargs(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(covariant), }, }; @@ -3666,7 +3666,7 @@ exit: return return_value; } -PyDoc_STRVAR(clone_f1__doc__, +TyDoc_STRVAR(clone_f1__doc__, "clone_f1($module, /, path)\n" "--\n" "\n"); @@ -3690,7 +3690,7 @@ clone_f1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -3735,7 +3735,7 @@ exit: return return_value; } -PyDoc_STRVAR(clone_f2__doc__, +TyDoc_STRVAR(clone_f2__doc__, "clone_f2($module, /, path)\n" "--\n" "\n"); @@ -3759,7 +3759,7 @@ clone_f2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -3804,7 +3804,7 @@ exit: return return_value; } -PyDoc_STRVAR(clone_with_conv_f1__doc__, +TyDoc_STRVAR(clone_with_conv_f1__doc__, "clone_with_conv_f1($module, /, path=None)\n" "--\n" "\n"); @@ -3828,7 +3828,7 @@ clone_with_conv_f1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -3870,7 +3870,7 @@ exit: return return_value; } -PyDoc_STRVAR(clone_with_conv_f2__doc__, +TyDoc_STRVAR(clone_with_conv_f2__doc__, "clone_with_conv_f2($module, /, path=None)\n" "--\n" "\n"); @@ -3894,7 +3894,7 @@ clone_with_conv_f2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -3936,7 +3936,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_get_defining_class__doc__, +TyDoc_STRVAR(_testclinic_TestClass_get_defining_class__doc__, "get_defining_class($self, /)\n" "--\n" "\n"); @@ -3958,7 +3958,7 @@ _testclinic_TestClass_get_defining_class(TyObject *self, TyTypeObject *cls, TyOb return _testclinic_TestClass_get_defining_class_impl(self, cls); } -PyDoc_STRVAR(_testclinic_TestClass_get_defining_class_arg__doc__, +TyDoc_STRVAR(_testclinic_TestClass_get_defining_class_arg__doc__, "get_defining_class_arg($self, /, arg)\n" "--\n" "\n"); @@ -3984,7 +3984,7 @@ _testclinic_TestClass_get_defining_class_arg(TyObject *self, TyTypeObject *cls, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(arg), }, }; @@ -4017,7 +4017,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_defclass_varpos__doc__, +TyDoc_STRVAR(_testclinic_TestClass_defclass_varpos__doc__, "defclass_varpos($self, /, *args)\n" "--\n" "\n"); @@ -4068,7 +4068,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_defclass_posonly_varpos__doc__, +TyDoc_STRVAR(_testclinic_TestClass_defclass_posonly_varpos__doc__, "defclass_posonly_varpos($self, a, b, /, *args)\n" "--\n" "\n"); @@ -4125,7 +4125,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_varpos_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_varpos_no_fastcall__doc__, "varpos_no_fastcall($type, /, *args)\n" "--\n" "\n"); @@ -4152,7 +4152,7 @@ _testclinic_TestClass_varpos_no_fastcall(TyObject *type, TyObject *args) return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_posonly_varpos_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_posonly_varpos_no_fastcall__doc__, "posonly_varpos_no_fastcall($type, a, b, /, *args)\n" "--\n" "\n"); @@ -4192,7 +4192,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_posonly_req_opt_varpos_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_posonly_req_opt_varpos_no_fastcall__doc__, "posonly_req_opt_varpos_no_fastcall($type, a, b=False, /, *args)\n" "--\n" "\n"); @@ -4236,7 +4236,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_posonly_poskw_varpos_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_posonly_poskw_varpos_no_fastcall__doc__, "posonly_poskw_varpos_no_fastcall($type, a, /, b, *args)\n" "--\n" "\n"); @@ -4263,7 +4263,7 @@ _testclinic_TestClass_posonly_poskw_varpos_no_fastcall(TyObject *type, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -4308,7 +4308,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_varpos_array_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_varpos_array_no_fastcall__doc__, "varpos_array_no_fastcall($type, /, *args)\n" "--\n" "\n"); @@ -4335,7 +4335,7 @@ _testclinic_TestClass_varpos_array_no_fastcall(TyObject *type, TyObject *args) return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_posonly_varpos_array_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_posonly_varpos_array_no_fastcall__doc__, "posonly_varpos_array_no_fastcall($type, a, b, /, *args)\n" "--\n" "\n"); @@ -4372,7 +4372,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_posonly_req_opt_varpos_array_no_fastcall__doc__, "posonly_req_opt_varpos_array_no_fastcall($type, a, b=False, /, *args)\n" "--\n" "\n"); @@ -4413,7 +4413,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall__doc__, +TyDoc_STRVAR(_testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall__doc__, "posonly_poskw_varpos_array_no_fastcall($type, a, /, b, *args)\n" "--\n" "\n"); @@ -4441,7 +4441,7 @@ _testclinic_TestClass_posonly_poskw_varpos_array_no_fastcall(TyObject *type, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; diff --git a/Modules/clinic/_testclinic_depr.c.h b/Modules/clinic/_testclinic_depr.c.h index f5ae646..ae2953c 100644 --- a/Modules/clinic/_testclinic_depr.c.h +++ b/Modules/clinic/_testclinic_depr.c.h @@ -11,7 +11,7 @@ preserve #include "pycore_runtime.h" // _Ty_ID() #include "pycore_tuple.h" // _TyTuple_FromArray() -PyDoc_STRVAR(depr_star_new__doc__, +TyDoc_STRVAR(depr_star_new__doc__, "DeprStarNew(a=None)\n" "--\n" "\n" @@ -49,7 +49,7 @@ depr_star_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -98,7 +98,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_new_clone__doc__, +TyDoc_STRVAR(depr_star_new_clone__doc__, "cloned($self, /, a=None)\n" "--\n" "\n" @@ -137,7 +137,7 @@ depr_star_new_clone(TyObject *type, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -184,7 +184,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_init__doc__, +TyDoc_STRVAR(depr_star_init__doc__, "DeprStarInit(a=None)\n" "--\n" "\n" @@ -222,7 +222,7 @@ depr_star_init(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -271,7 +271,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_init_clone__doc__, +TyDoc_STRVAR(depr_star_init_clone__doc__, "cloned($self, /, a=None)\n" "--\n" "\n" @@ -310,7 +310,7 @@ depr_star_init_clone(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -385,7 +385,7 @@ depr_star_init_noinline(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -429,7 +429,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_new__doc__, +TyDoc_STRVAR(depr_kwd_new__doc__, "DeprKwdNew(a=None)\n" "--\n" "\n" @@ -466,7 +466,7 @@ depr_kwd_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -515,7 +515,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_init__doc__, +TyDoc_STRVAR(depr_kwd_init__doc__, "DeprKwdInit(a=None)\n" "--\n" "\n" @@ -552,7 +552,7 @@ depr_kwd_init(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -629,7 +629,7 @@ depr_kwd_init_noinline(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -676,7 +676,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos0_len1__doc__, +TyDoc_STRVAR(depr_star_pos0_len1__doc__, "depr_star_pos0_len1($module, /, a)\n" "--\n" "\n" @@ -715,7 +715,7 @@ depr_star_pos0_len1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), }, }; @@ -757,7 +757,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos0_len2__doc__, +TyDoc_STRVAR(depr_star_pos0_len2__doc__, "depr_star_pos0_len2($module, /, a, b)\n" "--\n" "\n" @@ -796,7 +796,7 @@ depr_star_pos0_len2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -840,7 +840,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos0_len3_with_kwd__doc__, +TyDoc_STRVAR(depr_star_pos0_len3_with_kwd__doc__, "depr_star_pos0_len3_with_kwd($module, /, a, b, c, *, d)\n" "--\n" "\n" @@ -880,7 +880,7 @@ depr_star_pos0_len3_with_kwd(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -928,7 +928,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos1_len1_opt__doc__, +TyDoc_STRVAR(depr_star_pos1_len1_opt__doc__, "depr_star_pos1_len1_opt($module, /, a, b=None)\n" "--\n" "\n" @@ -967,7 +967,7 @@ depr_star_pos1_len1_opt(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -1016,7 +1016,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos1_len1__doc__, +TyDoc_STRVAR(depr_star_pos1_len1__doc__, "depr_star_pos1_len1($module, /, a, b)\n" "--\n" "\n" @@ -1055,7 +1055,7 @@ depr_star_pos1_len1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), }, }; @@ -1099,7 +1099,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos1_len2_with_kwd__doc__, +TyDoc_STRVAR(depr_star_pos1_len2_with_kwd__doc__, "depr_star_pos1_len2_with_kwd($module, /, a, b, c, *, d)\n" "--\n" "\n" @@ -1139,7 +1139,7 @@ depr_star_pos1_len2_with_kwd(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -1187,7 +1187,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos2_len1__doc__, +TyDoc_STRVAR(depr_star_pos2_len1__doc__, "depr_star_pos2_len1($module, /, a, b, c)\n" "--\n" "\n" @@ -1227,7 +1227,7 @@ depr_star_pos2_len1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -1273,7 +1273,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos2_len2__doc__, +TyDoc_STRVAR(depr_star_pos2_len2__doc__, "depr_star_pos2_len2($module, /, a, b, c, d)\n" "--\n" "\n" @@ -1313,7 +1313,7 @@ depr_star_pos2_len2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -1361,7 +1361,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_pos2_len2_with_kwd__doc__, +TyDoc_STRVAR(depr_star_pos2_len2_with_kwd__doc__, "depr_star_pos2_len2_with_kwd($module, /, a, b, c, d, *, e)\n" "--\n" "\n" @@ -1401,7 +1401,7 @@ depr_star_pos2_len2_with_kwd(TyObject *module, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), }, }; @@ -1451,7 +1451,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_noinline__doc__, +TyDoc_STRVAR(depr_star_noinline__doc__, "depr_star_noinline($module, /, a, b, c=None, *, d=\'\')\n" "--\n" "\n" @@ -1491,7 +1491,7 @@ depr_star_noinline(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -1534,7 +1534,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_star_multi__doc__, +TyDoc_STRVAR(depr_star_multi__doc__, "depr_star_multi($module, /, a, b, c, d, e, f, g, *, h)\n" "--\n" "\n" @@ -1577,7 +1577,7 @@ depr_star_multi(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), _Ty_LATIN1_CHR('f'), _Ty_LATIN1_CHR('g'), _Ty_LATIN1_CHR('h'), }, }; @@ -1635,7 +1635,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_required_1__doc__, +TyDoc_STRVAR(depr_kwd_required_1__doc__, "depr_kwd_required_1($module, a, /, b)\n" "--\n" "\n" @@ -1673,7 +1673,7 @@ depr_kwd_required_1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -1717,7 +1717,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_required_2__doc__, +TyDoc_STRVAR(depr_kwd_required_2__doc__, "depr_kwd_required_2($module, a, /, b, c)\n" "--\n" "\n" @@ -1757,7 +1757,7 @@ depr_kwd_required_2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -1803,7 +1803,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_optional_1__doc__, +TyDoc_STRVAR(depr_kwd_optional_1__doc__, "depr_kwd_optional_1($module, a, /, b=None)\n" "--\n" "\n" @@ -1841,7 +1841,7 @@ depr_kwd_optional_1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), }, }; @@ -1890,7 +1890,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_optional_2__doc__, +TyDoc_STRVAR(depr_kwd_optional_2__doc__, "depr_kwd_optional_2($module, a, /, b=None, c=None)\n" "--\n" "\n" @@ -1930,7 +1930,7 @@ depr_kwd_optional_2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -1986,7 +1986,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_optional_3__doc__, +TyDoc_STRVAR(depr_kwd_optional_3__doc__, "depr_kwd_optional_3($module, /, a=None, b=None, c=None)\n" "--\n" "\n" @@ -2026,7 +2026,7 @@ depr_kwd_optional_3(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -2087,7 +2087,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_required_optional__doc__, +TyDoc_STRVAR(depr_kwd_required_optional__doc__, "depr_kwd_required_optional($module, a, /, b, c=None)\n" "--\n" "\n" @@ -2127,7 +2127,7 @@ depr_kwd_required_optional(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), }, }; @@ -2178,7 +2178,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_noinline__doc__, +TyDoc_STRVAR(depr_kwd_noinline__doc__, "depr_kwd_noinline($module, a, /, b, c=None, d=\'\')\n" "--\n" "\n" @@ -2218,7 +2218,7 @@ depr_kwd_noinline(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), }, }; @@ -2264,7 +2264,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_kwd_multi__doc__, +TyDoc_STRVAR(depr_kwd_multi__doc__, "depr_kwd_multi($module, a, /, b, c, d, e, f, g, h)\n" "--\n" "\n" @@ -2307,7 +2307,7 @@ depr_kwd_multi(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), _Ty_LATIN1_CHR('f'), _Ty_LATIN1_CHR('g'), _Ty_LATIN1_CHR('h'), }, }; @@ -2365,7 +2365,7 @@ exit: return return_value; } -PyDoc_STRVAR(depr_multi__doc__, +TyDoc_STRVAR(depr_multi__doc__, "depr_multi($module, a, /, b, c, d, e, f, *, g)\n" "--\n" "\n" @@ -2411,7 +2411,7 @@ depr_multi(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('b'), _Ty_LATIN1_CHR('c'), _Ty_LATIN1_CHR('d'), _Ty_LATIN1_CHR('e'), _Ty_LATIN1_CHR('f'), _Ty_LATIN1_CHR('g'), }, }; diff --git a/Modules/clinic/_testclinic_limited.c.h b/Modules/clinic/_testclinic_limited.c.h index ca82c63..b36e00f 100644 --- a/Modules/clinic/_testclinic_limited.c.h +++ b/Modules/clinic/_testclinic_limited.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(test_empty_function__doc__, +TyDoc_STRVAR(test_empty_function__doc__, "test_empty_function($module, /)\n" "--\n" "\n"); @@ -19,7 +19,7 @@ test_empty_function(TyObject *module, TyObject *Py_UNUSED(ignored)) return test_empty_function_impl(module); } -PyDoc_STRVAR(my_int_func__doc__, +TyDoc_STRVAR(my_int_func__doc__, "my_int_func($module, arg, /)\n" "--\n" "\n"); @@ -51,7 +51,7 @@ exit: return return_value; } -PyDoc_STRVAR(my_int_sum__doc__, +TyDoc_STRVAR(my_int_sum__doc__, "my_int_sum($module, x, y, /)\n" "--\n" "\n"); @@ -92,7 +92,7 @@ exit: return return_value; } -PyDoc_STRVAR(my_float_sum__doc__, +TyDoc_STRVAR(my_float_sum__doc__, "my_float_sum($module, x, y, /)\n" "--\n" "\n"); @@ -133,7 +133,7 @@ exit: return return_value; } -PyDoc_STRVAR(my_double_sum__doc__, +TyDoc_STRVAR(my_double_sum__doc__, "my_double_sum($module, x, y, /)\n" "--\n" "\n"); @@ -174,7 +174,7 @@ exit: return return_value; } -PyDoc_STRVAR(get_file_descriptor__doc__, +TyDoc_STRVAR(get_file_descriptor__doc__, "get_file_descriptor($module, file, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_testinternalcapi.c.h b/Modules/clinic/_testinternalcapi.c.h index fda206e..01e8249 100644 --- a/Modules/clinic/_testinternalcapi.c.h +++ b/Modules/clinic/_testinternalcapi.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_testinternalcapi_compiler_cleandoc__doc__, +TyDoc_STRVAR(_testinternalcapi_compiler_cleandoc__doc__, "compiler_cleandoc($module, /, doc)\n" "--\n" "\n" @@ -33,7 +33,7 @@ _testinternalcapi_compiler_cleandoc(TyObject *module, TyObject *const *args, Ty_ Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(doc), }, }; @@ -70,7 +70,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testinternalcapi_new_instruction_sequence__doc__, +TyDoc_STRVAR(_testinternalcapi_new_instruction_sequence__doc__, "new_instruction_sequence($module, /)\n" "--\n" "\n" @@ -88,7 +88,7 @@ _testinternalcapi_new_instruction_sequence(TyObject *module, TyObject *Py_UNUSED return _testinternalcapi_new_instruction_sequence_impl(module); } -PyDoc_STRVAR(_testinternalcapi_compiler_codegen__doc__, +TyDoc_STRVAR(_testinternalcapi_compiler_codegen__doc__, "compiler_codegen($module, /, ast, filename, optimize, compile_mode=0)\n" "--\n" "\n" @@ -115,7 +115,7 @@ _testinternalcapi_compiler_codegen(TyObject *module, TyObject *const *args, Ty_s Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(ast), &_Ty_ID(filename), &_Ty_ID(optimize), &_Ty_ID(compile_mode), }, }; @@ -165,7 +165,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testinternalcapi_optimize_cfg__doc__, +TyDoc_STRVAR(_testinternalcapi_optimize_cfg__doc__, "optimize_cfg($module, /, instructions, consts, nlocals)\n" "--\n" "\n" @@ -191,7 +191,7 @@ _testinternalcapi_optimize_cfg(TyObject *module, TyObject *const *args, Ty_ssize Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(instructions), &_Ty_ID(consts), &_Ty_ID(nlocals), }, }; @@ -231,7 +231,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testinternalcapi_assemble_code_object__doc__, +TyDoc_STRVAR(_testinternalcapi_assemble_code_object__doc__, "assemble_code_object($module, /, filename, instructions, metadata)\n" "--\n" "\n" @@ -259,7 +259,7 @@ _testinternalcapi_assemble_code_object(TyObject *module, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(filename), &_Ty_ID(instructions), &_Ty_ID(metadata), }, }; @@ -296,7 +296,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testinternalcapi_test_long_numbits__doc__, +TyDoc_STRVAR(_testinternalcapi_test_long_numbits__doc__, "test_long_numbits($module, /)\n" "--\n" "\n"); @@ -313,7 +313,7 @@ _testinternalcapi_test_long_numbits(TyObject *module, TyObject *Py_UNUSED(ignore return _testinternalcapi_test_long_numbits_impl(module); } -PyDoc_STRVAR(gh_119213_getargs__doc__, +TyDoc_STRVAR(gh_119213_getargs__doc__, "gh_119213_getargs($module, /, spam=None)\n" "--\n" "\n" @@ -338,7 +338,7 @@ gh_119213_getargs(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(spam), }, }; @@ -376,7 +376,7 @@ exit: return return_value; } -PyDoc_STRVAR(get_next_dict_keys_version__doc__, +TyDoc_STRVAR(get_next_dict_keys_version__doc__, "get_next_dict_keys_version($module, /)\n" "--\n" "\n"); diff --git a/Modules/clinic/_testmultiphase.c.h b/Modules/clinic/_testmultiphase.c.h index b423275..f6a90c2 100644 --- a/Modules/clinic/_testmultiphase.c.h +++ b/Modules/clinic/_testmultiphase.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_testmultiphase_StateAccessType_get_defining_module__doc__, +TyDoc_STRVAR(_testmultiphase_StateAccessType_get_defining_module__doc__, "get_defining_module($self, /)\n" "--\n" "\n" @@ -34,7 +34,7 @@ _testmultiphase_StateAccessType_get_defining_module(TyObject *self, TyTypeObject return _testmultiphase_StateAccessType_get_defining_module_impl((StateAccessTypeObject *)self, cls); } -PyDoc_STRVAR(_testmultiphase_StateAccessType_getmodulebydef_bad_def__doc__, +TyDoc_STRVAR(_testmultiphase_StateAccessType_getmodulebydef_bad_def__doc__, "getmodulebydef_bad_def($self, /)\n" "--\n" "\n" @@ -57,7 +57,7 @@ _testmultiphase_StateAccessType_getmodulebydef_bad_def(TyObject *self, TyTypeObj return _testmultiphase_StateAccessType_getmodulebydef_bad_def_impl((StateAccessTypeObject *)self, cls); } -PyDoc_STRVAR(_testmultiphase_StateAccessType_increment_count_clinic__doc__, +TyDoc_STRVAR(_testmultiphase_StateAccessType_increment_count_clinic__doc__, "increment_count_clinic($self, /, n=1, *, twice=False)\n" "--\n" "\n" @@ -88,7 +88,7 @@ _testmultiphase_StateAccessType_increment_count_clinic(TyObject *self, TyTypeObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('n'), &_Ty_ID(twice), }, }; @@ -143,7 +143,7 @@ exit: return return_value; } -PyDoc_STRVAR(_testmultiphase_StateAccessType_get_count__doc__, +TyDoc_STRVAR(_testmultiphase_StateAccessType_get_count__doc__, "get_count($self, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_threadmodule.c.h b/Modules/clinic/_threadmodule.c.h index f413efc..ccc5e76 100644 --- a/Modules/clinic/_threadmodule.c.h +++ b/Modules/clinic/_threadmodule.c.h @@ -10,7 +10,7 @@ preserve #if (defined(HAVE_PTHREAD_GETNAME_NP) || defined(HAVE_PTHREAD_GET_NAME_NP) || defined(MS_WINDOWS)) -PyDoc_STRVAR(_thread__get_name__doc__, +TyDoc_STRVAR(_thread__get_name__doc__, "_get_name($module, /)\n" "--\n" "\n" @@ -32,7 +32,7 @@ _thread__get_name(TyObject *module, TyObject *Py_UNUSED(ignored)) #if (defined(HAVE_PTHREAD_SETNAME_NP) || defined(HAVE_PTHREAD_SET_NAME_NP) || defined(MS_WINDOWS)) -PyDoc_STRVAR(_thread_set_name__doc__, +TyDoc_STRVAR(_thread_set_name__doc__, "set_name($module, /, name)\n" "--\n" "\n" @@ -57,7 +57,7 @@ _thread_set_name(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), }, }; diff --git a/Modules/clinic/_tkinter.c.h b/Modules/clinic/_tkinter.c.h index 9d875dc..dc20dc0 100644 --- a/Modules/clinic/_tkinter.c.h +++ b/Modules/clinic/_tkinter.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(_tkinter_tkapp_eval__doc__, +TyDoc_STRVAR(_tkinter_tkapp_eval__doc__, "eval($self, script, /)\n" "--\n" "\n"); @@ -40,7 +40,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_evalfile__doc__, +TyDoc_STRVAR(_tkinter_tkapp_evalfile__doc__, "evalfile($self, fileName, /)\n" "--\n" "\n"); @@ -76,7 +76,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_record__doc__, +TyDoc_STRVAR(_tkinter_tkapp_record__doc__, "record($self, script, /)\n" "--\n" "\n"); @@ -112,7 +112,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_adderrorinfo__doc__, +TyDoc_STRVAR(_tkinter_tkapp_adderrorinfo__doc__, "adderrorinfo($self, msg, /)\n" "--\n" "\n"); @@ -148,7 +148,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_getint__doc__, +TyDoc_STRVAR(_tkinter_tkapp_getint__doc__, "getint($self, arg, /)\n" "--\n" "\n"); @@ -169,7 +169,7 @@ _tkinter_tkapp_getint(TyObject *self, TyObject *arg) return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_getdouble__doc__, +TyDoc_STRVAR(_tkinter_tkapp_getdouble__doc__, "getdouble($self, arg, /)\n" "--\n" "\n"); @@ -190,7 +190,7 @@ _tkinter_tkapp_getdouble(TyObject *self, TyObject *arg) return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_getboolean__doc__, +TyDoc_STRVAR(_tkinter_tkapp_getboolean__doc__, "getboolean($self, arg, /)\n" "--\n" "\n"); @@ -211,7 +211,7 @@ _tkinter_tkapp_getboolean(TyObject *self, TyObject *arg) return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_exprstring__doc__, +TyDoc_STRVAR(_tkinter_tkapp_exprstring__doc__, "exprstring($self, s, /)\n" "--\n" "\n"); @@ -247,7 +247,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_exprlong__doc__, +TyDoc_STRVAR(_tkinter_tkapp_exprlong__doc__, "exprlong($self, s, /)\n" "--\n" "\n"); @@ -283,7 +283,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_exprdouble__doc__, +TyDoc_STRVAR(_tkinter_tkapp_exprdouble__doc__, "exprdouble($self, s, /)\n" "--\n" "\n"); @@ -319,7 +319,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_exprboolean__doc__, +TyDoc_STRVAR(_tkinter_tkapp_exprboolean__doc__, "exprboolean($self, s, /)\n" "--\n" "\n"); @@ -355,7 +355,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_splitlist__doc__, +TyDoc_STRVAR(_tkinter_tkapp_splitlist__doc__, "splitlist($self, arg, /)\n" "--\n" "\n"); @@ -376,7 +376,7 @@ _tkinter_tkapp_splitlist(TyObject *self, TyObject *arg) return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_createcommand__doc__, +TyDoc_STRVAR(_tkinter_tkapp_createcommand__doc__, "createcommand($self, name, func, /)\n" "--\n" "\n"); @@ -418,7 +418,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_deletecommand__doc__, +TyDoc_STRVAR(_tkinter_tkapp_deletecommand__doc__, "deletecommand($self, name, /)\n" "--\n" "\n"); @@ -456,7 +456,7 @@ exit: #if defined(HAVE_CREATEFILEHANDLER) -PyDoc_STRVAR(_tkinter_tkapp_createfilehandler__doc__, +TyDoc_STRVAR(_tkinter_tkapp_createfilehandler__doc__, "createfilehandler($self, file, mask, func, /)\n" "--\n" "\n"); @@ -495,7 +495,7 @@ exit: #if defined(HAVE_CREATEFILEHANDLER) -PyDoc_STRVAR(_tkinter_tkapp_deletefilehandler__doc__, +TyDoc_STRVAR(_tkinter_tkapp_deletefilehandler__doc__, "deletefilehandler($self, file, /)\n" "--\n" "\n"); @@ -518,7 +518,7 @@ _tkinter_tkapp_deletefilehandler(TyObject *self, TyObject *file) #endif /* defined(HAVE_CREATEFILEHANDLER) */ -PyDoc_STRVAR(_tkinter_tktimertoken_deletetimerhandler__doc__, +TyDoc_STRVAR(_tkinter_tktimertoken_deletetimerhandler__doc__, "deletetimerhandler($self, /)\n" "--\n" "\n"); @@ -535,7 +535,7 @@ _tkinter_tktimertoken_deletetimerhandler(TyObject *self, TyObject *Py_UNUSED(ign return _tkinter_tktimertoken_deletetimerhandler_impl((TkttObject *)self); } -PyDoc_STRVAR(_tkinter_tkapp_createtimerhandler__doc__, +TyDoc_STRVAR(_tkinter_tkapp_createtimerhandler__doc__, "createtimerhandler($self, milliseconds, func, /)\n" "--\n" "\n"); @@ -568,7 +568,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_mainloop__doc__, +TyDoc_STRVAR(_tkinter_tkapp_mainloop__doc__, "mainloop($self, threshold=0, /)\n" "--\n" "\n"); @@ -602,7 +602,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_dooneevent__doc__, +TyDoc_STRVAR(_tkinter_tkapp_dooneevent__doc__, "dooneevent($self, flags=0, /)\n" "--\n" "\n"); @@ -636,7 +636,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_quit__doc__, +TyDoc_STRVAR(_tkinter_tkapp_quit__doc__, "quit($self, /)\n" "--\n" "\n"); @@ -653,7 +653,7 @@ _tkinter_tkapp_quit(TyObject *self, TyObject *Py_UNUSED(ignored)) return _tkinter_tkapp_quit_impl((TkappObject *)self); } -PyDoc_STRVAR(_tkinter_tkapp_interpaddr__doc__, +TyDoc_STRVAR(_tkinter_tkapp_interpaddr__doc__, "interpaddr($self, /)\n" "--\n" "\n"); @@ -670,7 +670,7 @@ _tkinter_tkapp_interpaddr(TyObject *self, TyObject *Py_UNUSED(ignored)) return _tkinter_tkapp_interpaddr_impl((TkappObject *)self); } -PyDoc_STRVAR(_tkinter_tkapp_loadtk__doc__, +TyDoc_STRVAR(_tkinter_tkapp_loadtk__doc__, "loadtk($self, /)\n" "--\n" "\n"); @@ -687,7 +687,7 @@ _tkinter_tkapp_loadtk(TyObject *self, TyObject *Py_UNUSED(ignored)) return _tkinter_tkapp_loadtk_impl((TkappObject *)self); } -PyDoc_STRVAR(_tkinter_tkapp_settrace__doc__, +TyDoc_STRVAR(_tkinter_tkapp_settrace__doc__, "settrace($self, func, /)\n" "--\n" "\n" @@ -709,7 +709,7 @@ _tkinter_tkapp_settrace(TyObject *self, TyObject *func) return return_value; } -PyDoc_STRVAR(_tkinter_tkapp_gettrace__doc__, +TyDoc_STRVAR(_tkinter_tkapp_gettrace__doc__, "gettrace($self, /)\n" "--\n" "\n" @@ -727,7 +727,7 @@ _tkinter_tkapp_gettrace(TyObject *self, TyObject *Py_UNUSED(ignored)) return _tkinter_tkapp_gettrace_impl((TkappObject *)self); } -PyDoc_STRVAR(_tkinter_tkapp_willdispatch__doc__, +TyDoc_STRVAR(_tkinter_tkapp_willdispatch__doc__, "willdispatch($self, /)\n" "--\n" "\n"); @@ -744,7 +744,7 @@ _tkinter_tkapp_willdispatch(TyObject *self, TyObject *Py_UNUSED(ignored)) return _tkinter_tkapp_willdispatch_impl((TkappObject *)self); } -PyDoc_STRVAR(_tkinter__flatten__doc__, +TyDoc_STRVAR(_tkinter__flatten__doc__, "_flatten($module, item, /)\n" "--\n" "\n"); @@ -752,7 +752,7 @@ PyDoc_STRVAR(_tkinter__flatten__doc__, #define _TKINTER__FLATTEN_METHODDEF \ {"_flatten", (PyCFunction)_tkinter__flatten, METH_O, _tkinter__flatten__doc__}, -PyDoc_STRVAR(_tkinter_create__doc__, +TyDoc_STRVAR(_tkinter_create__doc__, "create($module, screenName=None, baseName=\'\', className=\'Tk\',\n" " interactive=False, wantobjects=0, wantTk=True, sync=False,\n" " use=None, /)\n" @@ -901,7 +901,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_setbusywaitinterval__doc__, +TyDoc_STRVAR(_tkinter_setbusywaitinterval__doc__, "setbusywaitinterval($module, new_val, /)\n" "--\n" "\n" @@ -931,7 +931,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tkinter_getbusywaitinterval__doc__, +TyDoc_STRVAR(_tkinter_getbusywaitinterval__doc__, "getbusywaitinterval($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_tracemalloc.c.h b/Modules/clinic/_tracemalloc.c.h index 288efa7..768e53b 100644 --- a/Modules/clinic/_tracemalloc.c.h +++ b/Modules/clinic/_tracemalloc.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_tracemalloc_is_tracing__doc__, +TyDoc_STRVAR(_tracemalloc_is_tracing__doc__, "is_tracing($module, /)\n" "--\n" "\n" @@ -22,7 +22,7 @@ _tracemalloc_is_tracing(TyObject *module, TyObject *Py_UNUSED(ignored)) return _tracemalloc_is_tracing_impl(module); } -PyDoc_STRVAR(_tracemalloc_clear_traces__doc__, +TyDoc_STRVAR(_tracemalloc_clear_traces__doc__, "clear_traces($module, /)\n" "--\n" "\n" @@ -40,7 +40,7 @@ _tracemalloc_clear_traces(TyObject *module, TyObject *Py_UNUSED(ignored)) return _tracemalloc_clear_traces_impl(module); } -PyDoc_STRVAR(_tracemalloc__get_traces__doc__, +TyDoc_STRVAR(_tracemalloc__get_traces__doc__, "_get_traces($module, /)\n" "--\n" "\n" @@ -63,7 +63,7 @@ _tracemalloc__get_traces(TyObject *module, TyObject *Py_UNUSED(ignored)) return _tracemalloc__get_traces_impl(module); } -PyDoc_STRVAR(_tracemalloc__get_object_traceback__doc__, +TyDoc_STRVAR(_tracemalloc__get_object_traceback__doc__, "_get_object_traceback($module, obj, /)\n" "--\n" "\n" @@ -76,7 +76,7 @@ PyDoc_STRVAR(_tracemalloc__get_object_traceback__doc__, #define _TRACEMALLOC__GET_OBJECT_TRACEBACK_METHODDEF \ {"_get_object_traceback", (PyCFunction)_tracemalloc__get_object_traceback, METH_O, _tracemalloc__get_object_traceback__doc__}, -PyDoc_STRVAR(_tracemalloc_start__doc__, +TyDoc_STRVAR(_tracemalloc_start__doc__, "start($module, nframe=1, /)\n" "--\n" "\n" @@ -114,7 +114,7 @@ exit: return return_value; } -PyDoc_STRVAR(_tracemalloc_stop__doc__, +TyDoc_STRVAR(_tracemalloc_stop__doc__, "stop($module, /)\n" "--\n" "\n" @@ -134,7 +134,7 @@ _tracemalloc_stop(TyObject *module, TyObject *Py_UNUSED(ignored)) return _tracemalloc_stop_impl(module); } -PyDoc_STRVAR(_tracemalloc_get_traceback_limit__doc__, +TyDoc_STRVAR(_tracemalloc_get_traceback_limit__doc__, "get_traceback_limit($module, /)\n" "--\n" "\n" @@ -155,7 +155,7 @@ _tracemalloc_get_traceback_limit(TyObject *module, TyObject *Py_UNUSED(ignored)) return _tracemalloc_get_traceback_limit_impl(module); } -PyDoc_STRVAR(_tracemalloc_get_tracemalloc_memory__doc__, +TyDoc_STRVAR(_tracemalloc_get_tracemalloc_memory__doc__, "get_tracemalloc_memory($module, /)\n" "--\n" "\n" @@ -175,7 +175,7 @@ _tracemalloc_get_tracemalloc_memory(TyObject *module, TyObject *Py_UNUSED(ignore return _tracemalloc_get_tracemalloc_memory_impl(module); } -PyDoc_STRVAR(_tracemalloc_get_traced_memory__doc__, +TyDoc_STRVAR(_tracemalloc_get_traced_memory__doc__, "get_traced_memory($module, /)\n" "--\n" "\n" @@ -195,7 +195,7 @@ _tracemalloc_get_traced_memory(TyObject *module, TyObject *Py_UNUSED(ignored)) return _tracemalloc_get_traced_memory_impl(module); } -PyDoc_STRVAR(_tracemalloc_reset_peak__doc__, +TyDoc_STRVAR(_tracemalloc_reset_peak__doc__, "reset_peak($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_typingmodule.c.h b/Modules/clinic/_typingmodule.c.h index ea415e6..267197d 100644 --- a/Modules/clinic/_typingmodule.c.h +++ b/Modules/clinic/_typingmodule.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_typing__idfunc__doc__, +TyDoc_STRVAR(_typing__idfunc__doc__, "_idfunc($module, x, /)\n" "--\n" "\n"); diff --git a/Modules/clinic/_weakref.c.h b/Modules/clinic/_weakref.c.h index b378bea..ec95b75 100644 --- a/Modules/clinic/_weakref.c.h +++ b/Modules/clinic/_weakref.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_weakref_getweakrefcount__doc__, +TyDoc_STRVAR(_weakref_getweakrefcount__doc__, "getweakrefcount($module, object, /)\n" "--\n" "\n" @@ -32,7 +32,7 @@ exit: return return_value; } -PyDoc_STRVAR(_weakref__remove_dead_weakref__doc__, +TyDoc_STRVAR(_weakref__remove_dead_weakref__doc__, "_remove_dead_weakref($module, dct, key, /)\n" "--\n" "\n" @@ -67,7 +67,7 @@ exit: return return_value; } -PyDoc_STRVAR(_weakref_getweakrefs__doc__, +TyDoc_STRVAR(_weakref_getweakrefs__doc__, "getweakrefs($module, object, /)\n" "--\n" "\n" @@ -76,7 +76,7 @@ PyDoc_STRVAR(_weakref_getweakrefs__doc__, #define _WEAKREF_GETWEAKREFS_METHODDEF \ {"getweakrefs", (PyCFunction)_weakref_getweakrefs, METH_O, _weakref_getweakrefs__doc__}, -PyDoc_STRVAR(_weakref_proxy__doc__, +TyDoc_STRVAR(_weakref_proxy__doc__, "proxy($module, object, callback=None, /)\n" "--\n" "\n" diff --git a/Modules/clinic/_winapi.c.h b/Modules/clinic/_winapi.c.h index db279de..5c45be7 100644 --- a/Modules/clinic/_winapi.c.h +++ b/Modules/clinic/_winapi.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_long.h" // _TyLong_Size_t_Converter() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_winapi_Overlapped_GetOverlappedResult__doc__, +TyDoc_STRVAR(_winapi_Overlapped_GetOverlappedResult__doc__, "GetOverlappedResult($self, wait, /)\n" "--\n" "\n"); @@ -36,7 +36,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_Overlapped_getbuffer__doc__, +TyDoc_STRVAR(_winapi_Overlapped_getbuffer__doc__, "getbuffer($self, /)\n" "--\n" "\n"); @@ -53,7 +53,7 @@ _winapi_Overlapped_getbuffer(TyObject *self, TyObject *Py_UNUSED(ignored)) return _winapi_Overlapped_getbuffer_impl((OverlappedObject *)self); } -PyDoc_STRVAR(_winapi_Overlapped_cancel__doc__, +TyDoc_STRVAR(_winapi_Overlapped_cancel__doc__, "cancel($self, /)\n" "--\n" "\n"); @@ -70,7 +70,7 @@ _winapi_Overlapped_cancel(TyObject *self, TyObject *Py_UNUSED(ignored)) return _winapi_Overlapped_cancel_impl((OverlappedObject *)self); } -PyDoc_STRVAR(_winapi_CloseHandle__doc__, +TyDoc_STRVAR(_winapi_CloseHandle__doc__, "CloseHandle($module, handle, /)\n" "--\n" "\n" @@ -97,7 +97,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_ConnectNamedPipe__doc__, +TyDoc_STRVAR(_winapi_ConnectNamedPipe__doc__, "ConnectNamedPipe($module, /, handle, overlapped=False)\n" "--\n" "\n"); @@ -122,7 +122,7 @@ _winapi_ConnectNamedPipe(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(handle), &_Ty_ID(overlapped), }, }; @@ -153,7 +153,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreateEventW__doc__, +TyDoc_STRVAR(_winapi_CreateEventW__doc__, "CreateEventW($module, /, security_attributes, manual_reset,\n" " initial_state, name)\n" "--\n" @@ -181,7 +181,7 @@ _winapi_CreateEventW(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(security_attributes), &_Ty_ID(manual_reset), &_Ty_ID(initial_state), &_Ty_ID(name), }, }; @@ -225,7 +225,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreateFile__doc__, +TyDoc_STRVAR(_winapi_CreateFile__doc__, "CreateFile($module, file_name, desired_access, share_mode,\n" " security_attributes, creation_disposition,\n" " flags_and_attributes, template_file, /)\n" @@ -275,7 +275,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreateFileMapping__doc__, +TyDoc_STRVAR(_winapi_CreateFileMapping__doc__, "CreateFileMapping($module, file_handle, security_attributes, protect,\n" " max_size_high, max_size_low, name, /)\n" "--\n" @@ -322,7 +322,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreateJunction__doc__, +TyDoc_STRVAR(_winapi_CreateJunction__doc__, "CreateJunction($module, src_path, dst_path, /)\n" "--\n" "\n"); @@ -371,7 +371,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreateMutexW__doc__, +TyDoc_STRVAR(_winapi_CreateMutexW__doc__, "CreateMutexW($module, /, security_attributes, initial_owner, name)\n" "--\n" "\n"); @@ -397,7 +397,7 @@ _winapi_CreateMutexW(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(security_attributes), &_Ty_ID(initial_owner), &_Ty_ID(name), }, }; @@ -440,7 +440,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreateNamedPipe__doc__, +TyDoc_STRVAR(_winapi_CreateNamedPipe__doc__, "CreateNamedPipe($module, name, open_mode, pipe_mode, max_instances,\n" " out_buffer_size, in_buffer_size, default_timeout,\n" " security_attributes, /)\n" @@ -491,7 +491,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreatePipe__doc__, +TyDoc_STRVAR(_winapi_CreatePipe__doc__, "CreatePipe($module, pipe_attrs, size, /)\n" "--\n" "\n" @@ -525,7 +525,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CreateProcess__doc__, +TyDoc_STRVAR(_winapi_CreateProcess__doc__, "CreateProcess($module, application_name, command_line, proc_attrs,\n" " thread_attrs, inherit_handles, creation_flags,\n" " env_mapping, current_directory, startup_info, /)\n" @@ -583,7 +583,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_DuplicateHandle__doc__, +TyDoc_STRVAR(_winapi_DuplicateHandle__doc__, "DuplicateHandle($module, source_process_handle, source_handle,\n" " target_process_handle, desired_access, inherit_handle,\n" " options=0, /)\n" @@ -634,7 +634,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_ExitProcess__doc__, +TyDoc_STRVAR(_winapi_ExitProcess__doc__, "ExitProcess($module, ExitCode, /)\n" "--\n" "\n"); @@ -660,7 +660,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetCurrentProcess__doc__, +TyDoc_STRVAR(_winapi_GetCurrentProcess__doc__, "GetCurrentProcess($module, /)\n" "--\n" "\n" @@ -691,7 +691,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetExitCodeProcess__doc__, +TyDoc_STRVAR(_winapi_GetExitCodeProcess__doc__, "GetExitCodeProcess($module, process, /)\n" "--\n" "\n" @@ -723,7 +723,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetLastError__doc__, +TyDoc_STRVAR(_winapi_GetLastError__doc__, "GetLastError($module, /)\n" "--\n" "\n"); @@ -750,7 +750,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetLongPathName__doc__, +TyDoc_STRVAR(_winapi_GetLongPathName__doc__, "GetLongPathName($module, /, path)\n" "--\n" "\n" @@ -780,7 +780,7 @@ _winapi_GetLongPathName(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -823,7 +823,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetModuleFileName__doc__, +TyDoc_STRVAR(_winapi_GetModuleFileName__doc__, "GetModuleFileName($module, module_handle, /)\n" "--\n" "\n" @@ -857,7 +857,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetShortPathName__doc__, +TyDoc_STRVAR(_winapi_GetShortPathName__doc__, "GetShortPathName($module, /, path)\n" "--\n" "\n" @@ -887,7 +887,7 @@ _winapi_GetShortPathName(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -930,7 +930,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetStdHandle__doc__, +TyDoc_STRVAR(_winapi_GetStdHandle__doc__, "GetStdHandle($module, std_handle, /)\n" "--\n" "\n" @@ -970,7 +970,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetVersion__doc__, +TyDoc_STRVAR(_winapi_GetVersion__doc__, "GetVersion($module, /)\n" "--\n" "\n" @@ -998,7 +998,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_MapViewOfFile__doc__, +TyDoc_STRVAR(_winapi_MapViewOfFile__doc__, "MapViewOfFile($module, file_map, desired_access, file_offset_high,\n" " file_offset_low, number_bytes, /)\n" "--\n" @@ -1037,7 +1037,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_UnmapViewOfFile__doc__, +TyDoc_STRVAR(_winapi_UnmapViewOfFile__doc__, "UnmapViewOfFile($module, address, /)\n" "--\n" "\n"); @@ -1063,7 +1063,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_OpenEventW__doc__, +TyDoc_STRVAR(_winapi_OpenEventW__doc__, "OpenEventW($module, /, desired_access, inherit_handle, name)\n" "--\n" "\n"); @@ -1088,7 +1088,7 @@ _winapi_OpenEventW(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(desired_access), &_Ty_ID(inherit_handle), &_Ty_ID(name), }, }; @@ -1131,7 +1131,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_OpenMutexW__doc__, +TyDoc_STRVAR(_winapi_OpenMutexW__doc__, "OpenMutexW($module, /, desired_access, inherit_handle, name)\n" "--\n" "\n"); @@ -1156,7 +1156,7 @@ _winapi_OpenMutexW(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(desired_access), &_Ty_ID(inherit_handle), &_Ty_ID(name), }, }; @@ -1199,7 +1199,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_OpenFileMapping__doc__, +TyDoc_STRVAR(_winapi_OpenFileMapping__doc__, "OpenFileMapping($module, desired_access, inherit_handle, name, /)\n" "--\n" "\n"); @@ -1240,7 +1240,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_OpenProcess__doc__, +TyDoc_STRVAR(_winapi_OpenProcess__doc__, "OpenProcess($module, desired_access, inherit_handle, process_id, /)\n" "--\n" "\n"); @@ -1278,7 +1278,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_PeekNamedPipe__doc__, +TyDoc_STRVAR(_winapi_PeekNamedPipe__doc__, "PeekNamedPipe($module, handle, size=0, /)\n" "--\n" "\n"); @@ -1306,7 +1306,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_LCMapStringEx__doc__, +TyDoc_STRVAR(_winapi_LCMapStringEx__doc__, "LCMapStringEx($module, /, locale, flags, src)\n" "--\n" "\n"); @@ -1331,7 +1331,7 @@ _winapi_LCMapStringEx(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(locale), &_Ty_ID(flags), &_Ty_ID(src), }, }; @@ -1366,7 +1366,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_ReadFile__doc__, +TyDoc_STRVAR(_winapi_ReadFile__doc__, "ReadFile($module, /, handle, size, overlapped=False)\n" "--\n" "\n"); @@ -1391,7 +1391,7 @@ _winapi_ReadFile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(handle), &_Ty_ID(size), &_Ty_ID(overlapped), }, }; @@ -1423,7 +1423,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_ReleaseMutex__doc__, +TyDoc_STRVAR(_winapi_ReleaseMutex__doc__, "ReleaseMutex($module, /, mutex)\n" "--\n" "\n"); @@ -1447,7 +1447,7 @@ _winapi_ReleaseMutex(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(mutex), }, }; @@ -1477,7 +1477,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_ResetEvent__doc__, +TyDoc_STRVAR(_winapi_ResetEvent__doc__, "ResetEvent($module, /, event)\n" "--\n" "\n"); @@ -1501,7 +1501,7 @@ _winapi_ResetEvent(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(event), }, }; @@ -1531,7 +1531,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_SetEvent__doc__, +TyDoc_STRVAR(_winapi_SetEvent__doc__, "SetEvent($module, /, event)\n" "--\n" "\n"); @@ -1555,7 +1555,7 @@ _winapi_SetEvent(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(event), }, }; @@ -1585,7 +1585,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_SetNamedPipeHandleState__doc__, +TyDoc_STRVAR(_winapi_SetNamedPipeHandleState__doc__, "SetNamedPipeHandleState($module, named_pipe, mode,\n" " max_collection_count, collect_data_timeout, /)\n" "--\n" @@ -1619,7 +1619,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_TerminateProcess__doc__, +TyDoc_STRVAR(_winapi_TerminateProcess__doc__, "TerminateProcess($module, handle, exit_code, /)\n" "--\n" "\n" @@ -1649,7 +1649,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_VirtualQuerySize__doc__, +TyDoc_STRVAR(_winapi_VirtualQuerySize__doc__, "VirtualQuerySize($module, address, /)\n" "--\n" "\n"); @@ -1680,7 +1680,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_WaitNamedPipe__doc__, +TyDoc_STRVAR(_winapi_WaitNamedPipe__doc__, "WaitNamedPipe($module, name, timeout, /)\n" "--\n" "\n"); @@ -1711,7 +1711,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_BatchedWaitForMultipleObjects__doc__, +TyDoc_STRVAR(_winapi_BatchedWaitForMultipleObjects__doc__, "BatchedWaitForMultipleObjects($module, /, handle_seq, wait_all,\n" " milliseconds=_winapi.INFINITE)\n" "--\n" @@ -1752,7 +1752,7 @@ _winapi_BatchedWaitForMultipleObjects(TyObject *module, TyObject *const *args, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(handle_seq), &_Ty_ID(wait_all), &_Ty_ID(milliseconds), }, }; @@ -1784,7 +1784,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_WaitForMultipleObjects__doc__, +TyDoc_STRVAR(_winapi_WaitForMultipleObjects__doc__, "WaitForMultipleObjects($module, handle_seq, wait_flag,\n" " milliseconds=_winapi.INFINITE, /)\n" "--\n" @@ -1815,7 +1815,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_WaitForSingleObject__doc__, +TyDoc_STRVAR(_winapi_WaitForSingleObject__doc__, "WaitForSingleObject($module, handle, milliseconds, /)\n" "--\n" "\n" @@ -1854,7 +1854,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_WriteFile__doc__, +TyDoc_STRVAR(_winapi_WriteFile__doc__, "WriteFile($module, /, handle, buffer, overlapped=False)\n" "--\n" "\n"); @@ -1879,7 +1879,7 @@ _winapi_WriteFile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(handle), &_Ty_ID(buffer), &_Ty_ID(overlapped), }, }; @@ -1911,7 +1911,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_GetACP__doc__, +TyDoc_STRVAR(_winapi_GetACP__doc__, "GetACP($module, /)\n" "--\n" "\n" @@ -1929,7 +1929,7 @@ _winapi_GetACP(TyObject *module, TyObject *Py_UNUSED(ignored)) return _winapi_GetACP_impl(module); } -PyDoc_STRVAR(_winapi_GetFileType__doc__, +TyDoc_STRVAR(_winapi_GetFileType__doc__, "GetFileType($module, /, handle)\n" "--\n" "\n"); @@ -1953,7 +1953,7 @@ _winapi_GetFileType(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(handle), }, }; @@ -1988,7 +1988,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi__mimetypes_read_windows_registry__doc__, +TyDoc_STRVAR(_winapi__mimetypes_read_windows_registry__doc__, "_mimetypes_read_windows_registry($module, /, on_type_read)\n" "--\n" "\n" @@ -2017,7 +2017,7 @@ _winapi__mimetypes_read_windows_registry(TyObject *module, TyObject *const *args Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(on_type_read), }, }; @@ -2050,7 +2050,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_NeedCurrentDirectoryForExePath__doc__, +TyDoc_STRVAR(_winapi_NeedCurrentDirectoryForExePath__doc__, "NeedCurrentDirectoryForExePath($module, exe_name, /)\n" "--\n" "\n"); @@ -2090,7 +2090,7 @@ exit: return return_value; } -PyDoc_STRVAR(_winapi_CopyFile2__doc__, +TyDoc_STRVAR(_winapi_CopyFile2__doc__, "CopyFile2($module, /, existing_file_name, new_file_name, flags,\n" " progress_routine=None)\n" "--\n" @@ -2124,7 +2124,7 @@ _winapi_CopyFile2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(existing_file_name), &_Ty_ID(new_file_name), &_Ty_ID(flags), &_Ty_ID(progress_routine), }, }; diff --git a/Modules/clinic/_zoneinfo.c.h b/Modules/clinic/_zoneinfo.c.h index ae656ef..93bb911 100644 --- a/Modules/clinic/_zoneinfo.c.h +++ b/Modules/clinic/_zoneinfo.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(zoneinfo_ZoneInfo__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo__doc__, "ZoneInfo(key)\n" "--\n" "\n" @@ -31,7 +31,7 @@ zoneinfo_ZoneInfo(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), }, }; @@ -68,7 +68,7 @@ exit: return return_value; } -PyDoc_STRVAR(zoneinfo_ZoneInfo_from_file__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo_from_file__doc__, "from_file($type, file_obj, /, key=None)\n" "--\n" "\n" @@ -94,7 +94,7 @@ zoneinfo_ZoneInfo_from_file(TyObject *type, TyTypeObject *cls, TyObject *const * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), }, }; @@ -134,7 +134,7 @@ exit: return return_value; } -PyDoc_STRVAR(zoneinfo_ZoneInfo_no_cache__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo_no_cache__doc__, "no_cache($type, /, key)\n" "--\n" "\n" @@ -160,7 +160,7 @@ zoneinfo_ZoneInfo_no_cache(TyObject *type, TyTypeObject *cls, TyObject *const *a Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), }, }; @@ -193,7 +193,7 @@ exit: return return_value; } -PyDoc_STRVAR(zoneinfo_ZoneInfo_clear_cache__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo_clear_cache__doc__, "clear_cache($type, /, *, only_keys=None)\n" "--\n" "\n" @@ -219,7 +219,7 @@ zoneinfo_ZoneInfo_clear_cache(TyObject *type, TyTypeObject *cls, TyObject *const Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(only_keys), }, }; @@ -259,7 +259,7 @@ exit: return return_value; } -PyDoc_STRVAR(zoneinfo_ZoneInfo_utcoffset__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo_utcoffset__doc__, "utcoffset($self, dt, /)\n" "--\n" "\n" @@ -304,7 +304,7 @@ exit: return return_value; } -PyDoc_STRVAR(zoneinfo_ZoneInfo_dst__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo_dst__doc__, "dst($self, dt, /)\n" "--\n" "\n" @@ -348,7 +348,7 @@ exit: return return_value; } -PyDoc_STRVAR(zoneinfo_ZoneInfo_tzname__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo_tzname__doc__, "tzname($self, dt, /)\n" "--\n" "\n" @@ -393,7 +393,7 @@ exit: return return_value; } -PyDoc_STRVAR(zoneinfo_ZoneInfo__unpickle__doc__, +TyDoc_STRVAR(zoneinfo_ZoneInfo__unpickle__doc__, "_unpickle($type, key, from_cache, /)\n" "--\n" "\n" diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index dfb9713..b00950a 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -8,7 +8,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(array_array_clear__doc__, +TyDoc_STRVAR(array_array_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -26,7 +26,7 @@ array_array_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array_clear_impl((arrayobject *)self); } -PyDoc_STRVAR(array_array___copy____doc__, +TyDoc_STRVAR(array_array___copy____doc__, "__copy__($self, /)\n" "--\n" "\n" @@ -44,7 +44,7 @@ array_array___copy__(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array___copy___impl((arrayobject *)self); } -PyDoc_STRVAR(array_array___deepcopy____doc__, +TyDoc_STRVAR(array_array___deepcopy____doc__, "__deepcopy__($self, unused, /)\n" "--\n" "\n" @@ -66,7 +66,7 @@ array_array___deepcopy__(TyObject *self, TyObject *unused) return return_value; } -PyDoc_STRVAR(array_array_count__doc__, +TyDoc_STRVAR(array_array_count__doc__, "count($self, v, /)\n" "--\n" "\n" @@ -88,7 +88,7 @@ array_array_count(TyObject *self, TyObject *v) return return_value; } -PyDoc_STRVAR(array_array_index__doc__, +TyDoc_STRVAR(array_array_index__doc__, "index($self, v, start=0, stop=sys.maxsize, /)\n" "--\n" "\n" @@ -134,7 +134,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_remove__doc__, +TyDoc_STRVAR(array_array_remove__doc__, "remove($self, v, /)\n" "--\n" "\n" @@ -156,7 +156,7 @@ array_array_remove(TyObject *self, TyObject *v) return return_value; } -PyDoc_STRVAR(array_array_pop__doc__, +TyDoc_STRVAR(array_array_pop__doc__, "pop($self, i=-1, /)\n" "--\n" "\n" @@ -201,7 +201,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_extend__doc__, +TyDoc_STRVAR(array_array_extend__doc__, "extend($self, bb, /)\n" "--\n" "\n" @@ -245,7 +245,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_insert__doc__, +TyDoc_STRVAR(array_array_insert__doc__, "insert($self, i, v, /)\n" "--\n" "\n" @@ -286,7 +286,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_buffer_info__doc__, +TyDoc_STRVAR(array_array_buffer_info__doc__, "buffer_info($self, /)\n" "--\n" "\n" @@ -307,7 +307,7 @@ array_array_buffer_info(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array_buffer_info_impl((arrayobject *)self); } -PyDoc_STRVAR(array_array_append__doc__, +TyDoc_STRVAR(array_array_append__doc__, "append($self, v, /)\n" "--\n" "\n" @@ -329,7 +329,7 @@ array_array_append(TyObject *self, TyObject *v) return return_value; } -PyDoc_STRVAR(array_array_byteswap__doc__, +TyDoc_STRVAR(array_array_byteswap__doc__, "byteswap($self, /)\n" "--\n" "\n" @@ -350,7 +350,7 @@ array_array_byteswap(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array_byteswap_impl((arrayobject *)self); } -PyDoc_STRVAR(array_array_reverse__doc__, +TyDoc_STRVAR(array_array_reverse__doc__, "reverse($self, /)\n" "--\n" "\n" @@ -368,7 +368,7 @@ array_array_reverse(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array_reverse_impl((arrayobject *)self); } -PyDoc_STRVAR(array_array_fromfile__doc__, +TyDoc_STRVAR(array_array_fromfile__doc__, "fromfile($self, f, n, /)\n" "--\n" "\n" @@ -426,7 +426,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_tofile__doc__, +TyDoc_STRVAR(array_array_tofile__doc__, "tofile($self, f, /)\n" "--\n" "\n" @@ -470,7 +470,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_fromlist__doc__, +TyDoc_STRVAR(array_array_fromlist__doc__, "fromlist($self, list, /)\n" "--\n" "\n" @@ -492,7 +492,7 @@ array_array_fromlist(TyObject *self, TyObject *list) return return_value; } -PyDoc_STRVAR(array_array_tolist__doc__, +TyDoc_STRVAR(array_array_tolist__doc__, "tolist($self, /)\n" "--\n" "\n" @@ -510,7 +510,7 @@ array_array_tolist(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array_tolist_impl((arrayobject *)self); } -PyDoc_STRVAR(array_array_frombytes__doc__, +TyDoc_STRVAR(array_array_frombytes__doc__, "frombytes($self, buffer, /)\n" "--\n" "\n" @@ -542,7 +542,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_tobytes__doc__, +TyDoc_STRVAR(array_array_tobytes__doc__, "tobytes($self, /)\n" "--\n" "\n" @@ -560,7 +560,7 @@ array_array_tobytes(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array_tobytes_impl((arrayobject *)self); } -PyDoc_STRVAR(array_array_fromunicode__doc__, +TyDoc_STRVAR(array_array_fromunicode__doc__, "fromunicode($self, ustr, /)\n" "--\n" "\n" @@ -593,7 +593,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array_tounicode__doc__, +TyDoc_STRVAR(array_array_tounicode__doc__, "tounicode($self, /)\n" "--\n" "\n" @@ -615,7 +615,7 @@ array_array_tounicode(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array_tounicode_impl((arrayobject *)self); } -PyDoc_STRVAR(array_array___sizeof____doc__, +TyDoc_STRVAR(array_array___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -633,7 +633,7 @@ array_array___sizeof__(TyObject *self, TyObject *Py_UNUSED(ignored)) return array_array___sizeof___impl((arrayobject *)self); } -PyDoc_STRVAR(array__array_reconstructor__doc__, +TyDoc_STRVAR(array__array_reconstructor__doc__, "_array_reconstructor($module, arraytype, typecode, mformat_code, items,\n" " /)\n" "--\n" @@ -685,7 +685,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_array___reduce_ex____doc__, +TyDoc_STRVAR(array_array___reduce_ex____doc__, "__reduce_ex__($self, value, /)\n" "--\n" "\n" @@ -730,7 +730,7 @@ exit: return return_value; } -PyDoc_STRVAR(array_arrayiterator___reduce____doc__, +TyDoc_STRVAR(array_arrayiterator___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n" @@ -752,7 +752,7 @@ array_arrayiterator___reduce__(TyObject *self, TyTypeObject *cls, TyObject *cons return array_arrayiterator___reduce___impl((arrayiterobject *)self, cls); } -PyDoc_STRVAR(array_arrayiterator___setstate____doc__, +TyDoc_STRVAR(array_arrayiterator___setstate____doc__, "__setstate__($self, state, /)\n" "--\n" "\n" diff --git a/Modules/clinic/binascii.c.h b/Modules/clinic/binascii.c.h index 14801ec..890679a 100644 --- a/Modules/clinic/binascii.c.h +++ b/Modules/clinic/binascii.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(binascii_a2b_uu__doc__, +TyDoc_STRVAR(binascii_a2b_uu__doc__, "a2b_uu($module, data, /)\n" "--\n" "\n" @@ -39,7 +39,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_b2a_uu__doc__, +TyDoc_STRVAR(binascii_b2a_uu__doc__, "b2a_uu($module, data, /, *, backtick=False)\n" "--\n" "\n" @@ -64,7 +64,7 @@ binascii_b2a_uu(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(backtick), }, }; @@ -114,7 +114,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_a2b_base64__doc__, +TyDoc_STRVAR(binascii_a2b_base64__doc__, "a2b_base64($module, data, /, *, strict_mode=False)\n" "--\n" "\n" @@ -143,7 +143,7 @@ binascii_a2b_base64(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(strict_mode), }, }; @@ -192,7 +192,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_b2a_base64__doc__, +TyDoc_STRVAR(binascii_b2a_base64__doc__, "b2a_base64($module, data, /, *, newline=True)\n" "--\n" "\n" @@ -217,7 +217,7 @@ binascii_b2a_base64(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(newline), }, }; @@ -267,7 +267,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_crc_hqx__doc__, +TyDoc_STRVAR(binascii_crc_hqx__doc__, "crc_hqx($module, data, crc, /)\n" "--\n" "\n" @@ -307,7 +307,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_crc32__doc__, +TyDoc_STRVAR(binascii_crc32__doc__, "crc32($module, data, crc=0, /)\n" "--\n" "\n" @@ -356,7 +356,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_b2a_hex__doc__, +TyDoc_STRVAR(binascii_b2a_hex__doc__, "b2a_hex($module, /, data, sep=, bytes_per_sep=1)\n" "--\n" "\n" @@ -399,7 +399,7 @@ binascii_b2a_hex(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(sep), &_Ty_ID(bytes_per_sep), }, }; @@ -456,7 +456,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_hexlify__doc__, +TyDoc_STRVAR(binascii_hexlify__doc__, "hexlify($module, /, data, sep=, bytes_per_sep=1)\n" "--\n" "\n" @@ -491,7 +491,7 @@ binascii_hexlify(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(sep), &_Ty_ID(bytes_per_sep), }, }; @@ -548,7 +548,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_a2b_hex__doc__, +TyDoc_STRVAR(binascii_a2b_hex__doc__, "a2b_hex($module, hexstr, /)\n" "--\n" "\n" @@ -582,7 +582,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_unhexlify__doc__, +TyDoc_STRVAR(binascii_unhexlify__doc__, "unhexlify($module, hexstr, /)\n" "--\n" "\n" @@ -615,7 +615,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_a2b_qp__doc__, +TyDoc_STRVAR(binascii_a2b_qp__doc__, "a2b_qp($module, /, data, header=False)\n" "--\n" "\n" @@ -640,7 +640,7 @@ binascii_a2b_qp(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(header), }, }; @@ -689,7 +689,7 @@ exit: return return_value; } -PyDoc_STRVAR(binascii_b2a_qp__doc__, +TyDoc_STRVAR(binascii_b2a_qp__doc__, "b2a_qp($module, /, data, quotetabs=False, istext=True, header=False)\n" "--\n" "\n" @@ -719,7 +719,7 @@ binascii_b2a_qp(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(quotetabs), &_Ty_ID(istext), &_Ty_ID(header), }, }; diff --git a/Modules/clinic/blake2module.c.h b/Modules/clinic/blake2module.c.h index e0eaa89..b74b7e7 100644 --- a/Modules/clinic/blake2module.c.h +++ b/Modules/clinic/blake2module.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_long.h" // _TyLong_UnsignedLong_Converter() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(py_blake2b_new__doc__, +TyDoc_STRVAR(py_blake2b_new__doc__, "blake2b(data=b\'\', *, digest_size=_blake2.blake2b.MAX_DIGEST_SIZE,\n" " key=b\'\', salt=b\'\', person=b\'\', fanout=1, depth=1, leaf_size=0,\n" " node_offset=0, node_depth=0, inner_size=0, last_node=False,\n" @@ -39,7 +39,7 @@ py_blake2b_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(digest_size), &_Ty_ID(key), &_Ty_ID(salt), &_Ty_ID(person), &_Ty_ID(fanout), &_Ty_ID(depth), &_Ty_ID(leaf_size), &_Ty_ID(node_offset), &_Ty_ID(node_depth), &_Ty_ID(inner_size), &_Ty_ID(last_node), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -218,7 +218,7 @@ exit: return return_value; } -PyDoc_STRVAR(py_blake2s_new__doc__, +TyDoc_STRVAR(py_blake2s_new__doc__, "blake2s(data=b\'\', *, digest_size=_blake2.blake2s.MAX_DIGEST_SIZE,\n" " key=b\'\', salt=b\'\', person=b\'\', fanout=1, depth=1, leaf_size=0,\n" " node_offset=0, node_depth=0, inner_size=0, last_node=False,\n" @@ -248,7 +248,7 @@ py_blake2s_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(digest_size), &_Ty_ID(key), &_Ty_ID(salt), &_Ty_ID(person), &_Ty_ID(fanout), &_Ty_ID(depth), &_Ty_ID(leaf_size), &_Ty_ID(node_offset), &_Ty_ID(node_depth), &_Ty_ID(inner_size), &_Ty_ID(last_node), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -427,7 +427,7 @@ exit: return return_value; } -PyDoc_STRVAR(_blake2_blake2b_copy__doc__, +TyDoc_STRVAR(_blake2_blake2b_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -445,7 +445,7 @@ _blake2_blake2b_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return _blake2_blake2b_copy_impl((Blake2Object *)self); } -PyDoc_STRVAR(_blake2_blake2b_update__doc__, +TyDoc_STRVAR(_blake2_blake2b_update__doc__, "update($self, data, /)\n" "--\n" "\n" @@ -467,7 +467,7 @@ _blake2_blake2b_update(TyObject *self, TyObject *data) return return_value; } -PyDoc_STRVAR(_blake2_blake2b_digest__doc__, +TyDoc_STRVAR(_blake2_blake2b_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -485,7 +485,7 @@ _blake2_blake2b_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return _blake2_blake2b_digest_impl((Blake2Object *)self); } -PyDoc_STRVAR(_blake2_blake2b_hexdigest__doc__, +TyDoc_STRVAR(_blake2_blake2b_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" diff --git a/Modules/clinic/cmathmodule.c.h b/Modules/clinic/cmathmodule.c.h index 4a2c7e2..d047797 100644 --- a/Modules/clinic/cmathmodule.c.h +++ b/Modules/clinic/cmathmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(cmath_acos__doc__, +TyDoc_STRVAR(cmath_acos__doc__, "acos($module, z, /)\n" "--\n" "\n" @@ -50,7 +50,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_acosh__doc__, +TyDoc_STRVAR(cmath_acosh__doc__, "acosh($module, z, /)\n" "--\n" "\n" @@ -92,7 +92,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_asin__doc__, +TyDoc_STRVAR(cmath_asin__doc__, "asin($module, z, /)\n" "--\n" "\n" @@ -134,7 +134,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_asinh__doc__, +TyDoc_STRVAR(cmath_asinh__doc__, "asinh($module, z, /)\n" "--\n" "\n" @@ -176,7 +176,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_atan__doc__, +TyDoc_STRVAR(cmath_atan__doc__, "atan($module, z, /)\n" "--\n" "\n" @@ -218,7 +218,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_atanh__doc__, +TyDoc_STRVAR(cmath_atanh__doc__, "atanh($module, z, /)\n" "--\n" "\n" @@ -260,7 +260,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_cos__doc__, +TyDoc_STRVAR(cmath_cos__doc__, "cos($module, z, /)\n" "--\n" "\n" @@ -302,7 +302,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_cosh__doc__, +TyDoc_STRVAR(cmath_cosh__doc__, "cosh($module, z, /)\n" "--\n" "\n" @@ -344,7 +344,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_exp__doc__, +TyDoc_STRVAR(cmath_exp__doc__, "exp($module, z, /)\n" "--\n" "\n" @@ -386,7 +386,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_log10__doc__, +TyDoc_STRVAR(cmath_log10__doc__, "log10($module, z, /)\n" "--\n" "\n" @@ -428,7 +428,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_sin__doc__, +TyDoc_STRVAR(cmath_sin__doc__, "sin($module, z, /)\n" "--\n" "\n" @@ -470,7 +470,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_sinh__doc__, +TyDoc_STRVAR(cmath_sinh__doc__, "sinh($module, z, /)\n" "--\n" "\n" @@ -512,7 +512,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_sqrt__doc__, +TyDoc_STRVAR(cmath_sqrt__doc__, "sqrt($module, z, /)\n" "--\n" "\n" @@ -554,7 +554,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_tan__doc__, +TyDoc_STRVAR(cmath_tan__doc__, "tan($module, z, /)\n" "--\n" "\n" @@ -596,7 +596,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_tanh__doc__, +TyDoc_STRVAR(cmath_tanh__doc__, "tanh($module, z, /)\n" "--\n" "\n" @@ -638,7 +638,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_log__doc__, +TyDoc_STRVAR(cmath_log__doc__, "log($module, z, base=, /)\n" "--\n" "\n" @@ -677,7 +677,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_phase__doc__, +TyDoc_STRVAR(cmath_phase__doc__, "phase($module, z, /)\n" "--\n" "\n" @@ -705,7 +705,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_polar__doc__, +TyDoc_STRVAR(cmath_polar__doc__, "polar($module, z, /)\n" "--\n" "\n" @@ -735,7 +735,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_rect__doc__, +TyDoc_STRVAR(cmath_rect__doc__, "rect($module, r, phi, /)\n" "--\n" "\n" @@ -783,7 +783,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_isfinite__doc__, +TyDoc_STRVAR(cmath_isfinite__doc__, "isfinite($module, z, /)\n" "--\n" "\n" @@ -811,7 +811,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_isnan__doc__, +TyDoc_STRVAR(cmath_isnan__doc__, "isnan($module, z, /)\n" "--\n" "\n" @@ -839,7 +839,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_isinf__doc__, +TyDoc_STRVAR(cmath_isinf__doc__, "isinf($module, z, /)\n" "--\n" "\n" @@ -867,7 +867,7 @@ exit: return return_value; } -PyDoc_STRVAR(cmath_isclose__doc__, +TyDoc_STRVAR(cmath_isclose__doc__, "isclose($module, /, a, b, *, rel_tol=1e-09, abs_tol=0.0)\n" "--\n" "\n" @@ -908,7 +908,7 @@ cmath_isclose(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), &_Ty_ID(rel_tol), &_Ty_ID(abs_tol), }, }; diff --git a/Modules/clinic/fcntlmodule.c.h b/Modules/clinic/fcntlmodule.c.h index e931a30..bc990e2 100644 --- a/Modules/clinic/fcntlmodule.c.h +++ b/Modules/clinic/fcntlmodule.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(fcntl_fcntl__doc__, +TyDoc_STRVAR(fcntl_fcntl__doc__, "fcntl($module, fd, cmd, arg=0, /)\n" "--\n" "\n" @@ -59,7 +59,7 @@ exit: return return_value; } -PyDoc_STRVAR(fcntl_ioctl__doc__, +TyDoc_STRVAR(fcntl_ioctl__doc__, "ioctl($module, fd, request, arg=0, mutate_flag=True, /)\n" "--\n" "\n" @@ -143,7 +143,7 @@ exit: return return_value; } -PyDoc_STRVAR(fcntl_flock__doc__, +TyDoc_STRVAR(fcntl_flock__doc__, "flock($module, fd, operation, /)\n" "--\n" "\n" @@ -183,7 +183,7 @@ exit: return return_value; } -PyDoc_STRVAR(fcntl_lockf__doc__, +TyDoc_STRVAR(fcntl_lockf__doc__, "lockf($module, fd, cmd, len=0, start=0, whence=0, /)\n" "--\n" "\n" diff --git a/Modules/clinic/gcmodule.c.h b/Modules/clinic/gcmodule.c.h index f843f5c..3597354 100644 --- a/Modules/clinic/gcmodule.c.h +++ b/Modules/clinic/gcmodule.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() #include "pycore_tuple.h" // _TyTuple_FromArray() -PyDoc_STRVAR(gc_enable__doc__, +TyDoc_STRVAR(gc_enable__doc__, "enable($module, /)\n" "--\n" "\n" @@ -28,7 +28,7 @@ gc_enable(TyObject *module, TyObject *Py_UNUSED(ignored)) return gc_enable_impl(module); } -PyDoc_STRVAR(gc_disable__doc__, +TyDoc_STRVAR(gc_disable__doc__, "disable($module, /)\n" "--\n" "\n" @@ -46,7 +46,7 @@ gc_disable(TyObject *module, TyObject *Py_UNUSED(ignored)) return gc_disable_impl(module); } -PyDoc_STRVAR(gc_isenabled__doc__, +TyDoc_STRVAR(gc_isenabled__doc__, "isenabled($module, /)\n" "--\n" "\n" @@ -74,7 +74,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_collect__doc__, +TyDoc_STRVAR(gc_collect__doc__, "collect($module, /, generation=2)\n" "--\n" "\n" @@ -105,7 +105,7 @@ gc_collect(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(generation), }, }; @@ -151,7 +151,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_set_debug__doc__, +TyDoc_STRVAR(gc_set_debug__doc__, "set_debug($module, flags, /)\n" "--\n" "\n" @@ -190,7 +190,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_get_debug__doc__, +TyDoc_STRVAR(gc_get_debug__doc__, "get_debug($module, /)\n" "--\n" "\n" @@ -218,7 +218,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_set_threshold__doc__, +TyDoc_STRVAR(gc_set_threshold__doc__, "set_threshold(threshold0, [threshold1, [threshold2]])\n" "Set the collection thresholds (the collection frequency).\n" "\n" @@ -270,7 +270,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_get_threshold__doc__, +TyDoc_STRVAR(gc_get_threshold__doc__, "get_threshold($module, /)\n" "--\n" "\n" @@ -288,7 +288,7 @@ gc_get_threshold(TyObject *module, TyObject *Py_UNUSED(ignored)) return gc_get_threshold_impl(module); } -PyDoc_STRVAR(gc_get_count__doc__, +TyDoc_STRVAR(gc_get_count__doc__, "get_count($module, /)\n" "--\n" "\n" @@ -306,7 +306,7 @@ gc_get_count(TyObject *module, TyObject *Py_UNUSED(ignored)) return gc_get_count_impl(module); } -PyDoc_STRVAR(gc_get_referrers__doc__, +TyDoc_STRVAR(gc_get_referrers__doc__, "get_referrers($module, /, *objs)\n" "--\n" "\n" @@ -337,7 +337,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_get_referents__doc__, +TyDoc_STRVAR(gc_get_referents__doc__, "get_referents($module, /, *objs)\n" "--\n" "\n" @@ -368,7 +368,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_get_objects__doc__, +TyDoc_STRVAR(gc_get_objects__doc__, "get_objects($module, /, generation=None)\n" "--\n" "\n" @@ -399,7 +399,7 @@ gc_get_objects(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(generation), }, }; @@ -439,7 +439,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_get_stats__doc__, +TyDoc_STRVAR(gc_get_stats__doc__, "get_stats($module, /)\n" "--\n" "\n" @@ -457,7 +457,7 @@ gc_get_stats(TyObject *module, TyObject *Py_UNUSED(ignored)) return gc_get_stats_impl(module); } -PyDoc_STRVAR(gc_is_tracked__doc__, +TyDoc_STRVAR(gc_is_tracked__doc__, "is_tracked($module, obj, /)\n" "--\n" "\n" @@ -487,7 +487,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_is_finalized__doc__, +TyDoc_STRVAR(gc_is_finalized__doc__, "is_finalized($module, obj, /)\n" "--\n" "\n" @@ -515,7 +515,7 @@ exit: return return_value; } -PyDoc_STRVAR(gc_freeze__doc__, +TyDoc_STRVAR(gc_freeze__doc__, "freeze($module, /)\n" "--\n" "\n" @@ -537,7 +537,7 @@ gc_freeze(TyObject *module, TyObject *Py_UNUSED(ignored)) return gc_freeze_impl(module); } -PyDoc_STRVAR(gc_unfreeze__doc__, +TyDoc_STRVAR(gc_unfreeze__doc__, "unfreeze($module, /)\n" "--\n" "\n" @@ -557,7 +557,7 @@ gc_unfreeze(TyObject *module, TyObject *Py_UNUSED(ignored)) return gc_unfreeze_impl(module); } -PyDoc_STRVAR(gc_get_freeze_count__doc__, +TyDoc_STRVAR(gc_get_freeze_count__doc__, "get_freeze_count($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/grpmodule.c.h b/Modules/clinic/grpmodule.c.h index 1b7e844..789e393 100644 --- a/Modules/clinic/grpmodule.c.h +++ b/Modules/clinic/grpmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(grp_getgrgid__doc__, +TyDoc_STRVAR(grp_getgrgid__doc__, "getgrgid($module, /, id)\n" "--\n" "\n" @@ -35,7 +35,7 @@ grp_getgrgid(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(id), }, }; @@ -68,7 +68,7 @@ exit: return return_value; } -PyDoc_STRVAR(grp_getgrnam__doc__, +TyDoc_STRVAR(grp_getgrnam__doc__, "getgrnam($module, /, name)\n" "--\n" "\n" @@ -95,7 +95,7 @@ grp_getgrnam(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), }, }; @@ -132,7 +132,7 @@ exit: return return_value; } -PyDoc_STRVAR(grp_getgrall__doc__, +TyDoc_STRVAR(grp_getgrall__doc__, "getgrall($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/hmacmodule.c.h b/Modules/clinic/hmacmodule.c.h index 24952cb..cd9cb3b 100644 --- a/Modules/clinic/hmacmodule.c.h +++ b/Modules/clinic/hmacmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_hmac_new__doc__, +TyDoc_STRVAR(_hmac_new__doc__, "new($module, /, key, msg=None, digestmod=None)\n" "--\n" "\n" @@ -34,7 +34,7 @@ _hmac_new(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(msg), &_Ty_ID(digestmod), }, }; @@ -81,7 +81,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_HMAC_copy__doc__, +TyDoc_STRVAR(_hmac_HMAC_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -103,7 +103,7 @@ _hmac_HMAC_copy(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssi return _hmac_HMAC_copy_impl((HMACObject *)self, cls); } -PyDoc_STRVAR(_hmac_HMAC_update__doc__, +TyDoc_STRVAR(_hmac_HMAC_update__doc__, "update($self, /, msg)\n" "--\n" "\n" @@ -128,7 +128,7 @@ _hmac_HMAC_update(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(msg), }, }; @@ -161,7 +161,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_HMAC_digest__doc__, +TyDoc_STRVAR(_hmac_HMAC_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -181,7 +181,7 @@ _hmac_HMAC_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return _hmac_HMAC_digest_impl((HMACObject *)self); } -PyDoc_STRVAR(_hmac_HMAC_hexdigest__doc__, +TyDoc_STRVAR(_hmac_HMAC_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -261,7 +261,7 @@ _hmac_HMAC_digest_size_get(TyObject *self, void *Py_UNUSED(context)) return _hmac_HMAC_digest_size_get_impl((HMACObject *)self); } -PyDoc_STRVAR(_hmac_compute_digest__doc__, +TyDoc_STRVAR(_hmac_compute_digest__doc__, "compute_digest($module, /, key, msg, digest)\n" "--\n" "\n"); @@ -286,7 +286,7 @@ _hmac_compute_digest(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(msg), &_Ty_ID(digest), }, }; @@ -323,7 +323,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_md5__doc__, +TyDoc_STRVAR(_hmac_compute_md5__doc__, "compute_md5($module, key, msg, /)\n" "--\n" "\n"); @@ -352,7 +352,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha1__doc__, +TyDoc_STRVAR(_hmac_compute_sha1__doc__, "compute_sha1($module, key, msg, /)\n" "--\n" "\n"); @@ -381,7 +381,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha2_224__doc__, +TyDoc_STRVAR(_hmac_compute_sha2_224__doc__, "compute_sha224($module, key, msg, /)\n" "--\n" "\n"); @@ -410,7 +410,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha2_256__doc__, +TyDoc_STRVAR(_hmac_compute_sha2_256__doc__, "compute_sha256($module, key, msg, /)\n" "--\n" "\n"); @@ -439,7 +439,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha2_384__doc__, +TyDoc_STRVAR(_hmac_compute_sha2_384__doc__, "compute_sha384($module, key, msg, /)\n" "--\n" "\n"); @@ -468,7 +468,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha2_512__doc__, +TyDoc_STRVAR(_hmac_compute_sha2_512__doc__, "compute_sha512($module, key, msg, /)\n" "--\n" "\n"); @@ -497,7 +497,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha3_224__doc__, +TyDoc_STRVAR(_hmac_compute_sha3_224__doc__, "compute_sha3_224($module, key, msg, /)\n" "--\n" "\n"); @@ -526,7 +526,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha3_256__doc__, +TyDoc_STRVAR(_hmac_compute_sha3_256__doc__, "compute_sha3_256($module, key, msg, /)\n" "--\n" "\n"); @@ -555,7 +555,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha3_384__doc__, +TyDoc_STRVAR(_hmac_compute_sha3_384__doc__, "compute_sha3_384($module, key, msg, /)\n" "--\n" "\n"); @@ -584,7 +584,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_sha3_512__doc__, +TyDoc_STRVAR(_hmac_compute_sha3_512__doc__, "compute_sha3_512($module, key, msg, /)\n" "--\n" "\n"); @@ -613,7 +613,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_blake2s_32__doc__, +TyDoc_STRVAR(_hmac_compute_blake2s_32__doc__, "compute_blake2s_32($module, key, msg, /)\n" "--\n" "\n"); @@ -642,7 +642,7 @@ exit: return return_value; } -PyDoc_STRVAR(_hmac_compute_blake2b_32__doc__, +TyDoc_STRVAR(_hmac_compute_blake2b_32__doc__, "compute_blake2b_32($module, key, msg, /)\n" "--\n" "\n"); diff --git a/Modules/clinic/itertoolsmodule.c.h b/Modules/clinic/itertoolsmodule.c.h index 17e06a7..5c8a332 100644 --- a/Modules/clinic/itertoolsmodule.c.h +++ b/Modules/clinic/itertoolsmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(batched_new__doc__, +TyDoc_STRVAR(batched_new__doc__, "batched(iterable, n, *, strict=False)\n" "--\n" "\n" @@ -47,7 +47,7 @@ batched_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), _Ty_LATIN1_CHR('n'), &_Ty_ID(strict), }, }; @@ -105,7 +105,7 @@ exit: return return_value; } -PyDoc_STRVAR(pairwise_new__doc__, +TyDoc_STRVAR(pairwise_new__doc__, "pairwise(iterable, /)\n" "--\n" "\n" @@ -137,7 +137,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_groupby__doc__, +TyDoc_STRVAR(itertools_groupby__doc__, "groupby(iterable, key=None)\n" "--\n" "\n" @@ -166,7 +166,7 @@ itertools_groupby(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), &_Ty_ID(key), }, }; @@ -239,7 +239,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_teedataobject__doc__, +TyDoc_STRVAR(itertools_teedataobject__doc__, "teedataobject(iterable, values, next, /)\n" "--\n" "\n" @@ -278,7 +278,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools__tee__doc__, +TyDoc_STRVAR(itertools__tee__doc__, "_tee(iterable, /)\n" "--\n" "\n" @@ -308,7 +308,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_tee__doc__, +TyDoc_STRVAR(itertools_tee__doc__, "tee($module, iterable, n=2, /)\n" "--\n" "\n" @@ -353,7 +353,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_cycle__doc__, +TyDoc_STRVAR(itertools_cycle__doc__, "cycle(iterable, /)\n" "--\n" "\n" @@ -383,7 +383,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_dropwhile__doc__, +TyDoc_STRVAR(itertools_dropwhile__doc__, "dropwhile(predicate, iterable, /)\n" "--\n" "\n" @@ -417,7 +417,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_takewhile__doc__, +TyDoc_STRVAR(itertools_takewhile__doc__, "takewhile(predicate, iterable, /)\n" "--\n" "\n" @@ -449,7 +449,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_starmap__doc__, +TyDoc_STRVAR(itertools_starmap__doc__, "starmap(function, iterable, /)\n" "--\n" "\n" @@ -481,7 +481,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_chain_from_iterable__doc__, +TyDoc_STRVAR(itertools_chain_from_iterable__doc__, "from_iterable($type, iterable, /)\n" "--\n" "\n" @@ -503,7 +503,7 @@ itertools_chain_from_iterable(TyObject *type, TyObject *arg) return return_value; } -PyDoc_STRVAR(itertools_combinations__doc__, +TyDoc_STRVAR(itertools_combinations__doc__, "combinations(iterable, r)\n" "--\n" "\n" @@ -528,7 +528,7 @@ itertools_combinations(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), _Ty_LATIN1_CHR('r'), }, }; @@ -576,7 +576,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_combinations_with_replacement__doc__, +TyDoc_STRVAR(itertools_combinations_with_replacement__doc__, "combinations_with_replacement(iterable, r)\n" "--\n" "\n" @@ -602,7 +602,7 @@ itertools_combinations_with_replacement(TyTypeObject *type, TyObject *args, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), _Ty_LATIN1_CHR('r'), }, }; @@ -650,7 +650,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_permutations__doc__, +TyDoc_STRVAR(itertools_permutations__doc__, "permutations(iterable, r=None)\n" "--\n" "\n" @@ -675,7 +675,7 @@ itertools_permutations(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), _Ty_LATIN1_CHR('r'), }, }; @@ -717,7 +717,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_accumulate__doc__, +TyDoc_STRVAR(itertools_accumulate__doc__, "accumulate(iterable, func=None, *, initial=None)\n" "--\n" "\n" @@ -740,7 +740,7 @@ itertools_accumulate(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), &_Ty_ID(func), &_Ty_ID(initial), }, }; @@ -793,7 +793,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_compress__doc__, +TyDoc_STRVAR(itertools_compress__doc__, "compress(data, selectors)\n" "--\n" "\n" @@ -818,7 +818,7 @@ itertools_compress(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(selectors), }, }; @@ -855,7 +855,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_filterfalse__doc__, +TyDoc_STRVAR(itertools_filterfalse__doc__, "filterfalse(function, iterable, /)\n" "--\n" "\n" @@ -889,7 +889,7 @@ exit: return return_value; } -PyDoc_STRVAR(itertools_count__doc__, +TyDoc_STRVAR(itertools_count__doc__, "count(start=0, step=1)\n" "--\n" "\n" @@ -919,7 +919,7 @@ itertools_count(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(start), &_Ty_ID(step), }, }; diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h index 73fbb18..39c2ae3 100644 --- a/Modules/clinic/mathmodule.c.h +++ b/Modules/clinic/mathmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(math_gcd__doc__, +TyDoc_STRVAR(math_gcd__doc__, "gcd($module, /, *integers)\n" "--\n" "\n" @@ -35,7 +35,7 @@ math_gcd(TyObject *module, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(math_lcm__doc__, +TyDoc_STRVAR(math_lcm__doc__, "lcm($module, /, *integers)\n" "--\n" "\n" @@ -62,7 +62,7 @@ math_lcm(TyObject *module, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(math_ceil__doc__, +TyDoc_STRVAR(math_ceil__doc__, "ceil($module, x, /)\n" "--\n" "\n" @@ -73,7 +73,7 @@ PyDoc_STRVAR(math_ceil__doc__, #define MATH_CEIL_METHODDEF \ {"ceil", (PyCFunction)math_ceil, METH_O, math_ceil__doc__}, -PyDoc_STRVAR(math_floor__doc__, +TyDoc_STRVAR(math_floor__doc__, "floor($module, x, /)\n" "--\n" "\n" @@ -84,7 +84,7 @@ PyDoc_STRVAR(math_floor__doc__, #define MATH_FLOOR_METHODDEF \ {"floor", (PyCFunction)math_floor, METH_O, math_floor__doc__}, -PyDoc_STRVAR(math_fsum__doc__, +TyDoc_STRVAR(math_fsum__doc__, "fsum($module, seq, /)\n" "--\n" "\n" @@ -95,7 +95,7 @@ PyDoc_STRVAR(math_fsum__doc__, #define MATH_FSUM_METHODDEF \ {"fsum", (PyCFunction)math_fsum, METH_O, math_fsum__doc__}, -PyDoc_STRVAR(math_isqrt__doc__, +TyDoc_STRVAR(math_isqrt__doc__, "isqrt($module, n, /)\n" "--\n" "\n" @@ -104,7 +104,7 @@ PyDoc_STRVAR(math_isqrt__doc__, #define MATH_ISQRT_METHODDEF \ {"isqrt", (PyCFunction)math_isqrt, METH_O, math_isqrt__doc__}, -PyDoc_STRVAR(math_factorial__doc__, +TyDoc_STRVAR(math_factorial__doc__, "factorial($module, n, /)\n" "--\n" "\n" @@ -113,7 +113,7 @@ PyDoc_STRVAR(math_factorial__doc__, #define MATH_FACTORIAL_METHODDEF \ {"factorial", (PyCFunction)math_factorial, METH_O, math_factorial__doc__}, -PyDoc_STRVAR(math_trunc__doc__, +TyDoc_STRVAR(math_trunc__doc__, "trunc($module, x, /)\n" "--\n" "\n" @@ -124,7 +124,7 @@ PyDoc_STRVAR(math_trunc__doc__, #define MATH_TRUNC_METHODDEF \ {"trunc", (PyCFunction)math_trunc, METH_O, math_trunc__doc__}, -PyDoc_STRVAR(math_frexp__doc__, +TyDoc_STRVAR(math_frexp__doc__, "frexp($module, x, /)\n" "--\n" "\n" @@ -161,7 +161,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_ldexp__doc__, +TyDoc_STRVAR(math_ldexp__doc__, "ldexp($module, x, i, /)\n" "--\n" "\n" @@ -202,7 +202,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_modf__doc__, +TyDoc_STRVAR(math_modf__doc__, "modf($module, x, /)\n" "--\n" "\n" @@ -238,7 +238,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_log2__doc__, +TyDoc_STRVAR(math_log2__doc__, "log2($module, x, /)\n" "--\n" "\n" @@ -247,7 +247,7 @@ PyDoc_STRVAR(math_log2__doc__, #define MATH_LOG2_METHODDEF \ {"log2", (PyCFunction)math_log2, METH_O, math_log2__doc__}, -PyDoc_STRVAR(math_log10__doc__, +TyDoc_STRVAR(math_log10__doc__, "log10($module, x, /)\n" "--\n" "\n" @@ -256,7 +256,7 @@ PyDoc_STRVAR(math_log10__doc__, #define MATH_LOG10_METHODDEF \ {"log10", (PyCFunction)math_log10, METH_O, math_log10__doc__}, -PyDoc_STRVAR(math_fma__doc__, +TyDoc_STRVAR(math_fma__doc__, "fma($module, x, y, z, /)\n" "--\n" "\n" @@ -317,7 +317,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_fmod__doc__, +TyDoc_STRVAR(math_fmod__doc__, "fmod($module, x, y, /)\n" "--\n" "\n" @@ -367,7 +367,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_dist__doc__, +TyDoc_STRVAR(math_dist__doc__, "dist($module, p, q, /)\n" "--\n" "\n" @@ -403,7 +403,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_hypot__doc__, +TyDoc_STRVAR(math_hypot__doc__, "hypot($module, /, *coordinates)\n" "--\n" "\n" @@ -441,7 +441,7 @@ math_hypot(TyObject *module, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(math_sumprod__doc__, +TyDoc_STRVAR(math_sumprod__doc__, "sumprod($module, p, q, /)\n" "--\n" "\n" @@ -478,7 +478,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_pow__doc__, +TyDoc_STRVAR(math_pow__doc__, "pow($module, x, y, /)\n" "--\n" "\n" @@ -526,7 +526,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_degrees__doc__, +TyDoc_STRVAR(math_degrees__doc__, "degrees($module, x, /)\n" "--\n" "\n" @@ -560,7 +560,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_radians__doc__, +TyDoc_STRVAR(math_radians__doc__, "radians($module, x, /)\n" "--\n" "\n" @@ -594,7 +594,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_isfinite__doc__, +TyDoc_STRVAR(math_isfinite__doc__, "isfinite($module, x, /)\n" "--\n" "\n" @@ -628,7 +628,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_isnan__doc__, +TyDoc_STRVAR(math_isnan__doc__, "isnan($module, x, /)\n" "--\n" "\n" @@ -662,7 +662,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_isinf__doc__, +TyDoc_STRVAR(math_isinf__doc__, "isinf($module, x, /)\n" "--\n" "\n" @@ -696,7 +696,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_isclose__doc__, +TyDoc_STRVAR(math_isclose__doc__, "isclose($module, /, a, b, *, rel_tol=1e-09, abs_tol=0.0)\n" "--\n" "\n" @@ -738,7 +738,7 @@ math_isclose(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('a'), _Ty_LATIN1_CHR('b'), &_Ty_ID(rel_tol), &_Ty_ID(abs_tol), }, }; @@ -828,7 +828,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_prod__doc__, +TyDoc_STRVAR(math_prod__doc__, "prod($module, iterable, /, *, start=1)\n" "--\n" "\n" @@ -859,7 +859,7 @@ math_prod(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(start), }, }; @@ -899,7 +899,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_perm__doc__, +TyDoc_STRVAR(math_perm__doc__, "perm($module, n, k=None, /)\n" "--\n" "\n" @@ -942,7 +942,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_comb__doc__, +TyDoc_STRVAR(math_comb__doc__, "comb($module, n, k, /)\n" "--\n" "\n" @@ -982,7 +982,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_nextafter__doc__, +TyDoc_STRVAR(math_nextafter__doc__, "nextafter($module, x, y, /, *, steps=None)\n" "--\n" "\n" @@ -1012,7 +1012,7 @@ math_nextafter(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(steps), }, }; @@ -1072,7 +1072,7 @@ exit: return return_value; } -PyDoc_STRVAR(math_ulp__doc__, +TyDoc_STRVAR(math_ulp__doc__, "ulp($module, x, /)\n" "--\n" "\n" diff --git a/Modules/clinic/md5module.c.h b/Modules/clinic/md5module.c.h index fbdfc5e..774997c 100644 --- a/Modules/clinic/md5module.c.h +++ b/Modules/clinic/md5module.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(MD5Type_copy__doc__, +TyDoc_STRVAR(MD5Type_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -30,7 +30,7 @@ MD5Type_copy(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssize_ return MD5Type_copy_impl((MD5object *)self, cls); } -PyDoc_STRVAR(MD5Type_digest__doc__, +TyDoc_STRVAR(MD5Type_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -48,7 +48,7 @@ MD5Type_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return MD5Type_digest_impl((MD5object *)self); } -PyDoc_STRVAR(MD5Type_hexdigest__doc__, +TyDoc_STRVAR(MD5Type_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -66,7 +66,7 @@ MD5Type_hexdigest(TyObject *self, TyObject *Py_UNUSED(ignored)) return MD5Type_hexdigest_impl((MD5object *)self); } -PyDoc_STRVAR(MD5Type_update__doc__, +TyDoc_STRVAR(MD5Type_update__doc__, "update($self, obj, /)\n" "--\n" "\n" @@ -88,7 +88,7 @@ MD5Type_update(TyObject *self, TyObject *obj) return return_value; } -PyDoc_STRVAR(_md5_md5__doc__, +TyDoc_STRVAR(_md5_md5__doc__, "md5($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -114,7 +114,7 @@ _md5_md5(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h index 5d31c1e..9cafac4 100644 --- a/Modules/clinic/overlapped.c.h +++ b/Modules/clinic/overlapped.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_long.h" // _TyLong_UnsignedLong_Converter() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_overlapped_CreateIoCompletionPort__doc__, +TyDoc_STRVAR(_overlapped_CreateIoCompletionPort__doc__, "CreateIoCompletionPort($module, handle, port, key, concurrency, /)\n" "--\n" "\n" @@ -57,7 +57,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_GetQueuedCompletionStatus__doc__, +TyDoc_STRVAR(_overlapped_GetQueuedCompletionStatus__doc__, "GetQueuedCompletionStatus($module, port, msecs, /)\n" "--\n" "\n" @@ -96,7 +96,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_PostQueuedCompletionStatus__doc__, +TyDoc_STRVAR(_overlapped_PostQueuedCompletionStatus__doc__, "PostQueuedCompletionStatus($module, port, bytes, key, address, /)\n" "--\n" "\n" @@ -145,7 +145,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_RegisterWaitWithQueue__doc__, +TyDoc_STRVAR(_overlapped_RegisterWaitWithQueue__doc__, "RegisterWaitWithQueue($module, Object, CompletionPort, Overlapped,\n" " Timeout, /)\n" "--\n" @@ -194,7 +194,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_UnregisterWait__doc__, +TyDoc_STRVAR(_overlapped_UnregisterWait__doc__, "UnregisterWait($module, WaitHandle, /)\n" "--\n" "\n" @@ -222,7 +222,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_UnregisterWaitEx__doc__, +TyDoc_STRVAR(_overlapped_UnregisterWaitEx__doc__, "UnregisterWaitEx($module, WaitHandle, Event, /)\n" "--\n" "\n" @@ -259,7 +259,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_CreateEvent__doc__, +TyDoc_STRVAR(_overlapped_CreateEvent__doc__, "CreateEvent($module, EventAttributes, ManualReset, InitialState, Name,\n" " /)\n" "--\n" @@ -319,7 +319,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_SetEvent__doc__, +TyDoc_STRVAR(_overlapped_SetEvent__doc__, "SetEvent($module, Handle, /)\n" "--\n" "\n" @@ -347,7 +347,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_ResetEvent__doc__, +TyDoc_STRVAR(_overlapped_ResetEvent__doc__, "ResetEvent($module, Handle, /)\n" "--\n" "\n" @@ -375,7 +375,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_BindLocal__doc__, +TyDoc_STRVAR(_overlapped_BindLocal__doc__, "BindLocal($module, handle, family, /)\n" "--\n" "\n" @@ -413,7 +413,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_FormatMessage__doc__, +TyDoc_STRVAR(_overlapped_FormatMessage__doc__, "FormatMessage($module, error_code, /)\n" "--\n" "\n" @@ -440,7 +440,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped__doc__, +TyDoc_STRVAR(_overlapped_Overlapped__doc__, "Overlapped(event=_overlapped.INVALID_HANDLE_VALUE)\n" "--\n" "\n" @@ -462,7 +462,7 @@ _overlapped_Overlapped(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(event), }, }; @@ -505,7 +505,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_cancel__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_cancel__doc__, "cancel($self, /)\n" "--\n" "\n" @@ -523,7 +523,7 @@ _overlapped_Overlapped_cancel(TyObject *self, TyObject *Py_UNUSED(ignored)) return _overlapped_Overlapped_cancel_impl((OverlappedObject *)self); } -PyDoc_STRVAR(_overlapped_Overlapped_getresult__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_getresult__doc__, "getresult($self, wait=False, /)\n" "--\n" "\n" @@ -561,7 +561,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_ReadFile__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_ReadFile__doc__, "ReadFile($self, handle, size, /)\n" "--\n" "\n" @@ -597,7 +597,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_ReadFileInto__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_ReadFileInto__doc__, "ReadFileInto($self, handle, buf, /)\n" "--\n" "\n" @@ -638,7 +638,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_WSARecv__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_WSARecv__doc__, "WSARecv($self, handle, size, flags=0, /)\n" "--\n" "\n" @@ -682,7 +682,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_WSARecvInto__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_WSARecvInto__doc__, "WSARecvInto($self, handle, buf, flags, /)\n" "--\n" "\n" @@ -728,7 +728,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_WriteFile__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_WriteFile__doc__, "WriteFile($self, handle, buf, /)\n" "--\n" "\n" @@ -769,7 +769,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_WSASend__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_WSASend__doc__, "WSASend($self, handle, buf, flags, /)\n" "--\n" "\n" @@ -814,7 +814,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_AcceptEx__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_AcceptEx__doc__, "AcceptEx($self, listen_handle, accept_handle, /)\n" "--\n" "\n" @@ -852,7 +852,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_ConnectEx__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_ConnectEx__doc__, "ConnectEx($self, client_handle, address_as_bytes, /)\n" "--\n" "\n" @@ -893,7 +893,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_DisconnectEx__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_DisconnectEx__doc__, "DisconnectEx($self, handle, flags, /)\n" "--\n" "\n"); @@ -928,7 +928,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_TransmitFile__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_TransmitFile__doc__, "TransmitFile($self, socket, file, offset, offset_high, count_to_write,\n" " count_per_send, flags, /)\n" "--\n" @@ -989,7 +989,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_ConnectNamedPipe__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_ConnectNamedPipe__doc__, "ConnectNamedPipe($self, handle, /)\n" "--\n" "\n" @@ -1018,7 +1018,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_ConnectPipe__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_ConnectPipe__doc__, "ConnectPipe($self, addr, /)\n" "--\n" "\n" @@ -1054,7 +1054,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_WSAConnect__doc__, +TyDoc_STRVAR(_overlapped_WSAConnect__doc__, "WSAConnect($module, client_handle, address_as_bytes, /)\n" "--\n" "\n" @@ -1092,7 +1092,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_WSASendTo__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_WSASendTo__doc__, "WSASendTo($self, handle, buf, flags, address_as_bytes, /)\n" "--\n" "\n" @@ -1144,7 +1144,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_WSARecvFrom__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_WSARecvFrom__doc__, "WSARecvFrom($self, handle, size, flags=0, /)\n" "--\n" "\n" @@ -1189,7 +1189,7 @@ exit: return return_value; } -PyDoc_STRVAR(_overlapped_Overlapped_WSARecvFromInto__doc__, +TyDoc_STRVAR(_overlapped_Overlapped_WSARecvFromInto__doc__, "WSARecvFromInto($self, handle, buf, size, flags=0, /)\n" "--\n" "\n" diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index db7576d..b2cb09d 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_long.h" // _TyLong_UnsignedInt_Converter() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(os_stat__doc__, +TyDoc_STRVAR(os_stat__doc__, "stat($module, /, path, *, dir_fd=None, follow_symlinks=True)\n" "--\n" "\n" @@ -54,7 +54,7 @@ os_stat(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(dir_fd), &_Ty_ID(follow_symlinks), }, }; @@ -111,7 +111,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_lstat__doc__, +TyDoc_STRVAR(os_lstat__doc__, "lstat($module, /, path, *, dir_fd=None)\n" "--\n" "\n" @@ -139,7 +139,7 @@ os_lstat(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(dir_fd), }, }; @@ -186,7 +186,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_access__doc__, +TyDoc_STRVAR(os_access__doc__, "access($module, /, path, mode, *, dir_fd=None, effective_ids=False,\n" " follow_symlinks=True)\n" "--\n" @@ -238,7 +238,7 @@ os_access(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(mode), &_Ty_ID(dir_fd), &_Ty_ID(effective_ids), &_Ty_ID(follow_symlinks), }, }; @@ -317,7 +317,7 @@ exit: #if defined(HAVE_TTYNAME_R) -PyDoc_STRVAR(os_ttyname__doc__, +TyDoc_STRVAR(os_ttyname__doc__, "ttyname($module, fd, /)\n" "--\n" "\n" @@ -352,7 +352,7 @@ exit: #if defined(HAVE_CTERMID) -PyDoc_STRVAR(os_ctermid__doc__, +TyDoc_STRVAR(os_ctermid__doc__, "ctermid($module, /)\n" "--\n" "\n" @@ -372,7 +372,7 @@ os_ctermid(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_CTERMID) */ -PyDoc_STRVAR(os_chdir__doc__, +TyDoc_STRVAR(os_chdir__doc__, "chdir($module, /, path)\n" "--\n" "\n" @@ -401,7 +401,7 @@ os_chdir(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -441,7 +441,7 @@ exit: #if defined(HAVE_FCHDIR) -PyDoc_STRVAR(os_fchdir__doc__, +TyDoc_STRVAR(os_fchdir__doc__, "fchdir($module, /, fd)\n" "--\n" "\n" @@ -469,7 +469,7 @@ os_fchdir(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -507,7 +507,7 @@ exit: #endif /* defined(HAVE_FCHDIR) */ -PyDoc_STRVAR(os_chmod__doc__, +TyDoc_STRVAR(os_chmod__doc__, "chmod($module, /, path, mode, *, dir_fd=None,\n" " follow_symlinks=(os.name != \'nt\'))\n" "--\n" @@ -557,7 +557,7 @@ os_chmod(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(mode), &_Ty_ID(dir_fd), &_Ty_ID(follow_symlinks), }, }; @@ -621,7 +621,7 @@ exit: #if (defined(HAVE_FCHMOD) || defined(MS_WINDOWS)) -PyDoc_STRVAR(os_fchmod__doc__, +TyDoc_STRVAR(os_fchmod__doc__, "fchmod($module, /, fd, mode)\n" "--\n" "\n" @@ -656,7 +656,7 @@ os_fchmod(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), &_Ty_ID(mode), }, }; @@ -701,7 +701,7 @@ exit: #if (defined(HAVE_LCHMOD) || defined(MS_WINDOWS)) -PyDoc_STRVAR(os_lchmod__doc__, +TyDoc_STRVAR(os_lchmod__doc__, "lchmod($module, /, path, mode)\n" "--\n" "\n" @@ -729,7 +729,7 @@ os_lchmod(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(mode), }, }; @@ -776,7 +776,7 @@ exit: #if defined(HAVE_CHFLAGS) -PyDoc_STRVAR(os_chflags__doc__, +TyDoc_STRVAR(os_chflags__doc__, "chflags($module, /, path, flags, follow_symlinks=True)\n" "--\n" "\n" @@ -808,7 +808,7 @@ os_chflags(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(flags), &_Ty_ID(follow_symlinks), }, }; @@ -866,7 +866,7 @@ exit: #if defined(HAVE_LCHFLAGS) -PyDoc_STRVAR(os_lchflags__doc__, +TyDoc_STRVAR(os_lchflags__doc__, "lchflags($module, /, path, flags)\n" "--\n" "\n" @@ -894,7 +894,7 @@ os_lchflags(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(flags), }, }; @@ -942,7 +942,7 @@ exit: #if defined(HAVE_CHROOT) -PyDoc_STRVAR(os_chroot__doc__, +TyDoc_STRVAR(os_chroot__doc__, "chroot($module, /, path)\n" "--\n" "\n" @@ -967,7 +967,7 @@ os_chroot(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -1009,7 +1009,7 @@ exit: #if defined(HAVE_FSYNC) -PyDoc_STRVAR(os_fsync__doc__, +TyDoc_STRVAR(os_fsync__doc__, "fsync($module, /, fd)\n" "--\n" "\n" @@ -1034,7 +1034,7 @@ os_fsync(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -1074,7 +1074,7 @@ exit: #if defined(HAVE_SYNC) -PyDoc_STRVAR(os_sync__doc__, +TyDoc_STRVAR(os_sync__doc__, "sync($module, /)\n" "--\n" "\n" @@ -1096,7 +1096,7 @@ os_sync(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_FDATASYNC) -PyDoc_STRVAR(os_fdatasync__doc__, +TyDoc_STRVAR(os_fdatasync__doc__, "fdatasync($module, /, fd)\n" "--\n" "\n" @@ -1121,7 +1121,7 @@ os_fdatasync(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -1161,7 +1161,7 @@ exit: #if defined(HAVE_CHOWN) -PyDoc_STRVAR(os_chown__doc__, +TyDoc_STRVAR(os_chown__doc__, "chown($module, /, path, uid, gid, *, dir_fd=None, follow_symlinks=True)\n" "--\n" "\n" @@ -1211,7 +1211,7 @@ os_chown(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(uid), &_Ty_ID(gid), &_Ty_ID(dir_fd), &_Ty_ID(follow_symlinks), }, }; @@ -1280,7 +1280,7 @@ exit: #if defined(HAVE_FCHOWN) -PyDoc_STRVAR(os_fchown__doc__, +TyDoc_STRVAR(os_fchown__doc__, "fchown($module, /, fd, uid, gid)\n" "--\n" "\n" @@ -1307,7 +1307,7 @@ os_fchown(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), &_Ty_ID(uid), &_Ty_ID(gid), }, }; @@ -1355,7 +1355,7 @@ exit: #if defined(HAVE_LCHOWN) -PyDoc_STRVAR(os_lchown__doc__, +TyDoc_STRVAR(os_lchown__doc__, "lchown($module, /, path, uid, gid)\n" "--\n" "\n" @@ -1383,7 +1383,7 @@ os_lchown(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(uid), &_Ty_ID(gid), }, }; @@ -1431,7 +1431,7 @@ exit: #endif /* defined(HAVE_LCHOWN) */ -PyDoc_STRVAR(os_getcwd__doc__, +TyDoc_STRVAR(os_getcwd__doc__, "getcwd($module, /)\n" "--\n" "\n" @@ -1449,7 +1449,7 @@ os_getcwd(TyObject *module, TyObject *Py_UNUSED(ignored)) return os_getcwd_impl(module); } -PyDoc_STRVAR(os_getcwdb__doc__, +TyDoc_STRVAR(os_getcwdb__doc__, "getcwdb($module, /)\n" "--\n" "\n" @@ -1469,7 +1469,7 @@ os_getcwdb(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_LINK) -PyDoc_STRVAR(os_link__doc__, +TyDoc_STRVAR(os_link__doc__, "link($module, /, src, dst, *, src_dir_fd=None, dst_dir_fd=None,\n" " follow_symlinks=(os.name != \'nt\'))\n" "--\n" @@ -1506,7 +1506,7 @@ os_link(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(src), &_Ty_ID(dst), &_Ty_ID(src_dir_fd), &_Ty_ID(dst_dir_fd), &_Ty_ID(follow_symlinks), }, }; @@ -1580,7 +1580,7 @@ exit: #endif /* defined(HAVE_LINK) */ -PyDoc_STRVAR(os_listdir__doc__, +TyDoc_STRVAR(os_listdir__doc__, "listdir($module, /, path=None)\n" "--\n" "\n" @@ -1616,7 +1616,7 @@ os_listdir(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -1661,7 +1661,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_listdrives__doc__, +TyDoc_STRVAR(os_listdrives__doc__, "listdrives($module, /)\n" "--\n" "\n" @@ -1685,7 +1685,7 @@ os_listdrives(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_listvolumes__doc__, +TyDoc_STRVAR(os_listvolumes__doc__, "listvolumes($module, /)\n" "--\n" "\n" @@ -1709,7 +1709,7 @@ os_listvolumes(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_listmounts__doc__, +TyDoc_STRVAR(os_listmounts__doc__, "listmounts($module, /, volume)\n" "--\n" "\n" @@ -1736,7 +1736,7 @@ os_listmounts(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(volume), }, }; @@ -1778,7 +1778,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_isdevdrive__doc__, +TyDoc_STRVAR(os__path_isdevdrive__doc__, "_path_isdevdrive($module, /, path)\n" "--\n" "\n" @@ -1803,7 +1803,7 @@ os__path_isdevdrive(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -1845,7 +1845,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__getfullpathname__doc__, +TyDoc_STRVAR(os__getfullpathname__doc__, "_getfullpathname($module, path, /)\n" "--\n" "\n"); @@ -1878,7 +1878,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__getfinalpathname__doc__, +TyDoc_STRVAR(os__getfinalpathname__doc__, "_getfinalpathname($module, path, /)\n" "--\n" "\n" @@ -1912,7 +1912,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__findfirstfile__doc__, +TyDoc_STRVAR(os__findfirstfile__doc__, "_findfirstfile($module, path, /)\n" "--\n" "\n" @@ -1946,7 +1946,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__getvolumepathname__doc__, +TyDoc_STRVAR(os__getvolumepathname__doc__, "_getvolumepathname($module, /, path)\n" "--\n" "\n" @@ -1971,7 +1971,7 @@ os__getvolumepathname(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2013,7 +2013,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_splitroot__doc__, +TyDoc_STRVAR(os__path_splitroot__doc__, "_path_splitroot($module, /, path)\n" "--\n" "\n" @@ -2038,7 +2038,7 @@ os__path_splitroot(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2080,7 +2080,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_exists__doc__, +TyDoc_STRVAR(os__path_exists__doc__, "_path_exists($module, /, path)\n" "--\n" "\n" @@ -2105,7 +2105,7 @@ os__path_exists(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2152,7 +2152,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_lexists__doc__, +TyDoc_STRVAR(os__path_lexists__doc__, "_path_lexists($module, /, path)\n" "--\n" "\n" @@ -2177,7 +2177,7 @@ os__path_lexists(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2224,7 +2224,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_isdir__doc__, +TyDoc_STRVAR(os__path_isdir__doc__, "_path_isdir($module, /, s)\n" "--\n" "\n" @@ -2249,7 +2249,7 @@ os__path_isdir(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('s'), }, }; @@ -2296,7 +2296,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_isfile__doc__, +TyDoc_STRVAR(os__path_isfile__doc__, "_path_isfile($module, /, path)\n" "--\n" "\n" @@ -2321,7 +2321,7 @@ os__path_isfile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2368,7 +2368,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_islink__doc__, +TyDoc_STRVAR(os__path_islink__doc__, "_path_islink($module, /, path)\n" "--\n" "\n" @@ -2393,7 +2393,7 @@ os__path_islink(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2440,7 +2440,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__path_isjunction__doc__, +TyDoc_STRVAR(os__path_isjunction__doc__, "_path_isjunction($module, /, path)\n" "--\n" "\n" @@ -2465,7 +2465,7 @@ os__path_isjunction(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2510,7 +2510,7 @@ exit: #endif /* defined(MS_WINDOWS) */ -PyDoc_STRVAR(os__path_splitroot_ex__doc__, +TyDoc_STRVAR(os__path_splitroot_ex__doc__, "_path_splitroot_ex($module, /, p)\n" "--\n" "\n" @@ -2537,7 +2537,7 @@ os__path_splitroot_ex(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { _Ty_LATIN1_CHR('p'), }, }; @@ -2575,7 +2575,7 @@ exit: return return_value; } -PyDoc_STRVAR(os__path_normpath__doc__, +TyDoc_STRVAR(os__path_normpath__doc__, "_path_normpath($module, /, path)\n" "--\n" "\n" @@ -2600,7 +2600,7 @@ os__path_normpath(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -2638,7 +2638,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_mkdir__doc__, +TyDoc_STRVAR(os_mkdir__doc__, "mkdir($module, /, path, mode=511, *, dir_fd=None)\n" "--\n" "\n" @@ -2671,7 +2671,7 @@ os_mkdir(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(mode), &_Ty_ID(dir_fd), }, }; @@ -2734,7 +2734,7 @@ exit: #if defined(HAVE_NICE) -PyDoc_STRVAR(os_nice__doc__, +TyDoc_STRVAR(os_nice__doc__, "nice($module, increment, /)\n" "--\n" "\n" @@ -2766,7 +2766,7 @@ exit: #if defined(HAVE_GETPRIORITY) -PyDoc_STRVAR(os_getpriority__doc__, +TyDoc_STRVAR(os_getpriority__doc__, "getpriority($module, /, which, who)\n" "--\n" "\n" @@ -2791,7 +2791,7 @@ os_getpriority(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(which), &_Ty_ID(who), }, }; @@ -2836,7 +2836,7 @@ exit: #if defined(HAVE_SETPRIORITY) -PyDoc_STRVAR(os_setpriority__doc__, +TyDoc_STRVAR(os_setpriority__doc__, "setpriority($module, /, which, who, priority)\n" "--\n" "\n" @@ -2861,7 +2861,7 @@ os_setpriority(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(which), &_Ty_ID(who), &_Ty_ID(priority), }, }; @@ -2909,7 +2909,7 @@ exit: #endif /* defined(HAVE_SETPRIORITY) */ -PyDoc_STRVAR(os_rename__doc__, +TyDoc_STRVAR(os_rename__doc__, "rename($module, /, src, dst, *, src_dir_fd=None, dst_dir_fd=None)\n" "--\n" "\n" @@ -2941,7 +2941,7 @@ os_rename(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(src), &_Ty_ID(dst), &_Ty_ID(src_dir_fd), &_Ty_ID(dst_dir_fd), }, }; @@ -3003,7 +3003,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_replace__doc__, +TyDoc_STRVAR(os_replace__doc__, "replace($module, /, src, dst, *, src_dir_fd=None, dst_dir_fd=None)\n" "--\n" "\n" @@ -3035,7 +3035,7 @@ os_replace(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(src), &_Ty_ID(dst), &_Ty_ID(src_dir_fd), &_Ty_ID(dst_dir_fd), }, }; @@ -3097,7 +3097,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_rmdir__doc__, +TyDoc_STRVAR(os_rmdir__doc__, "rmdir($module, /, path, *, dir_fd=None)\n" "--\n" "\n" @@ -3127,7 +3127,7 @@ os_rmdir(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(dir_fd), }, }; @@ -3176,7 +3176,7 @@ exit: #if defined(HAVE_SYSTEM) && defined(MS_WINDOWS) -PyDoc_STRVAR(os_system__doc__, +TyDoc_STRVAR(os_system__doc__, "system($module, /, command)\n" "--\n" "\n" @@ -3201,7 +3201,7 @@ os_system(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(command), }, }; @@ -3253,7 +3253,7 @@ exit: #if defined(HAVE_SYSTEM) && !defined(MS_WINDOWS) -PyDoc_STRVAR(os_system__doc__, +TyDoc_STRVAR(os_system__doc__, "system($module, /, command)\n" "--\n" "\n" @@ -3278,7 +3278,7 @@ os_system(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(command), }, }; @@ -3325,7 +3325,7 @@ exit: #if defined(HAVE_UMASK) -PyDoc_STRVAR(os_umask__doc__, +TyDoc_STRVAR(os_umask__doc__, "umask($module, mask, /)\n" "--\n" "\n" @@ -3355,7 +3355,7 @@ exit: #endif /* defined(HAVE_UMASK) */ -PyDoc_STRVAR(os_unlink__doc__, +TyDoc_STRVAR(os_unlink__doc__, "unlink($module, /, path, *, dir_fd=None)\n" "--\n" "\n" @@ -3385,7 +3385,7 @@ os_unlink(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(dir_fd), }, }; @@ -3432,7 +3432,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_remove__doc__, +TyDoc_STRVAR(os_remove__doc__, "remove($module, /, path, *, dir_fd=None)\n" "--\n" "\n" @@ -3462,7 +3462,7 @@ os_remove(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(dir_fd), }, }; @@ -3511,7 +3511,7 @@ exit: #if defined(HAVE_UNAME) -PyDoc_STRVAR(os_uname__doc__, +TyDoc_STRVAR(os_uname__doc__, "uname($module, /)\n" "--\n" "\n" @@ -3534,7 +3534,7 @@ os_uname(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_UNAME) */ -PyDoc_STRVAR(os_utime__doc__, +TyDoc_STRVAR(os_utime__doc__, "utime($module, /, path, times=None, *, ns=,\n" " dir_fd=None, follow_symlinks=True)\n" "--\n" @@ -3583,7 +3583,7 @@ os_utime(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(times), &_Ty_ID(ns), &_Ty_ID(dir_fd), &_Ty_ID(follow_symlinks), }, }; @@ -3658,7 +3658,7 @@ exit: return return_value; } -PyDoc_STRVAR(os__exit__doc__, +TyDoc_STRVAR(os__exit__doc__, "_exit($module, /, status)\n" "--\n" "\n" @@ -3683,7 +3683,7 @@ os__exit(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -3721,7 +3721,7 @@ exit: #if defined(HAVE_EXECV) -PyDoc_STRVAR(os_execv__doc__, +TyDoc_STRVAR(os_execv__doc__, "execv($module, path, argv, /)\n" "--\n" "\n" @@ -3765,7 +3765,7 @@ exit: #if defined(HAVE_EXECV) -PyDoc_STRVAR(os_execve__doc__, +TyDoc_STRVAR(os_execve__doc__, "execve($module, /, path, argv, env)\n" "--\n" "\n" @@ -3797,7 +3797,7 @@ os_execve(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(argv), &_Ty_ID(env), }, }; @@ -3843,7 +3843,7 @@ exit: #if defined(HAVE_POSIX_SPAWN) -PyDoc_STRVAR(os_posix_spawn__doc__, +TyDoc_STRVAR(os_posix_spawn__doc__, "posix_spawn($module, path, argv, env, /, *, file_actions=(),\n" " setpgroup=, resetids=False, setsid=False,\n" " setsigmask=(), setsigdef=(), scheduler=)\n" @@ -3895,7 +3895,7 @@ os_posix_spawn(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file_actions), &_Ty_ID(setpgroup), &_Ty_ID(resetids), &_Ty_ID(setsid), &_Ty_ID(setsigmask), &_Ty_ID(setsigdef), &_Ty_ID(scheduler), }, }; @@ -3996,7 +3996,7 @@ exit: #if defined(HAVE_POSIX_SPAWNP) -PyDoc_STRVAR(os_posix_spawnp__doc__, +TyDoc_STRVAR(os_posix_spawnp__doc__, "posix_spawnp($module, path, argv, env, /, *, file_actions=(),\n" " setpgroup=, resetids=False, setsid=False,\n" " setsigmask=(), setsigdef=(), scheduler=)\n" @@ -4048,7 +4048,7 @@ os_posix_spawnp(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(file_actions), &_Ty_ID(setpgroup), &_Ty_ID(resetids), &_Ty_ID(setsid), &_Ty_ID(setsigmask), &_Ty_ID(setsigdef), &_Ty_ID(scheduler), }, }; @@ -4149,7 +4149,7 @@ exit: #if (defined(HAVE_SPAWNV) || defined(HAVE_WSPAWNV) || defined(HAVE_RTPSPAWN)) -PyDoc_STRVAR(os_spawnv__doc__, +TyDoc_STRVAR(os_spawnv__doc__, "spawnv($module, mode, path, argv, /)\n" "--\n" "\n" @@ -4200,7 +4200,7 @@ exit: #if (defined(HAVE_SPAWNV) || defined(HAVE_WSPAWNV) || defined(HAVE_RTPSPAWN)) -PyDoc_STRVAR(os_spawnve__doc__, +TyDoc_STRVAR(os_spawnve__doc__, "spawnve($module, mode, path, argv, env, /)\n" "--\n" "\n" @@ -4256,7 +4256,7 @@ exit: #if defined(HAVE_FORK) -PyDoc_STRVAR(os_register_at_fork__doc__, +TyDoc_STRVAR(os_register_at_fork__doc__, "register_at_fork($module, /, *, before=,\n" " after_in_child=,\n" " after_in_parent=)\n" @@ -4294,7 +4294,7 @@ os_register_at_fork(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(before), &_Ty_ID(after_in_child), &_Ty_ID(after_in_parent), }, }; @@ -4350,7 +4350,7 @@ exit: #if defined(HAVE_FORK1) -PyDoc_STRVAR(os_fork1__doc__, +TyDoc_STRVAR(os_fork1__doc__, "fork1($module, /)\n" "--\n" "\n" @@ -4374,7 +4374,7 @@ os_fork1(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_FORK) -PyDoc_STRVAR(os_fork__doc__, +TyDoc_STRVAR(os_fork__doc__, "fork($module, /)\n" "--\n" "\n" @@ -4398,7 +4398,7 @@ os_fork(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_GET_PRIORITY_MAX) -PyDoc_STRVAR(os_sched_get_priority_max__doc__, +TyDoc_STRVAR(os_sched_get_priority_max__doc__, "sched_get_priority_max($module, /, policy)\n" "--\n" "\n" @@ -4423,7 +4423,7 @@ os_sched_get_priority_max(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(policy), }, }; @@ -4463,7 +4463,7 @@ exit: #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_GET_PRIORITY_MAX) -PyDoc_STRVAR(os_sched_get_priority_min__doc__, +TyDoc_STRVAR(os_sched_get_priority_min__doc__, "sched_get_priority_min($module, /, policy)\n" "--\n" "\n" @@ -4488,7 +4488,7 @@ os_sched_get_priority_min(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(policy), }, }; @@ -4528,7 +4528,7 @@ exit: #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETSCHEDULER) -PyDoc_STRVAR(os_sched_getscheduler__doc__, +TyDoc_STRVAR(os_sched_getscheduler__doc__, "sched_getscheduler($module, pid, /)\n" "--\n" "\n" @@ -4562,7 +4562,7 @@ exit: #if defined(HAVE_SCHED_H) && (defined(HAVE_SCHED_SETPARAM) || defined(HAVE_SCHED_SETSCHEDULER) || defined(POSIX_SPAWN_SETSCHEDULER) || defined(POSIX_SPAWN_SETSCHEDPARAM)) -PyDoc_STRVAR(os_sched_param__doc__, +TyDoc_STRVAR(os_sched_param__doc__, "sched_param(sched_priority)\n" "--\n" "\n" @@ -4587,7 +4587,7 @@ os_sched_param(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sched_priority), }, }; @@ -4626,7 +4626,7 @@ exit: #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETSCHEDULER) -PyDoc_STRVAR(os_sched_setscheduler__doc__, +TyDoc_STRVAR(os_sched_setscheduler__doc__, "sched_setscheduler($module, pid, policy, param, /)\n" "--\n" "\n" @@ -4672,7 +4672,7 @@ exit: #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETPARAM) -PyDoc_STRVAR(os_sched_getparam__doc__, +TyDoc_STRVAR(os_sched_getparam__doc__, "sched_getparam($module, pid, /)\n" "--\n" "\n" @@ -4707,7 +4707,7 @@ exit: #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETPARAM) -PyDoc_STRVAR(os_sched_setparam__doc__, +TyDoc_STRVAR(os_sched_setparam__doc__, "sched_setparam($module, pid, param, /)\n" "--\n" "\n" @@ -4747,7 +4747,7 @@ exit: #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_RR_GET_INTERVAL) -PyDoc_STRVAR(os_sched_rr_get_interval__doc__, +TyDoc_STRVAR(os_sched_rr_get_interval__doc__, "sched_rr_get_interval($module, pid, /)\n" "--\n" "\n" @@ -4786,7 +4786,7 @@ exit: #if defined(HAVE_SCHED_H) -PyDoc_STRVAR(os_sched_yield__doc__, +TyDoc_STRVAR(os_sched_yield__doc__, "sched_yield($module, /)\n" "--\n" "\n" @@ -4808,7 +4808,7 @@ os_sched_yield(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETAFFINITY) -PyDoc_STRVAR(os_sched_setaffinity__doc__, +TyDoc_STRVAR(os_sched_setaffinity__doc__, "sched_setaffinity($module, pid, mask, /)\n" "--\n" "\n" @@ -4847,7 +4847,7 @@ exit: #if defined(HAVE_SCHED_H) && defined(HAVE_SCHED_SETAFFINITY) -PyDoc_STRVAR(os_sched_getaffinity__doc__, +TyDoc_STRVAR(os_sched_getaffinity__doc__, "sched_getaffinity($module, pid, /)\n" "--\n" "\n" @@ -4881,7 +4881,7 @@ exit: #if defined(HAVE_POSIX_OPENPT) -PyDoc_STRVAR(os_posix_openpt__doc__, +TyDoc_STRVAR(os_posix_openpt__doc__, "posix_openpt($module, oflag, /)\n" "--\n" "\n" @@ -4922,7 +4922,7 @@ exit: #if defined(HAVE_GRANTPT) -PyDoc_STRVAR(os_grantpt__doc__, +TyDoc_STRVAR(os_grantpt__doc__, "grantpt($module, fd, /)\n" "--\n" "\n" @@ -4959,7 +4959,7 @@ exit: #if defined(HAVE_UNLOCKPT) -PyDoc_STRVAR(os_unlockpt__doc__, +TyDoc_STRVAR(os_unlockpt__doc__, "unlockpt($module, fd, /)\n" "--\n" "\n" @@ -4996,7 +4996,7 @@ exit: #if (defined(HAVE_PTSNAME) || defined(HAVE_PTSNAME_R)) -PyDoc_STRVAR(os_ptsname__doc__, +TyDoc_STRVAR(os_ptsname__doc__, "ptsname($module, fd, /)\n" "--\n" "\n" @@ -5034,7 +5034,7 @@ exit: #if (defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX)) -PyDoc_STRVAR(os_openpty__doc__, +TyDoc_STRVAR(os_openpty__doc__, "openpty($module, /)\n" "--\n" "\n" @@ -5059,7 +5059,7 @@ os_openpty(TyObject *module, TyObject *Py_UNUSED(ignored)) #if (defined(HAVE_LOGIN_TTY) || defined(HAVE_FALLBACK_LOGIN_TTY)) -PyDoc_STRVAR(os_login_tty__doc__, +TyDoc_STRVAR(os_login_tty__doc__, "login_tty($module, fd, /)\n" "--\n" "\n" @@ -5095,7 +5095,7 @@ exit: #if defined(HAVE_FORKPTY) -PyDoc_STRVAR(os_forkpty__doc__, +TyDoc_STRVAR(os_forkpty__doc__, "forkpty($module, /)\n" "--\n" "\n" @@ -5122,7 +5122,7 @@ os_forkpty(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETEGID) -PyDoc_STRVAR(os_getegid__doc__, +TyDoc_STRVAR(os_getegid__doc__, "getegid($module, /)\n" "--\n" "\n" @@ -5144,7 +5144,7 @@ os_getegid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETEUID) -PyDoc_STRVAR(os_geteuid__doc__, +TyDoc_STRVAR(os_geteuid__doc__, "geteuid($module, /)\n" "--\n" "\n" @@ -5166,7 +5166,7 @@ os_geteuid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETGID) -PyDoc_STRVAR(os_getgid__doc__, +TyDoc_STRVAR(os_getgid__doc__, "getgid($module, /)\n" "--\n" "\n" @@ -5188,7 +5188,7 @@ os_getgid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETPID) -PyDoc_STRVAR(os_getpid__doc__, +TyDoc_STRVAR(os_getpid__doc__, "getpid($module, /)\n" "--\n" "\n" @@ -5210,7 +5210,7 @@ os_getpid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETGROUPLIST) && defined(__APPLE__) -PyDoc_STRVAR(os_getgrouplist__doc__, +TyDoc_STRVAR(os_getgrouplist__doc__, "getgrouplist($module, user, group, /)\n" "--\n" "\n" @@ -5264,7 +5264,7 @@ exit: #if defined(HAVE_GETGROUPLIST) && !defined(__APPLE__) -PyDoc_STRVAR(os_getgrouplist__doc__, +TyDoc_STRVAR(os_getgrouplist__doc__, "getgrouplist($module, user, group, /)\n" "--\n" "\n" @@ -5317,7 +5317,7 @@ exit: #if defined(HAVE_GETGROUPS) -PyDoc_STRVAR(os_getgroups__doc__, +TyDoc_STRVAR(os_getgroups__doc__, "getgroups($module, /)\n" "--\n" "\n" @@ -5339,7 +5339,7 @@ os_getgroups(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_INITGROUPS) && defined(__APPLE__) -PyDoc_STRVAR(os_initgroups__doc__, +TyDoc_STRVAR(os_initgroups__doc__, "initgroups($module, username, gid, /)\n" "--\n" "\n" @@ -5385,7 +5385,7 @@ exit: #if defined(HAVE_INITGROUPS) && !defined(__APPLE__) -PyDoc_STRVAR(os_initgroups__doc__, +TyDoc_STRVAR(os_initgroups__doc__, "initgroups($module, username, gid, /)\n" "--\n" "\n" @@ -5430,7 +5430,7 @@ exit: #if defined(HAVE_GETPGID) -PyDoc_STRVAR(os_getpgid__doc__, +TyDoc_STRVAR(os_getpgid__doc__, "getpgid($module, /, pid)\n" "--\n" "\n" @@ -5455,7 +5455,7 @@ os_getpgid(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pid), }, }; @@ -5495,7 +5495,7 @@ exit: #if defined(HAVE_GETPGRP) -PyDoc_STRVAR(os_getpgrp__doc__, +TyDoc_STRVAR(os_getpgrp__doc__, "getpgrp($module, /)\n" "--\n" "\n" @@ -5517,7 +5517,7 @@ os_getpgrp(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_SETPGRP) -PyDoc_STRVAR(os_setpgrp__doc__, +TyDoc_STRVAR(os_setpgrp__doc__, "setpgrp($module, /)\n" "--\n" "\n" @@ -5539,7 +5539,7 @@ os_setpgrp(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETPPID) -PyDoc_STRVAR(os_getppid__doc__, +TyDoc_STRVAR(os_getppid__doc__, "getppid($module, /)\n" "--\n" "\n" @@ -5564,7 +5564,7 @@ os_getppid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETLOGIN) -PyDoc_STRVAR(os_getlogin__doc__, +TyDoc_STRVAR(os_getlogin__doc__, "getlogin($module, /)\n" "--\n" "\n" @@ -5586,7 +5586,7 @@ os_getlogin(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETUID) -PyDoc_STRVAR(os_getuid__doc__, +TyDoc_STRVAR(os_getuid__doc__, "getuid($module, /)\n" "--\n" "\n" @@ -5608,7 +5608,7 @@ os_getuid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_KILL) -PyDoc_STRVAR(os_kill__doc__, +TyDoc_STRVAR(os_kill__doc__, "kill($module, pid, signal, /)\n" "--\n" "\n" @@ -5656,7 +5656,7 @@ exit: #if defined(HAVE_KILLPG) -PyDoc_STRVAR(os_killpg__doc__, +TyDoc_STRVAR(os_killpg__doc__, "killpg($module, pgid, signal, /)\n" "--\n" "\n" @@ -5696,7 +5696,7 @@ exit: #if defined(HAVE_PLOCK) -PyDoc_STRVAR(os_plock__doc__, +TyDoc_STRVAR(os_plock__doc__, "plock($module, op, /)\n" "--\n" "\n" @@ -5728,7 +5728,7 @@ exit: #if defined(HAVE_SETUID) -PyDoc_STRVAR(os_setuid__doc__, +TyDoc_STRVAR(os_setuid__doc__, "setuid($module, uid, /)\n" "--\n" "\n" @@ -5759,7 +5759,7 @@ exit: #if defined(HAVE_SETEUID) -PyDoc_STRVAR(os_seteuid__doc__, +TyDoc_STRVAR(os_seteuid__doc__, "seteuid($module, euid, /)\n" "--\n" "\n" @@ -5790,7 +5790,7 @@ exit: #if defined(HAVE_SETEGID) -PyDoc_STRVAR(os_setegid__doc__, +TyDoc_STRVAR(os_setegid__doc__, "setegid($module, egid, /)\n" "--\n" "\n" @@ -5821,7 +5821,7 @@ exit: #if defined(HAVE_SETREUID) -PyDoc_STRVAR(os_setreuid__doc__, +TyDoc_STRVAR(os_setreuid__doc__, "setreuid($module, ruid, euid, /)\n" "--\n" "\n" @@ -5859,7 +5859,7 @@ exit: #if defined(HAVE_SETREGID) -PyDoc_STRVAR(os_setregid__doc__, +TyDoc_STRVAR(os_setregid__doc__, "setregid($module, rgid, egid, /)\n" "--\n" "\n" @@ -5897,7 +5897,7 @@ exit: #if defined(HAVE_SETGID) -PyDoc_STRVAR(os_setgid__doc__, +TyDoc_STRVAR(os_setgid__doc__, "setgid($module, gid, /)\n" "--\n" "\n" @@ -5928,7 +5928,7 @@ exit: #if defined(HAVE_SETGROUPS) -PyDoc_STRVAR(os_setgroups__doc__, +TyDoc_STRVAR(os_setgroups__doc__, "setgroups($module, groups, /)\n" "--\n" "\n" @@ -5941,7 +5941,7 @@ PyDoc_STRVAR(os_setgroups__doc__, #if defined(HAVE_WAIT3) -PyDoc_STRVAR(os_wait3__doc__, +TyDoc_STRVAR(os_wait3__doc__, "wait3($module, /, options)\n" "--\n" "\n" @@ -5969,7 +5969,7 @@ os_wait3(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(options), }, }; @@ -6009,7 +6009,7 @@ exit: #if defined(HAVE_WAIT4) -PyDoc_STRVAR(os_wait4__doc__, +TyDoc_STRVAR(os_wait4__doc__, "wait4($module, /, pid, options)\n" "--\n" "\n" @@ -6037,7 +6037,7 @@ os_wait4(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pid), &_Ty_ID(options), }, }; @@ -6082,7 +6082,7 @@ exit: #if defined(HAVE_WAITID) -PyDoc_STRVAR(os_waitid__doc__, +TyDoc_STRVAR(os_waitid__doc__, "waitid($module, idtype, id, options, /)\n" "--\n" "\n" @@ -6137,7 +6137,7 @@ exit: #if defined(HAVE_WAITPID) -PyDoc_STRVAR(os_waitpid__doc__, +TyDoc_STRVAR(os_waitpid__doc__, "waitpid($module, pid, options, /)\n" "--\n" "\n" @@ -6182,7 +6182,7 @@ exit: #if !defined(HAVE_WAITPID) && defined(HAVE_CWAIT) -PyDoc_STRVAR(os_waitpid__doc__, +TyDoc_STRVAR(os_waitpid__doc__, "waitpid($module, pid, options, /)\n" "--\n" "\n" @@ -6227,7 +6227,7 @@ exit: #if defined(HAVE_WAIT) -PyDoc_STRVAR(os_wait__doc__, +TyDoc_STRVAR(os_wait__doc__, "wait($module, /)\n" "--\n" "\n" @@ -6252,7 +6252,7 @@ os_wait(TyObject *module, TyObject *Py_UNUSED(ignored)) #if (defined(__linux__) && defined(__NR_pidfd_open) && !(defined(__ANDROID__) && __ANDROID_API__ < 31)) -PyDoc_STRVAR(os_pidfd_open__doc__, +TyDoc_STRVAR(os_pidfd_open__doc__, "pidfd_open($module, /, pid, flags=0)\n" "--\n" "\n" @@ -6280,7 +6280,7 @@ os_pidfd_open(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pid), &_Ty_ID(flags), }, }; @@ -6329,7 +6329,7 @@ exit: #if defined(HAVE_SETNS) -PyDoc_STRVAR(os_setns__doc__, +TyDoc_STRVAR(os_setns__doc__, "setns($module, /, fd, nstype=0)\n" "--\n" "\n" @@ -6359,7 +6359,7 @@ os_setns(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), &_Ty_ID(nstype), }, }; @@ -6409,7 +6409,7 @@ exit: #if defined(HAVE_UNSHARE) -PyDoc_STRVAR(os_unshare__doc__, +TyDoc_STRVAR(os_unshare__doc__, "unshare($module, /, flags)\n" "--\n" "\n" @@ -6437,7 +6437,7 @@ os_unshare(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(flags), }, }; @@ -6477,7 +6477,7 @@ exit: #if (defined(HAVE_READLINK) || defined(MS_WINDOWS)) -PyDoc_STRVAR(os_readlink__doc__, +TyDoc_STRVAR(os_readlink__doc__, "readlink($module, /, path, *, dir_fd=None)\n" "--\n" "\n" @@ -6508,7 +6508,7 @@ os_readlink(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(dir_fd), }, }; @@ -6559,7 +6559,7 @@ exit: #if defined(HAVE_SYMLINK) -PyDoc_STRVAR(os_symlink__doc__, +TyDoc_STRVAR(os_symlink__doc__, "symlink($module, /, src, dst, target_is_directory=False, *, dir_fd=None)\n" "--\n" "\n" @@ -6595,7 +6595,7 @@ os_symlink(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(src), &_Ty_ID(dst), &_Ty_ID(target_is_directory), &_Ty_ID(dir_fd), }, }; @@ -6664,7 +6664,7 @@ exit: #endif /* defined(HAVE_SYMLINK) */ -PyDoc_STRVAR(os_times__doc__, +TyDoc_STRVAR(os_times__doc__, "times($module, /)\n" "--\n" "\n" @@ -6688,7 +6688,7 @@ os_times(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_TIMERFD_CREATE) -PyDoc_STRVAR(os_timerfd_create__doc__, +TyDoc_STRVAR(os_timerfd_create__doc__, "timerfd_create($module, clockid, /, *, flags=0)\n" "--\n" "\n" @@ -6729,7 +6729,7 @@ os_timerfd_create(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(flags), }, }; @@ -6779,7 +6779,7 @@ exit: #if defined(HAVE_TIMERFD_CREATE) -PyDoc_STRVAR(os_timerfd_settime__doc__, +TyDoc_STRVAR(os_timerfd_settime__doc__, "timerfd_settime($module, fd, /, *, flags=0, initial=0.0, interval=0.0)\n" "--\n" "\n" @@ -6814,7 +6814,7 @@ os_timerfd_settime(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(flags), &_Ty_ID(initial), &_Ty_ID(interval), }, }; @@ -6896,7 +6896,7 @@ exit: #if defined(HAVE_TIMERFD_CREATE) -PyDoc_STRVAR(os_timerfd_settime_ns__doc__, +TyDoc_STRVAR(os_timerfd_settime_ns__doc__, "timerfd_settime_ns($module, fd, /, *, flags=0, initial=0, interval=0)\n" "--\n" "\n" @@ -6931,7 +6931,7 @@ os_timerfd_settime_ns(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(flags), &_Ty_ID(initial), &_Ty_ID(interval), }, }; @@ -7001,7 +7001,7 @@ exit: #if defined(HAVE_TIMERFD_CREATE) -PyDoc_STRVAR(os_timerfd_gettime__doc__, +TyDoc_STRVAR(os_timerfd_gettime__doc__, "timerfd_gettime($module, fd, /)\n" "--\n" "\n" @@ -7036,7 +7036,7 @@ exit: #if defined(HAVE_TIMERFD_CREATE) -PyDoc_STRVAR(os_timerfd_gettime_ns__doc__, +TyDoc_STRVAR(os_timerfd_gettime_ns__doc__, "timerfd_gettime_ns($module, fd, /)\n" "--\n" "\n" @@ -7071,7 +7071,7 @@ exit: #if defined(HAVE_GETSID) -PyDoc_STRVAR(os_getsid__doc__, +TyDoc_STRVAR(os_getsid__doc__, "getsid($module, pid, /)\n" "--\n" "\n" @@ -7103,7 +7103,7 @@ exit: #if defined(HAVE_SETSID) -PyDoc_STRVAR(os_setsid__doc__, +TyDoc_STRVAR(os_setsid__doc__, "setsid($module, /)\n" "--\n" "\n" @@ -7125,7 +7125,7 @@ os_setsid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_SETPGID) -PyDoc_STRVAR(os_setpgid__doc__, +TyDoc_STRVAR(os_setpgid__doc__, "setpgid($module, pid, pgrp, /)\n" "--\n" "\n" @@ -7165,7 +7165,7 @@ exit: #if defined(HAVE_TCGETPGRP) -PyDoc_STRVAR(os_tcgetpgrp__doc__, +TyDoc_STRVAR(os_tcgetpgrp__doc__, "tcgetpgrp($module, fd, /)\n" "--\n" "\n" @@ -7197,7 +7197,7 @@ exit: #if defined(HAVE_TCSETPGRP) -PyDoc_STRVAR(os_tcsetpgrp__doc__, +TyDoc_STRVAR(os_tcsetpgrp__doc__, "tcsetpgrp($module, fd, pgid, /)\n" "--\n" "\n" @@ -7235,7 +7235,7 @@ exit: #endif /* defined(HAVE_TCSETPGRP) */ -PyDoc_STRVAR(os_open__doc__, +TyDoc_STRVAR(os_open__doc__, "open($module, /, path, flags, mode=511, *, dir_fd=None)\n" "--\n" "\n" @@ -7265,7 +7265,7 @@ os_open(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(flags), &_Ty_ID(mode), &_Ty_ID(dir_fd), }, }; @@ -7336,7 +7336,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_close__doc__, +TyDoc_STRVAR(os_close__doc__, "close($module, /, fd)\n" "--\n" "\n" @@ -7361,7 +7361,7 @@ os_close(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -7397,7 +7397,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_closerange__doc__, +TyDoc_STRVAR(os_closerange__doc__, "closerange($module, fd_low, fd_high, /)\n" "--\n" "\n" @@ -7433,7 +7433,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_dup__doc__, +TyDoc_STRVAR(os_dup__doc__, "dup($module, fd, /)\n" "--\n" "\n" @@ -7468,7 +7468,7 @@ exit: #if ((defined(HAVE_DUP3) || defined(F_DUPFD) || defined(MS_WINDOWS))) -PyDoc_STRVAR(os_dup2__doc__, +TyDoc_STRVAR(os_dup2__doc__, "dup2($module, /, fd, fd2, inheritable=True)\n" "--\n" "\n" @@ -7493,7 +7493,7 @@ os_dup2(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), &_Ty_ID(fd2), &_Ty_ID(inheritable), }, }; @@ -7553,7 +7553,7 @@ exit: #if defined(HAVE_LOCKF) -PyDoc_STRVAR(os_lockf__doc__, +TyDoc_STRVAR(os_lockf__doc__, "lockf($module, fd, command, length, /)\n" "--\n" "\n" @@ -7602,7 +7602,7 @@ exit: #endif /* defined(HAVE_LOCKF) */ -PyDoc_STRVAR(os_lseek__doc__, +TyDoc_STRVAR(os_lseek__doc__, "lseek($module, fd, position, whence, /)\n" "--\n" "\n" @@ -7659,7 +7659,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_read__doc__, +TyDoc_STRVAR(os_read__doc__, "read($module, fd, length, /)\n" "--\n" "\n" @@ -7703,7 +7703,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_readinto__doc__, +TyDoc_STRVAR(os_readinto__doc__, "readinto($module, fd, buffer, /)\n" "--\n" "\n" @@ -7761,7 +7761,7 @@ exit: #if defined(HAVE_READV) -PyDoc_STRVAR(os_readv__doc__, +TyDoc_STRVAR(os_readv__doc__, "readv($module, fd, buffers, /)\n" "--\n" "\n" @@ -7811,7 +7811,7 @@ exit: #if defined(HAVE_PREAD) -PyDoc_STRVAR(os_pread__doc__, +TyDoc_STRVAR(os_pread__doc__, "pread($module, fd, length, offset, /)\n" "--\n" "\n" @@ -7866,7 +7866,7 @@ exit: #if (defined(HAVE_PREADV) || defined (HAVE_PREADV2)) -PyDoc_STRVAR(os_preadv__doc__, +TyDoc_STRVAR(os_preadv__doc__, "preadv($module, fd, buffers, offset, flags=0, /)\n" "--\n" "\n" @@ -7934,7 +7934,7 @@ exit: #endif /* (defined(HAVE_PREADV) || defined (HAVE_PREADV2)) */ -PyDoc_STRVAR(os_write__doc__, +TyDoc_STRVAR(os_write__doc__, "write($module, fd, data, /)\n" "--\n" "\n" @@ -7981,7 +7981,7 @@ exit: #if defined(HAVE_SENDFILE) && defined(__APPLE__) -PyDoc_STRVAR(os_sendfile__doc__, +TyDoc_STRVAR(os_sendfile__doc__, "sendfile($module, /, out_fd, in_fd, offset, count, headers=(),\n" " trailers=(), flags=0)\n" "--\n" @@ -8009,7 +8009,7 @@ os_sendfile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(out_fd), &_Ty_ID(in_fd), &_Ty_ID(offset), &_Ty_ID(count), &_Ty_ID(headers), &_Ty_ID(trailers), &_Ty_ID(flags), }, }; @@ -8086,7 +8086,7 @@ exit: #if defined(HAVE_SENDFILE) && !defined(__APPLE__) && (defined(__FreeBSD__) || defined(__DragonFly__)) -PyDoc_STRVAR(os_sendfile__doc__, +TyDoc_STRVAR(os_sendfile__doc__, "sendfile($module, /, out_fd, in_fd, offset, count, headers=(),\n" " trailers=(), flags=0)\n" "--\n" @@ -8114,7 +8114,7 @@ os_sendfile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(out_fd), &_Ty_ID(in_fd), &_Ty_ID(offset), &_Ty_ID(count), &_Ty_ID(headers), &_Ty_ID(trailers), &_Ty_ID(flags), }, }; @@ -8200,7 +8200,7 @@ exit: #if defined(HAVE_SENDFILE) && !defined(__APPLE__) && !(defined(__FreeBSD__) || defined(__DragonFly__)) -PyDoc_STRVAR(os_sendfile__doc__, +TyDoc_STRVAR(os_sendfile__doc__, "sendfile($module, /, out_fd, in_fd, offset, count)\n" "--\n" "\n" @@ -8226,7 +8226,7 @@ os_sendfile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(out_fd), &_Ty_ID(in_fd), &_Ty_ID(offset), &_Ty_ID(count), }, }; @@ -8286,7 +8286,7 @@ exit: #if defined(__APPLE__) -PyDoc_STRVAR(os__fcopyfile__doc__, +TyDoc_STRVAR(os__fcopyfile__doc__, "_fcopyfile($module, in_fd, out_fd, flags, /)\n" "--\n" "\n" @@ -8329,7 +8329,7 @@ exit: #endif /* defined(__APPLE__) */ -PyDoc_STRVAR(os_fstat__doc__, +TyDoc_STRVAR(os_fstat__doc__, "fstat($module, /, fd)\n" "--\n" "\n" @@ -8357,7 +8357,7 @@ os_fstat(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -8393,7 +8393,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_isatty__doc__, +TyDoc_STRVAR(os_isatty__doc__, "isatty($module, fd, /)\n" "--\n" "\n" @@ -8431,7 +8431,7 @@ exit: #if defined(HAVE_PIPE) -PyDoc_STRVAR(os_pipe__doc__, +TyDoc_STRVAR(os_pipe__doc__, "pipe($module, /)\n" "--\n" "\n" @@ -8456,7 +8456,7 @@ os_pipe(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_PIPE2) -PyDoc_STRVAR(os_pipe2__doc__, +TyDoc_STRVAR(os_pipe2__doc__, "pipe2($module, flags, /)\n" "--\n" "\n" @@ -8494,7 +8494,7 @@ exit: #if defined(HAVE_WRITEV) -PyDoc_STRVAR(os_writev__doc__, +TyDoc_STRVAR(os_writev__doc__, "writev($module, fd, buffers, /)\n" "--\n" "\n" @@ -8539,7 +8539,7 @@ exit: #if defined(HAVE_PWRITE) -PyDoc_STRVAR(os_pwrite__doc__, +TyDoc_STRVAR(os_pwrite__doc__, "pwrite($module, fd, buffer, offset, /)\n" "--\n" "\n" @@ -8596,7 +8596,7 @@ exit: #if (defined(HAVE_PWRITEV) || defined (HAVE_PWRITEV2)) -PyDoc_STRVAR(os_pwritev__doc__, +TyDoc_STRVAR(os_pwritev__doc__, "pwritev($module, fd, buffers, offset, flags=0, /)\n" "--\n" "\n" @@ -8667,7 +8667,7 @@ exit: #if defined(HAVE_COPY_FILE_RANGE) -PyDoc_STRVAR(os_copy_file_range__doc__, +TyDoc_STRVAR(os_copy_file_range__doc__, "copy_file_range($module, /, src, dst, count, offset_src=None,\n" " offset_dst=None)\n" "--\n" @@ -8708,7 +8708,7 @@ os_copy_file_range(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(src), &_Ty_ID(dst), &_Ty_ID(count), &_Ty_ID(offset_src), &_Ty_ID(offset_dst), }, }; @@ -8780,7 +8780,7 @@ exit: #if ((defined(HAVE_SPLICE) && !defined(_AIX))) -PyDoc_STRVAR(os_splice__doc__, +TyDoc_STRVAR(os_splice__doc__, "splice($module, /, src, dst, count, offset_src=None, offset_dst=None,\n" " flags=0)\n" "--\n" @@ -8825,7 +8825,7 @@ os_splice(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(src), &_Ty_ID(dst), &_Ty_ID(count), &_Ty_ID(offset_src), &_Ty_ID(offset_dst), &_Ty_ID(flags), }, }; @@ -8906,7 +8906,7 @@ exit: #if defined(HAVE_MKFIFO) -PyDoc_STRVAR(os_mkfifo__doc__, +TyDoc_STRVAR(os_mkfifo__doc__, "mkfifo($module, /, path, mode=438, *, dir_fd=None)\n" "--\n" "\n" @@ -8936,7 +8936,7 @@ os_mkfifo(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(mode), &_Ty_ID(dir_fd), }, }; @@ -9001,7 +9001,7 @@ exit: #if (defined(HAVE_MKNOD) && defined(HAVE_MAKEDEV)) -PyDoc_STRVAR(os_mknod__doc__, +TyDoc_STRVAR(os_mknod__doc__, "mknod($module, /, path, mode=384, device=0, *, dir_fd=None)\n" "--\n" "\n" @@ -9039,7 +9039,7 @@ os_mknod(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *kw Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(mode), &_Ty_ID(device), &_Ty_ID(dir_fd), }, }; @@ -9113,7 +9113,7 @@ exit: #if defined(HAVE_DEVICE_MACROS) -PyDoc_STRVAR(os_major__doc__, +TyDoc_STRVAR(os_major__doc__, "major($module, device, /)\n" "--\n" "\n" @@ -9144,7 +9144,7 @@ exit: #if defined(HAVE_DEVICE_MACROS) -PyDoc_STRVAR(os_minor__doc__, +TyDoc_STRVAR(os_minor__doc__, "minor($module, device, /)\n" "--\n" "\n" @@ -9175,7 +9175,7 @@ exit: #if defined(HAVE_DEVICE_MACROS) -PyDoc_STRVAR(os_makedev__doc__, +TyDoc_STRVAR(os_makedev__doc__, "makedev($module, major, minor, /)\n" "--\n" "\n" @@ -9218,7 +9218,7 @@ exit: #if (defined HAVE_FTRUNCATE || defined MS_WINDOWS) -PyDoc_STRVAR(os_ftruncate__doc__, +TyDoc_STRVAR(os_ftruncate__doc__, "ftruncate($module, fd, length, /)\n" "--\n" "\n" @@ -9257,7 +9257,7 @@ exit: #if (defined HAVE_TRUNCATE || defined MS_WINDOWS) -PyDoc_STRVAR(os_truncate__doc__, +TyDoc_STRVAR(os_truncate__doc__, "truncate($module, /, path, length)\n" "--\n" "\n" @@ -9285,7 +9285,7 @@ os_truncate(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(length), }, }; @@ -9331,7 +9331,7 @@ exit: #if (defined(HAVE_POSIX_FALLOCATE) && !defined(POSIX_FADVISE_AIX_BUG) && !defined(__wasi__)) -PyDoc_STRVAR(os_posix_fallocate__doc__, +TyDoc_STRVAR(os_posix_fallocate__doc__, "posix_fallocate($module, fd, offset, length, /)\n" "--\n" "\n" @@ -9378,7 +9378,7 @@ exit: #if (defined(HAVE_POSIX_FADVISE) && !defined(POSIX_FADVISE_AIX_BUG)) -PyDoc_STRVAR(os_posix_fadvise__doc__, +TyDoc_STRVAR(os_posix_fadvise__doc__, "posix_fadvise($module, fd, offset, length, advice, /)\n" "--\n" "\n" @@ -9435,7 +9435,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_putenv__doc__, +TyDoc_STRVAR(os_putenv__doc__, "putenv($module, name, value, /)\n" "--\n" "\n" @@ -9477,7 +9477,7 @@ exit: #if !defined(MS_WINDOWS) -PyDoc_STRVAR(os_putenv__doc__, +TyDoc_STRVAR(os_putenv__doc__, "putenv($module, name, value, /)\n" "--\n" "\n" @@ -9520,7 +9520,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_unsetenv__doc__, +TyDoc_STRVAR(os_unsetenv__doc__, "unsetenv($module, name, /)\n" "--\n" "\n" @@ -9553,7 +9553,7 @@ exit: #if !defined(MS_WINDOWS) -PyDoc_STRVAR(os_unsetenv__doc__, +TyDoc_STRVAR(os_unsetenv__doc__, "unsetenv($module, name, /)\n" "--\n" "\n" @@ -9585,7 +9585,7 @@ exit: #endif /* !defined(MS_WINDOWS) */ -PyDoc_STRVAR(os_strerror__doc__, +TyDoc_STRVAR(os_strerror__doc__, "strerror($module, code, /)\n" "--\n" "\n" @@ -9615,7 +9615,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WCOREDUMP) -PyDoc_STRVAR(os_WCOREDUMP__doc__, +TyDoc_STRVAR(os_WCOREDUMP__doc__, "WCOREDUMP($module, status, /)\n" "--\n" "\n" @@ -9652,7 +9652,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WIFCONTINUED) -PyDoc_STRVAR(os_WIFCONTINUED__doc__, +TyDoc_STRVAR(os_WIFCONTINUED__doc__, "WIFCONTINUED($module, /, status)\n" "--\n" "\n" @@ -9680,7 +9680,7 @@ os_WIFCONTINUED(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -9725,7 +9725,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WIFSTOPPED) -PyDoc_STRVAR(os_WIFSTOPPED__doc__, +TyDoc_STRVAR(os_WIFSTOPPED__doc__, "WIFSTOPPED($module, /, status)\n" "--\n" "\n" @@ -9750,7 +9750,7 @@ os_WIFSTOPPED(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -9795,7 +9795,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WIFSIGNALED) -PyDoc_STRVAR(os_WIFSIGNALED__doc__, +TyDoc_STRVAR(os_WIFSIGNALED__doc__, "WIFSIGNALED($module, /, status)\n" "--\n" "\n" @@ -9820,7 +9820,7 @@ os_WIFSIGNALED(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -9865,7 +9865,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WIFEXITED) -PyDoc_STRVAR(os_WIFEXITED__doc__, +TyDoc_STRVAR(os_WIFEXITED__doc__, "WIFEXITED($module, /, status)\n" "--\n" "\n" @@ -9890,7 +9890,7 @@ os_WIFEXITED(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -9935,7 +9935,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WEXITSTATUS) -PyDoc_STRVAR(os_WEXITSTATUS__doc__, +TyDoc_STRVAR(os_WEXITSTATUS__doc__, "WEXITSTATUS($module, /, status)\n" "--\n" "\n" @@ -9960,7 +9960,7 @@ os_WEXITSTATUS(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -10005,7 +10005,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WTERMSIG) -PyDoc_STRVAR(os_WTERMSIG__doc__, +TyDoc_STRVAR(os_WTERMSIG__doc__, "WTERMSIG($module, /, status)\n" "--\n" "\n" @@ -10030,7 +10030,7 @@ os_WTERMSIG(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -10075,7 +10075,7 @@ exit: #if defined(HAVE_SYS_WAIT_H) && defined(WSTOPSIG) -PyDoc_STRVAR(os_WSTOPSIG__doc__, +TyDoc_STRVAR(os_WSTOPSIG__doc__, "WSTOPSIG($module, /, status)\n" "--\n" "\n" @@ -10100,7 +10100,7 @@ os_WSTOPSIG(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -10145,7 +10145,7 @@ exit: #if (defined(HAVE_FSTATVFS) && defined(HAVE_SYS_STATVFS_H)) -PyDoc_STRVAR(os_fstatvfs__doc__, +TyDoc_STRVAR(os_fstatvfs__doc__, "fstatvfs($module, fd, /)\n" "--\n" "\n" @@ -10179,7 +10179,7 @@ exit: #if (defined(HAVE_STATVFS) && defined(HAVE_SYS_STATVFS_H)) -PyDoc_STRVAR(os_statvfs__doc__, +TyDoc_STRVAR(os_statvfs__doc__, "statvfs($module, /, path)\n" "--\n" "\n" @@ -10208,7 +10208,7 @@ os_statvfs(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -10250,7 +10250,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__getdiskusage__doc__, +TyDoc_STRVAR(os__getdiskusage__doc__, "_getdiskusage($module, /, path)\n" "--\n" "\n" @@ -10275,7 +10275,7 @@ os__getdiskusage(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -10317,7 +10317,7 @@ exit: #if defined(HAVE_FPATHCONF) -PyDoc_STRVAR(os_fpathconf__doc__, +TyDoc_STRVAR(os_fpathconf__doc__, "fpathconf($module, fd, name, /)\n" "--\n" "\n" @@ -10363,7 +10363,7 @@ exit: #if defined(HAVE_PATHCONF) -PyDoc_STRVAR(os_pathconf__doc__, +TyDoc_STRVAR(os_pathconf__doc__, "pathconf($module, /, path, name)\n" "--\n" "\n" @@ -10392,7 +10392,7 @@ os_pathconf(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(name), }, }; @@ -10443,7 +10443,7 @@ exit: #if defined(HAVE_CONFSTR) -PyDoc_STRVAR(os_confstr__doc__, +TyDoc_STRVAR(os_confstr__doc__, "confstr($module, name, /)\n" "--\n" "\n" @@ -10474,7 +10474,7 @@ exit: #if defined(HAVE_SYSCONF) -PyDoc_STRVAR(os_sysconf__doc__, +TyDoc_STRVAR(os_sysconf__doc__, "sysconf($module, name, /)\n" "--\n" "\n" @@ -10508,7 +10508,7 @@ exit: #endif /* defined(HAVE_SYSCONF) */ -PyDoc_STRVAR(os_abort__doc__, +TyDoc_STRVAR(os_abort__doc__, "abort($module, /)\n" "--\n" "\n" @@ -10531,7 +10531,7 @@ os_abort(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_startfile__doc__, +TyDoc_STRVAR(os_startfile__doc__, "startfile($module, /, filepath, operation=,\n" " arguments=, cwd=None, show_cmd=1)\n" "--\n" @@ -10584,7 +10584,7 @@ os_startfile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(filepath), &_Ty_ID(operation), &_Ty_ID(arguments), &_Ty_ID(cwd), &_Ty_ID(show_cmd), }, }; @@ -10679,7 +10679,7 @@ exit: #if defined(HAVE_GETLOADAVG) -PyDoc_STRVAR(os_getloadavg__doc__, +TyDoc_STRVAR(os_getloadavg__doc__, "getloadavg($module, /)\n" "--\n" "\n" @@ -10703,7 +10703,7 @@ os_getloadavg(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_GETLOADAVG) */ -PyDoc_STRVAR(os_device_encoding__doc__, +TyDoc_STRVAR(os_device_encoding__doc__, "device_encoding($module, /, fd)\n" "--\n" "\n" @@ -10731,7 +10731,7 @@ os_device_encoding(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -10769,7 +10769,7 @@ exit: #if defined(HAVE_SETRESUID) -PyDoc_STRVAR(os_setresuid__doc__, +TyDoc_STRVAR(os_setresuid__doc__, "setresuid($module, ruid, euid, suid, /)\n" "--\n" "\n" @@ -10811,7 +10811,7 @@ exit: #if defined(HAVE_SETRESGID) -PyDoc_STRVAR(os_setresgid__doc__, +TyDoc_STRVAR(os_setresgid__doc__, "setresgid($module, rgid, egid, sgid, /)\n" "--\n" "\n" @@ -10853,7 +10853,7 @@ exit: #if defined(HAVE_GETRESUID) -PyDoc_STRVAR(os_getresuid__doc__, +TyDoc_STRVAR(os_getresuid__doc__, "getresuid($module, /)\n" "--\n" "\n" @@ -10875,7 +10875,7 @@ os_getresuid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_GETRESGID) -PyDoc_STRVAR(os_getresgid__doc__, +TyDoc_STRVAR(os_getresgid__doc__, "getresgid($module, /)\n" "--\n" "\n" @@ -10897,7 +10897,7 @@ os_getresgid(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(USE_XATTRS) -PyDoc_STRVAR(os_getxattr__doc__, +TyDoc_STRVAR(os_getxattr__doc__, "getxattr($module, /, path, attribute, *, follow_symlinks=True)\n" "--\n" "\n" @@ -10928,7 +10928,7 @@ os_getxattr(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(attribute), &_Ty_ID(follow_symlinks), }, }; @@ -10986,7 +10986,7 @@ exit: #if defined(USE_XATTRS) -PyDoc_STRVAR(os_setxattr__doc__, +TyDoc_STRVAR(os_setxattr__doc__, "setxattr($module, /, path, attribute, value, flags=0, *,\n" " follow_symlinks=True)\n" "--\n" @@ -11018,7 +11018,7 @@ os_setxattr(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(attribute), &_Ty_ID(value), &_Ty_ID(flags), &_Ty_ID(follow_symlinks), }, }; @@ -11098,7 +11098,7 @@ exit: #if defined(USE_XATTRS) -PyDoc_STRVAR(os_removexattr__doc__, +TyDoc_STRVAR(os_removexattr__doc__, "removexattr($module, /, path, attribute, *, follow_symlinks=True)\n" "--\n" "\n" @@ -11129,7 +11129,7 @@ os_removexattr(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(attribute), &_Ty_ID(follow_symlinks), }, }; @@ -11187,7 +11187,7 @@ exit: #if defined(USE_XATTRS) -PyDoc_STRVAR(os_listxattr__doc__, +TyDoc_STRVAR(os_listxattr__doc__, "listxattr($module, /, path=None, *, follow_symlinks=True)\n" "--\n" "\n" @@ -11218,7 +11218,7 @@ os_listxattr(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), &_Ty_ID(follow_symlinks), }, }; @@ -11277,7 +11277,7 @@ exit: #endif /* defined(USE_XATTRS) */ -PyDoc_STRVAR(os_urandom__doc__, +TyDoc_STRVAR(os_urandom__doc__, "urandom($module, size, /)\n" "--\n" "\n" @@ -11315,7 +11315,7 @@ exit: #if defined(HAVE_MEMFD_CREATE) -PyDoc_STRVAR(os_memfd_create__doc__, +TyDoc_STRVAR(os_memfd_create__doc__, "memfd_create($module, /, name, flags=MFD_CLOEXEC)\n" "--\n" "\n"); @@ -11339,7 +11339,7 @@ os_memfd_create(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(flags), }, }; @@ -11391,7 +11391,7 @@ exit: #if (defined(HAVE_EVENTFD) && defined(EFD_CLOEXEC)) -PyDoc_STRVAR(os_eventfd__doc__, +TyDoc_STRVAR(os_eventfd__doc__, "eventfd($module, /, initval, flags=EFD_CLOEXEC)\n" "--\n" "\n" @@ -11416,7 +11416,7 @@ os_eventfd(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(initval), &_Ty_ID(flags), }, }; @@ -11465,7 +11465,7 @@ exit: #if (defined(HAVE_EVENTFD) && defined(EFD_CLOEXEC)) -PyDoc_STRVAR(os_eventfd_read__doc__, +TyDoc_STRVAR(os_eventfd_read__doc__, "eventfd_read($module, /, fd)\n" "--\n" "\n" @@ -11490,7 +11490,7 @@ os_eventfd_read(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -11530,7 +11530,7 @@ exit: #if (defined(HAVE_EVENTFD) && defined(EFD_CLOEXEC)) -PyDoc_STRVAR(os_eventfd_write__doc__, +TyDoc_STRVAR(os_eventfd_write__doc__, "eventfd_write($module, /, fd, value)\n" "--\n" "\n" @@ -11555,7 +11555,7 @@ os_eventfd_write(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), &_Ty_ID(value), }, }; @@ -11599,7 +11599,7 @@ exit: #if (defined(TERMSIZE_USE_CONIO) || defined(TERMSIZE_USE_IOCTL)) -PyDoc_STRVAR(os_get_terminal_size__doc__, +TyDoc_STRVAR(os_get_terminal_size__doc__, "get_terminal_size($module, fd=, /)\n" "--\n" "\n" @@ -11648,7 +11648,7 @@ exit: #endif /* (defined(TERMSIZE_USE_CONIO) || defined(TERMSIZE_USE_IOCTL)) */ -PyDoc_STRVAR(os_cpu_count__doc__, +TyDoc_STRVAR(os_cpu_count__doc__, "cpu_count($module, /)\n" "--\n" "\n" @@ -11668,7 +11668,7 @@ os_cpu_count(TyObject *module, TyObject *Py_UNUSED(ignored)) return os_cpu_count_impl(module); } -PyDoc_STRVAR(os_get_inheritable__doc__, +TyDoc_STRVAR(os_get_inheritable__doc__, "get_inheritable($module, fd, /)\n" "--\n" "\n" @@ -11701,7 +11701,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_set_inheritable__doc__, +TyDoc_STRVAR(os_set_inheritable__doc__, "set_inheritable($module, fd, inheritable, /)\n" "--\n" "\n" @@ -11739,7 +11739,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_get_handle_inheritable__doc__, +TyDoc_STRVAR(os_get_handle_inheritable__doc__, "get_handle_inheritable($module, handle, /)\n" "--\n" "\n" @@ -11776,7 +11776,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os_set_handle_inheritable__doc__, +TyDoc_STRVAR(os_set_handle_inheritable__doc__, "set_handle_inheritable($module, handle, inheritable, /)\n" "--\n" "\n" @@ -11815,7 +11815,7 @@ exit: #endif /* defined(MS_WINDOWS) */ -PyDoc_STRVAR(os_get_blocking__doc__, +TyDoc_STRVAR(os_get_blocking__doc__, "get_blocking($module, fd, /)\n" "--\n" "\n" @@ -11850,7 +11850,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_set_blocking__doc__, +TyDoc_STRVAR(os_set_blocking__doc__, "set_blocking($module, fd, blocking, /)\n" "--\n" "\n" @@ -11889,7 +11889,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_DirEntry_is_symlink__doc__, +TyDoc_STRVAR(os_DirEntry_is_symlink__doc__, "is_symlink($self, /)\n" "--\n" "\n" @@ -11921,7 +11921,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_DirEntry_is_junction__doc__, +TyDoc_STRVAR(os_DirEntry_is_junction__doc__, "is_junction($self, /)\n" "--\n" "\n" @@ -11949,7 +11949,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_DirEntry_stat__doc__, +TyDoc_STRVAR(os_DirEntry_stat__doc__, "stat($self, /, *, follow_symlinks=True)\n" "--\n" "\n" @@ -11975,7 +11975,7 @@ os_DirEntry_stat(TyObject *self, TyTypeObject *defining_class, TyObject *const * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(follow_symlinks), }, }; @@ -12016,7 +12016,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_DirEntry_is_dir__doc__, +TyDoc_STRVAR(os_DirEntry_is_dir__doc__, "is_dir($self, /, *, follow_symlinks=True)\n" "--\n" "\n" @@ -12042,7 +12042,7 @@ os_DirEntry_is_dir(TyObject *self, TyTypeObject *defining_class, TyObject *const Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(follow_symlinks), }, }; @@ -12088,7 +12088,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_DirEntry_is_file__doc__, +TyDoc_STRVAR(os_DirEntry_is_file__doc__, "is_file($self, /, *, follow_symlinks=True)\n" "--\n" "\n" @@ -12114,7 +12114,7 @@ os_DirEntry_is_file(TyObject *self, TyTypeObject *defining_class, TyObject *cons Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(follow_symlinks), }, }; @@ -12160,7 +12160,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_DirEntry_inode__doc__, +TyDoc_STRVAR(os_DirEntry_inode__doc__, "inode($self, /)\n" "--\n" "\n" @@ -12178,7 +12178,7 @@ os_DirEntry_inode(TyObject *self, TyObject *Py_UNUSED(ignored)) return os_DirEntry_inode_impl((DirEntry *)self); } -PyDoc_STRVAR(os_DirEntry___fspath____doc__, +TyDoc_STRVAR(os_DirEntry___fspath____doc__, "__fspath__($self, /)\n" "--\n" "\n" @@ -12196,7 +12196,7 @@ os_DirEntry___fspath__(TyObject *self, TyObject *Py_UNUSED(ignored)) return os_DirEntry___fspath___impl((DirEntry *)self); } -PyDoc_STRVAR(os_scandir__doc__, +TyDoc_STRVAR(os_scandir__doc__, "scandir($module, /, path=None)\n" "--\n" "\n" @@ -12227,7 +12227,7 @@ os_scandir(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -12270,7 +12270,7 @@ exit: return return_value; } -PyDoc_STRVAR(os_fspath__doc__, +TyDoc_STRVAR(os_fspath__doc__, "fspath($module, /, path)\n" "--\n" "\n" @@ -12299,7 +12299,7 @@ os_fspath(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -12334,7 +12334,7 @@ exit: #if defined(HAVE_GETRANDOM_SYSCALL) -PyDoc_STRVAR(os_getrandom__doc__, +TyDoc_STRVAR(os_getrandom__doc__, "getrandom($module, /, size, flags=0)\n" "--\n" "\n" @@ -12359,7 +12359,7 @@ os_getrandom(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(size), &_Ty_ID(flags), }, }; @@ -12417,7 +12417,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(os__add_dll_directory__doc__, +TyDoc_STRVAR(os__add_dll_directory__doc__, "_add_dll_directory($module, /, path)\n" "--\n" "\n" @@ -12449,7 +12449,7 @@ os__add_dll_directory(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(path), }, }; @@ -12491,7 +12491,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(os__remove_dll_directory__doc__, +TyDoc_STRVAR(os__remove_dll_directory__doc__, "_remove_dll_directory($module, /, cookie)\n" "--\n" "\n" @@ -12520,7 +12520,7 @@ os__remove_dll_directory(TyObject *module, TyObject *const *args, Ty_ssize_t nar Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(cookie), }, }; @@ -12557,7 +12557,7 @@ exit: #if (defined(WIFEXITED) || defined(MS_WINDOWS)) -PyDoc_STRVAR(os_waitstatus_to_exitcode__doc__, +TyDoc_STRVAR(os_waitstatus_to_exitcode__doc__, "waitstatus_to_exitcode($module, /, status)\n" "--\n" "\n" @@ -12594,7 +12594,7 @@ os_waitstatus_to_exitcode(TyObject *module, TyObject *const *args, Ty_ssize_t na Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(status), }, }; @@ -12631,7 +12631,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(os__supports_virtual_terminal__doc__, +TyDoc_STRVAR(os__supports_virtual_terminal__doc__, "_supports_virtual_terminal($module, /)\n" "--\n" "\n" @@ -12651,7 +12651,7 @@ os__supports_virtual_terminal(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(MS_WINDOWS) */ -PyDoc_STRVAR(os__inputhook__doc__, +TyDoc_STRVAR(os__inputhook__doc__, "_inputhook($module, /)\n" "--\n" "\n" @@ -12669,7 +12669,7 @@ os__inputhook(TyObject *module, TyObject *Py_UNUSED(ignored)) return os__inputhook_impl(module); } -PyDoc_STRVAR(os__is_inputhook_installed__doc__, +TyDoc_STRVAR(os__is_inputhook_installed__doc__, "_is_inputhook_installed($module, /)\n" "--\n" "\n" @@ -12687,7 +12687,7 @@ os__is_inputhook_installed(TyObject *module, TyObject *Py_UNUSED(ignored)) return os__is_inputhook_installed_impl(module); } -PyDoc_STRVAR(os__create_environ__doc__, +TyDoc_STRVAR(os__create_environ__doc__, "_create_environ($module, /)\n" "--\n" "\n" @@ -12707,7 +12707,7 @@ os__create_environ(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(__EMSCRIPTEN__) -PyDoc_STRVAR(os__emscripten_debugger__doc__, +TyDoc_STRVAR(os__emscripten_debugger__doc__, "_emscripten_debugger($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/pwdmodule.c.h b/Modules/clinic/pwdmodule.c.h index 3283bb1..b1190cb 100644 --- a/Modules/clinic/pwdmodule.c.h +++ b/Modules/clinic/pwdmodule.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(pwd_getpwuid__doc__, +TyDoc_STRVAR(pwd_getpwuid__doc__, "getpwuid($module, uidobj, /)\n" "--\n" "\n" @@ -13,7 +13,7 @@ PyDoc_STRVAR(pwd_getpwuid__doc__, #define PWD_GETPWUID_METHODDEF \ {"getpwuid", (PyCFunction)pwd_getpwuid, METH_O, pwd_getpwuid__doc__}, -PyDoc_STRVAR(pwd_getpwnam__doc__, +TyDoc_STRVAR(pwd_getpwnam__doc__, "getpwnam($module, name, /)\n" "--\n" "\n" @@ -46,7 +46,7 @@ exit: #if defined(HAVE_GETPWENT) -PyDoc_STRVAR(pwd_getpwall__doc__, +TyDoc_STRVAR(pwd_getpwall__doc__, "getpwall($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/pyexpat.c.h b/Modules/clinic/pyexpat.c.h index 93a09d7..902d9b3 100644 --- a/Modules/clinic/pyexpat.c.h +++ b/Modules/clinic/pyexpat.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(pyexpat_xmlparser_SetReparseDeferralEnabled__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_SetReparseDeferralEnabled__doc__, "SetReparseDeferralEnabled($self, enabled, /)\n" "--\n" "\n" @@ -37,7 +37,7 @@ exit: return return_value; } -PyDoc_STRVAR(pyexpat_xmlparser_GetReparseDeferralEnabled__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_GetReparseDeferralEnabled__doc__, "GetReparseDeferralEnabled($self, /)\n" "--\n" "\n" @@ -55,7 +55,7 @@ pyexpat_xmlparser_GetReparseDeferralEnabled(TyObject *self, TyObject *Py_UNUSED( return pyexpat_xmlparser_GetReparseDeferralEnabled_impl((xmlparseobject *)self); } -PyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__, "Parse($self, data, isfinal=False, /)\n" "--\n" "\n" @@ -111,7 +111,7 @@ exit: return return_value; } -PyDoc_STRVAR(pyexpat_xmlparser_ParseFile__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_ParseFile__doc__, "ParseFile($self, file, /)\n" "--\n" "\n" @@ -156,7 +156,7 @@ exit: return return_value; } -PyDoc_STRVAR(pyexpat_xmlparser_SetBase__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_SetBase__doc__, "SetBase($self, base, /)\n" "--\n" "\n" @@ -193,7 +193,7 @@ exit: return return_value; } -PyDoc_STRVAR(pyexpat_xmlparser_GetBase__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_GetBase__doc__, "GetBase($self, /)\n" "--\n" "\n" @@ -211,7 +211,7 @@ pyexpat_xmlparser_GetBase(TyObject *self, TyObject *Py_UNUSED(ignored)) return pyexpat_xmlparser_GetBase_impl((xmlparseobject *)self); } -PyDoc_STRVAR(pyexpat_xmlparser_GetInputContext__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_GetInputContext__doc__, "GetInputContext($self, /)\n" "--\n" "\n" @@ -232,7 +232,7 @@ pyexpat_xmlparser_GetInputContext(TyObject *self, TyObject *Py_UNUSED(ignored)) return pyexpat_xmlparser_GetInputContext_impl((xmlparseobject *)self); } -PyDoc_STRVAR(pyexpat_xmlparser_ExternalEntityParserCreate__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_ExternalEntityParserCreate__doc__, "ExternalEntityParserCreate($self, context, encoding=,\n" " /)\n" "--\n" @@ -315,7 +315,7 @@ exit: return return_value; } -PyDoc_STRVAR(pyexpat_xmlparser_SetParamEntityParsing__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_SetParamEntityParsing__doc__, "SetParamEntityParsing($self, flag, /)\n" "--\n" "\n" @@ -350,7 +350,7 @@ exit: #if (XML_COMBINED_VERSION >= 19505) -PyDoc_STRVAR(pyexpat_xmlparser_UseForeignDTD__doc__, +TyDoc_STRVAR(pyexpat_xmlparser_UseForeignDTD__doc__, "UseForeignDTD($self, flag=True, /)\n" "--\n" "\n" @@ -408,7 +408,7 @@ exit: #endif /* (XML_COMBINED_VERSION >= 19505) */ -PyDoc_STRVAR(pyexpat_ParserCreate__doc__, +TyDoc_STRVAR(pyexpat_ParserCreate__doc__, "ParserCreate($module, /, encoding=None, namespace_separator=None,\n" " intern=)\n" "--\n" @@ -435,7 +435,7 @@ pyexpat_ParserCreate(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(encoding), &_Ty_ID(namespace_separator), &_Ty_ID(intern), }, }; @@ -521,7 +521,7 @@ exit: return return_value; } -PyDoc_STRVAR(pyexpat_ErrorString__doc__, +TyDoc_STRVAR(pyexpat_ErrorString__doc__, "ErrorString($module, code, /)\n" "--\n" "\n" diff --git a/Modules/clinic/readline.c.h b/Modules/clinic/readline.c.h index 0156ed1..f3af68d 100644 --- a/Modules/clinic/readline.c.h +++ b/Modules/clinic/readline.c.h @@ -5,7 +5,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(readline_parse_and_bind__doc__, +TyDoc_STRVAR(readline_parse_and_bind__doc__, "parse_and_bind($module, string, /)\n" "--\n" "\n" @@ -29,7 +29,7 @@ readline_parse_and_bind(TyObject *module, TyObject *string) return return_value; } -PyDoc_STRVAR(readline_read_init_file__doc__, +TyDoc_STRVAR(readline_read_init_file__doc__, "read_init_file($module, filename=None, /)\n" "--\n" "\n" @@ -65,7 +65,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_read_history_file__doc__, +TyDoc_STRVAR(readline_read_history_file__doc__, "read_history_file($module, filename=None, /)\n" "--\n" "\n" @@ -101,7 +101,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_write_history_file__doc__, +TyDoc_STRVAR(readline_write_history_file__doc__, "write_history_file($module, filename=None, /)\n" "--\n" "\n" @@ -139,7 +139,7 @@ exit: #if defined(HAVE_RL_APPEND_HISTORY) -PyDoc_STRVAR(readline_append_history_file__doc__, +TyDoc_STRVAR(readline_append_history_file__doc__, "append_history_file($module, nelements, filename=None, /)\n" "--\n" "\n" @@ -183,7 +183,7 @@ exit: #endif /* defined(HAVE_RL_APPEND_HISTORY) */ -PyDoc_STRVAR(readline_set_history_length__doc__, +TyDoc_STRVAR(readline_set_history_length__doc__, "set_history_length($module, length, /)\n" "--\n" "\n" @@ -213,7 +213,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_get_history_length__doc__, +TyDoc_STRVAR(readline_get_history_length__doc__, "get_history_length($module, /)\n" "--\n" "\n" @@ -231,7 +231,7 @@ readline_get_history_length(TyObject *module, TyObject *Py_UNUSED(ignored)) return readline_get_history_length_impl(module); } -PyDoc_STRVAR(readline_set_completion_display_matches_hook__doc__, +TyDoc_STRVAR(readline_set_completion_display_matches_hook__doc__, "set_completion_display_matches_hook($module, function=None, /)\n" "--\n" "\n" @@ -270,7 +270,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_set_startup_hook__doc__, +TyDoc_STRVAR(readline_set_startup_hook__doc__, "set_startup_hook($module, function=None, /)\n" "--\n" "\n" @@ -309,7 +309,7 @@ exit: #if defined(HAVE_RL_PRE_INPUT_HOOK) -PyDoc_STRVAR(readline_set_pre_input_hook__doc__, +TyDoc_STRVAR(readline_set_pre_input_hook__doc__, "set_pre_input_hook($module, function=None, /)\n" "--\n" "\n" @@ -349,7 +349,7 @@ exit: #endif /* defined(HAVE_RL_PRE_INPUT_HOOK) */ -PyDoc_STRVAR(readline_get_completion_type__doc__, +TyDoc_STRVAR(readline_get_completion_type__doc__, "get_completion_type($module, /)\n" "--\n" "\n" @@ -367,7 +367,7 @@ readline_get_completion_type(TyObject *module, TyObject *Py_UNUSED(ignored)) return readline_get_completion_type_impl(module); } -PyDoc_STRVAR(readline_get_begidx__doc__, +TyDoc_STRVAR(readline_get_begidx__doc__, "get_begidx($module, /)\n" "--\n" "\n" @@ -385,7 +385,7 @@ readline_get_begidx(TyObject *module, TyObject *Py_UNUSED(ignored)) return readline_get_begidx_impl(module); } -PyDoc_STRVAR(readline_get_endidx__doc__, +TyDoc_STRVAR(readline_get_endidx__doc__, "get_endidx($module, /)\n" "--\n" "\n" @@ -403,7 +403,7 @@ readline_get_endidx(TyObject *module, TyObject *Py_UNUSED(ignored)) return readline_get_endidx_impl(module); } -PyDoc_STRVAR(readline_set_completer_delims__doc__, +TyDoc_STRVAR(readline_set_completer_delims__doc__, "set_completer_delims($module, string, /)\n" "--\n" "\n" @@ -427,7 +427,7 @@ readline_set_completer_delims(TyObject *module, TyObject *string) return return_value; } -PyDoc_STRVAR(readline_remove_history_item__doc__, +TyDoc_STRVAR(readline_remove_history_item__doc__, "remove_history_item($module, pos, /)\n" "--\n" "\n" @@ -457,7 +457,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_replace_history_item__doc__, +TyDoc_STRVAR(readline_replace_history_item__doc__, "replace_history_item($module, pos, line, /)\n" "--\n" "\n" @@ -499,7 +499,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_add_history__doc__, +TyDoc_STRVAR(readline_add_history__doc__, "add_history($module, string, /)\n" "--\n" "\n" @@ -523,7 +523,7 @@ readline_add_history(TyObject *module, TyObject *string) return return_value; } -PyDoc_STRVAR(readline_set_auto_history__doc__, +TyDoc_STRVAR(readline_set_auto_history__doc__, "set_auto_history($module, enabled, /)\n" "--\n" "\n" @@ -552,7 +552,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_get_completer_delims__doc__, +TyDoc_STRVAR(readline_get_completer_delims__doc__, "get_completer_delims($module, /)\n" "--\n" "\n" @@ -576,7 +576,7 @@ readline_get_completer_delims(TyObject *module, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(readline_set_completer__doc__, +TyDoc_STRVAR(readline_set_completer__doc__, "set_completer($module, function=None, /)\n" "--\n" "\n" @@ -614,7 +614,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_get_completer__doc__, +TyDoc_STRVAR(readline_get_completer__doc__, "get_completer($module, /)\n" "--\n" "\n" @@ -632,7 +632,7 @@ readline_get_completer(TyObject *module, TyObject *Py_UNUSED(ignored)) return readline_get_completer_impl(module); } -PyDoc_STRVAR(readline_get_history_item__doc__, +TyDoc_STRVAR(readline_get_history_item__doc__, "get_history_item($module, index, /)\n" "--\n" "\n" @@ -662,7 +662,7 @@ exit: return return_value; } -PyDoc_STRVAR(readline_get_current_history_length__doc__, +TyDoc_STRVAR(readline_get_current_history_length__doc__, "get_current_history_length($module, /)\n" "--\n" "\n" @@ -686,7 +686,7 @@ readline_get_current_history_length(TyObject *module, TyObject *Py_UNUSED(ignore return return_value; } -PyDoc_STRVAR(readline_get_line_buffer__doc__, +TyDoc_STRVAR(readline_get_line_buffer__doc__, "get_line_buffer($module, /)\n" "--\n" "\n" @@ -712,7 +712,7 @@ readline_get_line_buffer(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_RL_COMPLETION_APPEND_CHARACTER) -PyDoc_STRVAR(readline_clear_history__doc__, +TyDoc_STRVAR(readline_clear_history__doc__, "clear_history($module, /)\n" "--\n" "\n" @@ -738,7 +738,7 @@ readline_clear_history(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_RL_COMPLETION_APPEND_CHARACTER) */ -PyDoc_STRVAR(readline_insert_text__doc__, +TyDoc_STRVAR(readline_insert_text__doc__, "insert_text($module, string, /)\n" "--\n" "\n" @@ -762,7 +762,7 @@ readline_insert_text(TyObject *module, TyObject *string) return return_value; } -PyDoc_STRVAR(readline_redisplay__doc__, +TyDoc_STRVAR(readline_redisplay__doc__, "redisplay($module, /)\n" "--\n" "\n" diff --git a/Modules/clinic/resource.c.h b/Modules/clinic/resource.c.h index 9d17a9c..a04d89c 100644 --- a/Modules/clinic/resource.c.h +++ b/Modules/clinic/resource.c.h @@ -4,7 +4,7 @@ preserve #if defined(HAVE_GETRUSAGE) -PyDoc_STRVAR(resource_getrusage__doc__, +TyDoc_STRVAR(resource_getrusage__doc__, "getrusage($module, who, /)\n" "--\n" "\n"); @@ -33,7 +33,7 @@ exit: #endif /* defined(HAVE_GETRUSAGE) */ -PyDoc_STRVAR(resource_getrlimit__doc__, +TyDoc_STRVAR(resource_getrlimit__doc__, "getrlimit($module, resource, /)\n" "--\n" "\n"); @@ -60,7 +60,7 @@ exit: return return_value; } -PyDoc_STRVAR(resource_setrlimit__doc__, +TyDoc_STRVAR(resource_setrlimit__doc__, "setrlimit($module, resource, limits, /)\n" "--\n" "\n"); @@ -95,7 +95,7 @@ exit: #if defined(HAVE_PRLIMIT) -PyDoc_STRVAR(resource_prlimit__doc__, +TyDoc_STRVAR(resource_prlimit__doc__, "prlimit($module, pid, resource, limits=None, /)\n" "--\n" "\n"); @@ -144,7 +144,7 @@ exit: #endif /* defined(HAVE_PRLIMIT) */ -PyDoc_STRVAR(resource_getpagesize__doc__, +TyDoc_STRVAR(resource_getpagesize__doc__, "getpagesize($module, /)\n" "--\n" "\n"); diff --git a/Modules/clinic/selectmodule.c.h b/Modules/clinic/selectmodule.c.h index a5f5664..0561b9a 100644 --- a/Modules/clinic/selectmodule.c.h +++ b/Modules/clinic/selectmodule.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_long.h" // _TyLong_UnsignedShort_Converter() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(select_select__doc__, +TyDoc_STRVAR(select_select__doc__, "select($module, rlist, wlist, xlist, timeout=None, /)\n" "--\n" "\n" @@ -72,7 +72,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) -PyDoc_STRVAR(select_poll_register__doc__, +TyDoc_STRVAR(select_poll_register__doc__, "register($self, fd,\n" " eventmask=select.POLLIN | select.POLLPRI | select.POLLOUT, /)\n" "--\n" @@ -123,7 +123,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) -PyDoc_STRVAR(select_poll_modify__doc__, +TyDoc_STRVAR(select_poll_modify__doc__, "modify($self, fd, eventmask, /)\n" "--\n" "\n" @@ -170,7 +170,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) -PyDoc_STRVAR(select_poll_unregister__doc__, +TyDoc_STRVAR(select_poll_unregister__doc__, "unregister($self, fd, /)\n" "--\n" "\n" @@ -204,7 +204,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) -PyDoc_STRVAR(select_poll_poll__doc__, +TyDoc_STRVAR(select_poll_poll__doc__, "poll($self, timeout=None, /)\n" "--\n" "\n" @@ -249,7 +249,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) && defined(HAVE_SYS_DEVPOLL_H) -PyDoc_STRVAR(select_devpoll_register__doc__, +TyDoc_STRVAR(select_devpoll_register__doc__, "register($self, fd,\n" " eventmask=select.POLLIN | select.POLLPRI | select.POLLOUT, /)\n" "--\n" @@ -302,7 +302,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) && defined(HAVE_SYS_DEVPOLL_H) -PyDoc_STRVAR(select_devpoll_modify__doc__, +TyDoc_STRVAR(select_devpoll_modify__doc__, "modify($self, fd,\n" " eventmask=select.POLLIN | select.POLLPRI | select.POLLOUT, /)\n" "--\n" @@ -355,7 +355,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) && defined(HAVE_SYS_DEVPOLL_H) -PyDoc_STRVAR(select_devpoll_unregister__doc__, +TyDoc_STRVAR(select_devpoll_unregister__doc__, "unregister($self, fd, /)\n" "--\n" "\n" @@ -389,7 +389,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) && defined(HAVE_SYS_DEVPOLL_H) -PyDoc_STRVAR(select_devpoll_poll__doc__, +TyDoc_STRVAR(select_devpoll_poll__doc__, "poll($self, timeout=None, /)\n" "--\n" "\n" @@ -434,7 +434,7 @@ exit: #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) && defined(HAVE_SYS_DEVPOLL_H) -PyDoc_STRVAR(select_devpoll_close__doc__, +TyDoc_STRVAR(select_devpoll_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -464,7 +464,7 @@ select_devpoll_close(TyObject *self, TyObject *Py_UNUSED(ignored)) #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) && defined(HAVE_SYS_DEVPOLL_H) -PyDoc_STRVAR(select_devpoll_fileno__doc__, +TyDoc_STRVAR(select_devpoll_fileno__doc__, "fileno($self, /)\n" "--\n" "\n" @@ -492,7 +492,7 @@ select_devpoll_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) -PyDoc_STRVAR(select_poll__doc__, +TyDoc_STRVAR(select_poll__doc__, "poll($module, /)\n" "--\n" "\n" @@ -517,7 +517,7 @@ select_poll(TyObject *module, TyObject *Py_UNUSED(ignored)) #if (defined(HAVE_POLL) && !defined(HAVE_BROKEN_POLL)) && defined(HAVE_SYS_DEVPOLL_H) -PyDoc_STRVAR(select_devpoll__doc__, +TyDoc_STRVAR(select_devpoll__doc__, "devpoll($module, /)\n" "--\n" "\n" @@ -542,7 +542,7 @@ select_devpoll(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll__doc__, +TyDoc_STRVAR(select_epoll__doc__, "epoll(sizehint=-1, flags=0)\n" "--\n" "\n" @@ -573,7 +573,7 @@ select_epoll(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sizehint), &_Ty_ID(flags), }, }; @@ -630,7 +630,7 @@ exit: #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll_close__doc__, +TyDoc_STRVAR(select_epoll_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -660,7 +660,7 @@ select_epoll_close(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll_fileno__doc__, +TyDoc_STRVAR(select_epoll_fileno__doc__, "fileno($self, /)\n" "--\n" "\n" @@ -682,7 +682,7 @@ select_epoll_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll_fromfd__doc__, +TyDoc_STRVAR(select_epoll_fromfd__doc__, "fromfd($type, fd, /)\n" "--\n" "\n" @@ -714,7 +714,7 @@ exit: #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll_register__doc__, +TyDoc_STRVAR(select_epoll_register__doc__, "register($self, /, fd,\n" " eventmask=select.EPOLLIN | select.EPOLLPRI | select.EPOLLOUT)\n" "--\n" @@ -748,7 +748,7 @@ select_epoll_register(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), &_Ty_ID(eventmask), }, }; @@ -798,7 +798,7 @@ exit: #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll_modify__doc__, +TyDoc_STRVAR(select_epoll_modify__doc__, "modify($self, /, fd, eventmask)\n" "--\n" "\n" @@ -829,7 +829,7 @@ select_epoll_modify(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), &_Ty_ID(eventmask), }, }; @@ -874,7 +874,7 @@ exit: #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll_unregister__doc__, +TyDoc_STRVAR(select_epoll_unregister__doc__, "unregister($self, /, fd)\n" "--\n" "\n" @@ -902,7 +902,7 @@ select_epoll_unregister(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fd), }, }; @@ -942,7 +942,7 @@ exit: #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll_poll__doc__, +TyDoc_STRVAR(select_epoll_poll__doc__, "poll($self, /, timeout=None, maxevents=-1)\n" "--\n" "\n" @@ -977,7 +977,7 @@ select_epoll_poll(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(timeout), &_Ty_ID(maxevents), }, }; @@ -1029,7 +1029,7 @@ exit: #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll___enter____doc__, +TyDoc_STRVAR(select_epoll___enter____doc__, "__enter__($self, /)\n" "--\n" "\n"); @@ -1050,7 +1050,7 @@ select_epoll___enter__(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_EPOLL) -PyDoc_STRVAR(select_epoll___exit____doc__, +TyDoc_STRVAR(select_epoll___exit____doc__, "__exit__($self, exc_type=None, exc_value=None, exc_tb=None, /)\n" "--\n" "\n"); @@ -1096,7 +1096,7 @@ exit: #if defined(HAVE_KQUEUE) -PyDoc_STRVAR(select_kqueue__doc__, +TyDoc_STRVAR(select_kqueue__doc__, "kqueue()\n" "--\n" "\n" @@ -1141,7 +1141,7 @@ exit: #if defined(HAVE_KQUEUE) -PyDoc_STRVAR(select_kqueue_close__doc__, +TyDoc_STRVAR(select_kqueue_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -1171,7 +1171,7 @@ select_kqueue_close(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_KQUEUE) -PyDoc_STRVAR(select_kqueue_fileno__doc__, +TyDoc_STRVAR(select_kqueue_fileno__doc__, "fileno($self, /)\n" "--\n" "\n" @@ -1193,7 +1193,7 @@ select_kqueue_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_KQUEUE) -PyDoc_STRVAR(select_kqueue_fromfd__doc__, +TyDoc_STRVAR(select_kqueue_fromfd__doc__, "fromfd($type, fd, /)\n" "--\n" "\n" @@ -1225,7 +1225,7 @@ exit: #if defined(HAVE_KQUEUE) -PyDoc_STRVAR(select_kqueue_control__doc__, +TyDoc_STRVAR(select_kqueue_control__doc__, "control($self, changelist, maxevents, timeout=None, /)\n" "--\n" "\n" diff --git a/Modules/clinic/sha1module.c.h b/Modules/clinic/sha1module.c.h index 9da7bf3..de877b5 100644 --- a/Modules/clinic/sha1module.c.h +++ b/Modules/clinic/sha1module.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(SHA1Type_copy__doc__, +TyDoc_STRVAR(SHA1Type_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -30,7 +30,7 @@ SHA1Type_copy(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssize return SHA1Type_copy_impl((SHA1object *)self, cls); } -PyDoc_STRVAR(SHA1Type_digest__doc__, +TyDoc_STRVAR(SHA1Type_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -48,7 +48,7 @@ SHA1Type_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return SHA1Type_digest_impl((SHA1object *)self); } -PyDoc_STRVAR(SHA1Type_hexdigest__doc__, +TyDoc_STRVAR(SHA1Type_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -66,7 +66,7 @@ SHA1Type_hexdigest(TyObject *self, TyObject *Py_UNUSED(ignored)) return SHA1Type_hexdigest_impl((SHA1object *)self); } -PyDoc_STRVAR(SHA1Type_update__doc__, +TyDoc_STRVAR(SHA1Type_update__doc__, "update($self, obj, /)\n" "--\n" "\n" @@ -88,7 +88,7 @@ SHA1Type_update(TyObject *self, TyObject *obj) return return_value; } -PyDoc_STRVAR(_sha1_sha1__doc__, +TyDoc_STRVAR(_sha1_sha1__doc__, "sha1($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -114,7 +114,7 @@ _sha1_sha1(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; diff --git a/Modules/clinic/sha2module.c.h b/Modules/clinic/sha2module.c.h index 27ffb4c..d85ac63 100644 --- a/Modules/clinic/sha2module.c.h +++ b/Modules/clinic/sha2module.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(SHA256Type_copy__doc__, +TyDoc_STRVAR(SHA256Type_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -30,7 +30,7 @@ SHA256Type_copy(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssi return SHA256Type_copy_impl((SHA256object *)self, cls); } -PyDoc_STRVAR(SHA512Type_copy__doc__, +TyDoc_STRVAR(SHA512Type_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -52,7 +52,7 @@ SHA512Type_copy(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ssi return SHA512Type_copy_impl((SHA512object *)self, cls); } -PyDoc_STRVAR(SHA256Type_digest__doc__, +TyDoc_STRVAR(SHA256Type_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -70,7 +70,7 @@ SHA256Type_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return SHA256Type_digest_impl((SHA256object *)self); } -PyDoc_STRVAR(SHA512Type_digest__doc__, +TyDoc_STRVAR(SHA512Type_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -88,7 +88,7 @@ SHA512Type_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return SHA512Type_digest_impl((SHA512object *)self); } -PyDoc_STRVAR(SHA256Type_hexdigest__doc__, +TyDoc_STRVAR(SHA256Type_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -106,7 +106,7 @@ SHA256Type_hexdigest(TyObject *self, TyObject *Py_UNUSED(ignored)) return SHA256Type_hexdigest_impl((SHA256object *)self); } -PyDoc_STRVAR(SHA512Type_hexdigest__doc__, +TyDoc_STRVAR(SHA512Type_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -124,7 +124,7 @@ SHA512Type_hexdigest(TyObject *self, TyObject *Py_UNUSED(ignored)) return SHA512Type_hexdigest_impl((SHA512object *)self); } -PyDoc_STRVAR(SHA256Type_update__doc__, +TyDoc_STRVAR(SHA256Type_update__doc__, "update($self, obj, /)\n" "--\n" "\n" @@ -146,7 +146,7 @@ SHA256Type_update(TyObject *self, TyObject *obj) return return_value; } -PyDoc_STRVAR(SHA512Type_update__doc__, +TyDoc_STRVAR(SHA512Type_update__doc__, "update($self, obj, /)\n" "--\n" "\n" @@ -168,7 +168,7 @@ SHA512Type_update(TyObject *self, TyObject *obj) return return_value; } -PyDoc_STRVAR(_sha2_sha256__doc__, +TyDoc_STRVAR(_sha2_sha256__doc__, "sha256($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -194,7 +194,7 @@ _sha2_sha256(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -253,7 +253,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sha2_sha224__doc__, +TyDoc_STRVAR(_sha2_sha224__doc__, "sha224($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -279,7 +279,7 @@ _sha2_sha224(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -338,7 +338,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sha2_sha512__doc__, +TyDoc_STRVAR(_sha2_sha512__doc__, "sha512($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -364,7 +364,7 @@ _sha2_sha512(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -423,7 +423,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sha2_sha384__doc__, +TyDoc_STRVAR(_sha2_sha384__doc__, "sha384($module, /, data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -449,7 +449,7 @@ _sha2_sha384(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; diff --git a/Modules/clinic/sha3module.c.h b/Modules/clinic/sha3module.c.h index 3fc4f6a..c7a0ba7 100644 --- a/Modules/clinic/sha3module.c.h +++ b/Modules/clinic/sha3module.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_long.h" // _TyLong_UnsignedLong_Converter() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(py_sha3_new__doc__, +TyDoc_STRVAR(py_sha3_new__doc__, "sha3_224(data=b\'\', *, usedforsecurity=True, string=None)\n" "--\n" "\n" @@ -32,7 +32,7 @@ py_sha3_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(usedforsecurity), &_Ty_ID(string), }, }; @@ -93,7 +93,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sha3_sha3_224_copy__doc__, +TyDoc_STRVAR(_sha3_sha3_224_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -111,7 +111,7 @@ _sha3_sha3_224_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return _sha3_sha3_224_copy_impl((SHA3object *)self); } -PyDoc_STRVAR(_sha3_sha3_224_digest__doc__, +TyDoc_STRVAR(_sha3_sha3_224_digest__doc__, "digest($self, /)\n" "--\n" "\n" @@ -129,7 +129,7 @@ _sha3_sha3_224_digest(TyObject *self, TyObject *Py_UNUSED(ignored)) return _sha3_sha3_224_digest_impl((SHA3object *)self); } -PyDoc_STRVAR(_sha3_sha3_224_hexdigest__doc__, +TyDoc_STRVAR(_sha3_sha3_224_hexdigest__doc__, "hexdigest($self, /)\n" "--\n" "\n" @@ -147,7 +147,7 @@ _sha3_sha3_224_hexdigest(TyObject *self, TyObject *Py_UNUSED(ignored)) return _sha3_sha3_224_hexdigest_impl((SHA3object *)self); } -PyDoc_STRVAR(_sha3_sha3_224_update__doc__, +TyDoc_STRVAR(_sha3_sha3_224_update__doc__, "update($self, data, /)\n" "--\n" "\n" @@ -169,7 +169,7 @@ _sha3_sha3_224_update(TyObject *self, TyObject *data) return return_value; } -PyDoc_STRVAR(_sha3_shake_128_digest__doc__, +TyDoc_STRVAR(_sha3_shake_128_digest__doc__, "digest($self, /, length)\n" "--\n" "\n" @@ -194,7 +194,7 @@ _sha3_shake_128_digest(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(length), }, }; @@ -229,7 +229,7 @@ exit: return return_value; } -PyDoc_STRVAR(_sha3_shake_128_hexdigest__doc__, +TyDoc_STRVAR(_sha3_shake_128_hexdigest__doc__, "hexdigest($self, /, length)\n" "--\n" "\n" @@ -254,7 +254,7 @@ _sha3_shake_128_hexdigest(TyObject *self, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(length), }, }; diff --git a/Modules/clinic/signalmodule.c.h b/Modules/clinic/signalmodule.c.h index 07a0ab6..796d21a 100644 --- a/Modules/clinic/signalmodule.c.h +++ b/Modules/clinic/signalmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(signal_default_int_handler__doc__, +TyDoc_STRVAR(signal_default_int_handler__doc__, "default_int_handler($module, signalnum, frame, /)\n" "--\n" "\n" @@ -46,7 +46,7 @@ exit: #if defined(HAVE_ALARM) -PyDoc_STRVAR(signal_alarm__doc__, +TyDoc_STRVAR(signal_alarm__doc__, "alarm($module, seconds, /)\n" "--\n" "\n" @@ -83,7 +83,7 @@ exit: #if defined(HAVE_PAUSE) -PyDoc_STRVAR(signal_pause__doc__, +TyDoc_STRVAR(signal_pause__doc__, "pause($module, /)\n" "--\n" "\n" @@ -103,7 +103,7 @@ signal_pause(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_PAUSE) */ -PyDoc_STRVAR(signal_raise_signal__doc__, +TyDoc_STRVAR(signal_raise_signal__doc__, "raise_signal($module, signalnum, /)\n" "--\n" "\n" @@ -131,7 +131,7 @@ exit: return return_value; } -PyDoc_STRVAR(signal_signal__doc__, +TyDoc_STRVAR(signal_signal__doc__, "signal($module, signalnum, handler, /)\n" "--\n" "\n" @@ -171,7 +171,7 @@ exit: return return_value; } -PyDoc_STRVAR(signal_getsignal__doc__, +TyDoc_STRVAR(signal_getsignal__doc__, "getsignal($module, signalnum, /)\n" "--\n" "\n" @@ -205,7 +205,7 @@ exit: return return_value; } -PyDoc_STRVAR(signal_strsignal__doc__, +TyDoc_STRVAR(signal_strsignal__doc__, "strsignal($module, signalnum, /)\n" "--\n" "\n" @@ -239,7 +239,7 @@ exit: #if defined(HAVE_SIGINTERRUPT) -PyDoc_STRVAR(signal_siginterrupt__doc__, +TyDoc_STRVAR(signal_siginterrupt__doc__, "siginterrupt($module, signalnum, flag, /)\n" "--\n" "\n" @@ -280,7 +280,7 @@ exit: #endif /* defined(HAVE_SIGINTERRUPT) */ -PyDoc_STRVAR(signal_set_wakeup_fd__doc__, +TyDoc_STRVAR(signal_set_wakeup_fd__doc__, "set_wakeup_fd($module, fd, /, *, warn_on_full_buffer=True)\n" "--\n" "\n" @@ -311,7 +311,7 @@ signal_set_wakeup_fd(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(warn_on_full_buffer), }, }; @@ -356,7 +356,7 @@ exit: #if defined(HAVE_SETITIMER) -PyDoc_STRVAR(signal_setitimer__doc__, +TyDoc_STRVAR(signal_setitimer__doc__, "setitimer($module, which, seconds, interval=0.0, /)\n" "--\n" "\n" @@ -405,7 +405,7 @@ exit: #if defined(HAVE_GETITIMER) -PyDoc_STRVAR(signal_getitimer__doc__, +TyDoc_STRVAR(signal_getitimer__doc__, "getitimer($module, which, /)\n" "--\n" "\n" @@ -437,7 +437,7 @@ exit: #if defined(HAVE_SIGSET_T) && defined(PYPTHREAD_SIGMASK) -PyDoc_STRVAR(signal_pthread_sigmask__doc__, +TyDoc_STRVAR(signal_pthread_sigmask__doc__, "pthread_sigmask($module, how, mask, /)\n" "--\n" "\n" @@ -476,7 +476,7 @@ exit: #if defined(HAVE_SIGSET_T) && defined(HAVE_SIGPENDING) -PyDoc_STRVAR(signal_sigpending__doc__, +TyDoc_STRVAR(signal_sigpending__doc__, "sigpending($module, /)\n" "--\n" "\n" @@ -501,7 +501,7 @@ signal_sigpending(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_SIGSET_T) && defined(HAVE_SIGWAIT) -PyDoc_STRVAR(signal_sigwait__doc__, +TyDoc_STRVAR(signal_sigwait__doc__, "sigwait($module, sigset, /)\n" "--\n" "\n" @@ -536,7 +536,7 @@ exit: #if ((defined(HAVE_SIGFILLSET) && defined(HAVE_SIGSET_T)) || defined(MS_WINDOWS)) -PyDoc_STRVAR(signal_valid_signals__doc__, +TyDoc_STRVAR(signal_valid_signals__doc__, "valid_signals($module, /)\n" "--\n" "\n" @@ -561,7 +561,7 @@ signal_valid_signals(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(HAVE_SIGSET_T) && defined(HAVE_SIGWAITINFO) -PyDoc_STRVAR(signal_sigwaitinfo__doc__, +TyDoc_STRVAR(signal_sigwaitinfo__doc__, "sigwaitinfo($module, sigset, /)\n" "--\n" "\n" @@ -594,7 +594,7 @@ exit: #if defined(HAVE_SIGSET_T) && defined(HAVE_SIGTIMEDWAIT) -PyDoc_STRVAR(signal_sigtimedwait__doc__, +TyDoc_STRVAR(signal_sigtimedwait__doc__, "sigtimedwait($module, sigset, timeout, /)\n" "--\n" "\n" @@ -633,7 +633,7 @@ exit: #if defined(HAVE_PTHREAD_KILL) -PyDoc_STRVAR(signal_pthread_kill__doc__, +TyDoc_STRVAR(signal_pthread_kill__doc__, "pthread_kill($module, thread_id, signalnum, /)\n" "--\n" "\n" @@ -675,7 +675,7 @@ exit: #if (defined(__linux__) && defined(__NR_pidfd_send_signal) && !(defined(__ANDROID__) && __ANDROID_API__ < 31)) -PyDoc_STRVAR(signal_pidfd_send_signal__doc__, +TyDoc_STRVAR(signal_pidfd_send_signal__doc__, "pidfd_send_signal($module, pidfd, signalnum, siginfo=None, flags=0, /)\n" "--\n" "\n" diff --git a/Modules/clinic/socketmodule.c.h b/Modules/clinic/socketmodule.c.h index 54d705d..d923e82 100644 --- a/Modules/clinic/socketmodule.c.h +++ b/Modules/clinic/socketmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_long.h" // _TyLong_UInt16_Converter() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_socket_socket_close__doc__, +TyDoc_STRVAR(_socket_socket_close__doc__, "close($self, /)\n" "--\n" "\n" @@ -46,7 +46,7 @@ sock_initobj(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(family), &_Ty_ID(type), &_Ty_ID(proto), &_Ty_ID(fileno), }, }; @@ -116,7 +116,7 @@ exit: return return_value; } -PyDoc_STRVAR(_socket_ntohs__doc__, +TyDoc_STRVAR(_socket_ntohs__doc__, "ntohs($module, integer, /)\n" "--\n" "\n" @@ -143,7 +143,7 @@ exit: return return_value; } -PyDoc_STRVAR(_socket_ntohl__doc__, +TyDoc_STRVAR(_socket_ntohl__doc__, "ntohl($module, integer, /)\n" "--\n" "\n" @@ -170,7 +170,7 @@ exit: return return_value; } -PyDoc_STRVAR(_socket_htons__doc__, +TyDoc_STRVAR(_socket_htons__doc__, "htons($module, integer, /)\n" "--\n" "\n" @@ -197,7 +197,7 @@ exit: return return_value; } -PyDoc_STRVAR(_socket_htonl__doc__, +TyDoc_STRVAR(_socket_htonl__doc__, "htonl($module, integer, /)\n" "--\n" "\n" @@ -224,7 +224,7 @@ exit: return return_value; } -PyDoc_STRVAR(_socket_inet_aton__doc__, +TyDoc_STRVAR(_socket_inet_aton__doc__, "inet_aton($module, ip_addr, /)\n" "--\n" "\n" @@ -263,7 +263,7 @@ exit: #if defined(HAVE_INET_NTOA) -PyDoc_STRVAR(_socket_inet_ntoa__doc__, +TyDoc_STRVAR(_socket_inet_ntoa__doc__, "inet_ntoa($module, packed_ip, /)\n" "--\n" "\n" @@ -299,7 +299,7 @@ exit: #if (defined(HAVE_IF_NAMEINDEX) || defined(MS_WINDOWS)) -PyDoc_STRVAR(_socket_if_nametoindex__doc__, +TyDoc_STRVAR(_socket_if_nametoindex__doc__, "if_nametoindex($module, oname, /)\n" "--\n" "\n" @@ -330,7 +330,7 @@ exit: #if (defined(HAVE_IF_NAMEINDEX) || defined(MS_WINDOWS)) -PyDoc_STRVAR(_socket_if_indextoname__doc__, +TyDoc_STRVAR(_socket_if_indextoname__doc__, "if_indextoname($module, if_index, /)\n" "--\n" "\n" diff --git a/Modules/clinic/symtablemodule.c.h b/Modules/clinic/symtablemodule.c.h index d9ca39a..c77fc9f 100644 --- a/Modules/clinic/symtablemodule.c.h +++ b/Modules/clinic/symtablemodule.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_symtable_symtable__doc__, +TyDoc_STRVAR(_symtable_symtable__doc__, "symtable($module, source, filename, startstr, /)\n" "--\n" "\n" diff --git a/Modules/clinic/syslogmodule.c.h b/Modules/clinic/syslogmodule.c.h index 10b24b4..23fffb1 100644 --- a/Modules/clinic/syslogmodule.c.h +++ b/Modules/clinic/syslogmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(syslog_openlog__doc__, +TyDoc_STRVAR(syslog_openlog__doc__, "openlog($module, /, ident=, logoption=0,\n" " facility=LOG_USER)\n" "--\n" @@ -36,7 +36,7 @@ syslog_openlog(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(ident), &_Ty_ID(logoption), &_Ty_ID(facility), }, }; @@ -100,7 +100,7 @@ exit: return return_value; } -PyDoc_STRVAR(syslog_syslog__doc__, +TyDoc_STRVAR(syslog_syslog__doc__, "syslog([priority=LOG_INFO,] message)\n" "Send the string message to the system logger."); @@ -143,7 +143,7 @@ exit: return return_value; } -PyDoc_STRVAR(syslog_closelog__doc__, +TyDoc_STRVAR(syslog_closelog__doc__, "closelog($module, /)\n" "--\n" "\n" @@ -167,7 +167,7 @@ syslog_closelog(TyObject *module, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(syslog_setlogmask__doc__, +TyDoc_STRVAR(syslog_setlogmask__doc__, "setlogmask($module, maskpri, /)\n" "--\n" "\n" @@ -200,7 +200,7 @@ exit: return return_value; } -PyDoc_STRVAR(syslog_LOG_MASK__doc__, +TyDoc_STRVAR(syslog_LOG_MASK__doc__, "LOG_MASK($module, pri, /)\n" "--\n" "\n" @@ -233,7 +233,7 @@ exit: return return_value; } -PyDoc_STRVAR(syslog_LOG_UPTO__doc__, +TyDoc_STRVAR(syslog_LOG_UPTO__doc__, "LOG_UPTO($module, pri, /)\n" "--\n" "\n" diff --git a/Modules/clinic/termios.c.h b/Modules/clinic/termios.c.h index 2507650..825af45 100644 --- a/Modules/clinic/termios.c.h +++ b/Modules/clinic/termios.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(termios_tcgetattr__doc__, +TyDoc_STRVAR(termios_tcgetattr__doc__, "tcgetattr($module, fd, /)\n" "--\n" "\n" @@ -37,7 +37,7 @@ exit: return return_value; } -PyDoc_STRVAR(termios_tcsetattr__doc__, +TyDoc_STRVAR(termios_tcsetattr__doc__, "tcsetattr($module, fd, when, attributes, /)\n" "--\n" "\n" @@ -83,7 +83,7 @@ exit: return return_value; } -PyDoc_STRVAR(termios_tcsendbreak__doc__, +TyDoc_STRVAR(termios_tcsendbreak__doc__, "tcsendbreak($module, fd, duration, /)\n" "--\n" "\n" @@ -123,7 +123,7 @@ exit: return return_value; } -PyDoc_STRVAR(termios_tcdrain__doc__, +TyDoc_STRVAR(termios_tcdrain__doc__, "tcdrain($module, fd, /)\n" "--\n" "\n" @@ -151,7 +151,7 @@ exit: return return_value; } -PyDoc_STRVAR(termios_tcflush__doc__, +TyDoc_STRVAR(termios_tcflush__doc__, "tcflush($module, fd, queue, /)\n" "--\n" "\n" @@ -192,7 +192,7 @@ exit: return return_value; } -PyDoc_STRVAR(termios_tcflow__doc__, +TyDoc_STRVAR(termios_tcflow__doc__, "tcflow($module, fd, action, /)\n" "--\n" "\n" @@ -233,7 +233,7 @@ exit: return return_value; } -PyDoc_STRVAR(termios_tcgetwinsize__doc__, +TyDoc_STRVAR(termios_tcgetwinsize__doc__, "tcgetwinsize($module, fd, /)\n" "--\n" "\n" @@ -263,7 +263,7 @@ exit: return return_value; } -PyDoc_STRVAR(termios_tcsetwinsize__doc__, +TyDoc_STRVAR(termios_tcsetwinsize__doc__, "tcsetwinsize($module, fd, winsize, /)\n" "--\n" "\n" diff --git a/Modules/clinic/timemodule.c.h b/Modules/clinic/timemodule.c.h index b7adcaf..e981e45 100644 --- a/Modules/clinic/timemodule.c.h +++ b/Modules/clinic/timemodule.c.h @@ -4,7 +4,7 @@ preserve #if defined(HAVE_CLOCK_GETTIME) -PyDoc_STRVAR(time_clock_gettime__doc__, +TyDoc_STRVAR(time_clock_gettime__doc__, "clock_gettime($module, clk_id, /)\n" "--\n" "\n" @@ -35,7 +35,7 @@ exit: #if defined(HAVE_CLOCK_GETTIME) -PyDoc_STRVAR(time_clock_gettime_ns__doc__, +TyDoc_STRVAR(time_clock_gettime_ns__doc__, "clock_gettime_ns($module, clk_id, /)\n" "--\n" "\n" diff --git a/Modules/clinic/unicodedata.c.h b/Modules/clinic/unicodedata.c.h index 7bb06a3..8c5a3ab 100644 --- a/Modules/clinic/unicodedata.c.h +++ b/Modules/clinic/unicodedata.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(unicodedata_UCD_decimal__doc__, +TyDoc_STRVAR(unicodedata_UCD_decimal__doc__, "decimal($self, chr, default=, /)\n" "--\n" "\n" @@ -54,7 +54,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_digit__doc__, +TyDoc_STRVAR(unicodedata_UCD_digit__doc__, "digit($self, chr, default=, /)\n" "--\n" "\n" @@ -103,7 +103,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_numeric__doc__, +TyDoc_STRVAR(unicodedata_UCD_numeric__doc__, "numeric($self, chr, default=, /)\n" "--\n" "\n" @@ -153,7 +153,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_category__doc__, +TyDoc_STRVAR(unicodedata_UCD_category__doc__, "category($self, chr, /)\n" "--\n" "\n" @@ -189,7 +189,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_bidirectional__doc__, +TyDoc_STRVAR(unicodedata_UCD_bidirectional__doc__, "bidirectional($self, chr, /)\n" "--\n" "\n" @@ -227,7 +227,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_combining__doc__, +TyDoc_STRVAR(unicodedata_UCD_combining__doc__, "combining($self, chr, /)\n" "--\n" "\n" @@ -270,7 +270,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_mirrored__doc__, +TyDoc_STRVAR(unicodedata_UCD_mirrored__doc__, "mirrored($self, chr, /)\n" "--\n" "\n" @@ -314,7 +314,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_east_asian_width__doc__, +TyDoc_STRVAR(unicodedata_UCD_east_asian_width__doc__, "east_asian_width($self, chr, /)\n" "--\n" "\n" @@ -350,7 +350,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_decomposition__doc__, +TyDoc_STRVAR(unicodedata_UCD_decomposition__doc__, "decomposition($self, chr, /)\n" "--\n" "\n" @@ -388,7 +388,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_is_normalized__doc__, +TyDoc_STRVAR(unicodedata_UCD_is_normalized__doc__, "is_normalized($self, form, unistr, /)\n" "--\n" "\n" @@ -429,7 +429,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_normalize__doc__, +TyDoc_STRVAR(unicodedata_UCD_normalize__doc__, "normalize($self, form, unistr, /)\n" "--\n" "\n" @@ -470,7 +470,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_name__doc__, +TyDoc_STRVAR(unicodedata_UCD_name__doc__, "name($self, chr, default=, /)\n" "--\n" "\n" @@ -518,7 +518,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicodedata_UCD_lookup__doc__, +TyDoc_STRVAR(unicodedata_UCD_lookup__doc__, "lookup($self, name, /)\n" "--\n" "\n" diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index 69d7724..f90087c 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(zlib_compress__doc__, +TyDoc_STRVAR(zlib_compress__doc__, "compress($module, data, /, level=Z_DEFAULT_COMPRESSION, wbits=MAX_WBITS)\n" "--\n" "\n" @@ -41,7 +41,7 @@ zlib_compress(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(level), &_Ty_ID(wbits), }, }; @@ -101,7 +101,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_decompress__doc__, +TyDoc_STRVAR(zlib_decompress__doc__, "decompress($module, data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)\n" "--\n" "\n" @@ -134,7 +134,7 @@ zlib_decompress(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(wbits), &_Ty_ID(bufsize), }, }; @@ -202,7 +202,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_compressobj__doc__, +TyDoc_STRVAR(zlib_compressobj__doc__, "compressobj($module, /, level=Z_DEFAULT_COMPRESSION, method=DEFLATED,\n" " wbits=MAX_WBITS, memLevel=DEF_MEM_LEVEL,\n" " strategy=Z_DEFAULT_STRATEGY, zdict=None)\n" @@ -252,7 +252,7 @@ zlib_compressobj(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(level), &_Ty_ID(method), &_Ty_ID(wbits), &_Ty_ID(memLevel), &_Ty_ID(strategy), &_Ty_ID(zdict), }, }; @@ -347,7 +347,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_decompressobj__doc__, +TyDoc_STRVAR(zlib_decompressobj__doc__, "decompressobj($module, /, wbits=MAX_WBITS, zdict=b\'\')\n" "--\n" "\n" @@ -378,7 +378,7 @@ zlib_decompressobj(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(wbits), &_Ty_ID(zdict), }, }; @@ -426,7 +426,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_Compress_compress__doc__, +TyDoc_STRVAR(zlib_Compress_compress__doc__, "compress($self, data, /)\n" "--\n" "\n" @@ -485,7 +485,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_Decompress_decompress__doc__, +TyDoc_STRVAR(zlib_Decompress_decompress__doc__, "decompress($self, data, /, max_length=0)\n" "--\n" "\n" @@ -522,7 +522,7 @@ zlib_Decompress_decompress(TyObject *self, TyTypeObject *cls, TyObject *const *a Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(max_length), }, }; @@ -580,7 +580,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_Compress_flush__doc__, +TyDoc_STRVAR(zlib_Compress_flush__doc__, "flush($self, mode=zlib.Z_FINISH, /)\n" "--\n" "\n" @@ -639,7 +639,7 @@ exit: #if defined(HAVE_ZLIB_COPY) -PyDoc_STRVAR(zlib_Compress_copy__doc__, +TyDoc_STRVAR(zlib_Compress_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -665,7 +665,7 @@ zlib_Compress_copy(TyObject *self, TyTypeObject *cls, TyObject *const *args, Ty_ #if defined(HAVE_ZLIB_COPY) -PyDoc_STRVAR(zlib_Compress___copy____doc__, +TyDoc_STRVAR(zlib_Compress___copy____doc__, "__copy__($self, /)\n" "--\n" "\n"); @@ -690,7 +690,7 @@ zlib_Compress___copy__(TyObject *self, TyTypeObject *cls, TyObject *const *args, #if defined(HAVE_ZLIB_COPY) -PyDoc_STRVAR(zlib_Compress___deepcopy____doc__, +TyDoc_STRVAR(zlib_Compress___deepcopy____doc__, "__deepcopy__($self, memo, /)\n" "--\n" "\n"); @@ -738,7 +738,7 @@ exit: #if defined(HAVE_ZLIB_COPY) -PyDoc_STRVAR(zlib_Decompress_copy__doc__, +TyDoc_STRVAR(zlib_Decompress_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -764,7 +764,7 @@ zlib_Decompress_copy(TyObject *self, TyTypeObject *cls, TyObject *const *args, T #if defined(HAVE_ZLIB_COPY) -PyDoc_STRVAR(zlib_Decompress___copy____doc__, +TyDoc_STRVAR(zlib_Decompress___copy____doc__, "__copy__($self, /)\n" "--\n" "\n"); @@ -789,7 +789,7 @@ zlib_Decompress___copy__(TyObject *self, TyTypeObject *cls, TyObject *const *arg #if defined(HAVE_ZLIB_COPY) -PyDoc_STRVAR(zlib_Decompress___deepcopy____doc__, +TyDoc_STRVAR(zlib_Decompress___deepcopy____doc__, "__deepcopy__($self, memo, /)\n" "--\n" "\n"); @@ -835,7 +835,7 @@ exit: #endif /* defined(HAVE_ZLIB_COPY) */ -PyDoc_STRVAR(zlib_Decompress_flush__doc__, +TyDoc_STRVAR(zlib_Decompress_flush__doc__, "flush($self, length=zlib.DEF_BUF_SIZE, /)\n" "--\n" "\n" @@ -898,7 +898,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_ZlibDecompressor_decompress__doc__, +TyDoc_STRVAR(zlib_ZlibDecompressor_decompress__doc__, "decompress($self, /, data, max_length=-1)\n" "--\n" "\n" @@ -937,7 +937,7 @@ zlib_ZlibDecompressor_decompress(TyObject *self, TyObject *const *args, Ty_ssize Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(data), &_Ty_ID(max_length), }, }; @@ -995,7 +995,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_adler32__doc__, +TyDoc_STRVAR(zlib_adler32__doc__, "adler32($module, data, value=1, /)\n" "--\n" "\n" @@ -1044,7 +1044,7 @@ exit: return return_value; } -PyDoc_STRVAR(zlib_crc32__doc__, +TyDoc_STRVAR(zlib_crc32__doc__, "crc32($module, data, value=0, /)\n" "--\n" "\n" diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c index 9d5695e..dd1a65f 100644 --- a/Modules/cmathmodule.c +++ b/Modules/cmathmodule.c @@ -1140,7 +1140,7 @@ cmath_isclose_impl(TyObject *module, Ty_complex a, Ty_complex b, (diff <= abs_tol)); } -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides access to mathematical functions for complex\n" "numbers."); diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c index e655b13..e7183b7 100644 --- a/Modules/errnomodule.c +++ b/Modules/errnomodule.c @@ -958,7 +958,7 @@ static PyModuleDef_Slot errno_slots[] = { {0, NULL} }; -PyDoc_STRVAR(errno__doc__, +TyDoc_STRVAR(errno__doc__, "This module makes available standard errno system symbols.\n\ \n\ The value of each symbol is the corresponding integer value,\n\ diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 348c2e0..b4fd3ea 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -179,7 +179,7 @@ get_thread_state(void) static void faulthandler_dump_traceback(int fd, int all_threads, - PyInterpreterState *interp) + TyInterpreterState *interp) { static volatile int reentrant = 0; @@ -258,7 +258,7 @@ faulthandler_dump_traceback_py(TyObject *self, } if (all_threads) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* gh-128400: Accessing other thread states while they're running * isn't safe if those threads are running. */ _TyEval_StopTheWorld(interp); @@ -643,7 +643,7 @@ faulthandler_is_enabled(TyObject *self, TyObject *Py_UNUSED(ignored)) static void faulthandler_thread(void *unused) { - PyLockStatus st; + TyLockStatus st; const char* errmsg; int ok; #if defined(HAVE_PTHREAD_SIGMASK) && !defined(HAVE_BROKEN_PTHREAD_SIGMASK) @@ -655,10 +655,10 @@ faulthandler_thread(void *unused) #endif do { - st = PyThread_acquire_lock_timed(thread.cancel_event, + st = TyThread_acquire_lock_timed(thread.cancel_event, thread.timeout_us, 0); if (st == PY_LOCK_ACQUIRED) { - PyThread_release_lock(thread.cancel_event); + TyThread_release_lock(thread.cancel_event); break; } /* Timeout => dump traceback */ @@ -674,7 +674,7 @@ faulthandler_thread(void *unused) } while (ok && thread.repeat); /* The only way out */ - PyThread_release_lock(thread.running); + TyThread_release_lock(thread.running); } static void @@ -686,14 +686,14 @@ cancel_dump_traceback_later(void) } /* Notify cancellation */ - PyThread_release_lock(thread.cancel_event); + TyThread_release_lock(thread.cancel_event); /* Wait for thread to join */ - PyThread_acquire_lock(thread.running, 1); - PyThread_release_lock(thread.running); + TyThread_acquire_lock(thread.running, 1); + TyThread_release_lock(thread.running); /* The main thread should always hold the cancel_event lock */ - PyThread_acquire_lock(thread.cancel_event, 1); + TyThread_acquire_lock(thread.cancel_event, 1); Ty_CLEAR(thread.file); if (thread.header) { @@ -705,7 +705,7 @@ cancel_dump_traceback_later(void) #define SEC_TO_US (1000 * 1000) static char* -format_timeout(PyTime_t us) +format_timeout(TyTime_t us) { unsigned long sec, min, hour; char buffer[100]; @@ -738,7 +738,7 @@ faulthandler_dump_traceback_later(TyObject *self, { static char *kwlist[] = {"timeout", "repeat", "file", "exit", NULL}; TyObject *timeout_obj; - PyTime_t timeout, timeout_us; + TyTime_t timeout, timeout_us; int repeat = 0; TyObject *file = NULL; int fd; @@ -779,14 +779,14 @@ faulthandler_dump_traceback_later(TyObject *self, } if (!thread.running) { - thread.running = PyThread_allocate_lock(); + thread.running = TyThread_allocate_lock(); if (!thread.running) { Ty_XDECREF(file); return TyErr_NoMemory(); } } if (!thread.cancel_event) { - thread.cancel_event = PyThread_allocate_lock(); + thread.cancel_event = TyThread_allocate_lock(); if (!thread.cancel_event || !thread.running) { Ty_XDECREF(file); return TyErr_NoMemory(); @@ -794,7 +794,7 @@ faulthandler_dump_traceback_later(TyObject *self, /* cancel_event starts to be acquired: it's only released to cancel the thread. */ - PyThread_acquire_lock(thread.cancel_event, 1); + TyThread_acquire_lock(thread.cancel_event, 1); } /* format the timeout */ @@ -819,10 +819,10 @@ faulthandler_dump_traceback_later(TyObject *self, thread.header_len = header_len; /* Arm these locks to serve as events when released */ - PyThread_acquire_lock(thread.running, 1); + TyThread_acquire_lock(thread.running, 1); - if (PyThread_start_new_thread(faulthandler_thread, NULL) == PYTHREAD_INVALID_THREAD_ID) { - PyThread_release_lock(thread.running); + if (TyThread_start_new_thread(faulthandler_thread, NULL) == PYTHREAD_INVALID_THREAD_ID) { + TyThread_release_lock(thread.running); Ty_CLEAR(thread.file); TyMem_Free(header); thread.header = NULL; @@ -1134,28 +1134,28 @@ static TyObject * faulthandler_fatal_error_c_thread(TyObject *self, TyObject *args) { long tid; - PyThread_type_lock lock; + TyThread_type_lock lock; faulthandler_suppress_crash_report(); - lock = PyThread_allocate_lock(); + lock = TyThread_allocate_lock(); if (lock == NULL) return TyErr_NoMemory(); - PyThread_acquire_lock(lock, WAIT_LOCK); + TyThread_acquire_lock(lock, WAIT_LOCK); - tid = PyThread_start_new_thread(faulthandler_fatal_error_thread, lock); + tid = TyThread_start_new_thread(faulthandler_fatal_error_thread, lock); if (tid == -1) { - PyThread_free_lock(lock); + TyThread_free_lock(lock); TyErr_SetString(TyExc_RuntimeError, "unable to start the thread"); return NULL; } /* wait until the thread completes: it will never occur, since Ty_FatalError() exits the process immediately. */ - PyThread_acquire_lock(lock, WAIT_LOCK); - PyThread_release_lock(lock); - PyThread_free_lock(lock); + TyThread_acquire_lock(lock, WAIT_LOCK); + TyThread_release_lock(lock); + TyThread_free_lock(lock); Py_RETURN_NONE; } @@ -1272,76 +1272,76 @@ faulthandler_raise_exception(TyObject *self, TyObject *args) } #endif -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "faulthandler module."); static TyMethodDef module_methods[] = { {"enable", _PyCFunction_CAST(faulthandler_py_enable), METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("enable($module, /, file=sys.stderr, all_threads=True)\n--\n\n" + TyDoc_STR("enable($module, /, file=sys.stderr, all_threads=True)\n--\n\n" "Enable the fault handler.")}, {"disable", faulthandler_disable_py, METH_NOARGS, - PyDoc_STR("disable($module, /)\n--\n\n" + TyDoc_STR("disable($module, /)\n--\n\n" "Disable the fault handler.")}, {"is_enabled", faulthandler_is_enabled, METH_NOARGS, - PyDoc_STR("is_enabled($module, /)\n--\n\n" + TyDoc_STR("is_enabled($module, /)\n--\n\n" "Check if the handler is enabled.")}, {"dump_traceback", _PyCFunction_CAST(faulthandler_dump_traceback_py), METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("dump_traceback($module, /, file=sys.stderr, all_threads=True)\n--\n\n" + TyDoc_STR("dump_traceback($module, /, file=sys.stderr, all_threads=True)\n--\n\n" "Dump the traceback of the current thread, or of all threads " "if all_threads is True, into file.")}, {"dump_c_stack", _PyCFunction_CAST(faulthandler_dump_c_stack_py), METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("dump_c_stack($module, /, file=sys.stderr)\n--\n\n" + TyDoc_STR("dump_c_stack($module, /, file=sys.stderr)\n--\n\n" "Dump the C stack of the current thread.")}, {"dump_traceback_later", _PyCFunction_CAST(faulthandler_dump_traceback_later), METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("dump_traceback_later($module, /, timeout, repeat=False, file=sys.stderr, exit=False)\n--\n\n" + TyDoc_STR("dump_traceback_later($module, /, timeout, repeat=False, file=sys.stderr, exit=False)\n--\n\n" "Dump the traceback of all threads in timeout seconds,\n" "or each timeout seconds if repeat is True. If exit is True, " "call _exit(1) which is not safe.")}, {"cancel_dump_traceback_later", faulthandler_cancel_dump_traceback_later_py, METH_NOARGS, - PyDoc_STR("cancel_dump_traceback_later($module, /)\n--\n\n" + TyDoc_STR("cancel_dump_traceback_later($module, /)\n--\n\n" "Cancel the previous call to dump_traceback_later().")}, #ifdef FAULTHANDLER_USER {"register", _PyCFunction_CAST(faulthandler_register_py), METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("register($module, /, signum, file=sys.stderr, all_threads=True, chain=False)\n--\n\n" + TyDoc_STR("register($module, /, signum, file=sys.stderr, all_threads=True, chain=False)\n--\n\n" "Register a handler for the signal 'signum': dump the " "traceback of the current thread, or of all threads if " "all_threads is True, into file.")}, {"unregister", _PyCFunction_CAST(faulthandler_unregister_py), METH_VARARGS, - PyDoc_STR("unregister($module, signum, /)\n--\n\n" + TyDoc_STR("unregister($module, signum, /)\n--\n\n" "Unregister the handler of the signal " "'signum' registered by register().")}, #endif {"_read_null", faulthandler_read_null, METH_NOARGS, - PyDoc_STR("_read_null($module, /)\n--\n\n" + TyDoc_STR("_read_null($module, /)\n--\n\n" "Read from NULL, raise " "a SIGSEGV or SIGBUS signal depending on the platform.")}, {"_sigsegv", faulthandler_sigsegv, METH_VARARGS, - PyDoc_STR("_sigsegv($module, release_gil=False, /)\n--\n\n" + TyDoc_STR("_sigsegv($module, release_gil=False, /)\n--\n\n" "Raise a SIGSEGV signal.")}, {"_fatal_error_c_thread", faulthandler_fatal_error_c_thread, METH_NOARGS, - PyDoc_STR("_fatal_error_c_thread($module, /)\n--\n\n" + TyDoc_STR("_fatal_error_c_thread($module, /)\n--\n\n" "Call Ty_FatalError() in a new C thread.")}, {"_sigabrt", faulthandler_sigabrt, METH_NOARGS, - PyDoc_STR("_sigabrt($module, /)\n--\n\n" + TyDoc_STR("_sigabrt($module, /)\n--\n\n" "Raise a SIGABRT signal.")}, {"_sigfpe", faulthandler_sigfpe, METH_NOARGS, - PyDoc_STR("_sigfpe($module, /)\n--\n\n" + TyDoc_STR("_sigfpe($module, /)\n--\n\n" "Raise a SIGFPE signal.")}, #ifdef FAULTHANDLER_STACK_OVERFLOW {"_stack_overflow", faulthandler_stack_overflow, METH_NOARGS, - PyDoc_STR("_stack_overflow($module, /)\n--\n\n" + TyDoc_STR("_stack_overflow($module, /)\n--\n\n" "Recursive call to raise a stack overflow.")}, #endif #ifdef MS_WINDOWS {"_raise_exception", faulthandler_raise_exception, METH_VARARGS, - PyDoc_STR("_raise_exception($module, code, flags=0, /)\n--\n\n" + TyDoc_STR("_raise_exception($module, code, flags=0, /)\n--\n\n" "Call RaiseException(code, flags).")}, #endif {NULL, NULL} /* sentinel */ @@ -1456,12 +1456,12 @@ void _PyFaulthandler_Fini(void) /* later */ if (thread.cancel_event) { cancel_dump_traceback_later(); - PyThread_release_lock(thread.cancel_event); - PyThread_free_lock(thread.cancel_event); + TyThread_release_lock(thread.cancel_event); + TyThread_free_lock(thread.cancel_event); thread.cancel_event = NULL; } if (thread.running) { - PyThread_free_lock(thread.running); + TyThread_free_lock(thread.running); thread.running = NULL; } diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c index 7a03112..a854883 100644 --- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -462,7 +462,7 @@ static TyMethodDef fcntl_methods[] = { }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module performs file control and I/O control on file\n\ descriptors. It is an interface to the fcntl() and ioctl() Unix\n\ routines. File descriptors can be obtained with the fileno() method of\n\ diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index c40fd7e..0908c27 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -15,7 +15,7 @@ typedef struct _gc_runtime_state GCState; static GCState * get_gc_state(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return &interp->gc; } @@ -229,7 +229,7 @@ gc_get_referrers_impl(TyObject *module, TyObject *objs) return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return _TyGC_GetReferrers(interp, objs); } @@ -276,7 +276,7 @@ gc_get_referents_impl(TyObject *module, TyObject *objs) if (TySys_Audit("gc.get_referents", "(O)", objs) < 0) { return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *result = TyList_New(0); if (result == NULL) { @@ -327,7 +327,7 @@ gc_get_objects_impl(TyObject *module, Ty_ssize_t generation) return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return _TyGC_GetObjects(interp, (int)generation); } @@ -427,7 +427,7 @@ static TyObject * gc_freeze_impl(TyObject *module) /*[clinic end generated code: output=502159d9cdc4c139 input=b602b16ac5febbe5]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyGC_Freeze(interp); Py_RETURN_NONE; } @@ -444,7 +444,7 @@ static TyObject * gc_unfreeze_impl(TyObject *module) /*[clinic end generated code: output=1c15f2043b25e169 input=2dd52b170f4cef6c]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyGC_Unfreeze(interp); Py_RETURN_NONE; } @@ -459,12 +459,12 @@ static Ty_ssize_t gc_get_freeze_count_impl(TyObject *module) /*[clinic end generated code: output=61cbd9f43aa032e1 input=45ffbc65cfe2a6ed]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return _TyGC_GetFreezeCount(interp); } -PyDoc_STRVAR(gc__doc__, +TyDoc_STRVAR(gc__doc__, "This module provides access to the garbage collector for reference cycles.\n" "\n" "enable() -- Enable automatic garbage collection.\n" diff --git a/Modules/grpmodule.c b/Modules/grpmodule.c index 39d7185..4768dba 100644 --- a/Modules/grpmodule.c +++ b/Modules/grpmodule.c @@ -19,7 +19,7 @@ module grp [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=cade63f2ed1bd9f8]*/ -static PyStructSequence_Field struct_group_type_fields[] = { +static TyStructSequence_Field struct_group_type_fields[] = { {"gr_name", "group name"}, {"gr_passwd", "password"}, {"gr_gid", "group id"}, @@ -27,13 +27,13 @@ static PyStructSequence_Field struct_group_type_fields[] = { {0} }; -PyDoc_STRVAR(struct_group__doc__, +TyDoc_STRVAR(struct_group__doc__, "grp.struct_group: Results from getgr*() routines.\n\n\ This object may be accessed either as a tuple of\n\ (gr_name,gr_passwd,gr_gid,gr_mem)\n\ or via the object attributes as named in the above tuple.\n"); -static PyStructSequence_Desc struct_group_type_desc = { +static TyStructSequence_Desc struct_group_type_desc = { "grp.struct_group", struct_group__doc__, struct_group_type_fields, @@ -69,7 +69,7 @@ mkgrent(TyObject *module, struct group *p) TyObject *v, *w; char **member; - v = PyStructSequence_New(get_grp_state(module)->StructGrpType); + v = TyStructSequence_New(get_grp_state(module)->StructGrpType); if (v == NULL) return NULL; @@ -94,7 +94,7 @@ mkgrent(TyObject *module, struct group *p) Ty_DECREF(x); } -#define SET(i,val) PyStructSequence_SetItem(v, i, val) +#define SET(i,val) TyStructSequence_SetItem(v, i, val) SET(setIndex++, TyUnicode_DecodeFSDefault(p->gr_name)); if (p->gr_passwd) SET(setIndex++, TyUnicode_DecodeFSDefault(p->gr_passwd)); @@ -338,7 +338,7 @@ static TyMethodDef grp_methods[] = { {NULL, NULL} }; -PyDoc_STRVAR(grp__doc__, +TyDoc_STRVAR(grp__doc__, "Access to the Unix group database.\n\ \n\ Group entries are reported as 4-tuples containing the following fields\n\ @@ -359,7 +359,7 @@ grpmodule_exec(TyObject *module) { grpmodulestate *state = get_grp_state(module); - state->StructGrpType = PyStructSequence_NewType(&struct_group_type_desc); + state->StructGrpType = TyStructSequence_NewType(&struct_group_type_desc); if (state->StructGrpType == NULL) { return -1; } diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 7d67bc2..95fc0f3 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -962,7 +962,7 @@ tee_copy(TyObject *op, TyObject *Py_UNUSED(ignored)) return (TyObject *)tee_copy_impl(to); } -PyDoc_STRVAR(teecopy_doc, "Returns an independent iterator."); +TyDoc_STRVAR(teecopy_doc, "Returns an independent iterator."); static TyObject * tee_fromiterable(itertools_state *state, TyObject *iterable) @@ -1647,7 +1647,7 @@ empty: return NULL; } -PyDoc_STRVAR(islice_doc, +TyDoc_STRVAR(islice_doc, "islice(iterable, stop) --> islice object\n\ islice(iterable, start, stop[, step]) --> islice object\n\ \n\ @@ -1914,7 +1914,7 @@ chain_next(TyObject *op) return NULL; } -PyDoc_STRVAR(chain_doc, +TyDoc_STRVAR(chain_doc, "chain(*iterables)\n\ --\n\ \n\ @@ -1925,7 +1925,7 @@ iterable, until all of the iterables are exhausted."); static TyMethodDef chain_methods[] = { ITERTOOLS_CHAIN_FROM_ITERABLE_METHODDEF {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -2068,7 +2068,7 @@ product_sizeof(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromSize_t(res); } -PyDoc_STRVAR(sizeof_doc, "Returns size in memory, in bytes."); +TyDoc_STRVAR(sizeof_doc, "Returns size in memory, in bytes."); static int product_traverse(TyObject *op, visitproc visit, void *arg) @@ -2172,7 +2172,7 @@ static TyMethodDef product_methods[] = { {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(product_doc, +TyDoc_STRVAR(product_doc, "product(*iterables, repeat=1)\n\ --\n\ \n\ @@ -3663,14 +3663,14 @@ repeat_len(TyObject *op, TyObject *Py_UNUSED(args)) return TyLong_FromSize_t(ro->cnt); } -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyMethodDef repeat_methods[] = { {"__length_hint__", repeat_len, METH_NOARGS, length_hint_doc}, {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(repeat_doc, +TyDoc_STRVAR(repeat_doc, "repeat(object [,times]) -> create an iterator which returns the object\n\ for the specified number of times. If not specified, returns the object\n\ endlessly."); @@ -3875,7 +3875,7 @@ zip_longest_next(TyObject *op) return result; } -PyDoc_STRVAR(zip_longest_doc, +TyDoc_STRVAR(zip_longest_doc, "zip_longest(*iterables, fillvalue=None)\n\ --\n\ \n\ @@ -3910,7 +3910,7 @@ static TyType_Spec ziplongest_spec = { /* module level code ********************************************************/ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "Functional tools for creating and using iterators.\n\ \n\ Infinite iterators:\n\ diff --git a/Modules/main.c b/Modules/main.c index 14d7516..46ee776 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -157,7 +157,7 @@ error: static int -pymain_sys_path_add_path0(PyInterpreterState *interp, TyObject *path0) +pymain_sys_path_add_path0(TyInterpreterState *interp, TyObject *path0) { TyObject *sys_path; TyObject *sysdict = interp->sysdict; @@ -613,7 +613,7 @@ static void pymain_run_python(int *exitcode) { TyObject *main_importer_path = NULL; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* pymain_run_stdin() modify the config */ PyConfig *config = (PyConfig*)_TyInterpreterState_GetConfig(interp); diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 27f747c..fb83539 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -1050,31 +1050,31 @@ math_2(TyObject *const *args, Ty_ssize_t nargs, static TyObject * math_##funcname(TyObject *self, TyObject *args) { \ return math_1(args, func, can_overflow, NULL); \ }\ - PyDoc_STRVAR(math_##funcname##_doc, docstring); + TyDoc_STRVAR(math_##funcname##_doc, docstring); #define FUNC1D(funcname, func, can_overflow, docstring, err_msg) \ static TyObject * math_##funcname(TyObject *self, TyObject *args) { \ return math_1(args, func, can_overflow, err_msg); \ }\ - PyDoc_STRVAR(math_##funcname##_doc, docstring); + TyDoc_STRVAR(math_##funcname##_doc, docstring); #define FUNC1A(funcname, func, docstring) \ static TyObject * math_##funcname(TyObject *self, TyObject *args) { \ return math_1a(args, func, NULL); \ }\ - PyDoc_STRVAR(math_##funcname##_doc, docstring); + TyDoc_STRVAR(math_##funcname##_doc, docstring); #define FUNC1AD(funcname, func, docstring, err_msg) \ static TyObject * math_##funcname(TyObject *self, TyObject *args) { \ return math_1a(args, func, err_msg); \ }\ - PyDoc_STRVAR(math_##funcname##_doc, docstring); + TyDoc_STRVAR(math_##funcname##_doc, docstring); #define FUNC2(funcname, func, docstring) \ static TyObject * math_##funcname(TyObject *self, TyObject *const *args, Ty_ssize_t nargs) { \ return math_2(args, nargs, func, #funcname); \ }\ - PyDoc_STRVAR(math_##funcname##_doc, docstring); + TyDoc_STRVAR(math_##funcname##_doc, docstring); FUNC1D(acos, acos, 0, "acos($module, x, /)\n--\n\n" @@ -2298,7 +2298,7 @@ math_log(TyObject *module, TyObject * const *args, Ty_ssize_t nargs) return ans; } -PyDoc_STRVAR(math_log_doc, +TyDoc_STRVAR(math_log_doc, "log(x, [base=math.e])\n\ Return the logarithm of x to the given base.\n\n\ If the base is not specified, returns the natural logarithm (base e) of x."); @@ -4181,7 +4181,7 @@ static PyModuleDef_Slot math_slots[] = { {0, NULL} }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides access to the mathematical functions\n" "defined by the C standard."); diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 79ed09a..edaca84 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1451,7 +1451,7 @@ mmap_ass_subscript(TyObject *op, TyObject *item, TyObject *value) static TyObject * new_mmap_object(TyTypeObject *type, TyObject *args, TyObject *kwdict); -PyDoc_STRVAR(mmap_doc, +TyDoc_STRVAR(mmap_doc, "Windows: mmap(fileno, length[, tagname[, access[, offset]]])\n\ \n\ Maps length bytes from the file specified by the file handle fileno,\n\ diff --git a/Modules/overlapped.c b/Modules/overlapped.c index c613ce1..6894e0d 100644 --- a/Modules/overlapped.c +++ b/Modules/overlapped.c @@ -237,10 +237,10 @@ _overlapped_CreateIoCompletionPort_impl(TyObject *module, HANDLE FileHandle, { HANDLE ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = CreateIoCompletionPort(FileHandle, ExistingCompletionPort, CompletionKey, NumberOfConcurrentThreads); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (ret == NULL) return SetFromWindowsErr(0); @@ -271,10 +271,10 @@ _overlapped_GetQueuedCompletionStatus_impl(TyObject *module, DWORD err; BOOL ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = GetQueuedCompletionStatus(CompletionPort, &NumberOfBytes, &CompletionKey, &Overlapped, Milliseconds); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS err = ret ? ERROR_SUCCESS : GetLastError(); if (Overlapped == NULL) { @@ -309,10 +309,10 @@ _overlapped_PostQueuedCompletionStatus_impl(TyObject *module, { BOOL ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = PostQueuedCompletionStatus(CompletionPort, NumberOfBytes, CompletionKey, Overlapped); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!ret) return SetFromWindowsErr(0); @@ -397,9 +397,9 @@ _overlapped_UnregisterWait_impl(TyObject *module, HANDLE WaitHandle) { BOOL ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = UnregisterWait(WaitHandle); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!ret) return SetFromWindowsErr(0); @@ -423,9 +423,9 @@ _overlapped_UnregisterWaitEx_impl(TyObject *module, HANDLE WaitHandle, { BOOL ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = UnregisterWaitEx(WaitHandle, Event); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!ret) return SetFromWindowsErr(0); @@ -463,9 +463,9 @@ _overlapped_CreateEvent_impl(TyObject *module, TyObject *EventAttributes, return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS Event = CreateEventW(NULL, ManualReset, InitialState, Name); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (Event == NULL) return SetFromWindowsErr(0); @@ -487,9 +487,9 @@ _overlapped_SetEvent_impl(TyObject *module, HANDLE Handle) { BOOL ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = SetEvent(Handle); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!ret) return SetFromWindowsErr(0); @@ -511,9 +511,9 @@ _overlapped_ResetEvent_impl(TyObject *module, HANDLE Handle) { BOOL ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = ResetEvent(Handle); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!ret) return SetFromWindowsErr(0); @@ -749,13 +749,13 @@ Overlapped_dealloc(TyObject *op) // NOTE: Waiting when IOCP is in use can hang indefinitely, but this // CancelIoEx is superfluous in that self.cancel() was already called, // so I've only ever seen this return FALSE with GLE=ERROR_NOT_FOUND - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (CancelIoEx(self->handle, &self->overlapped)) wait = TRUE; ret = GetOverlappedResult(self->handle, &self->overlapped, &bytes, wait); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS switch (ret ? ERROR_SUCCESS : GetLastError()) { case ERROR_SUCCESS: @@ -865,9 +865,9 @@ _overlapped_Overlapped_cancel_impl(OverlappedObject *self) Py_RETURN_NONE; if (!HasOverlappedIoCompleted(&self->overlapped)) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = CancelIoEx(self->handle, &self->overlapped); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } /* CancelIoEx returns ERROR_NOT_FOUND if the I/O completed in-between */ @@ -907,10 +907,10 @@ _overlapped_Overlapped_getresult_impl(OverlappedObject *self, BOOL wait) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = GetOverlappedResult(self->handle, &self->overlapped, &transferred, wait); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : GetLastError(); switch (err) { @@ -1013,10 +1013,10 @@ do_ReadFile(OverlappedObject *self, HANDLE handle, int ret; DWORD err; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = ReadFile(handle, bufstart, buflen, &nread, &self->overlapped); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : GetLastError(); switch (err) { @@ -1116,10 +1116,10 @@ do_WSARecv(OverlappedObject *self, HANDLE handle, wsabuf.buf = bufstart; wsabuf.len = buflen; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = WSARecv((SOCKET)handle, &wsabuf, 1, &nread, &flags, &self->overlapped, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = (ret < 0 ? WSAGetLastError() : ERROR_SUCCESS); switch (err) { @@ -1246,11 +1246,11 @@ _overlapped_Overlapped_WriteFile_impl(OverlappedObject *self, HANDLE handle, self->type = TYPE_WRITE; self->handle = handle; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = WriteFile(handle, self->user_buffer.buf, (DWORD)self->user_buffer.len, &written, &self->overlapped); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : GetLastError(); switch (err) { @@ -1302,10 +1302,10 @@ _overlapped_Overlapped_WSASend_impl(OverlappedObject *self, HANDLE handle, wsabuf.len = (DWORD)self->user_buffer.len; wsabuf.buf = self->user_buffer.buf; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = WSASend((SOCKET)handle, &wsabuf, 1, &written, flags, &self->overlapped, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = (ret < 0 ? WSAGetLastError() : ERROR_SUCCESS); switch (err) { @@ -1354,11 +1354,11 @@ _overlapped_Overlapped_AcceptEx_impl(OverlappedObject *self, self->handle = ListenSocket; self->allocated_buffer = buf; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = Py_AcceptEx((SOCKET)ListenSocket, (SOCKET)AcceptSocket, TyBytes_AS_STRING(buf), 0, size, size, &BytesReceived, &self->overlapped); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : WSAGetLastError(); switch (err) { @@ -1470,10 +1470,10 @@ _overlapped_Overlapped_ConnectEx_impl(OverlappedObject *self, self->type = TYPE_CONNECT; self->handle = ConnectSocket; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = Py_ConnectEx((SOCKET)ConnectSocket, Address, Length, NULL, 0, NULL, &self->overlapped); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : WSAGetLastError(); switch (err) { @@ -1511,9 +1511,9 @@ _overlapped_Overlapped_DisconnectEx_impl(OverlappedObject *self, self->type = TYPE_DISCONNECT; self->handle = Socket; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = Py_DisconnectEx((SOCKET)Socket, &self->overlapped, flags, 0); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : WSAGetLastError(); switch (err) { @@ -1562,10 +1562,10 @@ _overlapped_Overlapped_TransmitFile_impl(OverlappedObject *self, self->overlapped.Offset = offset; self->overlapped.OffsetHigh = offset_high; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = Py_TransmitFile((SOCKET)Socket, File, count_to_write, count_per_send, &self->overlapped, NULL, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : WSAGetLastError(); switch (err) { @@ -1603,9 +1603,9 @@ _overlapped_Overlapped_ConnectNamedPipe_impl(OverlappedObject *self, self->type = TYPE_CONNECT_NAMED_PIPE; self->handle = Pipe; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = ConnectNamedPipe(Pipe, &self->overlapped); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = ret ? ERROR_SUCCESS : GetLastError(); switch (err) { @@ -1637,12 +1637,12 @@ _overlapped_Overlapped_ConnectPipe_impl(OverlappedObject *self, { HANDLE PipeHandle; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS PipeHandle = CreateFileW(Address, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (PipeHandle == INVALID_HANDLE_VALUE) return SetFromWindowsErr(0); @@ -1727,12 +1727,12 @@ _overlapped_WSAConnect_impl(TyObject *module, HANDLE ConnectSocket, return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS // WSAConnect does not support overlapped I/O so this call will // successfully complete immediately. err = WSAConnect((SOCKET)ConnectSocket, Address, Length, NULL, NULL, NULL, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (err == 0) { Py_RETURN_NONE; @@ -1793,10 +1793,10 @@ _overlapped_Overlapped_WSASendTo_impl(OverlappedObject *self, HANDLE handle, wsabuf.len = (DWORD)self->user_buffer.len; wsabuf.buf = self->user_buffer.buf; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = WSASendTo((SOCKET)handle, &wsabuf, 1, &written, flags, Address, AddressLength, &self->overlapped, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = (ret == SOCKET_ERROR ? WSAGetLastError() : ERROR_SUCCESS); @@ -1856,12 +1856,12 @@ _overlapped_Overlapped_WSARecvFrom_impl(OverlappedObject *self, memset(&self->read_from.address, 0, sizeof(self->read_from.address)); self->read_from.address_length = sizeof(self->read_from.address); - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = WSARecvFrom((SOCKET)handle, &wsabuf, 1, &nread, &flags, (SOCKADDR*)&self->read_from.address, &self->read_from.address_length, &self->overlapped, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = (ret < 0 ? WSAGetLastError() : ERROR_SUCCESS); switch (err) { @@ -1923,12 +1923,12 @@ _overlapped_Overlapped_WSARecvFromInto_impl(OverlappedObject *self, memset(&self->read_from_into.address, 0, sizeof(self->read_from_into.address)); self->read_from_into.address_length = sizeof(self->read_from_into.address); - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = WSARecvFrom((SOCKET)handle, &wsabuf, 1, &nread, &flags, (SOCKADDR*)&self->read_from_into.address, &self->read_from_into.address_length, &self->overlapped, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS self->error = err = (ret < 0 ? WSAGetLastError() : ERROR_SUCCESS); switch (err) { diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 968d866..c9ae4bd 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -612,7 +612,7 @@ module os [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=94a0f0f978acae17]*/ -PyDoc_STRVAR(posix__doc__, +TyDoc_STRVAR(posix__doc__, "This module provides access to operating system functionality that is\n\ standardized by the C Standard and the POSIX standard (a thinly\n\ disguised Unix interface). Refer to the library manual and\n\ @@ -662,7 +662,7 @@ run_at_forkers(TyObject *lst, int reverse) void TyOS_BeforeFork(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); run_at_forkers(interp->before_forkers, 1); _TyImport_AcquireLock(interp); @@ -676,7 +676,7 @@ TyOS_AfterFork_Parent(void) HEAD_UNLOCK(&_PyRuntime); _TyEval_StartTheWorldAll(&_PyRuntime); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyImport_ReleaseLock(interp); run_at_forkers(interp->after_forkers_parent, 0); } @@ -705,9 +705,9 @@ TyOS_AfterFork_Child(void) TyThreadState *tstate = _TyThreadState_GET(); _Ty_EnsureTstateNotNULL(tstate); - assert(tstate->thread_id == PyThread_get_thread_ident()); + assert(tstate->thread_id == TyThread_get_thread_ident()); #ifdef PY_HAVE_THREAD_NATIVE_ID - tstate->native_thread_id = PyThread_get_thread_native_id(); + tstate->native_thread_id = TyThread_get_thread_native_id(); #endif #ifdef Ty_GIL_DISABLED @@ -1906,11 +1906,11 @@ posix_fildes_fd(int fd, int (*func)(int)) int async_err = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH res = (*func)(fd); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res != 0) return (!async_err) ? posix_error() : NULL; @@ -2309,7 +2309,7 @@ win32_stat(const wchar_t* path, struct _Ty_stat_struct *result) #endif /* MS_WINDOWS */ -PyDoc_STRVAR(stat_result__doc__, +TyDoc_STRVAR(stat_result__doc__, "stat_result: Result from stat, fstat, or lstat.\n\n\ This object may be accessed either as a tuple of\n\ (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)\n\ @@ -2320,7 +2320,7 @@ or st_flags, they are available as attributes only.\n\ \n\ See os.stat for more information."); -static PyStructSequence_Field stat_result_fields[] = { +static TyStructSequence_Field stat_result_fields[] = { {"st_mode", "protection bits"}, {"st_ino", "inode"}, {"st_dev", "device"}, @@ -2328,7 +2328,7 @@ static PyStructSequence_Field stat_result_fields[] = { {"st_uid", "user ID of owner"}, {"st_gid", "group ID of owner"}, {"st_size", "total size, in bytes"}, - /* The NULL is replaced with PyStructSequence_UnnamedField later. */ + /* The NULL is replaced with TyStructSequence_UnnamedField later. */ {NULL, "integer time of last access"}, {NULL, "integer time of last modification"}, {NULL, "integer time of last change"}, @@ -2431,14 +2431,14 @@ static PyStructSequence_Field stat_result_fields[] = { #define ST_REPARSE_TAG_IDX ST_FSTYPE_IDX #endif -static PyStructSequence_Desc stat_result_desc = { +static TyStructSequence_Desc stat_result_desc = { "stat_result", /* name */ stat_result__doc__, /* doc */ stat_result_fields, 10 }; -PyDoc_STRVAR(statvfs_result__doc__, +TyDoc_STRVAR(statvfs_result__doc__, "statvfs_result: Result from statvfs or fstatvfs.\n\n\ This object may be accessed either as a tuple of\n\ (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),\n\ @@ -2446,7 +2446,7 @@ or via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.\n\ \n\ See os.statvfs for more information."); -static PyStructSequence_Field statvfs_result_fields[] = { +static TyStructSequence_Field statvfs_result_fields[] = { {"f_bsize", }, {"f_frsize", }, {"f_blocks", }, @@ -2461,7 +2461,7 @@ static PyStructSequence_Field statvfs_result_fields[] = { {0} }; -static PyStructSequence_Desc statvfs_result_desc = { +static TyStructSequence_Desc statvfs_result_desc = { "statvfs_result", /* name */ statvfs_result__doc__, /* doc */ statvfs_result_fields, @@ -2469,7 +2469,7 @@ static PyStructSequence_Desc statvfs_result_desc = { }; #if defined(HAVE_WAITID) -PyDoc_STRVAR(waitid_result__doc__, +TyDoc_STRVAR(waitid_result__doc__, "waitid_result: Result from waitid.\n\n\ This object may be accessed either as a tuple of\n\ (si_pid, si_uid, si_signo, si_status, si_code),\n\ @@ -2477,7 +2477,7 @@ or via the attributes si_pid, si_uid, and so on.\n\ \n\ See os.waitid for more information."); -static PyStructSequence_Field waitid_result_fields[] = { +static TyStructSequence_Field waitid_result_fields[] = { {"si_pid", }, {"si_uid", }, {"si_signo", }, @@ -2486,7 +2486,7 @@ static PyStructSequence_Field waitid_result_fields[] = { {0} }; -static PyStructSequence_Desc waitid_result_desc = { +static TyStructSequence_Desc waitid_result_desc = { "waitid_result", /* name */ waitid_result__doc__, /* doc */ waitid_result_fields, @@ -2500,7 +2500,7 @@ statresult_new(TyTypeObject *type, TyObject *args, TyObject *kwds) PyStructSequence *result; int i; - // ht_module doesn't get set in PyStructSequence_NewType(), + // ht_module doesn't get set in TyStructSequence_NewType(), // so we can't use TyType_GetModule(). TyObject *mod = TyImport_GetModule(MODNAME_OBJ); if (mod == NULL) { @@ -2615,15 +2615,15 @@ fill_time(TyObject *module, TyObject *v, int s_index, int f_index, int ns_index, } if (s_index >= 0) { - PyStructSequence_SET_ITEM(v, s_index, s); + TyStructSequence_SET_ITEM(v, s_index, s); s = NULL; } if (f_index >= 0) { - PyStructSequence_SET_ITEM(v, f_index, float_s); + TyStructSequence_SET_ITEM(v, f_index, float_s); float_s = NULL; } if (ns_index >= 0) { - PyStructSequence_SET_ITEM(v, ns_index, ns_total); + TyStructSequence_SET_ITEM(v, ns_index, ns_total); ns_total = NULL; } @@ -2674,7 +2674,7 @@ _pystat_fromstructstat(TyObject *module, STRUCT_STAT *st) assert(!TyErr_Occurred()); TyObject *StatResultType = get_posix_state(module)->StatResultType; - TyObject *v = PyStructSequence_New((TyTypeObject *)StatResultType); + TyObject *v = TyStructSequence_New((TyTypeObject *)StatResultType); if (v == NULL) { return NULL; } @@ -2685,7 +2685,7 @@ _pystat_fromstructstat(TyObject *module, STRUCT_STAT *st) if (obj == NULL) { \ goto error; \ } \ - PyStructSequence_SET_ITEM(v, (pos), obj); \ + TyStructSequence_SET_ITEM(v, (pos), obj); \ } while (0) SET_ITEM(0, TyLong_FromLong((long)st->st_mode)); @@ -2814,7 +2814,7 @@ posix_do_stat(TyObject *module, const char *function_name, path_t *path, fd_and_follow_symlinks_invalid("stat", path->fd, follow_symlinks)) return NULL; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (path->fd != -1) result = FSTAT(path->fd, &st); #ifdef MS_WINDOWS @@ -2842,7 +2842,7 @@ posix_do_stat(TyObject *module, const char *function_name, path_t *path, #endif /* HAVE_FSTATAT */ result = STAT(path->narrow, &st); #endif /* MS_WINDOWS */ - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_FSTATAT if (fstatat_unavailable) { @@ -3328,9 +3328,9 @@ os_access_impl(TyObject *module, path_t *path, int mode, int dir_fd, #endif #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS attr = GetFileAttributesW(path->wide); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS /* * Access is possible if @@ -3346,7 +3346,7 @@ os_access_impl(TyObject *module, path_t *path, int mode, int dir_fd, (attr & FILE_ATTRIBUTE_DIRECTORY)); #else - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_FACCESSAT if ((dir_fd != DEFAULT_DIR_FD) || effective_ids || @@ -3366,7 +3366,7 @@ os_access_impl(TyObject *module, path_t *path, int mode, int dir_fd, else #endif result = access(path->narrow, mode); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_FACCESSAT if (faccessat_unavailable) { @@ -3490,7 +3490,7 @@ os_chdir_impl(TyObject *module, path_t *path) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef MS_WINDOWS /* on unix, success = 0, on windows, success = !0 */ result = !win32_wchdir(path->wide); @@ -3502,7 +3502,7 @@ os_chdir_impl(TyObject *module, path_t *path) #endif result = chdir(path->narrow); #endif - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result) { return path_error(path); @@ -3651,7 +3651,7 @@ os_chmod_impl(TyObject *module, path_t *path, int mode, int dir_fd, #ifdef MS_WINDOWS result = 0; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (path->fd != -1) { result = win32_fchmod(path->fd, mode); } @@ -3668,12 +3668,12 @@ os_chmod_impl(TyObject *module, path_t *path, int mode, int dir_fd, else { result = win32_lchmod(path->wide, mode); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!result) { return path_error(path); } #else /* MS_WINDOWS */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_FCHMOD if (path->fd != -1) result = fchmod(path->fd, mode); @@ -3728,7 +3728,7 @@ os_chmod_impl(TyObject *module, path_t *path, int mode, int dir_fd, errno = ENOSYS; #endif } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result) { #ifdef HAVE_FCHMODAT @@ -3786,18 +3786,18 @@ os_fchmod_impl(TyObject *module, int fd, int mode) #ifdef MS_WINDOWS res = 0; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = win32_fchmod(fd, mode); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!res) { return TyErr_SetFromWindowsErr(0); } #else /* MS_WINDOWS */ int async_err = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = fchmod(fd, mode); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res != 0) return (!async_err) ? posix_error() : NULL; @@ -3830,17 +3830,17 @@ os_lchmod_impl(TyObject *module, path_t *path, int mode) return NULL; } #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = win32_lchmod(path->wide, mode); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!res) { path_error(path); return NULL; } #else /* MS_WINDOWS */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = lchmod(path->narrow, mode); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) { path_error(path); return NULL; @@ -3885,14 +3885,14 @@ os_chflags_impl(TyObject *module, path_t *path, unsigned long flags, return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_LCHFLAGS if (!follow_symlinks) result = lchflags(path->narrow, flags); else #endif result = chflags(path->narrow, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result) return path_error(path); @@ -3923,9 +3923,9 @@ os_lchflags_impl(TyObject *module, path_t *path, unsigned long flags) if (TySys_Audit("os.chflags", "Ok", path->object, flags) < 0) { return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = lchflags(path->narrow, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) { return path_error(path); } @@ -3948,9 +3948,9 @@ os_chroot_impl(TyObject *module, path_t *path) /*[clinic end generated code: output=de80befc763a4475 input=14822965652c3dc3]*/ { int res; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = chroot(path->narrow); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return path_error(path); Py_RETURN_NONE; @@ -3987,9 +3987,9 @@ static TyObject * os_sync_impl(TyObject *module) /*[clinic end generated code: output=2796b1f0818cd71c input=84749fe5e9b404ff]*/ { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS sync(); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS Py_RETURN_NONE; } #endif /* HAVE_SYNC */ @@ -4081,7 +4081,7 @@ os_chown_impl(TyObject *module, path_t *path, uid_t uid, gid_t gid, return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_FCHOWN if (path->fd != -1) result = fchown(path->fd, uid, gid); @@ -4103,7 +4103,7 @@ os_chown_impl(TyObject *module, path_t *path, uid_t uid, gid_t gid, } else #endif result = chown(path->narrow, uid, gid); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_FCHOWNAT if (fchownat_unsupported) { @@ -4149,9 +4149,9 @@ os_fchown_impl(TyObject *module, int fd, uid_t uid, gid_t gid) } do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = fchown(fd, uid, gid); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res != 0) return (!async_err) ? posix_error() : NULL; @@ -4183,9 +4183,9 @@ os_lchown_impl(TyObject *module, path_t *path, uid_t uid, gid_t gid) if (TySys_Audit("os.chown", "OIIi", path->object, uid, gid, -1) < 0) { return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = lchown(path->narrow, uid, gid); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) { return path_error(path); } @@ -4202,7 +4202,7 @@ posix_getcwd(int use_bytes) wchar_t *wbuf2 = wbuf; DWORD len; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS len = GetCurrentDirectoryW(Ty_ARRAY_LENGTH(wbuf), wbuf); /* If the buffer is large enough, len does not include the terminating \0. If the buffer is too small, len includes @@ -4218,7 +4218,7 @@ posix_getcwd(int use_bytes) len = GetCurrentDirectoryW(len, wbuf2); } } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!wbuf2) { TyErr_NoMemory(); @@ -4251,7 +4251,7 @@ posix_getcwd(int use_bytes) char *cwd = NULL; size_t buflen = 0; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS do { char *newbuf; if (buflen <= PY_SSIZE_T_MAX - chunk) { @@ -4270,7 +4270,7 @@ posix_getcwd(int use_bytes) cwd = getcwd(buf, buflen); } while (cwd == NULL && errno == ERANGE); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (buf == NULL) { return TyErr_NoMemory(); @@ -4417,14 +4417,14 @@ os_link_impl(TyObject *module, path_t *src, path_t *dst, int src_dir_fd, } #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = CreateHardLinkW(dst->wide, src->wide, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!result) return path_error2(src, dst); #else - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_LINKAT if (HAVE_LINKAT_RUNTIME) { result = linkat(src_dir_fd, src->narrow, @@ -4437,7 +4437,7 @@ os_link_impl(TyObject *module, path_t *src, path_t *dst, int src_dir_fd, /* linkat not available */ result = link(src->narrow, dst->narrow); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result) return path_error2(src, dst); @@ -4488,9 +4488,9 @@ _listdir_windows_no_opendir(path_t *path, TyObject *list) if ((list = TyList_New(0)) == NULL) { goto exit; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS hFindFile = FindFirstFileW(wnamebuf, &wFileData); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (hFindFile == INVALID_HANDLE_VALUE) { int error = GetLastError(); if (error == ERROR_FILE_NOT_FOUND) @@ -4519,9 +4519,9 @@ _listdir_windows_no_opendir(path_t *path, TyObject *list) } Ty_DECREF(v); } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = FindNextFileW(hFindFile, &wFileData); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS /* FindNextFile sets error to ERROR_NO_MORE_FILES if it got to the end of the directory. */ if (!result && GetLastError() != ERROR_NO_MORE_FILES) { @@ -4569,9 +4569,9 @@ _posix_listdir(path_t *path, TyObject *list) return_str = 1; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS dirp = fdopendir(fd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } else { TyErr_SetString(TyExc_TypeError, "listdir: path should be string, bytes, os.PathLike or None, not int"); @@ -4592,9 +4592,9 @@ _posix_listdir(path_t *path, TyObject *list) return_str = 1; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS dirp = opendir(name); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } if (dirp == NULL) { @@ -4602,9 +4602,9 @@ _posix_listdir(path_t *path, TyObject *list) list = NULL; #ifdef HAVE_FDOPENDIR if (fd != -1) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS close(fd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } #endif goto exit; @@ -4614,9 +4614,9 @@ _posix_listdir(path_t *path, TyObject *list) } for (;;) { errno = 0; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ep = readdir(dirp); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (ep == NULL) { if (errno == 0) { break; @@ -4648,13 +4648,13 @@ _posix_listdir(path_t *path, TyObject *list) exit: if (dirp != NULL) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_FDOPENDIR if (fd > -1) rewinddir(dirp); #endif closedir(dirp); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } return list; @@ -4723,9 +4723,9 @@ os_listdrives_impl(TyObject *module) return NULL; } - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; buflen = GetLogicalDriveStringsW(buflen, buffer); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; if (!buflen) { TyErr_SetFromWindowsErr(0); @@ -4773,12 +4773,12 @@ os_listvolumes_impl(TyObject *module) } int err = 0; - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; find = FindFirstVolumeW(buffer, Ty_ARRAY_LENGTH(buffer)); if (find == INVALID_HANDLE_VALUE) { err = GetLastError(); } - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; while (!err) { TyObject *s = TyUnicode_FromWideChar(buffer, -1); @@ -4789,17 +4789,17 @@ os_listvolumes_impl(TyObject *module) } Ty_DECREF(s); - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; if (!FindNextVolumeW(find, buffer, Ty_ARRAY_LENGTH(buffer))) { err = GetLastError(); } - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; } if (find != INVALID_HANDLE_VALUE) { - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; FindVolumeClose(find); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; } if (err && err != ERROR_NO_MORE_FILES) { TyErr_SetFromWindowsErr(err); @@ -4834,9 +4834,9 @@ os_listmounts_impl(TyObject *module, path_t *volume) TyObject *result = NULL; /* Ensure we have a valid volume path before continuing */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS attributes = GetFileAttributesW(volume->wide); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (attributes == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_UNRECOGNIZED_VOLUME) { @@ -4849,10 +4849,10 @@ os_listmounts_impl(TyObject *module, path_t *volume) while (1) { BOOL success; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS success = GetVolumePathNamesForVolumeNameW(volume->wide, buffer, buflen, &buflen); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (success) { break; } @@ -4915,7 +4915,7 @@ os__path_isdevdrive_impl(TyObject *module, path_t *path) TyObject *r = NULL; wchar_t volume[MAX_PATH]; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (!GetVolumePathNameW(path->wide, volume, MAX_PATH)) { /* invalid path of some kind */ /* Note that this also includes the case where a volume is mounted @@ -4964,7 +4964,7 @@ os__path_isdevdrive_impl(TyObject *module, path_t *path) } } } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (err) { TyErr_SetFromWindowsErr(err); @@ -5074,7 +5074,7 @@ os__getfinalpathname_impl(TyObject *module, path_t *path) int result_length; TyObject *result; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS hFile = CreateFileW( path->wide, 0, /* desired access */ @@ -5084,7 +5084,7 @@ os__getfinalpathname_impl(TyObject *module, path_t *path) /* FILE_FLAG_BACKUP_SEMANTICS is required to open a directory */ FILE_FLAG_BACKUP_SEMANTICS, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (hFile == INVALID_HANDLE_VALUE) { return win32_error_object("CreateFileW", path->object); @@ -5093,10 +5093,10 @@ os__getfinalpathname_impl(TyObject *module, path_t *path) /* We have a good handle to the target, use it to determine the target path name. */ while (1) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result_length = GetFinalPathNameByHandleW(hFile, target_path, buf_size, VOLUME_NAME_DOS); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!result_length) { result = win32_error_object("GetFinalPathNameByHandleW", @@ -5149,9 +5149,9 @@ os__findfirstfile_impl(TyObject *module, path_t *path) WIN32_FIND_DATAW wFileData; WCHAR *wRealFileName; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS hFindFile = FindFirstFileW(path->wide, &wFileData); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (hFindFile == INVALID_HANDLE_VALUE) { path_error(path); @@ -5194,10 +5194,10 @@ os__getvolumepathname_impl(TyObject *module, path_t *path) if (mountpath == NULL) return TyErr_NoMemory(); - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = GetVolumePathNameW(path->wide, mountpath, Py_SAFE_DOWNCAST(buflen, size_t, DWORD)); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!ret) { result = win32_error_object("_getvolumepathname", path->object); @@ -5239,9 +5239,9 @@ os__path_splitroot_impl(TyObject *module, path_t *path) *p = L'\\'; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = PathCchSkipRoot(buffer, &end); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (FAILED(ret)) { result = Ty_BuildValue("sO", "", path->object); } else if (end != buffer) { @@ -5446,7 +5446,7 @@ _testFileExists(path_t *path, BOOL followLinks) return FALSE; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (path->fd != -1) { HANDLE hfile = _Ty_get_osfhandle_noraise(path->fd); if (hfile != INVALID_HANDLE_VALUE) { @@ -5458,7 +5458,7 @@ _testFileExists(path_t *path, BOOL followLinks) else if (path->wide) { result = _testFileExistsByName(path->wide, followLinks); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return result; } @@ -5472,7 +5472,7 @@ _testFileType(path_t *path, int testedType) return FALSE; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (path->fd != -1) { HANDLE hfile = _Ty_get_osfhandle_noraise(path->fd); if (hfile != INVALID_HANDLE_VALUE) { @@ -5482,7 +5482,7 @@ _testFileType(path_t *path, int testedType) else if (path->wide) { result = _testFileTypeByName(path->wide, testedType); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return result; } @@ -5726,7 +5726,7 @@ os_mkdir_impl(TyObject *module, path_t *path, int mode, int dir_fd) } #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (mode == 0700 /* 0o700 */) { ULONG sdSize; pSecAttr = &secAttr; @@ -5751,7 +5751,7 @@ os_mkdir_impl(TyObject *module, path_t *path, int mode, int dir_fd) error = GetLastError(); } } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (error) { return TyErr_SetFromWindowsErr(error); @@ -5760,7 +5760,7 @@ os_mkdir_impl(TyObject *module, path_t *path, int mode, int dir_fd) return path_error(path); } #else - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #if HAVE_MKDIRAT if (dir_fd != DEFAULT_DIR_FD) { if (HAVE_MKDIRAT_RUNTIME) { @@ -5776,7 +5776,7 @@ os_mkdir_impl(TyObject *module, path_t *path, int mode, int dir_fd) #else result = mkdir(path->narrow, mode); #endif - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #if HAVE_MKDIRAT if (mkdirat_unavailable) { @@ -5921,15 +5921,15 @@ internal_rename(path_t *src, path_t *dst, int src_dir_fd, int dst_dir_fd, int is } #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = MoveFileExW(src->wide, dst->wide, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!result) return path_error2(src, dst); #else - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_RENAMEAT if (dir_fd_specified) { if (HAVE_RENAMEAT_RUNTIME) { @@ -5940,7 +5940,7 @@ internal_rename(path_t *src, path_t *dst, int src_dir_fd, int dst_dir_fd, int is } else #endif result = rename(src->narrow, dst->narrow); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_RENAMEAT @@ -6034,7 +6034,7 @@ os_rmdir_impl(TyObject *module, path_t *path, int dir_fd) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef MS_WINDOWS /* Windows, success=1, UNIX, success=0 */ result = !RemoveDirectoryW(path->wide); @@ -6051,7 +6051,7 @@ os_rmdir_impl(TyObject *module, path_t *path, int dir_fd) #endif result = rmdir(path->narrow); #endif - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_UNLINKAT if (unlinkat_unavailable) { @@ -6087,11 +6087,11 @@ os_system_impl(TyObject *module, const wchar_t *command) return -1; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH result = _wsystem(command); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return result; } #else /* MS_WINDOWS */ @@ -6114,9 +6114,9 @@ os_system_impl(TyObject *module, TyObject *command) return -1; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = system(bytes); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return result; } #endif @@ -6214,7 +6214,7 @@ os_unlink_impl(TyObject *module, path_t *path, int dir_fd) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH #ifdef MS_WINDOWS /* Windows, success=1, UNIX, success=0 */ @@ -6233,7 +6233,7 @@ os_unlink_impl(TyObject *module, path_t *path, int dir_fd) result = unlink(path->narrow); #endif _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_UNLINKAT if (unlinkat_unavailable) { @@ -6268,7 +6268,7 @@ os_remove_impl(TyObject *module, path_t *path, int dir_fd) } -static PyStructSequence_Field uname_result_fields[] = { +static TyStructSequence_Field uname_result_fields[] = { {"sysname", "operating system name"}, {"nodename", "name of machine on network (implementation-defined)"}, {"release", "operating system release"}, @@ -6277,7 +6277,7 @@ static PyStructSequence_Field uname_result_fields[] = { {NULL} }; -PyDoc_STRVAR(uname_result__doc__, +TyDoc_STRVAR(uname_result__doc__, "uname_result: Result from os.uname().\n\n\ This object may be accessed either as a tuple of\n\ (sysname, nodename, release, version, machine),\n\ @@ -6285,7 +6285,7 @@ or via the attributes sysname, nodename, release, version, and machine.\n\ \n\ See os.uname for more information."); -static PyStructSequence_Desc uname_result_desc = { +static TyStructSequence_Desc uname_result_desc = { MODNAME ".uname_result", /* name */ uname_result__doc__, /* doc */ uname_result_fields, @@ -6311,14 +6311,14 @@ os_uname_impl(TyObject *module) int res; TyObject *value; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = uname(&u); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return posix_error(); TyObject *UnameResultType = get_posix_state(module)->UnameResultType; - value = PyStructSequence_New((TyTypeObject *)UnameResultType); + value = TyStructSequence_New((TyTypeObject *)UnameResultType); if (value == NULL) return NULL; @@ -6329,7 +6329,7 @@ os_uname_impl(TyObject *module) Ty_DECREF(value); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(value, i, o); \ + TyStructSequence_SET_ITEM(value, i, o); \ } \ SET(0, u.sysname); @@ -6700,11 +6700,11 @@ os_utime_impl(TyObject *module, path_t *path, TyObject *times, TyObject *ns, } #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS hFile = CreateFileW(path->wide, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (hFile == INVALID_HANDLE_VALUE) { path_error(path); return NULL; @@ -6725,7 +6725,7 @@ os_utime_impl(TyObject *module, path_t *path, TyObject *times, TyObject *ns, } CloseHandle(hFile); #else /* MS_WINDOWS */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef UTIME_HAVE_NOFOLLOW_SYMLINKS if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) @@ -6748,7 +6748,7 @@ os_utime_impl(TyObject *module, path_t *path, TyObject *times, TyObject *ns, result = utime_default(&utime, path->narrow); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #if defined(__APPLE__) && defined(HAVE_UTIMENSAT) /* See utime_dir_fd implementation */ @@ -6983,7 +6983,7 @@ os_execv_impl(TyObject *module, path_t *path, TyObject *argv) EXECV_CHAR **argvlist; Ty_ssize_t argc; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (!_TyInterpreterState_HasFeature(interp, Py_RTFLAGS_EXEC)) { TyErr_SetString(TyExc_RuntimeError, "exec not supported for isolated subinterpreters"); @@ -7057,7 +7057,7 @@ os_execve_impl(TyObject *module, path_t *path, TyObject *argv, TyObject *env) EXECV_CHAR **envlist; Ty_ssize_t argc, envc; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (!_TyInterpreterState_HasFeature(interp, Py_RTFLAGS_EXEC)) { TyErr_SetString(TyExc_RuntimeError, "exec not supported for isolated subinterpreters"); @@ -7759,7 +7759,7 @@ os_spawnv_impl(TyObject *module, int mode, path_t *path, TyObject *argv) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH #ifdef HAVE_WSPAWNV spawnval = _wspawnv(mode, path->wide, argvlist); @@ -7769,7 +7769,7 @@ os_spawnv_impl(TyObject *module, int mode, path_t *path, TyObject *argv) spawnval = _spawnv(mode, path->narrow, argvlist); #endif _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS int saved_errno = errno; free_string_array(argvlist, argc); @@ -7875,7 +7875,7 @@ os_spawnve_impl(TyObject *module, int mode, path_t *path, TyObject *argv, goto fail_2; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH #ifdef HAVE_WSPAWNV spawnval = _wspawnve(mode, path->wide, argvlist, envlist); @@ -7886,7 +7886,7 @@ os_spawnve_impl(TyObject *module, int mode, path_t *path, TyObject *argv, spawnval = _spawnve(mode, path->narrow, argvlist, envlist); #endif _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (spawnval == -1) (void) posix_error(); @@ -7945,7 +7945,7 @@ os_register_at_fork_impl(TyObject *module, TyObject *before, TyObject *after_in_child, TyObject *after_in_parent) /*[clinic end generated code: output=5398ac75e8e97625 input=cd1187aa85d2312e]*/ { - PyInterpreterState *interp; + TyInterpreterState *interp; if (!before && !after_in_child && !after_in_parent) { TyErr_SetString(TyExc_TypeError, "At least one argument is required."); @@ -8092,7 +8092,7 @@ os_fork1_impl(TyObject *module) { pid_t pid; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_TyInterpreterState_GetFinalizing(interp) != NULL) { TyErr_SetString(TyExc_PythonFinalizationError, "can't fork at interpreter shutdown"); @@ -8137,7 +8137,7 @@ os_fork_impl(TyObject *module) /*[clinic end generated code: output=3626c81f98985d49 input=13c956413110eeaa]*/ { pid_t pid; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_TyInterpreterState_GetFinalizing(interp) != NULL) { TyErr_SetString(TyExc_PythonFinalizationError, "can't fork at interpreter shutdown"); @@ -8259,17 +8259,17 @@ os_sched_param_impl(TyTypeObject *type, TyObject *sched_priority) { TyObject *res; - res = PyStructSequence_New(type); + res = TyStructSequence_New(type); if (!res) return NULL; - PyStructSequence_SET_ITEM(res, 0, Ty_NewRef(sched_priority)); + TyStructSequence_SET_ITEM(res, 0, Ty_NewRef(sched_priority)); return res; } static TyObject * os_sched_param_reduce(TyObject *self, TyObject *Py_UNUSED(dummy)) { - return Ty_BuildValue("(O(N))", Ty_TYPE(self), PyStructSequence_GetItem(self, 0)); + return Ty_BuildValue("(O(N))", Ty_TYPE(self), TyStructSequence_GetItem(self, 0)); } static TyMethodDef os_sched_param_reduce_method = { @@ -8278,12 +8278,12 @@ static TyMethodDef os_sched_param_reduce_method = { PyDoc_VAR(os_sched_param__doc__); -static PyStructSequence_Field sched_param_fields[] = { +static TyStructSequence_Field sched_param_fields[] = { {"sched_priority", "the scheduling priority"}, {0} }; -static PyStructSequence_Desc sched_param_desc = { +static TyStructSequence_Desc sched_param_desc = { "sched_param", /* name */ os_sched_param__doc__, /* doc */ sched_param_fields, @@ -8299,7 +8299,7 @@ convert_sched_param(TyObject *module, TyObject *param, struct sched_param *res) TyErr_SetString(TyExc_TypeError, "must have a sched_param object"); return 0; } - priority = TyLong_AsLong(PyStructSequence_GET_ITEM(param, 0)); + priority = TyLong_AsLong(TyStructSequence_GET_ITEM(param, 0)); if (priority == -1 && TyErr_Occurred()) return 0; if (priority > INT_MAX || priority < INT_MIN) { @@ -8372,7 +8372,7 @@ os_sched_getparam_impl(TyObject *module, pid_t pid) if (sched_getparam(pid, ¶m)) return posix_error(); TyObject *SchedParamType = get_posix_state(module)->SchedParamType; - result = PyStructSequence_New((TyTypeObject *)SchedParamType); + result = TyStructSequence_New((TyTypeObject *)SchedParamType); if (!result) return NULL; priority = TyLong_FromLong(param.sched_priority); @@ -8380,7 +8380,7 @@ os_sched_getparam_impl(TyObject *module, pid_t pid) Ty_DECREF(result); return NULL; } - PyStructSequence_SET_ITEM(result, 0, priority); + TyStructSequence_SET_ITEM(result, 0, priority); return result; } @@ -8452,9 +8452,9 @@ os_sched_yield_impl(TyObject *module) /*[clinic end generated code: output=902323500f222cac input=e54d6f98189391d4]*/ { int result; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = sched_yield(); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result < 0) { return posix_error(); } @@ -8994,7 +8994,7 @@ os_forkpty_impl(TyObject *module) int master_fd = -1; pid_t pid; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_TyInterpreterState_GetFinalizing(interp) != NULL) { TyErr_SetString(TyExc_PythonFinalizationError, "can't fork at interpreter shutdown"); @@ -9940,7 +9940,7 @@ wait_helper(TyObject *module, pid_t pid, int status, struct rusage *ru) return NULL; /* XXX(nnorwitz): Copied (w/mods) from resource.c, there should be only one. */ - result = PyStructSequence_New((TyTypeObject*) struct_rusage); + result = TyStructSequence_New((TyTypeObject*) struct_rusage); Ty_DECREF(struct_rusage); if (!result) return NULL; @@ -9958,7 +9958,7 @@ wait_helper(TyObject *module, pid_t pid, int status, struct rusage *ru) Ty_DECREF(result); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(result, pos++, item); \ + TyStructSequence_SET_ITEM(result, pos++, item); \ } while(0) SET_RESULT(TyFloat_FromDouble(doubletime(ru->ru_utime))); @@ -10006,9 +10006,9 @@ os_wait3_impl(TyObject *module, int options) WAIT_STATUS_INT(status) = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS pid = wait3(&status, options, &ru); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (pid < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (pid < 0) return (!async_err) ? posix_error() : NULL; @@ -10043,9 +10043,9 @@ os_wait4_impl(TyObject *module, pid_t pid, int options) WAIT_STATUS_INT(status) = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = wait4(pid, &status, options, &ru); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res < 0) return (!async_err) ? posix_error() : NULL; @@ -10085,9 +10085,9 @@ os_waitid_impl(TyObject *module, idtype_t idtype, id_t id, int options) si.si_pid = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = waitid(idtype, id, &si, options); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res < 0) return (!async_err) ? posix_error() : NULL; @@ -10096,7 +10096,7 @@ os_waitid_impl(TyObject *module, idtype_t idtype, id_t id, int options) Py_RETURN_NONE; TyObject *WaitidResultType = get_posix_state(module)->WaitidResultType; - result = PyStructSequence_New((TyTypeObject *)WaitidResultType); + result = TyStructSequence_New((TyTypeObject *)WaitidResultType); if (!result) return NULL; @@ -10109,7 +10109,7 @@ os_waitid_impl(TyObject *module, idtype_t idtype, id_t id, int options) Ty_DECREF(result); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(result, pos++, item); \ + TyStructSequence_SET_ITEM(result, pos++, item); \ } while(0) SET_RESULT(TyLong_FromPid(si.si_pid)); @@ -10150,9 +10150,9 @@ os_waitpid_impl(TyObject *module, pid_t pid, int options) WAIT_STATUS_INT(status) = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = waitpid(pid, &status, options); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res < 0) return (!async_err) ? posix_error() : NULL; @@ -10184,11 +10184,11 @@ os_waitpid_impl(TyObject *module, intptr_t pid, int options) int async_err = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH res = _cwait(&status, pid, options); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res < 0) return (!async_err) ? posix_error() : NULL; @@ -10221,9 +10221,9 @@ os_wait_impl(TyObject *module) WAIT_STATUS_INT(status) = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS pid = wait(&status); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (pid < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (pid < 0) return (!async_err) ? posix_error() : NULL; @@ -10277,9 +10277,9 @@ os_setns_impl(TyObject *module, int fd, int nstype) { int res; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = setns(fd, nstype); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res != 0) { return posix_error(); @@ -10305,9 +10305,9 @@ os_unshare_impl(TyObject *module, int flags) { int res; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = unshare(flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res != 0) { return posix_error(); @@ -10346,7 +10346,7 @@ os_readlink_impl(TyObject *module, path_t *path, int dir_fd) int readlinkat_unavailable = 0; #endif - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_READLINKAT if (dir_fd != DEFAULT_DIR_FD) { if (HAVE_READLINKAT_RUNTIME) { @@ -10357,7 +10357,7 @@ os_readlink_impl(TyObject *module, path_t *path, int dir_fd) } else #endif length = readlink(path->narrow, buffer, MAXPATHLEN); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_READLINKAT if (readlinkat_unavailable) { @@ -10384,7 +10384,7 @@ os_readlink_impl(TyObject *module, path_t *path, int dir_fd) TyObject *result = NULL; /* First get a handle to the reparse point */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS reparse_point_handle = CreateFileW( path->wide, 0, @@ -10405,7 +10405,7 @@ os_readlink_impl(TyObject *module, path_t *path, int dir_fd) ); CloseHandle(reparse_point_handle); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (io_result == 0) { return path_error(path); @@ -10578,7 +10578,7 @@ os_symlink_impl(TyObject *module, path_t *src, path_t *dst, flags |= SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH /* if src is a directory, ensure flags==1 (target_is_directory bit) */ if (target_is_directory || _check_dirW(src->wide, dst->wide)) { @@ -10587,12 +10587,12 @@ os_symlink_impl(TyObject *module, path_t *src, path_t *dst, result = CreateSymbolicLinkW(dst->wide, src->wide, flags); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (windows_has_symlink_unprivileged_flag && !result && ERROR_INVALID_PARAMETER == GetLastError()) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH /* This error might be caused by SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE not being supported. @@ -10607,7 +10607,7 @@ os_symlink_impl(TyObject *module, path_t *src, path_t *dst, flags &= ~(SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE); result = CreateSymbolicLinkW(dst->wide, src->wide, flags); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result || ERROR_INVALID_PARAMETER != GetLastError()) { windows_has_symlink_unprivileged_flag = FALSE; @@ -10619,7 +10619,7 @@ os_symlink_impl(TyObject *module, path_t *src, path_t *dst, #else - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_SYMLINKAT if (dir_fd != DEFAULT_DIR_FD) { if (HAVE_SYMLINKAT_RUNTIME) { @@ -10630,7 +10630,7 @@ os_symlink_impl(TyObject *module, path_t *src, path_t *dst, } else #endif result = symlink(src->narrow, dst->narrow); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS #ifdef HAVE_SYMLINKAT if (symlinkat_unavailable) { @@ -10648,7 +10648,7 @@ os_symlink_impl(TyObject *module, path_t *src, path_t *dst, #endif /* HAVE_SYMLINK */ -static PyStructSequence_Field times_result_fields[] = { +static TyStructSequence_Field times_result_fields[] = { {"user", "user time"}, {"system", "system time"}, {"children_user", "user time of children"}, @@ -10657,7 +10657,7 @@ static PyStructSequence_Field times_result_fields[] = { {NULL} }; -PyDoc_STRVAR(times_result__doc__, +TyDoc_STRVAR(times_result__doc__, "times_result: Result from os.times().\n\n\ This object may be accessed either as a tuple of\n\ (user, system, children_user, children_system, elapsed),\n\ @@ -10666,7 +10666,7 @@ and elapsed.\n\ \n\ See os.times for more information."); -static PyStructSequence_Desc times_result_desc = { +static TyStructSequence_Desc times_result_desc = { "times_result", /* name */ times_result__doc__, /* doc */ times_result_fields, @@ -10679,7 +10679,7 @@ build_times_result(TyObject *module, double user, double system, double elapsed) { TyObject *TimesResultType = get_posix_state(module)->TimesResultType; - TyObject *value = PyStructSequence_New((TyTypeObject *)TimesResultType); + TyObject *value = TyStructSequence_New((TyTypeObject *)TimesResultType); if (value == NULL) return NULL; @@ -10690,7 +10690,7 @@ build_times_result(TyObject *module, double user, double system, Ty_DECREF(value); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(value, i, o); \ + TyStructSequence_SET_ITEM(value, i, o); \ } \ SET(0, user); @@ -10789,7 +10789,7 @@ build_itimerspec(const struct itimerspec* curr_value) static TyObject * build_itimerspec_ns(const struct itimerspec* curr_value) { - PyTime_t value, interval; + TyTime_t value, interval; if (_TyTime_FromTimespec(&value, &curr_value->it_value) < 0) { return NULL; } @@ -10829,10 +10829,10 @@ os_timerfd_create_impl(TyObject *module, int clockid, int flags) { int fd; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS flags |= TFD_CLOEXEC; // PEP 446: always create non-inheritable FD fd = timerfd_create(clockid, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (fd == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -10861,7 +10861,7 @@ os_timerfd_settime_impl(TyObject *module, int fd, int flags, double initial_double, double interval_double) /*[clinic end generated code: output=df4c1bce6859224e input=81d2c0d7e936e8a7]*/ { - PyTime_t initial, interval; + TyTime_t initial, interval; if (_TyTime_FromSecondsDouble(initial_double, _TyTime_ROUND_FLOOR, &initial) < 0) { return NULL; @@ -10882,9 +10882,9 @@ os_timerfd_settime_impl(TyObject *module, int fd, int flags, } int result; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = timerfd_settime(fd, flags, &new_value, &old_value); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -10925,9 +10925,9 @@ os_timerfd_settime_ns_impl(TyObject *module, int fd, int flags, TyErr_SetString(TyExc_ValueError, "invalid interval value"); return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = timerfd_settime(fd, flags, &new_value, &old_value); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -10950,9 +10950,9 @@ os_timerfd_gettime_impl(TyObject *module, int fd) { struct itimerspec curr_value; int result; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = timerfd_gettime(fd, &curr_value); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -10976,9 +10976,9 @@ os_timerfd_gettime_ns_impl(TyObject *module, int fd) { struct itimerspec curr_value; int result; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = timerfd_gettime(fd, &curr_value); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -11149,7 +11149,7 @@ os_open_impl(TyObject *module, path_t *path, int flags, int mode, int dir_fd) _Ty_BEGIN_SUPPRESS_IPH do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef MS_WINDOWS fd = _wopen(path->wide, flags, mode); #else @@ -11166,7 +11166,7 @@ os_open_impl(TyObject *module, path_t *path, int flags, int mode, int dir_fd) #endif /* HAVE_OPENAT */ fd = open(path->narrow, flags, mode); #endif /* !MS_WINDOWS */ - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (fd < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); _Ty_END_SUPPRESS_IPH @@ -11211,11 +11211,11 @@ os_close_impl(TyObject *module, int fd) * and http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html * for more details. */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH res = close(fd); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return posix_error(); Py_RETURN_NONE; @@ -11235,9 +11235,9 @@ static TyObject * os_closerange_impl(TyObject *module, int fd_low, int fd_high) /*[clinic end generated code: output=0ce5c20fcda681c2 input=5855a3d053ebd4ec]*/ { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_closerange(fd_low, fd_high - 1); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS Py_RETURN_NONE; } @@ -11286,11 +11286,11 @@ os_dup2_impl(TyObject *module, int fd, int fd2, int inheritable) * upon close(), and therefore below. */ #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH res = dup2(fd, fd2); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) { posix_error(); return -1; @@ -11304,12 +11304,12 @@ os_dup2_impl(TyObject *module, int fd, int fd2, int inheritable) } #elif defined(HAVE_FCNTL_H) && defined(F_DUP2FD_CLOEXEC) - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (!inheritable) res = fcntl(fd, F_DUP2FD_CLOEXEC, fd2); else res = dup2(fd, fd2); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) { posix_error(); return -1; @@ -11319,9 +11319,9 @@ os_dup2_impl(TyObject *module, int fd, int fd2, int inheritable) #ifdef HAVE_DUP3 if (!inheritable && dup3_works != 0) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = dup3(fd, fd2, O_CLOEXEC); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) { if (dup3_works == -1) dup3_works = (errno != ENOSYS); @@ -11335,9 +11335,9 @@ os_dup2_impl(TyObject *module, int fd, int fd2, int inheritable) if (inheritable || dup3_works == 0) { #endif - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = dup2(fd, fd2); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) { posix_error(); return -1; @@ -11384,9 +11384,9 @@ os_lockf_impl(TyObject *module, int fd, int command, Ty_off_t length) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = lockf(fd, command, length); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return posix_error(); @@ -11430,7 +11430,7 @@ os_lseek_impl(TyObject *module, int fd, Ty_off_t position, int how) } #endif /* SEEK_END */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH #ifdef MS_WINDOWS result = _lseeki64(fd, position, how); @@ -11438,7 +11438,7 @@ os_lseek_impl(TyObject *module, int fd, Ty_off_t position, int how) result = lseek(fd, position, how); #endif _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result < 0) posix_error(); @@ -11617,9 +11617,9 @@ os_readv_impl(TyObject *module, int fd, TyObject *buffers) return -1; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS n = readv(fd, iov, cnt); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (n < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); int saved_errno = errno; @@ -11669,11 +11669,11 @@ os_pread_impl(TyObject *module, int fd, Ty_ssize_t length, Ty_off_t offset) return NULL; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH n = pread(fd, TyBytes_AS_STRING(buffer), length, offset); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (n < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (n < 0) { @@ -11749,11 +11749,11 @@ os_preadv_impl(TyObject *module, int fd, TyObject *buffers, Ty_off_t offset, } #ifdef HAVE_PREADV2 do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH n = preadv2(fd, iov, cnt, offset, flags); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (n < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); #else do { @@ -11765,11 +11765,11 @@ os_preadv_impl(TyObject *module, int fd, TyObject *buffers, Ty_off_t offset, #pragma clang diagnostic ignored "-Wunguarded-availability" #pragma clang diagnostic ignored "-Wunguarded-availability-new" #endif - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH n = preadv(fd, iov, cnt, offset); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (n < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); #if defined(__APPLE__) && defined(__clang__) @@ -11941,13 +11941,13 @@ os_sendfile_impl(TyObject *module, int out_fd, int in_fd, TyObject *offobj, _Ty_BEGIN_SUPPRESS_IPH do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef __APPLE__ ret = sendfile(in_fd, out_fd, offset, &sbytes, &sf, flags); #else ret = sendfile(in_fd, out_fd, offset, count, &sf, &sbytes, flags); #endif - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (ret < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); _Ty_END_SUPPRESS_IPH @@ -11985,9 +11985,9 @@ done: #ifdef __linux__ if (offobj == Ty_None) { do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = sendfile(out_fd, in_fd, NULL, count); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (ret < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (ret < 0) return (!async_err) ? posix_error() : NULL; @@ -12004,9 +12004,9 @@ done: struct stat st; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = fstat(in_fd, &st); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (ret != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (ret < 0) return (!async_err) ? posix_error() : NULL; @@ -12025,7 +12025,7 @@ done: #endif do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = sendfile(out_fd, in_fd, &offset, count); #if defined(__sun) && defined(__SVR4) // This handles illumos-specific sendfile() partial write behavior, @@ -12034,7 +12034,7 @@ done: ret = offset - original_offset; } #endif - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (ret < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (ret < 0) return (!async_err) ? posix_error() : NULL; @@ -12062,9 +12062,9 @@ os__fcopyfile_impl(TyObject *module, int in_fd, int out_fd, int flags) { int ret; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = fcopyfile(in_fd, out_fd, NULL, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (ret < 0) return posix_error(); Py_RETURN_NONE; @@ -12092,9 +12092,9 @@ os_fstat_impl(TyObject *module, int fd) int async_err = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = FSTAT(fd, &st); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (res != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (res != 0) { #ifdef MS_WINDOWS @@ -12124,11 +12124,11 @@ os_isatty_impl(TyObject *module, int fd) /*[clinic end generated code: output=6a48c8b4e644ca00 input=08ce94aa1eaf7b5e]*/ { int return_value; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH return_value = isatty(fd); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return return_value; } @@ -12161,7 +12161,7 @@ os_pipe_impl(TyObject *module) attr.lpSecurityDescriptor = NULL; attr.bInheritHandle = FALSE; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ok = CreatePipe(&read, &write, &attr, 0); if (ok) { fds[0] = _Ty_open_osfhandle_noraise(read, _O_RDONLY | _O_NOINHERIT); @@ -12172,23 +12172,23 @@ os_pipe_impl(TyObject *module) ok = 0; } } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!ok) return TyErr_SetFromWindowsErr(0); #else #ifdef HAVE_PIPE2 - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = pipe2(fds, O_CLOEXEC); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res != 0 && errno == ENOSYS) { #endif - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = pipe(fds); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res == 0) { if (_Ty_set_inheritable(fds[0], 0, NULL) < 0) { @@ -12282,9 +12282,9 @@ os_writev_impl(TyObject *module, int fd, TyObject *buffers) } do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = writev(fd, iov, cnt); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (result < 0 && !async_err) @@ -12320,11 +12320,11 @@ os_pwrite_impl(TyObject *module, int fd, Ty_buffer *buffer, Ty_off_t offset) int async_err = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH size = pwrite(fd, buffer->buf, (size_t)buffer->len, offset); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (size < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (size < 0 && !async_err) @@ -12395,11 +12395,11 @@ os_pwritev_impl(TyObject *module, int fd, TyObject *buffers, Ty_off_t offset, } #ifdef HAVE_PWRITEV2 do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH result = pwritev2(fd, iov, cnt, offset, flags); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); #else @@ -12412,11 +12412,11 @@ os_pwritev_impl(TyObject *module, int fd, TyObject *buffers, Ty_off_t offset, #pragma clang diagnostic ignored "-Wunguarded-availability-new" #endif do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH result = pwritev(fd, iov, cnt, offset); _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); #if defined(__APPLE__) && defined(__clang__) @@ -12493,9 +12493,9 @@ os_copy_file_range_impl(TyObject *module, int src, int dst, Ty_ssize_t count, } do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = copy_file_range(src, p_offset_src, dst, p_offset_dst, count, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (ret < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (ret < 0) { @@ -12562,9 +12562,9 @@ os_splice_impl(TyObject *module, int src, int dst, Ty_ssize_t count, } do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS ret = splice(src, p_offset_src, dst, p_offset_dst, count, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (ret < 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (ret < 0) { @@ -12603,7 +12603,7 @@ os_mkfifo_impl(TyObject *module, path_t *path, int mode, int dir_fd) #endif do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_MKFIFOAT if (dir_fd != DEFAULT_DIR_FD) { if (HAVE_MKFIFOAT_RUNTIME) { @@ -12616,7 +12616,7 @@ os_mkfifo_impl(TyObject *module, path_t *path, int mode, int dir_fd) } else #endif result = mkfifo(path->narrow, mode); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); @@ -12672,7 +12672,7 @@ os_mknod_impl(TyObject *module, path_t *path, int mode, dev_t device, #endif do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_MKNODAT if (dir_fd != DEFAULT_DIR_FD) { if (HAVE_MKNODAT_RUNTIME) { @@ -12685,7 +12685,7 @@ os_mknod_impl(TyObject *module, path_t *path, int mode, dev_t device, } else #endif result = mknod(path->narrow, mode, device); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); #ifdef HAVE_MKNODAT @@ -12806,7 +12806,7 @@ os_ftruncate_impl(TyObject *module, int fd, Ty_off_t length) } do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH #ifdef MS_WINDOWS result = _chsize_s(fd, length); @@ -12814,7 +12814,7 @@ os_ftruncate_impl(TyObject *module, int fd, Ty_off_t length) result = ftruncate(fd, length); #endif _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (result != 0) @@ -12852,7 +12852,7 @@ os_truncate_impl(TyObject *module, path_t *path, Ty_off_t length) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS _Ty_BEGIN_SUPPRESS_IPH #ifdef MS_WINDOWS fd = _wopen(path->wide, _O_WRONLY | _O_BINARY | _O_NOINHERIT); @@ -12868,7 +12868,7 @@ os_truncate_impl(TyObject *module, path_t *path, Ty_off_t length) result = truncate(path->narrow, length); #endif _Ty_END_SUPPRESS_IPH - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result < 0) return posix_path_error(path); @@ -12913,9 +12913,9 @@ os_posix_fallocate_impl(TyObject *module, int fd, Ty_off_t offset, int async_err = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = posix_fallocate(fd, offset, length); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result == EINTR && !(async_err = TyErr_CheckSignals())); if (result == 0) @@ -12960,9 +12960,9 @@ os_posix_fadvise_impl(TyObject *module, int fd, Ty_off_t offset, int async_err = 0; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = posix_fadvise(fd, offset, length, advice); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result == EINTR && !(async_err = TyErr_CheckSignals())); if (result == 0) @@ -13350,7 +13350,7 @@ os_WSTOPSIG_impl(TyObject *module, int status) static TyObject* _pystatvfs_fromstructstatfs(TyObject *module, struct statfs st) { TyObject *StatVFSResultType = get_posix_state(module)->StatVFSResultType; - TyObject *v = PyStructSequence_New((TyTypeObject *)StatVFSResultType); + TyObject *v = TyStructSequence_New((TyTypeObject *)StatVFSResultType); if (v == NULL) { return NULL; } @@ -13372,7 +13372,7 @@ _pystatvfs_fromstructstatfs(TyObject *module, struct statfs st) { Ty_DECREF((SEQ)); \ return NULL; \ } \ - PyStructSequence_SET_ITEM((SEQ), (INDEX), obj); \ + TyStructSequence_SET_ITEM((SEQ), (INDEX), obj); \ } while (0) SET_ITEM(v, 0, TyLong_FromLong((long) st.f_iosize)); @@ -13400,7 +13400,7 @@ _pystatvfs_fromstructstatfs(TyObject *module, struct statfs st) { static TyObject* _pystatvfs_fromstructstatvfs(TyObject *module, struct statvfs st) { TyObject *StatVFSResultType = get_posix_state(module)->StatVFSResultType; - TyObject *v = PyStructSequence_New((TyTypeObject *)StatVFSResultType); + TyObject *v = TyStructSequence_New((TyTypeObject *)StatVFSResultType); if (v == NULL) return NULL; @@ -13413,7 +13413,7 @@ _pystatvfs_fromstructstatvfs(TyObject *module, struct statvfs st) { Ty_DECREF(v); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(v, pos++, item); \ + TyStructSequence_SET_ITEM(v, pos++, item); \ } while(0) #if !defined(HAVE_LARGEFILE_SUPPORT) @@ -13477,9 +13477,9 @@ os_fstatvfs_impl(TyObject *module, int fd) * the former uses 32-bit values for block counts. */ do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = fstatfs(fd, &st); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (result != 0) @@ -13490,9 +13490,9 @@ os_fstatvfs_impl(TyObject *module, int fd) struct statvfs st; do { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = fstatvfs(fd, &st); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } while (result != 0 && errno == EINTR && !(async_err = TyErr_CheckSignals())); if (result != 0) @@ -13530,13 +13530,13 @@ os_statvfs_impl(TyObject *module, path_t *path) */ struct statfs st; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (path->fd != -1) { result = fstatfs(path->fd, &st); } else result = statfs(path->narrow, &st); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result) { return path_error(path); @@ -13547,7 +13547,7 @@ os_statvfs_impl(TyObject *module, path_t *path) #else struct statvfs st; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_FSTATVFS if (path->fd != -1) { result = fstatvfs(path->fd, &st); @@ -13555,7 +13555,7 @@ os_statvfs_impl(TyObject *module, path_t *path) else #endif result = statvfs(path->narrow, &st); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result) { return path_error(path); @@ -13584,9 +13584,9 @@ os__getdiskusage_impl(TyObject *module, path_t *path) ULARGE_INTEGER _, total, free; DWORD err = 0; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS retval = GetDiskFreeSpaceExW(path->wide, &_, &total, &free); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (retval == 0) { if (GetLastError() == ERROR_DIRECTORY) { wchar_t *dir_path = NULL; @@ -13599,9 +13599,9 @@ os__getdiskusage_impl(TyObject *module, path_t *path) wcscpy_s(dir_path, path->length + 1, path->wide); if (_dirnameW(dir_path) != -1) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS retval = GetDiskFreeSpaceExW(dir_path, &_, &total, &free); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } /* Record the last error in case it's modified by TyMem_Free. */ err = GetLastError(); @@ -14640,7 +14640,7 @@ check_ShellExecute(void) /* only recheck */ if (-1 == has_ShellExecute) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS /* Security note: this call is not vulnerable to "DLL hijacking". SHELL32 is part of "KnownDLLs" and so Windows always load the system SHELL32.DLL, even if there is another SHELL32.DLL @@ -14653,7 +14653,7 @@ check_ShellExecute(void) } else { has_ShellExecute = 0; } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } return has_ShellExecute; } @@ -14719,10 +14719,10 @@ os_startfile_impl(TyObject *module, path_t *filepath, return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS rc = Py_ShellExecuteW((HWND)0, operation, filepath->wide, arguments, cwd->wide, show_cmd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (rc <= (HINSTANCE)32) { win32_error_object("startfile", filepath->object); @@ -14911,14 +14911,14 @@ os_getxattr_impl(TyObject *module, path_t *path, path_t *attribute, return NULL; ptr = TyBytes_AS_STRING(buffer); - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; if (path->fd >= 0) result = fgetxattr(path->fd, attribute->narrow, ptr, buffer_size); else if (follow_symlinks) result = getxattr(path->narrow, attribute->narrow, ptr, buffer_size); else result = lgetxattr(path->narrow, attribute->narrow, ptr, buffer_size); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; if (result < 0) { if (errno == ERANGE) { @@ -14975,7 +14975,7 @@ os_setxattr_impl(TyObject *module, path_t *path, path_t *attribute, return NULL; } - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; if (path->fd > -1) result = fsetxattr(path->fd, attribute->narrow, value->buf, value->len, flags); @@ -14985,7 +14985,7 @@ os_setxattr_impl(TyObject *module, path_t *path, path_t *attribute, else result = lsetxattr(path->narrow, attribute->narrow, value->buf, value->len, flags); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; if (result) { path_error(path); @@ -15027,14 +15027,14 @@ os_removexattr_impl(TyObject *module, path_t *path, path_t *attribute, return NULL; } - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; if (path->fd > -1) result = fremovexattr(path->fd, attribute->narrow); else if (follow_symlinks) result = removexattr(path->narrow, attribute->narrow); else result = lremovexattr(path->narrow, attribute->narrow); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; if (result) { return path_error(path); @@ -15095,14 +15095,14 @@ os_listxattr_impl(TyObject *module, path_t *path, int follow_symlinks) break; } - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; if (path->fd > -1) length = flistxattr(path->fd, buffer, buffer_size); else if (follow_symlinks) length = listxattr(name, buffer, buffer_size); else length = llistxattr(name, buffer, buffer_size); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; if (length < 0) { if (errno == ERANGE) { @@ -15194,9 +15194,9 @@ os_memfd_create_impl(TyObject *module, TyObject *name, unsigned int flags) { int fd; const char *bytes = TyBytes_AS_STRING(name); - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS fd = memfd_create(bytes, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (fd == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -15221,9 +15221,9 @@ os_eventfd_impl(TyObject *module, unsigned int initval, int flags) { /* initval is limited to uint32_t, internal counter is uint64_t */ int fd; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS fd = eventfd(initval, flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (fd == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -15244,9 +15244,9 @@ os_eventfd_read_impl(TyObject *module, int fd) { eventfd_t value; int result; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = eventfd_read(fd, &value); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -15267,9 +15267,9 @@ os_eventfd_write_impl(TyObject *module, int fd, unsigned long long value) /*[clinic end generated code: output=bebd9040bbf987f5 input=156de8555be5a949]*/ { int result; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = eventfd_write(fd, value); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result == -1) { return TyErr_SetFromErrno(TyExc_OSError); } @@ -15279,16 +15279,16 @@ os_eventfd_write_impl(TyObject *module, int fd, unsigned long long value) /* Terminal size querying */ -PyDoc_STRVAR(TerminalSize_docstring, +TyDoc_STRVAR(TerminalSize_docstring, "A tuple of (columns, lines) for holding terminal window size"); -static PyStructSequence_Field TerminalSize_fields[] = { +static TyStructSequence_Field TerminalSize_fields[] = { {"columns", "width of the terminal window in characters"}, {"lines", "height of the terminal window in characters"}, {NULL, NULL} }; -static PyStructSequence_Desc TerminalSize_desc = { +static TyStructSequence_Desc TerminalSize_desc = { "os.terminal_size", TerminalSize_docstring, TerminalSize_fields, @@ -15359,7 +15359,7 @@ os_get_terminal_size_impl(TyObject *module, int fd) #endif /* TERMSIZE_USE_CONIO */ TyObject *TerminalSizeType = get_posix_state(module)->TerminalSizeType; - termsize = PyStructSequence_New((TyTypeObject *)TerminalSizeType); + termsize = TyStructSequence_New((TyTypeObject *)TerminalSizeType); if (termsize == NULL) return NULL; @@ -15372,7 +15372,7 @@ os_get_terminal_size_impl(TyObject *module, int fd) Ty_DECREF(termsize); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(termsize, pos++, item); \ + TyStructSequence_SET_ITEM(termsize, pos++, item); \ } while(0) SET_TERMSIZE(TyLong_FromLong(columns)); @@ -15690,10 +15690,10 @@ DirEntry_fetch_stat(TyObject *module, DirEntry *self, int follow_symlinks) if (self->dir_fd != DEFAULT_DIR_FD) { #ifdef HAVE_FSTATAT if (HAVE_FSTATAT_RUNTIME) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = fstatat(self->dir_fd, path, &st, follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } else #endif /* HAVE_FSTATAT */ @@ -15706,14 +15706,14 @@ DirEntry_fetch_stat(TyObject *module, DirEntry *self, int follow_symlinks) else #endif { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (follow_symlinks) { result = STAT(path, &st); } else { result = LSTAT(path, &st); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } int saved_errno = errno; @@ -15979,7 +15979,7 @@ static TyMethodDef DirEntry_methods[] = { OS_DIRENTRY_INODE_METHODDEF OS_DIRENTRY___FSPATH___METHODDEF {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL} }; @@ -16225,9 +16225,9 @@ ScandirIterator_closedir(ScandirIterator *iterator) return; iterator->handle = INVALID_HANDLE_VALUE; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS FindClose(handle); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } static TyObject * @@ -16244,9 +16244,9 @@ ScandirIterator_iternext(TyObject *op) while (1) { if (!iterator->first_time) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS success = FindNextFileW(iterator->handle, file_data); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!success) { /* Error or no more files */ if (GetLastError() != ERROR_NO_MORE_FILES) @@ -16292,13 +16292,13 @@ ScandirIterator_closedir(ScandirIterator *iterator) return; iterator->dirp = NULL; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_FDOPENDIR if (iterator->path.fd != -1) rewinddir(dirp); #endif closedir(dirp); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS return; } @@ -16317,9 +16317,9 @@ ScandirIterator_iternext(TyObject *op) while (1) { errno = 0; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS direntp = readdir(iterator->dirp); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!direntp) { /* Error or no more files */ @@ -16499,9 +16499,9 @@ os_scandir_impl(TyObject *module, path_t *path) if (!path_strW) goto error; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS iterator->handle = FindFirstFileW(path_strW, &iterator->file_data); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (iterator->handle == INVALID_HANDLE_VALUE) { path_error(&iterator->path); @@ -16519,9 +16519,9 @@ os_scandir_impl(TyObject *module, path_t *path) if (fd == -1) goto error; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS iterator->dirp = fdopendir(fd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } else { TyErr_SetString(TyExc_TypeError, "scandir: path should be string, bytes, os.PathLike or None, not int"); @@ -16536,18 +16536,18 @@ os_scandir_impl(TyObject *module, path_t *path) else path_str = "."; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS iterator->dirp = opendir(path_str); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } if (!iterator->dirp) { path_error(&iterator->path); #ifdef HAVE_FDOPENDIR if (fd != -1) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS close(fd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } #endif goto error; @@ -16718,11 +16718,11 @@ os__add_dll_directory_impl(TyObject *module, path_t *path) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (!(cookie = AddDllDirectory(path->wide))) { err = GetLastError(); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (err) { return win32_error_object_err("add_dll_directory", @@ -16760,11 +16760,11 @@ os__remove_dll_directory_impl(TyObject *module, TyObject *cookie) cookieValue = (DLL_DIRECTORY_COOKIE)PyCapsule_GetPointer( cookie, "DLL directory cookie"); - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS if (!RemoveDllDirectory(cookieValue)) { err = GetLastError(); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (err) { return win32_error_object_err("remove_dll_directory", @@ -16905,9 +16905,9 @@ os__inputhook_impl(TyObject *module) { int result = 0; if (TyOS_InputHook) { - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; result = TyOS_InputHook(); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; } return TyLong_FromLong(result); } @@ -18083,17 +18083,17 @@ posixmodule_exec(TyObject *m) #if defined(HAVE_WAITID) waitid_result_desc.name = MODNAME ".waitid_result"; - state->WaitidResultType = (TyObject *)PyStructSequence_NewType(&waitid_result_desc); + state->WaitidResultType = (TyObject *)TyStructSequence_NewType(&waitid_result_desc); if (TyModule_AddObjectRef(m, "waitid_result", state->WaitidResultType) < 0) { return -1; } #endif stat_result_desc.name = "os.stat_result"; /* see issue #19209 */ - stat_result_desc.fields[7].name = PyStructSequence_UnnamedField; - stat_result_desc.fields[8].name = PyStructSequence_UnnamedField; - stat_result_desc.fields[9].name = PyStructSequence_UnnamedField; - state->StatResultType = (TyObject *)PyStructSequence_NewType(&stat_result_desc); + stat_result_desc.fields[7].name = TyStructSequence_UnnamedField; + stat_result_desc.fields[8].name = TyStructSequence_UnnamedField; + stat_result_desc.fields[9].name = TyStructSequence_UnnamedField; + state->StatResultType = (TyObject *)TyStructSequence_NewType(&stat_result_desc); if (TyModule_AddObjectRef(m, "stat_result", state->StatResultType) < 0) { return -1; } @@ -18101,14 +18101,14 @@ posixmodule_exec(TyObject *m) ((TyTypeObject *)state->StatResultType)->tp_new = statresult_new; statvfs_result_desc.name = "os.statvfs_result"; /* see issue #19209 */ - state->StatVFSResultType = (TyObject *)PyStructSequence_NewType(&statvfs_result_desc); + state->StatVFSResultType = (TyObject *)TyStructSequence_NewType(&statvfs_result_desc); if (TyModule_AddObjectRef(m, "statvfs_result", state->StatVFSResultType) < 0) { return -1; } #if defined(HAVE_SCHED_SETPARAM) || defined(HAVE_SCHED_SETSCHEDULER) || defined(POSIX_SPAWN_SETSCHEDULER) || defined(POSIX_SPAWN_SETSCHEDPARAM) sched_param_desc.name = MODNAME ".sched_param"; - state->SchedParamType = (TyObject *)PyStructSequence_NewType(&sched_param_desc); + state->SchedParamType = (TyObject *)TyStructSequence_NewType(&sched_param_desc); if (TyModule_AddObjectRef(m, "sched_param", state->SchedParamType) < 0) { return -1; } @@ -18122,7 +18122,7 @@ posixmodule_exec(TyObject *m) #endif /* initialize TerminalSize_info */ - state->TerminalSizeType = (TyObject *)PyStructSequence_NewType(&TerminalSize_desc); + state->TerminalSizeType = (TyObject *)TyStructSequence_NewType(&TerminalSize_desc); if (TyModule_AddObjectRef(m, "terminal_size", state->TerminalSizeType) < 0) { return -1; } @@ -18140,12 +18140,12 @@ posixmodule_exec(TyObject *m) } times_result_desc.name = MODNAME ".times_result"; - state->TimesResultType = (TyObject *)PyStructSequence_NewType(×_result_desc); + state->TimesResultType = (TyObject *)TyStructSequence_NewType(×_result_desc); if (TyModule_AddObjectRef(m, "times_result", state->TimesResultType) < 0) { return -1; } - state->UnameResultType = (TyObject *)PyStructSequence_NewType(&uname_result_desc); + state->UnameResultType = (TyObject *)TyStructSequence_NewType(&uname_result_desc); if (TyModule_AddObjectRef(m, "uname_result", state->UnameResultType) < 0) { return -1; } diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c index 084b98b..e382003 100644 --- a/Modules/pwdmodule.c +++ b/Modules/pwdmodule.c @@ -20,7 +20,7 @@ module pwd [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=60f628ef356b97b6]*/ -static PyStructSequence_Field struct_pwd_type_fields[] = { +static TyStructSequence_Field struct_pwd_type_fields[] = { {"pw_name", "user name"}, {"pw_passwd", "password"}, {"pw_uid", "user id"}, @@ -31,20 +31,20 @@ static PyStructSequence_Field struct_pwd_type_fields[] = { {0} }; -PyDoc_STRVAR(struct_passwd__doc__, +TyDoc_STRVAR(struct_passwd__doc__, "pwd.struct_passwd: Results from getpw*() routines.\n\n\ This object may be accessed either as a tuple of\n\ (pw_name,pw_passwd,pw_uid,pw_gid,pw_gecos,pw_dir,pw_shell)\n\ or via the object attributes as named in the above tuple."); -static PyStructSequence_Desc struct_pwd_type_desc = { +static TyStructSequence_Desc struct_pwd_type_desc = { "pwd.struct_passwd", struct_passwd__doc__, struct_pwd_type_fields, 7, }; -PyDoc_STRVAR(pwd__doc__, +TyDoc_STRVAR(pwd__doc__, "This module provides access to the Unix password database.\n\ It is available on all Unix versions.\n\ \n\ @@ -74,7 +74,7 @@ static struct TyModuleDef pwdmodule; static TyObject * mkpwent(TyObject *module, struct passwd *p) { - TyObject *v = PyStructSequence_New(get_pwd_state(module)->StructPwdType); + TyObject *v = TyStructSequence_New(get_pwd_state(module)->StructPwdType); if (v == NULL) { return NULL; } @@ -90,7 +90,7 @@ mkpwent(TyObject *module, struct passwd *p) if (item == NULL) { \ goto error; \ } \ - PyStructSequence_SetItem(v, setIndex++, item); \ + TyStructSequence_SetItem(v, setIndex++, item); \ } while(0) SET_STRING(p->pw_name); @@ -331,7 +331,7 @@ pwdmodule_exec(TyObject *module) { pwdmodulestate *state = get_pwd_state(module); - state->StructPwdType = PyStructSequence_NewType(&struct_pwd_type_desc); + state->StructPwdType = TyStructSequence_NewType(&struct_pwd_type_desc); if (state->StructPwdType == NULL) { return -1; } diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 25abba6..417ad24 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1601,7 +1601,7 @@ static TyGetSetDef xmlparse_getsetlist[] = { #undef XMLPARSE_GETTER_DEF #undef XMLPARSE_GETTER_SETTER_DEF -PyDoc_STRVAR(Xmlparsetype__doc__, "XML parser"); +TyDoc_STRVAR(Xmlparsetype__doc__, "XML parser"); static TyType_Slot _xml_parse_type_spec_slots[] = { {Ty_tp_dealloc, xmlparse_dealloc}, @@ -1699,7 +1699,7 @@ static struct TyMethodDef pyexpat_methods[] = { /* Module docstring */ -PyDoc_STRVAR(pyexpat_module_documentation, +TyDoc_STRVAR(pyexpat_module_documentation, "Python wrapper for Expat parser."); /* Initialization function for the module */ diff --git a/Modules/readline.c b/Modules/readline.c index 21cf158..5659f69 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -1578,10 +1578,10 @@ call_readline(FILE *sys_stdin, FILE *sys_stdout, const char *prompt) /* Initialize the module */ -PyDoc_STRVAR(doc_module, +TyDoc_STRVAR(doc_module, "Importing this module enables command line editing using GNU readline."); -PyDoc_STRVAR(doc_module_le, +TyDoc_STRVAR(doc_module_le, "Importing this module enables command line editing using libedit readline."); static struct TyModuleDef readlinemodule = { diff --git a/Modules/resource.c b/Modules/resource.c index 0892074..57acca3 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -42,14 +42,14 @@ class pid_t_converter(CConverter): #include "clinic/resource.c.h" -PyDoc_STRVAR(struct_rusage__doc__, +TyDoc_STRVAR(struct_rusage__doc__, "struct_rusage: Result from getrusage.\n\n" "This object may be accessed either as a tuple of\n" " (utime,stime,maxrss,ixrss,idrss,isrss,minflt,majflt,\n" " nswap,inblock,oublock,msgsnd,msgrcv,nsignals,nvcsw,nivcsw)\n" "or via the attributes ru_utime, ru_stime, ru_maxrss, and so on."); -static PyStructSequence_Field struct_rusage_fields[] = { +static TyStructSequence_Field struct_rusage_fields[] = { {"ru_utime", "user time used"}, {"ru_stime", "system time used"}, {"ru_maxrss", "max. resident set size"}, @@ -69,7 +69,7 @@ static PyStructSequence_Field struct_rusage_fields[] = { {0} }; -static PyStructSequence_Desc struct_rusage_desc = { +static TyStructSequence_Desc struct_rusage_desc = { "resource.struct_rusage", /* name */ struct_rusage__doc__, /* doc */ struct_rusage_fields, /* fields */ @@ -117,29 +117,29 @@ resource_getrusage_impl(TyObject *module, int who) return NULL; } - result = PyStructSequence_New( + result = TyStructSequence_New( get_resource_state(module)->StructRUsageType); if (!result) return NULL; - PyStructSequence_SetItem(result, 0, + TyStructSequence_SetItem(result, 0, TyFloat_FromDouble(doubletime(ru.ru_utime))); - PyStructSequence_SetItem(result, 1, + TyStructSequence_SetItem(result, 1, TyFloat_FromDouble(doubletime(ru.ru_stime))); - PyStructSequence_SetItem(result, 2, TyLong_FromLong(ru.ru_maxrss)); - PyStructSequence_SetItem(result, 3, TyLong_FromLong(ru.ru_ixrss)); - PyStructSequence_SetItem(result, 4, TyLong_FromLong(ru.ru_idrss)); - PyStructSequence_SetItem(result, 5, TyLong_FromLong(ru.ru_isrss)); - PyStructSequence_SetItem(result, 6, TyLong_FromLong(ru.ru_minflt)); - PyStructSequence_SetItem(result, 7, TyLong_FromLong(ru.ru_majflt)); - PyStructSequence_SetItem(result, 8, TyLong_FromLong(ru.ru_nswap)); - PyStructSequence_SetItem(result, 9, TyLong_FromLong(ru.ru_inblock)); - PyStructSequence_SetItem(result, 10, TyLong_FromLong(ru.ru_oublock)); - PyStructSequence_SetItem(result, 11, TyLong_FromLong(ru.ru_msgsnd)); - PyStructSequence_SetItem(result, 12, TyLong_FromLong(ru.ru_msgrcv)); - PyStructSequence_SetItem(result, 13, TyLong_FromLong(ru.ru_nsignals)); - PyStructSequence_SetItem(result, 14, TyLong_FromLong(ru.ru_nvcsw)); - PyStructSequence_SetItem(result, 15, TyLong_FromLong(ru.ru_nivcsw)); + TyStructSequence_SetItem(result, 2, TyLong_FromLong(ru.ru_maxrss)); + TyStructSequence_SetItem(result, 3, TyLong_FromLong(ru.ru_ixrss)); + TyStructSequence_SetItem(result, 4, TyLong_FromLong(ru.ru_idrss)); + TyStructSequence_SetItem(result, 5, TyLong_FromLong(ru.ru_isrss)); + TyStructSequence_SetItem(result, 6, TyLong_FromLong(ru.ru_minflt)); + TyStructSequence_SetItem(result, 7, TyLong_FromLong(ru.ru_majflt)); + TyStructSequence_SetItem(result, 8, TyLong_FromLong(ru.ru_nswap)); + TyStructSequence_SetItem(result, 9, TyLong_FromLong(ru.ru_inblock)); + TyStructSequence_SetItem(result, 10, TyLong_FromLong(ru.ru_oublock)); + TyStructSequence_SetItem(result, 11, TyLong_FromLong(ru.ru_msgsnd)); + TyStructSequence_SetItem(result, 12, TyLong_FromLong(ru.ru_msgrcv)); + TyStructSequence_SetItem(result, 13, TyLong_FromLong(ru.ru_nsignals)); + TyStructSequence_SetItem(result, 14, TyLong_FromLong(ru.ru_nvcsw)); + TyStructSequence_SetItem(result, 15, TyLong_FromLong(ru.ru_nivcsw)); if (TyErr_Occurred()) { Ty_DECREF(result); @@ -378,7 +378,7 @@ resource_exec(TyObject *module) return -1; } - state->StructRUsageType = PyStructSequence_NewType(&struct_rusage_desc); + state->StructRUsageType = TyStructSequence_NewType(&struct_rusage_desc); if (state->StructRUsageType == NULL) { return -1; } diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index b027d7b..ca7622a 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -296,7 +296,7 @@ select_select_impl(TyObject *module, TyObject *rlist, TyObject *wlist, struct timeval tv, *tvp; int imax, omax, emax, max; int n; - PyTime_t timeout, deadline = 0; + TyTime_t timeout, deadline = 0; if (timeout_obj == Ty_None) tvp = (struct timeval *)NULL; @@ -624,7 +624,7 @@ select_poll_poll_impl(pollObject *self, TyObject *timeout_obj) TyObject *result_list = NULL; int poll_result, i, j; TyObject *value = NULL, *num = NULL; - PyTime_t timeout = -1, ms = -1, deadline = 0; + TyTime_t timeout = -1, ms = -1, deadline = 0; int async_err = 0; if (timeout_obj != Ty_None) { @@ -959,7 +959,7 @@ select_devpoll_poll_impl(devpollObject *self, TyObject *timeout_obj) TyObject *result_list = NULL; int poll_result, i; TyObject *value, *num1, *num2; - PyTime_t timeout, ms, deadline = 0; + TyTime_t timeout, ms, deadline = 0; if (self->fd_devpoll < 0) return devpoll_err_closed(); @@ -1581,7 +1581,7 @@ select_epoll_poll_impl(pyEpoll_Object *self, TyObject *timeout_obj, int nfds, i; TyObject *elist = NULL, *etuple = NULL; struct epoll_event *evs = NULL; - PyTime_t timeout = -1, ms = -1, deadline = 0; + TyTime_t timeout = -1, ms = -1, deadline = 0; if (self->epfd < 0) return pyepoll_err_closed(); @@ -1724,7 +1724,7 @@ static TyGetSetDef pyepoll_getsetlist[] = { {0}, }; -PyDoc_STRVAR(pyepoll_doc, +TyDoc_STRVAR(pyepoll_doc, "select.epoll(sizehint=-1, flags=0)\n\ \n\ Returns an epolling object\n\ @@ -1768,7 +1768,7 @@ the maximum number of monitored events."); #include #endif -PyDoc_STRVAR(kqueue_event_doc, +TyDoc_STRVAR(kqueue_event_doc, "kevent(ident, filter=KQ_FILTER_READ, flags=KQ_EV_ADD, fflags=0, data=0, udata=0)\n\ \n\ This object is the equivalent of the struct kevent for the C API.\n\ @@ -2308,7 +2308,7 @@ select_kqueue_control_impl(kqueue_queue_Object *self, TyObject *changelist, struct kevent *chl = NULL; struct timespec timeoutspec; struct timespec *ptimeoutspec; - PyTime_t timeout, deadline = 0; + TyTime_t timeout, deadline = 0; _selectstate *state = _selectstate_by_type(Ty_TYPE(self)); if (self->kqfd < 0) @@ -2578,7 +2578,7 @@ static TyMethodDef select_methods[] = { {0, 0}, /* sentinel */ }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module supports asynchronous I/O on multiple file descriptors.\n\ \n\ *** IMPORTANT NOTICE ***\n\ diff --git a/Modules/sha1module.c b/Modules/sha1module.c index 3b1b212..bc4da22 100644 --- a/Modules/sha1module.c +++ b/Modules/sha1module.c @@ -42,7 +42,7 @@ typedef struct { // Prevents undefined behavior via multiple threads entering the C API. bool use_mutex; PyMutex mutex; - PyThread_type_lock lock; + TyThread_type_lock lock; Hacl_Hash_SHA1_state_t *hash_state; } SHA1object; diff --git a/Modules/sha3module.c b/Modules/sha3module.c index 1920480..781eb45 100644 --- a/Modules/sha3module.c +++ b/Modules/sha3module.c @@ -440,22 +440,22 @@ static TyGetSetDef SHA3_getseters[] = { .slots = type_slots \ } -PyDoc_STRVAR(sha3_224__doc__, +TyDoc_STRVAR(sha3_224__doc__, "sha3_224([data], *, usedforsecurity=True) -> SHA3 object\n\ \n\ Return a new SHA3 hash object with a hashbit length of 28 bytes."); -PyDoc_STRVAR(sha3_256__doc__, +TyDoc_STRVAR(sha3_256__doc__, "sha3_256([data], *, usedforsecurity=True) -> SHA3 object\n\ \n\ Return a new SHA3 hash object with a hashbit length of 32 bytes."); -PyDoc_STRVAR(sha3_384__doc__, +TyDoc_STRVAR(sha3_384__doc__, "sha3_384([data], *, usedforsecurity=True) -> SHA3 object\n\ \n\ Return a new SHA3 hash object with a hashbit length of 48 bytes."); -PyDoc_STRVAR(sha3_512__doc__, +TyDoc_STRVAR(sha3_512__doc__, "sha3_512([data], *, usedforsecurity=True) -> SHA3 object\n\ \n\ Return a new SHA3 hash object with a hashbit length of 64 bytes."); @@ -570,12 +570,12 @@ static TyMethodDef SHAKE_methods[] = { {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(shake_128__doc__, +TyDoc_STRVAR(shake_128__doc__, "shake_128([data], *, usedforsecurity=True) -> SHAKE object\n\ \n\ Return a new SHAKE hash object."); -PyDoc_STRVAR(shake_256__doc__, +TyDoc_STRVAR(shake_256__doc__, "shake_256([data], *, usedforsecurity=True) -> SHAKE object\n\ \n\ Return a new SHAKE hash object."); diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index 7fcb86d..79c9e6c 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -174,7 +174,7 @@ timeval_from_double(TyObject *obj, struct timeval *tv) return 0; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromSecondsObject(&t, obj, _TyTime_ROUND_CEILING) < 0) { return -1; } @@ -302,7 +302,7 @@ trip_signal(int sig_num) int fd = wakeup.fd; if (fd != INVALID_FD) { - PyInterpreterState *interp = _TyInterpreterState_Main(); + TyInterpreterState *interp = _TyInterpreterState_Main(); unsigned char byte = (unsigned char)sig_num; #ifdef MS_WINDOWS if (wakeup.use_send) { @@ -1093,7 +1093,7 @@ signal_valid_signals_impl(TyObject *module) #if defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT) -static PyStructSequence_Field struct_siginfo_fields[] = { +static TyStructSequence_Field struct_siginfo_fields[] = { {"si_signo", "signal number"}, {"si_code", "signal code"}, {"si_errno", "errno associated with this signal"}, @@ -1104,13 +1104,13 @@ static PyStructSequence_Field struct_siginfo_fields[] = { {0} }; -PyDoc_STRVAR(struct_siginfo__doc__, +TyDoc_STRVAR(struct_siginfo__doc__, "struct_siginfo: Result from sigwaitinfo or sigtimedwait.\n\n\ This object may be accessed either as a tuple of\n\ (si_signo, si_code, si_errno, si_pid, si_uid, si_status, si_band),\n\ or via the attributes si_signo, si_code, and so on."); -static PyStructSequence_Desc struct_siginfo_desc = { +static TyStructSequence_Desc struct_siginfo_desc = { "signal.struct_siginfo", /* name */ struct_siginfo__doc__, /* doc */ struct_siginfo_fields, /* fields */ @@ -1121,28 +1121,28 @@ static PyStructSequence_Desc struct_siginfo_desc = { static TyObject * fill_siginfo(_signal_module_state *state, siginfo_t *si) { - TyObject *result = PyStructSequence_New(state->siginfo_type); + TyObject *result = TyStructSequence_New(state->siginfo_type); if (!result) return NULL; - PyStructSequence_SET_ITEM(result, 0, TyLong_FromLong((long)(si->si_signo))); - PyStructSequence_SET_ITEM(result, 1, TyLong_FromLong((long)(si->si_code))); + TyStructSequence_SET_ITEM(result, 0, TyLong_FromLong((long)(si->si_signo))); + TyStructSequence_SET_ITEM(result, 1, TyLong_FromLong((long)(si->si_code))); #ifdef __VXWORKS__ - PyStructSequence_SET_ITEM(result, 2, TyLong_FromLong(0L)); - PyStructSequence_SET_ITEM(result, 3, TyLong_FromLong(0L)); - PyStructSequence_SET_ITEM(result, 4, TyLong_FromLong(0L)); - PyStructSequence_SET_ITEM(result, 5, TyLong_FromLong(0L)); + TyStructSequence_SET_ITEM(result, 2, TyLong_FromLong(0L)); + TyStructSequence_SET_ITEM(result, 3, TyLong_FromLong(0L)); + TyStructSequence_SET_ITEM(result, 4, TyLong_FromLong(0L)); + TyStructSequence_SET_ITEM(result, 5, TyLong_FromLong(0L)); #else - PyStructSequence_SET_ITEM(result, 2, TyLong_FromLong((long)(si->si_errno))); - PyStructSequence_SET_ITEM(result, 3, TyLong_FromPid(si->si_pid)); - PyStructSequence_SET_ITEM(result, 4, _TyLong_FromUid(si->si_uid)); - PyStructSequence_SET_ITEM(result, 5, + TyStructSequence_SET_ITEM(result, 2, TyLong_FromLong((long)(si->si_errno))); + TyStructSequence_SET_ITEM(result, 3, TyLong_FromPid(si->si_pid)); + TyStructSequence_SET_ITEM(result, 4, _TyLong_FromUid(si->si_uid)); + TyStructSequence_SET_ITEM(result, 5, TyLong_FromLong((long)(si->si_status))); #endif #ifdef HAVE_SIGINFO_T_SI_BAND - PyStructSequence_SET_ITEM(result, 6, TyLong_FromLong(si->si_band)); + TyStructSequence_SET_ITEM(result, 6, TyLong_FromLong(si->si_band)); #else - PyStructSequence_SET_ITEM(result, 6, TyLong_FromLong(0L)); + TyStructSequence_SET_ITEM(result, 6, TyLong_FromLong(0L)); #endif if (TyErr_Occurred()) { Ty_DECREF(result); @@ -1209,7 +1209,7 @@ signal_sigtimedwait_impl(TyObject *module, sigset_t sigset, TyObject *timeout_obj) /*[clinic end generated code: output=59c8971e8ae18a64 input=955773219c1596cd]*/ { - PyTime_t timeout; + TyTime_t timeout; if (_TyTime_FromSecondsObject(&timeout, timeout_obj, _TyTime_ROUND_CEILING) < 0) return NULL; @@ -1219,7 +1219,7 @@ signal_sigtimedwait_impl(TyObject *module, sigset_t sigset, return NULL; } - PyTime_t deadline = _PyDeadline_Init(timeout); + TyTime_t deadline = _PyDeadline_Init(timeout); siginfo_t si; do { @@ -1364,7 +1364,7 @@ static TyMethodDef signal_methods[] = { }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides mechanisms to use signal handlers in Python.\n\ \n\ Functions:\n\ @@ -1649,7 +1649,7 @@ signal_module_exec(TyObject *m) #endif #if defined(HAVE_SIGWAITINFO) || defined(HAVE_SIGTIMEDWAIT) - modstate->siginfo_type = PyStructSequence_NewType(&struct_siginfo_desc); + modstate->siginfo_type = TyStructSequence_NewType(&struct_siginfo_desc); if (modstate->siginfo_type == NULL) { return -1; } @@ -2053,7 +2053,7 @@ _PySignal_AfterFork(void) int _TyOS_IsMainThread(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return _Ty_ThreadCanHandleSignals(interp); } diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 50d2d2d..b2d09d1 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -117,7 +117,7 @@ Local naming conventions: #endif /* Socket object documentation */ -PyDoc_STRVAR(sock_doc, +TyDoc_STRVAR(sock_doc, "socket(family=AF_INET, type=SOCK_STREAM, proto=0) -> socket object\n\ socket(family=-1, type=-1, proto=-1, fileno=None) -> socket object\n\ \n\ @@ -545,7 +545,7 @@ typedef struct _socket_state { TyObject *socket_gaierror; /* Default timeout for new sockets */ - PyTime_t defaulttimeout; + TyTime_t defaulttimeout; } socket_state; #if defined(HAVE_ACCEPT) || defined(HAVE_ACCEPT4) @@ -802,7 +802,7 @@ internal_setblocking(PySocketSockObject *s, int block) int delay_flag, new_delay_flag; #endif - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifndef MS_WINDOWS #if (defined(HAVE_SYS_IOCTL_H) && defined(FIONBIO)) block = !block; @@ -829,7 +829,7 @@ internal_setblocking(PySocketSockObject *s, int block) result = 0; done: - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result) { #ifndef MS_WINDOWS @@ -843,13 +843,13 @@ internal_setblocking(PySocketSockObject *s, int block) } static int -internal_select(PySocketSockObject *s, int writing, PyTime_t interval, +internal_select(PySocketSockObject *s, int writing, TyTime_t interval, int connect) { int n; #ifdef HAVE_POLL struct pollfd pollfd; - PyTime_t ms; + TyTime_t ms; #else fd_set fds, efds; struct timeval tv, *tvp; @@ -896,9 +896,9 @@ internal_select(PySocketSockObject *s, int writing, PyTime_t interval, } assert(INT_MIN <= ms && ms <= INT_MAX); - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; n = poll(&pollfd, 1, (int)ms); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; #else if (interval >= 0) { _TyTime_AsTimeval_clamp(interval, &tv, _TyTime_ROUND_CEILING); @@ -919,14 +919,14 @@ internal_select(PySocketSockObject *s, int writing, PyTime_t interval, } /* See if the socket is ready */ - Py_BEGIN_ALLOW_THREADS; + Ty_BEGIN_ALLOW_THREADS; if (writing) n = select(Py_SAFE_DOWNCAST(get_sock_fd(s)+1, SOCKET_T, int), NULL, &fds, &efds, tvp); else n = select(Py_SAFE_DOWNCAST(get_sock_fd(s)+1, SOCKET_T, int), &fds, NULL, &efds, tvp); - Py_END_ALLOW_THREADS; + Ty_END_ALLOW_THREADS; #endif if (n < 0) @@ -962,10 +962,10 @@ sock_call_ex(PySocketSockObject *s, void *data, int connect, int *err, - PyTime_t timeout) + TyTime_t timeout) { int has_timeout = (timeout > 0); - PyTime_t deadline = 0; + TyTime_t deadline = 0; int deadline_initialized = 0; int res; @@ -979,7 +979,7 @@ sock_call_ex(PySocketSockObject *s, runs asynchronously. */ if (has_timeout || connect) { if (has_timeout) { - PyTime_t interval; + TyTime_t interval; if (deadline_initialized) { /* recompute the timeout */ @@ -1037,9 +1037,9 @@ sock_call_ex(PySocketSockObject *s, /* inner loop to retry sock_func() when sock_func() is interrupted by a signal */ while (1) { - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = sock_func(s, data); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res) { /* sock_func() succeeded */ @@ -1166,7 +1166,7 @@ new_sockobject(socket_state *state, SOCKET_T fd, int family, int type, /* Lock to allow python interpreter to continue, but only allow one thread to be in gethostbyname or getaddrinfo */ #if defined(USE_GETHOSTBYNAME_LOCK) -static PyThread_type_lock netdb_lock; +static TyThread_type_lock netdb_lock; #endif @@ -1191,9 +1191,9 @@ setipaddr(socket_state *state, const char *name, struct sockaddr *addr_ret, hints.ai_family = af; hints.ai_socktype = SOCK_DGRAM; /*dummy*/ hints.ai_flags = AI_PASSIVE; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS error = getaddrinfo(NULL, "0", &hints, &res); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS /* We assume that those thread-unsafe getaddrinfo() versions *are* safe regarding their return value, ie. that a subsequent call to getaddrinfo() does not destroy the @@ -1298,7 +1298,7 @@ setipaddr(socket_state *state, const char *name, struct sockaddr *addr_ret, /* perform a name resolution */ memset(&hints, 0, sizeof(hints)); hints.ai_family = af; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS error = getaddrinfo(name, NULL, &hints, &res); #if defined(__digital__) && defined(__unix__) if (error == EAI_NONAME && af == AF_UNSPEC) { @@ -1308,7 +1308,7 @@ setipaddr(socket_state *state, const char *name, struct sockaddr *addr_ret, error = getaddrinfo(name, NULL, &hints, &res); } #endif - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (error) { res = NULL; // no-op, remind us that it is invalid; gh-100795 set_gaierror(state, error); @@ -3136,7 +3136,7 @@ finally: return res; } -PyDoc_STRVAR(accept_doc, +TyDoc_STRVAR(accept_doc, "_accept() -> (integer, address info)\n\ \n\ Wait for an incoming connection. Return a new socket file descriptor\n\ @@ -3167,7 +3167,7 @@ sock_setblocking(TyObject *self, TyObject *arg) Py_RETURN_NONE; } -PyDoc_STRVAR(setblocking_doc, +TyDoc_STRVAR(setblocking_doc, "setblocking(flag)\n\ \n\ Set the socket to blocking (flag is true) or non-blocking (false).\n\ @@ -3190,20 +3190,20 @@ sock_getblocking(TyObject *self, TyObject *Py_UNUSED(ignored)) } } -PyDoc_STRVAR(getblocking_doc, +TyDoc_STRVAR(getblocking_doc, "getblocking()\n\ \n\ Returns True if socket is in blocking mode, or False if it\n\ is in non-blocking mode."); static int -socket_parse_timeout(PyTime_t *timeout, TyObject *timeout_obj) +socket_parse_timeout(TyTime_t *timeout, TyObject *timeout_obj) { #ifdef MS_WINDOWS struct timeval tv; #endif #ifndef HAVE_POLL - PyTime_t ms; + TyTime_t ms; #endif int overflow = 0; @@ -3246,7 +3246,7 @@ socket_parse_timeout(PyTime_t *timeout, TyObject *timeout_obj) static TyObject * sock_settimeout(TyObject *self, TyObject *arg) { - PyTime_t timeout; + TyTime_t timeout; if (socket_parse_timeout(&timeout, arg) < 0) return NULL; @@ -3282,7 +3282,7 @@ sock_settimeout(TyObject *self, TyObject *arg) Py_RETURN_NONE; } -PyDoc_STRVAR(settimeout_doc, +TyDoc_STRVAR(settimeout_doc, "settimeout(timeout)\n\ \n\ Set a timeout on socket operations. 'timeout' can be a float,\n\ @@ -3317,7 +3317,7 @@ sock_gettimeout_getter(TyObject *self, void *Py_UNUSED(closure)) return sock_gettimeout_impl(self, NULL); } -PyDoc_STRVAR(gettimeout_doc, +TyDoc_STRVAR(gettimeout_doc, "gettimeout() -> timeout\n\ \n\ Returns the timeout in seconds (float) associated with socket\n\ @@ -3419,7 +3419,7 @@ done: Py_RETURN_NONE; } -PyDoc_STRVAR(setsockopt_doc, +TyDoc_STRVAR(setsockopt_doc, "setsockopt(level, option, value: int)\n\ setsockopt(level, option, value: buffer)\n\ setsockopt(level, option, None, optlen: int)\n\ @@ -3500,7 +3500,7 @@ sock_getsockopt(TyObject *self, TyObject *args) return buf; } -PyDoc_STRVAR(getsockopt_doc, +TyDoc_STRVAR(getsockopt_doc, "getsockopt(level, option[, buffersize]) -> value\n\ \n\ Get a socket option. See the Unix manual for level and option.\n\ @@ -3528,15 +3528,15 @@ sock_bind(TyObject *self, TyObject *addro) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = bind(get_sock_fd(s), SAS2SA(&addrbuf), addrlen); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); Py_RETURN_NONE; } -PyDoc_STRVAR(bind_doc, +TyDoc_STRVAR(bind_doc, "bind(address)\n\ \n\ Bind the socket to a local address. For IP sockets, the address is a\n\ @@ -3573,9 +3573,9 @@ _socket_socket_close_impl(PySocketSockObject *s) http://lwn.net/Articles/576478/ and http://linux.derkeiler.com/Mailing-Lists/Kernel/2005-09/3000.html for more details. */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = SOCKETCLOSE(fd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS /* bpo-30319: The peer can already have closed the connection. Python ignores ECONNRESET on close(). */ if (res < 0 && errno != ECONNRESET) { @@ -3594,7 +3594,7 @@ sock_detach(TyObject *self, TyObject *Py_UNUSED(ignored)) return TyLong_FromSocket_t(fd); } -PyDoc_STRVAR(detach_doc, +TyDoc_STRVAR(detach_doc, "detach()\n\ \n\ Close the socket object without closing the underlying file descriptor.\n\ @@ -3641,9 +3641,9 @@ internal_connect(PySocketSockObject *s, struct sockaddr *addr, int addrlen, { int res, err, wait_connect; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = connect(get_sock_fd(s), addr, addrlen); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (!res) { /* connect() succeeded, the socket is connected */ @@ -3729,7 +3729,7 @@ sock_connect(TyObject *self, TyObject *addro) Py_RETURN_NONE; } -PyDoc_STRVAR(connect_doc, +TyDoc_STRVAR(connect_doc, "connect(address)\n\ \n\ Connect the socket to a remote address. For IP sockets, the address\n\ @@ -3763,7 +3763,7 @@ sock_connect_ex(TyObject *self, TyObject *addro) return TyLong_FromLong((long) res); } -PyDoc_STRVAR(connect_ex_doc, +TyDoc_STRVAR(connect_ex_doc, "connect_ex(address) -> errno\n\ \n\ This is like connect(address), but returns an error code (the errno value)\n\ @@ -3780,7 +3780,7 @@ sock_fileno(TyObject *self, TyObject *Py_UNUSED(ignored)) return TyLong_FromSocket_t(get_sock_fd(s)); } -PyDoc_STRVAR(fileno_doc, +TyDoc_STRVAR(fileno_doc, "fileno() -> integer\n\ \n\ Return the integer file descriptor of the socket."); @@ -3801,16 +3801,16 @@ sock_getsockname(TyObject *self, TyObject *Py_UNUSED(ignored)) if (!getsockaddrlen(s, &addrlen)) return NULL; memset(&addrbuf, 0, addrlen); - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = getsockname(get_sock_fd(s), SAS2SA(&addrbuf), &addrlen); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); return makesockaddr(get_sock_fd(s), SAS2SA(&addrbuf), addrlen, s->sock_proto); } -PyDoc_STRVAR(getsockname_doc, +TyDoc_STRVAR(getsockname_doc, "getsockname() -> address info\n\ \n\ Return the address of the local endpoint. The format depends on the\n\ @@ -3835,16 +3835,16 @@ sock_getpeername(TyObject *self, TyObject *Py_UNUSED(ignored)) if (!getsockaddrlen(s, &addrlen)) return NULL; memset(&addrbuf, 0, addrlen); - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = getpeername(get_sock_fd(s), SAS2SA(&addrbuf), &addrlen); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); return makesockaddr(get_sock_fd(s), SAS2SA(&addrbuf), addrlen, s->sock_proto); } -PyDoc_STRVAR(getpeername_doc, +TyDoc_STRVAR(getpeername_doc, "getpeername() -> address info\n\ \n\ Return the address of the remote endpoint. For IP sockets, the address\n\ @@ -3868,19 +3868,19 @@ sock_listen(TyObject *self, TyObject *args) if (!TyArg_ParseTuple(args, "|i:listen", &backlog)) return NULL; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS /* To avoid problems on systems that don't allow a negative backlog * (which doesn't make sense anyway) we force a minimum value of 0. */ if (backlog < 0) backlog = 0; res = listen(get_sock_fd(s), backlog); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); Py_RETURN_NONE; } -PyDoc_STRVAR(listen_doc, +TyDoc_STRVAR(listen_doc, "listen([backlog])\n\ \n\ Enable a server to accept connections. If backlog is specified, it must be\n\ @@ -3987,7 +3987,7 @@ sock_recv(TyObject *self, TyObject *args) return buf; } -PyDoc_STRVAR(recv_doc, +TyDoc_STRVAR(recv_doc, "recv(buffersize[, flags]) -> data\n\ \n\ Receive up to buffersize bytes from the socket. For the optional flags\n\ @@ -4049,7 +4049,7 @@ sock_recv_into(TyObject *self, TyObject *args, TyObject *kwds) return TyLong_FromSsize_t(readlen); } -PyDoc_STRVAR(recv_into_doc, +TyDoc_STRVAR(recv_into_doc, "recv_into(buffer, [nbytes[, flags]]) -> nbytes_read\n\ \n\ A version of recv() that stores its data into a buffer rather than creating\n\ @@ -4181,7 +4181,7 @@ finally: return ret; } -PyDoc_STRVAR(recvfrom_doc, +TyDoc_STRVAR(recvfrom_doc, "recvfrom(buffersize[, flags]) -> (data, address info)\n\ \n\ Like recv(buffersize, flags) but also return the sender's address info."); @@ -4239,7 +4239,7 @@ sock_recvfrom_into(TyObject *self, TyObject *args, TyObject* kwds) return Ty_BuildValue("nN", readlen, addr); } -PyDoc_STRVAR(recvfrom_into_doc, +TyDoc_STRVAR(recvfrom_into_doc, "recvfrom_into(buffer[, nbytes[, flags]]) -> (nbytes, address info)\n\ \n\ Like recv_into(buffer[, nbytes[, flags]]) but also return the sender's address info."); @@ -4449,7 +4449,7 @@ sock_recvmsg(TyObject *self, TyObject *args) return retval; } -PyDoc_STRVAR(recvmsg_doc, +TyDoc_STRVAR(recvmsg_doc, "recvmsg(bufsize[, ancbufsize[, flags]]) -> (data, ancdata, msg_flags, address)\n\ \n\ Receive normal data (up to bufsize bytes) and ancillary data from the\n\ @@ -4541,7 +4541,7 @@ finally: return retval; } -PyDoc_STRVAR(recvmsg_into_doc, +TyDoc_STRVAR(recvmsg_into_doc, "recvmsg_into(buffers[, ancbufsize[, flags]]) -> (nbytes, ancdata, msg_flags, address)\n\ \n\ Receive normal data and ancillary data from the socket, scattering the\n\ @@ -4628,7 +4628,7 @@ sock_send(TyObject *self, TyObject *args) return TyLong_FromSsize_t(ctx.result); } -PyDoc_STRVAR(send_doc, +TyDoc_STRVAR(send_doc, "send(data[, flags]) -> count\n\ \n\ Send a data string to the socket. For the optional flags\n\ @@ -4649,8 +4649,8 @@ sock_sendall(TyObject *self, TyObject *args) Ty_buffer pbuf; struct sock_send ctx; int has_timeout = (s->sock_timeout > 0); - PyTime_t timeout = s->sock_timeout; - PyTime_t deadline = 0; + TyTime_t timeout = s->sock_timeout; + TyTime_t deadline = 0; int deadline_initialized = 0; TyObject *res = NULL; @@ -4707,7 +4707,7 @@ done: return res; } -PyDoc_STRVAR(sendall_doc, +TyDoc_STRVAR(sendall_doc, "sendall(data[, flags])\n\ \n\ Send a data string to the socket. For the optional flags\n\ @@ -4806,7 +4806,7 @@ sock_sendto(TyObject *self, TyObject *args) return TyLong_FromSsize_t(ctx.result); } -PyDoc_STRVAR(sendto_doc, +TyDoc_STRVAR(sendto_doc, "sendto(data[, flags], address) -> count\n\ \n\ Like send(data, flags) but allows specifying the destination address.\n\ @@ -5078,7 +5078,7 @@ finally: return retval; } -PyDoc_STRVAR(sendmsg_doc, +TyDoc_STRVAR(sendmsg_doc, "sendmsg(buffers[, ancdata[, flags[, address]]]) -> count\n\ \n\ Send normal and ancillary data to the socket, gathering the\n\ @@ -5257,7 +5257,7 @@ sock_sendmsg_afalg(TyObject *s, TyObject *args, TyObject *kwds) return retval; } -PyDoc_STRVAR(sendmsg_afalg_doc, +TyDoc_STRVAR(sendmsg_afalg_doc, "sendmsg_afalg([msg], *, op[, iv[, assoclen[, flags=MSG_MORE]]])\n\ \n\ Set operation mode, IV and length of associated data for an AF_ALG\n\ @@ -5278,15 +5278,15 @@ sock_shutdown(TyObject *self, TyObject *arg) how = TyLong_AsInt(arg); if (how == -1 && TyErr_Occurred()) return NULL; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = shutdown(get_sock_fd(s), how); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return s->errorhandler(); Py_RETURN_NONE; } -PyDoc_STRVAR(shutdown_doc, +TyDoc_STRVAR(shutdown_doc, "shutdown(flag)\n\ \n\ Shut down the reading side of the socket (flag == SHUT_RD), the writing side\n\ @@ -5342,7 +5342,7 @@ sock_ioctl(TyObject *self, TyObject *arg) return NULL; } } -PyDoc_STRVAR(sock_ioctl_doc, +TyDoc_STRVAR(sock_ioctl_doc, "ioctl(cmd, option) -> long\n\ \n\ Control the socket with WSAIoctl syscall. Currently supported 'cmd' values are\n\ @@ -5364,14 +5364,14 @@ sock_share(TyObject *self, TyObject *arg) if (!TyArg_ParseTuple(arg, "I", &processId)) return NULL; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS result = WSADuplicateSocketW(get_sock_fd(s), processId, &info); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (result == SOCKET_ERROR) return set_error(); return TyBytes_FromStringAndSize((const char*)&info, sizeof(info)); } -PyDoc_STRVAR(sock_share_doc, +TyDoc_STRVAR(sock_share_doc, "share(process_id) -> bytes\n\ \n\ Share the socket with another process. The target process id\n\ @@ -5473,7 +5473,7 @@ static TyMemberDef sock_memberlist[] = { }; static TyGetSetDef sock_getsetlist[] = { - {"timeout", sock_gettimeout_getter, NULL, PyDoc_STR("the socket timeout")}, + {"timeout", sock_gettimeout_getter, NULL, TyDoc_STR("the socket timeout")}, {NULL} /* sentinel */ }; @@ -5507,9 +5507,9 @@ sock_finalize(TyObject *self) set_sock_fd(s, INVALID_SOCKET); /* We do not want to retry upon EINTR: see sock_close() */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS (void) SOCKETCLOSE(fd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS } /* Restore the saved exception. */ @@ -5656,10 +5656,10 @@ sock_initobj_impl(PySocketSockObject *self, int family, int type, int proto, return -1; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS fd = WSASocketW(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, &info, 0, WSA_FLAG_OVERLAPPED); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (fd == INVALID_SOCKET) { set_error(); return -1; @@ -5761,11 +5761,11 @@ sock_initobj_impl(PySocketSockObject *self, int family, int type, int proto, proto = 0; } #ifdef MS_WINDOWS - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS fd = WSASocketW(family, type, proto, NULL, 0, WSA_FLAG_OVERLAPPED | WSA_FLAG_NO_HANDLE_INHERIT); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (fd == INVALID_SOCKET) { set_error(); @@ -5773,7 +5773,7 @@ sock_initobj_impl(PySocketSockObject *self, int family, int type, int proto, } #else /* UNIX */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef SOCK_CLOEXEC if (_Ty_atomic_load_int_relaxed(&sock_cloexec_works) != 0) { fd = socket(family, type | SOCK_CLOEXEC, proto); @@ -5794,7 +5794,7 @@ sock_initobj_impl(PySocketSockObject *self, int family, int type, int proto, { fd = socket(family, type, proto); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (fd == INVALID_SOCKET) { set_error(); @@ -5893,9 +5893,9 @@ socket_gethostname(TyObject *self, TyObject *unused) #else char buf[1024]; int res; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = gethostname(buf, (int) sizeof buf - 1); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (res < 0) return set_error(); buf[sizeof buf - 1] = '\0'; @@ -5903,14 +5903,14 @@ socket_gethostname(TyObject *self, TyObject *unused) #endif } -PyDoc_STRVAR(gethostname_doc, +TyDoc_STRVAR(gethostname_doc, "gethostname() -> string\n\ \n\ Return the current host name."); #endif #ifdef HAVE_SETHOSTNAME -PyDoc_STRVAR(sethostname_doc, +TyDoc_STRVAR(sethostname_doc, "sethostname(name)\n\n\ Sets the hostname to name."); @@ -5980,7 +5980,7 @@ finally: return ret; } -PyDoc_STRVAR(gethostbyname_doc, +TyDoc_STRVAR(gethostbyname_doc, "gethostbyname(host) -> address\n\ \n\ Return the IP address (a string of the form '255.255.255.255') for a host."); @@ -6179,7 +6179,7 @@ socket_gethostbyname_ex(TyObject *self, TyObject *args) if (setipaddr(state, name, SAS2SA(&addr), sizeof(addr), AF_INET) < 0) { goto finally; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_GETHOSTBYNAME_R #if defined(HAVE_GETHOSTBYNAME_R_6_ARG) gethostbyname_r(name, &hp_allocated, buf, buf_len, @@ -6193,12 +6193,12 @@ socket_gethostbyname_ex(TyObject *self, TyObject *args) #endif #else /* not HAVE_GETHOSTBYNAME_R */ #ifdef USE_GETHOSTBYNAME_LOCK - PyThread_acquire_lock(netdb_lock, 1); + TyThread_acquire_lock(netdb_lock, 1); #endif SUPPRESS_DEPRECATED_CALL h = gethostbyname(name); #endif /* HAVE_GETHOSTBYNAME_R */ - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS /* Some C libraries would require addr.__ss_family instead of addr.ss_family. Therefore, we cast the sockaddr_storage into sockaddr to @@ -6207,14 +6207,14 @@ socket_gethostbyname_ex(TyObject *self, TyObject *args) ret = gethost_common(state, h, SAS2SA(&addr), sizeof(addr), sa->sa_family); #ifdef USE_GETHOSTBYNAME_LOCK - PyThread_release_lock(netdb_lock); + TyThread_release_lock(netdb_lock); #endif finally: TyMem_Free(name); return ret; } -PyDoc_STRVAR(ghbn_ex_doc, +TyDoc_STRVAR(ghbn_ex_doc, "gethostbyname_ex(host) -> (name, aliaslist, addresslist)\n\ \n\ Return the true host name, a list of aliases, and a list of IP addresses,\n\ @@ -6282,7 +6282,7 @@ socket_gethostbyaddr(TyObject *self, TyObject *args) TyErr_SetString(TyExc_OSError, "unsupported address family"); goto finally; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef HAVE_GETHOSTBYNAME_R #if defined(HAVE_GETHOSTBYNAME_R_6_ARG) gethostbyaddr_r(ap, al, af, @@ -6298,22 +6298,22 @@ socket_gethostbyaddr(TyObject *self, TyObject *args) #endif #else /* not HAVE_GETHOSTBYNAME_R */ #ifdef USE_GETHOSTBYNAME_LOCK - PyThread_acquire_lock(netdb_lock, 1); + TyThread_acquire_lock(netdb_lock, 1); #endif SUPPRESS_DEPRECATED_CALL h = gethostbyaddr(ap, al, af); #endif /* HAVE_GETHOSTBYNAME_R */ - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS ret = gethost_common(state, h, SAS2SA(&addr), sizeof(addr), af); #ifdef USE_GETHOSTBYNAME_LOCK - PyThread_release_lock(netdb_lock); + TyThread_release_lock(netdb_lock); #endif finally: TyMem_Free(ip_num); return ret; } -PyDoc_STRVAR(gethostbyaddr_doc, +TyDoc_STRVAR(gethostbyaddr_doc, "gethostbyaddr(host) -> (name, aliaslist, addresslist)\n\ \n\ Return the true host name, a list of aliases, and a list of IP addresses,\n\ @@ -6338,9 +6338,9 @@ socket_getservbyname(TyObject *self, TyObject *args) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS sp = getservbyname(name, proto); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (sp == NULL) { TyErr_SetString(TyExc_OSError, "service/proto not found"); return NULL; @@ -6348,7 +6348,7 @@ socket_getservbyname(TyObject *self, TyObject *args) return TyLong_FromLong((long) ntohs(sp->s_port)); } -PyDoc_STRVAR(getservbyname_doc, +TyDoc_STRVAR(getservbyname_doc, "getservbyname(servicename[, protocolname]) -> integer\n\ \n\ Return a port number from a service name and protocol name.\n\ @@ -6381,9 +6381,9 @@ socket_getservbyport(TyObject *self, TyObject *args) return NULL; } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS sp = getservbyport(htons((short)port), proto); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (sp == NULL) { TyErr_SetString(TyExc_OSError, "port/proto not found"); return NULL; @@ -6391,7 +6391,7 @@ socket_getservbyport(TyObject *self, TyObject *args) return TyUnicode_FromString(sp->s_name); } -PyDoc_STRVAR(getservbyport_doc, +TyDoc_STRVAR(getservbyport_doc, "getservbyport(port[, protocolname]) -> string\n\ \n\ Return the service name from a port number and protocol name.\n\ @@ -6412,9 +6412,9 @@ socket_getprotobyname(TyObject *self, TyObject *args) struct protoent *sp; if (!TyArg_ParseTuple(args, "s:getprotobyname", &name)) return NULL; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS sp = getprotobyname(name); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (sp == NULL) { TyErr_SetString(TyExc_OSError, "protocol not found"); return NULL; @@ -6422,7 +6422,7 @@ socket_getprotobyname(TyObject *self, TyObject *args) return TyLong_FromLong((long) sp->p_proto); } -PyDoc_STRVAR(getprotobyname_doc, +TyDoc_STRVAR(getprotobyname_doc, "getprotobyname(name) -> integer\n\ \n\ Return the protocol number for the named protocol. (Rarely used.)"); @@ -6437,9 +6437,9 @@ socket_close(TyObject *self, TyObject *fdobj) fd = TyLong_AsSocket_t(fdobj); if (fd == (SOCKET_T)(-1) && TyErr_Occurred()) return NULL; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS res = SOCKETCLOSE(fd); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS /* bpo-30319: The peer can already have closed the connection. Python ignores ECONNRESET on close(). */ if (res < 0 && !CHECK_ERRNO(ECONNRESET)) { @@ -6448,7 +6448,7 @@ socket_close(TyObject *self, TyObject *fdobj) Py_RETURN_NONE; } -PyDoc_STRVAR(close_doc, +TyDoc_STRVAR(close_doc, "close(integer) -> None\n\ \n\ Close an integer socket file descriptor. This is like os.close(), but for\n\ @@ -6502,7 +6502,7 @@ socket_dup(TyObject *self, TyObject *fdobj) return newfdobj; } -PyDoc_STRVAR(dup_doc, +TyDoc_STRVAR(dup_doc, "dup(integer) -> integer\n\ \n\ Duplicate an integer socket file descriptor. This is like os.dup(), but for\n\ @@ -6541,7 +6541,7 @@ socket_socketpair(TyObject *self, TyObject *args) return NULL; /* Create a pair of socket fds */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS #ifdef SOCK_CLOEXEC if (_Ty_atomic_load_int_relaxed(&sock_cloexec_works) != 0) { ret = socketpair(family, type | SOCK_CLOEXEC, proto, sv); @@ -6561,7 +6561,7 @@ socket_socketpair(TyObject *self, TyObject *args) { ret = socketpair(family, type, proto, sv); } - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (ret < 0) return set_error(); @@ -6591,7 +6591,7 @@ finally: return res; } -PyDoc_STRVAR(socketpair_doc, +TyDoc_STRVAR(socketpair_doc, "socketpair([family[, type [, proto]]]) -> (socket object, socket object)\n\ \n\ Create a pair of socket objects from the sockets returned by the platform\n\ @@ -6769,7 +6769,7 @@ _socket_inet_ntoa_impl(TyObject *module, Ty_buffer *packed_ip) #ifdef HAVE_INET_PTON -PyDoc_STRVAR(inet_pton_doc, +TyDoc_STRVAR(inet_pton_doc, "inet_pton(af, ip) -> packed IP address string\n\ \n\ Convert an IP address from string format to a packed string suitable\n\ @@ -6820,7 +6820,7 @@ socket_inet_pton(TyObject *self, TyObject *args) } } -PyDoc_STRVAR(inet_ntop_doc, +TyDoc_STRVAR(inet_ntop_doc, "inet_ntop(af, packed_ip) -> string formatted IP address\n\ \n\ Convert a packed IP address of the given family to string format."); @@ -6964,9 +6964,9 @@ socket_getaddrinfo(TyObject *self, TyObject *args, TyObject* kwargs) hints.ai_socktype = socktype; hints.ai_protocol = protocol; hints.ai_flags = flags; - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS error = getaddrinfo(hptr, pptr, &hints, &res0); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (error) { res0 = NULL; // gh-100795 socket_state *state = get_module_state(self); @@ -7011,7 +7011,7 @@ socket_getaddrinfo(TyObject *self, TyObject *args, TyObject* kwargs) return (TyObject *)NULL; } -PyDoc_STRVAR(getaddrinfo_doc, +TyDoc_STRVAR(getaddrinfo_doc, "getaddrinfo(host, port [, family, type, proto, flags])\n\ -> list of (family, type, proto, canonname, sockaddr)\n\ \n\ @@ -7064,9 +7064,9 @@ socket_getnameinfo(TyObject *self, TyObject *args) hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; /* make numeric port happy */ hints.ai_flags = AI_NUMERICHOST; /* don't do any name resolution */ - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS error = getaddrinfo(hostp, pbuf, &hints, &res); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (error) { res = NULL; // gh-100795 socket_state *state = get_module_state(self); @@ -7099,10 +7099,10 @@ socket_getnameinfo(TyObject *self, TyObject *args) } #endif } - Py_BEGIN_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS error = getnameinfo(res->ai_addr, (socklen_t) res->ai_addrlen, hbuf, sizeof(hbuf), pbuf, sizeof(pbuf), flags); - Py_END_ALLOW_THREADS + Ty_END_ALLOW_THREADS if (error) { socket_state *state = get_module_state(self); set_gaierror(state, error); @@ -7120,7 +7120,7 @@ fail: return ret; } -PyDoc_STRVAR(getnameinfo_doc, +TyDoc_STRVAR(getnameinfo_doc, "getnameinfo(sockaddr, flags) --> (host, port)\n\ \n\ Get host and port for a sockaddr."); @@ -7132,7 +7132,7 @@ static TyObject * socket_getdefaulttimeout(TyObject *self, TyObject *Py_UNUSED(ignored)) { socket_state *state = get_module_state(self); - PyTime_t timeout = _Ty_atomic_load_int64_relaxed(&state->defaulttimeout); + TyTime_t timeout = _Ty_atomic_load_int64_relaxed(&state->defaulttimeout); if (timeout < 0) { Py_RETURN_NONE; } @@ -7142,7 +7142,7 @@ socket_getdefaulttimeout(TyObject *self, TyObject *Py_UNUSED(ignored)) } } -PyDoc_STRVAR(getdefaulttimeout_doc, +TyDoc_STRVAR(getdefaulttimeout_doc, "getdefaulttimeout() -> timeout\n\ \n\ Returns the default timeout in seconds (float) for new socket objects.\n\ @@ -7152,7 +7152,7 @@ When the socket module is first imported, the default is None."); static TyObject * socket_setdefaulttimeout(TyObject *self, TyObject *arg) { - PyTime_t timeout; + TyTime_t timeout; if (socket_parse_timeout(&timeout, arg) < 0) return NULL; @@ -7163,7 +7163,7 @@ socket_setdefaulttimeout(TyObject *self, TyObject *arg) Py_RETURN_NONE; } -PyDoc_STRVAR(setdefaulttimeout_doc, +TyDoc_STRVAR(setdefaulttimeout_doc, "setdefaulttimeout(timeout)\n\ \n\ Set the default timeout in seconds (float) for new socket objects.\n\ @@ -7254,7 +7254,7 @@ socket_if_nameindex(TyObject *self, TyObject *arg) #endif } -PyDoc_STRVAR(if_nameindex_doc, +TyDoc_STRVAR(if_nameindex_doc, "if_nameindex()\n\ \n\ Returns a list of network interface information (index, name) tuples."); @@ -7331,7 +7331,7 @@ socket_CMSG_LEN(TyObject *self, TyObject *args) return TyLong_FromSize_t(result); } -PyDoc_STRVAR(CMSG_LEN_doc, +TyDoc_STRVAR(CMSG_LEN_doc, "CMSG_LEN(length) -> control message length\n\ \n\ Return the total length, without trailing padding, of an ancillary\n\ @@ -7362,7 +7362,7 @@ socket_CMSG_SPACE(TyObject *self, TyObject *args) return TyLong_FromSize_t(result); } -PyDoc_STRVAR(CMSG_SPACE_doc, +TyDoc_STRVAR(CMSG_SPACE_doc, "CMSG_SPACE(length) -> buffer size\n\ \n\ Return the buffer size needed for recvmsg() to receive an ancillary\n\ @@ -7575,7 +7575,7 @@ sock_get_api(socket_state *state) WSACleanup() is scheduled to be made at exit time. */ -PyDoc_STRVAR(socket_doc, +TyDoc_STRVAR(socket_doc, "Implementation module for socket operations.\n\ \n\ See the socket module for documentation."); @@ -9218,7 +9218,7 @@ socket_exec(TyObject *m) /* Initialize gethostbyname lock */ #if defined(USE_GETHOSTBYNAME_LOCK) - netdb_lock = PyThread_allocate_lock(); + netdb_lock = TyThread_allocate_lock(); #endif #ifdef MS_WINDOWS diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index 3ed390a..c2bc0ee 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -333,7 +333,7 @@ typedef struct { TyObject *(*errorhandler)(void); /* Error handler; checks errno, returns NULL and sets a Python exception */ - PyTime_t sock_timeout; /* Operation timeout in seconds; + TyTime_t sock_timeout; /* Operation timeout in seconds; 0.0 means non-blocking */ struct _socket_state *state; #ifdef MS_WINDOWS diff --git a/Modules/termios.c b/Modules/termios.c index 763b89e..e533eaf 100644 --- a/Modules/termios.c +++ b/Modules/termios.c @@ -54,7 +54,7 @@ module termios #include "clinic/termios.c.h" -PyDoc_STRVAR(termios__doc__, +TyDoc_STRVAR(termios__doc__, "This module provides an interface to the Posix calls for tty I/O control.\n\ For a complete description of these calls, see the Posix or Unix manual\n\ pages. It is only available for those Unix versions that support Posix\n\ diff --git a/Modules/timemodule.c b/Modules/timemodule.c index c1f9deb..7a0f3ab 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -71,7 +71,7 @@ module time /* Forward declarations */ -static int pysleep(PyTime_t timeout); +static int pysleep(TyTime_t timeout); typedef struct { @@ -97,7 +97,7 @@ get_time_state(TyObject *module) static TyObject* -_TyFloat_FromPyTime(PyTime_t t) +_TyFloat_FromPyTime(TyTime_t t) { double d = PyTime_AsSecondsDouble(t); return TyFloat_FromDouble(d); @@ -107,7 +107,7 @@ _TyFloat_FromPyTime(PyTime_t t) static TyObject * time_time(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (PyTime_Time(&t) < 0) { return NULL; } @@ -115,7 +115,7 @@ time_time(TyObject *self, TyObject *unused) } -PyDoc_STRVAR(time_doc, +TyDoc_STRVAR(time_doc, "time() -> floating-point number\n\ \n\ Return the current time in seconds since the Epoch.\n\ @@ -124,14 +124,14 @@ Fractions of a second may be present if the system clock provides them."); static TyObject * time_time_ns(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (PyTime_Time(&t) < 0) { return NULL; } return _TyTime_AsLong(t); } -PyDoc_STRVAR(time_ns_doc, +TyDoc_STRVAR(time_ns_doc, "time_ns() -> int\n\ \n\ Return the current time in nanoseconds since the Epoch."); @@ -147,7 +147,7 @@ Return the current time in nanoseconds since the Epoch."); #endif static int -py_clock(time_module_state *state, PyTime_t *tp, _Ty_clock_info_t *info) +py_clock(time_module_state *state, TyTime_t *tp, _Ty_clock_info_t *info) { _PyTimeFraction *base = &state->clock_base; @@ -257,7 +257,7 @@ time_clock_gettime_ns_impl(TyObject *module, clockid_t clk_id) return NULL; } - PyTime_t t; + TyTime_t t; if (_TyTime_FromTimespec(&t, &ts) < 0) { return NULL; } @@ -271,7 +271,7 @@ time_clock_settime(TyObject *self, TyObject *args) { int clk_id; TyObject *obj; - PyTime_t t; + TyTime_t t; struct timespec tp; int ret; @@ -292,7 +292,7 @@ time_clock_settime(TyObject *self, TyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(clock_settime_doc, +TyDoc_STRVAR(clock_settime_doc, "clock_settime(clk_id, time)\n\ \n\ Set the time of the specified clock clk_id."); @@ -302,7 +302,7 @@ time_clock_settime_ns(TyObject *self, TyObject *args) { int clk_id; TyObject *obj; - PyTime_t t; + TyTime_t t; struct timespec ts; int ret; @@ -325,7 +325,7 @@ time_clock_settime_ns(TyObject *self, TyObject *args) Py_RETURN_NONE; } -PyDoc_STRVAR(clock_settime_ns_doc, +TyDoc_STRVAR(clock_settime_ns_doc, "clock_settime_ns(clk_id, time)\n\ \n\ Set the time of the specified clock clk_id with nanoseconds."); @@ -351,7 +351,7 @@ time_clock_getres(TyObject *self, TyObject *args) return TyFloat_FromDouble(tp.tv_sec + tp.tv_nsec * 1e-9); } -PyDoc_STRVAR(clock_getres_doc, +TyDoc_STRVAR(clock_getres_doc, "clock_getres(clk_id) -> floating-point number\n\ \n\ Return the resolution (precision) of the specified clock clk_id."); @@ -384,7 +384,7 @@ time_pthread_getcpuclockid(TyObject *self, TyObject *args) return TyLong_FromLong(clk_id); } -PyDoc_STRVAR(pthread_getcpuclockid_doc, +TyDoc_STRVAR(pthread_getcpuclockid_doc, "pthread_getcpuclockid(thread_id) -> int\n\ \n\ Return the clk_id of a thread's CPU time clock."); @@ -397,7 +397,7 @@ time_sleep(TyObject *self, TyObject *timeout_obj) return NULL; } - PyTime_t timeout; + TyTime_t timeout; if (_TyTime_FromSecondsObject(&timeout, timeout_obj, _TyTime_ROUND_TIMEOUT)) return NULL; if (timeout < 0) { @@ -411,13 +411,13 @@ time_sleep(TyObject *self, TyObject *timeout_obj) Py_RETURN_NONE; } -PyDoc_STRVAR(sleep_doc, +TyDoc_STRVAR(sleep_doc, "sleep(seconds)\n\ \n\ Delay execution for a given number of seconds. The argument may be\n\ a floating-point number for subsecond precision."); -static PyStructSequence_Field struct_time_type_fields[] = { +static TyStructSequence_Field struct_time_type_fields[] = { {"tm_year", "year, for example, 1993"}, {"tm_mon", "month of year, range [1, 12]"}, {"tm_mday", "day of month, range [1, 31]"}, @@ -432,7 +432,7 @@ static PyStructSequence_Field struct_time_type_fields[] = { {0} }; -static PyStructSequence_Desc struct_time_type_desc = { +static TyStructSequence_Desc struct_time_type_desc = { "time.struct_time", "The time value as returned by gmtime(), localtime(), and strptime(), and\n" " accepted by asctime(), mktime() and strftime(). May be considered as a\n" @@ -460,7 +460,7 @@ tmtotuple(time_module_state *state, struct tm *p #endif ) { - TyObject *v = PyStructSequence_New(state->struct_time_type); + TyObject *v = TyStructSequence_New(state->struct_time_type); if (v == NULL) return NULL; @@ -471,7 +471,7 @@ tmtotuple(time_module_state *state, struct tm *p Ty_DECREF(v); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(v, (INDEX), obj); \ + TyStructSequence_SET_ITEM(v, (INDEX), obj); \ } while (0) #define SET(INDEX, VAL) \ @@ -557,7 +557,7 @@ timegm(struct tm *p) } #endif -PyDoc_STRVAR(gmtime_doc, +TyDoc_STRVAR(gmtime_doc, "gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,\n\ tm_sec, tm_wday, tm_yday, tm_isdst)\n\ \n\ @@ -597,7 +597,7 @@ time_localtime(TyObject *module, TyObject *args) static const char *utc_string = NULL; #endif -PyDoc_STRVAR(localtime_doc, +TyDoc_STRVAR(localtime_doc, "localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,\n\ tm_sec,tm_wday,tm_yday,tm_isdst)\n\ \n\ @@ -639,7 +639,7 @@ gettmarg(time_module_state *state, TyObject *args, #ifdef HAVE_STRUCT_TM_TM_ZONE if (Ty_IS_TYPE(args, state->struct_time_type)) { TyObject *item; - item = PyStructSequence_GET_ITEM(args, 9); + item = TyStructSequence_GET_ITEM(args, 9); if (item != Ty_None) { p->tm_zone = (char *)TyUnicode_AsUTF8(item); if (p->tm_zone == NULL) { @@ -660,7 +660,7 @@ gettmarg(time_module_state *state, TyObject *args, } #endif } - item = PyStructSequence_GET_ITEM(args, 10); + item = TyStructSequence_GET_ITEM(args, 10); if (item != Ty_None) { p->tm_gmtoff = TyLong_AsLong(item); if (TyErr_Occurred()) @@ -967,7 +967,7 @@ error: #undef time_char #undef format_time -PyDoc_STRVAR(strftime_doc, +TyDoc_STRVAR(strftime_doc, "strftime(format[, tuple]) -> string\n\ \n\ Convert a time tuple to a string according to a format specification.\n\ @@ -992,7 +992,7 @@ time_strptime(TyObject *self, TyObject *args) } -PyDoc_STRVAR(strptime_doc, +TyDoc_STRVAR(strptime_doc, "strptime(string, format) -> struct_time\n\ \n\ Parse a string to a time tuple according to a format specification.\n\ @@ -1045,7 +1045,7 @@ time_asctime(TyObject *module, TyObject *args) return _asctime(&buf); } -PyDoc_STRVAR(asctime_doc, +TyDoc_STRVAR(asctime_doc, "asctime([tuple]) -> string\n\ \n\ Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.\n\ @@ -1064,7 +1064,7 @@ time_ctime(TyObject *self, TyObject *args) return _asctime(&buf); } -PyDoc_STRVAR(ctime_doc, +TyDoc_STRVAR(ctime_doc, "ctime(seconds) -> string\n\ \n\ Convert a time in seconds since the Epoch to a string in local time.\n\ @@ -1142,7 +1142,7 @@ time_mktime(TyObject *module, TyObject *tm_tuple) return TyFloat_FromDouble((double)tt); } -PyDoc_STRVAR(mktime_doc, +TyDoc_STRVAR(mktime_doc, "mktime(tuple) -> floating-point number\n\ \n\ Convert a time tuple in local time to seconds since the Epoch.\n\ @@ -1179,7 +1179,7 @@ time_tzset(TyObject *self, TyObject *unused) Py_RETURN_NONE; } -PyDoc_STRVAR(tzset_doc, +TyDoc_STRVAR(tzset_doc, "tzset()\n\ \n\ Initialize, or reinitialize, the local timezone to the value stored in\n\ @@ -1197,14 +1197,14 @@ should not be relied on."); static TyObject * time_monotonic(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (PyTime_Monotonic(&t) < 0) { return NULL; } return _TyFloat_FromPyTime(t); } -PyDoc_STRVAR(monotonic_doc, +TyDoc_STRVAR(monotonic_doc, "monotonic() -> float\n\ \n\ Monotonic clock, cannot go backward."); @@ -1212,14 +1212,14 @@ Monotonic clock, cannot go backward."); static TyObject * time_monotonic_ns(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (PyTime_Monotonic(&t) < 0) { return NULL; } return _TyTime_AsLong(t); } -PyDoc_STRVAR(monotonic_ns_doc, +TyDoc_STRVAR(monotonic_ns_doc, "monotonic_ns() -> int\n\ \n\ Monotonic clock, cannot go backward, as nanoseconds."); @@ -1228,14 +1228,14 @@ Monotonic clock, cannot go backward, as nanoseconds."); static TyObject * time_perf_counter(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (PyTime_PerfCounter(&t) < 0) { return NULL; } return _TyFloat_FromPyTime(t); } -PyDoc_STRVAR(perf_counter_doc, +TyDoc_STRVAR(perf_counter_doc, "perf_counter() -> float\n\ \n\ Performance counter for benchmarking."); @@ -1244,14 +1244,14 @@ Performance counter for benchmarking."); static TyObject * time_perf_counter_ns(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (PyTime_PerfCounter(&t) < 0) { return NULL; } return _TyTime_AsLong(t); } -PyDoc_STRVAR(perf_counter_ns_doc, +TyDoc_STRVAR(perf_counter_ns_doc, "perf_counter_ns() -> int\n\ \n\ Performance counter for benchmarking as nanoseconds."); @@ -1260,7 +1260,7 @@ Performance counter for benchmarking as nanoseconds."); // gh-115714: Don't use times() on WASI. #if defined(HAVE_TIMES) && !defined(__wasi__) static int -process_time_times(time_module_state *state, PyTime_t *tp, +process_time_times(time_module_state *state, TyTime_t *tp, _Ty_clock_info_t *info) { _PyTimeFraction *base = &state->times_base; @@ -1277,7 +1277,7 @@ process_time_times(time_module_state *state, PyTime_t *tp, info->adjustable = 0; } - PyTime_t ns; + TyTime_t ns; ns = _PyTimeFraction_Mul(process.tms_utime, base); ns += _PyTimeFraction_Mul(process.tms_stime, base); *tp = ns; @@ -1287,14 +1287,14 @@ process_time_times(time_module_state *state, PyTime_t *tp, static int -py_process_time(time_module_state *state, PyTime_t *tp, +py_process_time(time_module_state *state, TyTime_t *tp, _Ty_clock_info_t *info) { #if defined(MS_WINDOWS) HANDLE process; FILETIME creation_time, exit_time, kernel_time, user_time; ULARGE_INTEGER large; - PyTime_t ktime, utime; + TyTime_t ktime, utime; BOOL ok; process = GetCurrentProcess(); @@ -1373,7 +1373,7 @@ py_process_time(time_module_state *state, PyTime_t *tp, struct rusage ru; if (getrusage(RUSAGE_SELF, &ru) == 0) { - PyTime_t utime, stime; + TyTime_t utime, stime; if (info) { info->implementation = "getrusage(RUSAGE_SELF)"; @@ -1389,7 +1389,7 @@ py_process_time(time_module_state *state, PyTime_t *tp, return -1; } - PyTime_t total = utime + stime; + TyTime_t total = utime + stime; *tp = total; return 0; } @@ -1417,14 +1417,14 @@ static TyObject * time_process_time(TyObject *module, TyObject *unused) { time_module_state *state = get_time_state(module); - PyTime_t t; + TyTime_t t; if (py_process_time(state, &t, NULL) < 0) { return NULL; } return _TyFloat_FromPyTime(t); } -PyDoc_STRVAR(process_time_doc, +TyDoc_STRVAR(process_time_doc, "process_time() -> float\n\ \n\ Process time for profiling: sum of the kernel and user-space CPU time."); @@ -1433,14 +1433,14 @@ static TyObject * time_process_time_ns(TyObject *module, TyObject *unused) { time_module_state *state = get_time_state(module); - PyTime_t t; + TyTime_t t; if (py_process_time(state, &t, NULL) < 0) { return NULL; } return _TyTime_AsLong(t); } -PyDoc_STRVAR(process_time_ns_doc, +TyDoc_STRVAR(process_time_ns_doc, "process_time() -> int\n\ \n\ Process time for profiling as nanoseconds:\n\ @@ -1450,12 +1450,12 @@ sum of the kernel and user-space CPU time."); #if defined(MS_WINDOWS) #define HAVE_THREAD_TIME static int -_TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) +_TyTime_GetThreadTimeWithInfo(TyTime_t *tp, _Ty_clock_info_t *info) { HANDLE thread; FILETIME creation_time, exit_time, kernel_time, user_time; ULARGE_INTEGER large; - PyTime_t ktime, utime; + TyTime_t ktime, utime; BOOL ok; thread = GetCurrentThread(); @@ -1489,7 +1489,7 @@ _TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) #elif defined(_AIX) #define HAVE_THREAD_TIME static int -_TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) +_TyTime_GetThreadTimeWithInfo(TyTime_t *tp, _Ty_clock_info_t *info) { /* bpo-40192: On AIX, thread_cputime() is preferred: it has nanosecond resolution, whereas clock_gettime(CLOCK_THREAD_CPUTIME_ID) @@ -1513,7 +1513,7 @@ _TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) #elif defined(__sun) && defined(__SVR4) #define HAVE_THREAD_TIME static int -_TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) +_TyTime_GetThreadTimeWithInfo(TyTime_t *tp, _Ty_clock_info_t *info) { /* bpo-35455: On Solaris, CLOCK_THREAD_CPUTIME_ID clock is not always available; use gethrvtime() to substitute this functionality. */ @@ -1541,7 +1541,7 @@ _TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) #if defined(__APPLE__) && _Ty__has_attribute(availability) static int -_TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) +_TyTime_GetThreadTimeWithInfo(TyTime_t *tp, _Ty_clock_info_t *info) __attribute__((availability(macos, introduced=10.12))) __attribute__((availability(ios, introduced=10.0))) __attribute__((availability(tvos, introduced=10.0))) @@ -1549,7 +1549,7 @@ _TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) #endif static int -_TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) +_TyTime_GetThreadTimeWithInfo(TyTime_t *tp, _Ty_clock_info_t *info) { struct timespec ts; const clockid_t clk_id = CLOCK_THREAD_CPUTIME_ID; @@ -1591,14 +1591,14 @@ _TyTime_GetThreadTimeWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) static TyObject * time_thread_time(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (_TyTime_GetThreadTimeWithInfo(&t, NULL) < 0) { return NULL; } return _TyFloat_FromPyTime(t); } -PyDoc_STRVAR(thread_time_doc, +TyDoc_STRVAR(thread_time_doc, "thread_time() -> float\n\ \n\ Thread time for profiling: sum of the kernel and user-space CPU time."); @@ -1606,14 +1606,14 @@ Thread time for profiling: sum of the kernel and user-space CPU time."); static TyObject * time_thread_time_ns(TyObject *self, TyObject *unused) { - PyTime_t t; + TyTime_t t; if (_TyTime_GetThreadTimeWithInfo(&t, NULL) < 0) { return NULL; } return _TyTime_AsLong(t); } -PyDoc_STRVAR(thread_time_ns_doc, +TyDoc_STRVAR(thread_time_ns_doc, "thread_time() -> int\n\ \n\ Thread time for profiling as nanoseconds:\n\ @@ -1632,7 +1632,7 @@ time_get_clock_info(TyObject *module, TyObject *args) char *name; _Ty_clock_info_t info; TyObject *obj = NULL, *dict, *ns; - PyTime_t t; + TyTime_t t; if (!TyArg_ParseTuple(args, "s:get_clock_info", &name)) { return NULL; @@ -1749,7 +1749,7 @@ error: return NULL; } -PyDoc_STRVAR(get_clock_info_doc, +TyDoc_STRVAR(get_clock_info_doc, "get_clock_info(name: str) -> dict\n\ \n\ Get information of the specified clock."); @@ -1948,7 +1948,7 @@ static TyMethodDef time_methods[] = { }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides various functions to manipulate time values.\n\ \n\ There are two standard representations of time. One is the number\n\ @@ -2099,7 +2099,7 @@ time_exec(TyObject *module) } // struct_time type - state->struct_time_type = PyStructSequence_NewType(&struct_time_type_desc); + state->struct_time_type = TyStructSequence_NewType(&struct_time_type_desc); if (state->struct_time_type == NULL) { return -1; } @@ -2213,7 +2213,7 @@ PyInit_time(void) // On error, raise an exception and return -1. // On success, return 0. static int -pysleep(PyTime_t timeout) +pysleep(TyTime_t timeout) { assert(timeout >= 0); @@ -2225,7 +2225,7 @@ pysleep(PyTime_t timeout) #else struct timeval timeout_tv; #endif - PyTime_t deadline, monotonic; + TyTime_t deadline, monotonic; int err = 0; if (PyTime_Monotonic(&monotonic) < 0) { @@ -2294,7 +2294,7 @@ pysleep(PyTime_t timeout) return 0; #else // MS_WINDOWS - PyTime_t timeout_100ns = _TyTime_As100Nanoseconds(timeout, + TyTime_t timeout_100ns = _TyTime_As100Nanoseconds(timeout, _TyTime_ROUND_CEILING); // Maintain Windows Sleep() semantics for time.sleep(0) diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index cb17e4f..3583561 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -1625,7 +1625,7 @@ static TyType_Spec ucd_type_spec = { .slots = ucd_type_slots }; -PyDoc_STRVAR(unicodedata_docstring, +TyDoc_STRVAR(unicodedata_docstring, "This module provides access to the Unicode Character Database which\n\ defines character properties for all Unicode characters. The data in\n\ this database is based on the UnicodeData.txt file version\n\ diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c index 74d34fe..5d1bed6 100644 --- a/Modules/xxlimited.c +++ b/Modules/xxlimited.c @@ -230,7 +230,7 @@ Xxo_demo(TyObject *op, TyTypeObject *defining_class, static TyMethodDef Xxo_methods[] = { {"demo", _PyCFunction_CAST(Xxo_demo), - METH_METHOD | METH_FASTCALL | METH_KEYWORDS, PyDoc_STR("demo(o) -> o")}, + METH_METHOD | METH_FASTCALL | METH_KEYWORDS, TyDoc_STR("demo(o) -> o")}, {NULL, NULL} /* sentinel */ }; @@ -265,7 +265,7 @@ Xxo_get_x_exports(TyObject *op, void *Py_UNUSED(closure)) /* Xxo type definition */ -PyDoc_STRVAR(Xxo_doc, +TyDoc_STRVAR(Xxo_doc, "A class that explicitly stores attributes in an internal dict"); static TyGetSetDef Xxo_getsetlist[] = { @@ -313,7 +313,7 @@ static TyType_Spec Str_Type_spec = { /* Function of two integers returning integer (with C "long int" arithmetic) */ -PyDoc_STRVAR(xx_foo_doc, +TyDoc_STRVAR(xx_foo_doc, "foo(i,j)\n\ \n\ Return the sum of i and j."); @@ -351,14 +351,14 @@ static TyMethodDef xx_methods[] = { {"foo", xx_foo, METH_VARARGS, xx_foo_doc}, {"new", xx_new, METH_NOARGS, - PyDoc_STR("new() -> new Xx object")}, + TyDoc_STR("new() -> new Xx object")}, {NULL, NULL} /* sentinel */ }; /* The module itself */ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This is a template module just for instruction."); static int diff --git a/Modules/xxlimited_35.c b/Modules/xxlimited_35.c index 43aab21..a267393 100644 --- a/Modules/xxlimited_35.c +++ b/Modules/xxlimited_35.c @@ -79,7 +79,7 @@ Xxo_demo(TyObject *self, TyObject *args) } static TyMethodDef Xxo_methods[] = { - {"demo", Xxo_demo, METH_VARARGS, PyDoc_STR("demo() -> None")}, + {"demo", Xxo_demo, METH_VARARGS, TyDoc_STR("demo() -> None")}, {NULL, NULL} /* sentinel */ }; @@ -143,7 +143,7 @@ static TyType_Spec Xxo_Type_spec = { /* Function of two integers returning integer */ -PyDoc_STRVAR(xx_foo_doc, +TyDoc_STRVAR(xx_foo_doc, "foo(i,j)\n\ \n\ Return the sum of i and j."); @@ -232,15 +232,15 @@ static TyType_Spec Null_Type_spec = { static TyMethodDef xx_methods[] = { {"roj", xx_roj, METH_VARARGS, - PyDoc_STR("roj(a,b) -> None")}, + TyDoc_STR("roj(a,b) -> None")}, {"foo", xx_foo, METH_VARARGS, xx_foo_doc}, {"new", xx_new, METH_VARARGS, - PyDoc_STR("new() -> new Xx object")}, + TyDoc_STR("new() -> new Xx object")}, {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This is a module for testing limited API from Python 3.5."); static int diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c index 5e37ccb..7d966b0 100644 --- a/Modules/xxmodule.c +++ b/Modules/xxmodule.c @@ -58,7 +58,7 @@ Xxo_demo(TyObject *Py_UNUSED(op), TyObject *args) } static TyMethodDef Xxo_methods[] = { - {"demo", Xxo_demo, METH_VARARGS, PyDoc_STR("demo() -> None")}, + {"demo", Xxo_demo, METH_VARARGS, TyDoc_STR("demo() -> None")}, {NULL, NULL} /* sentinel */ }; @@ -102,7 +102,7 @@ Xxo_setattr(TyObject *op, const char *name, TyObject *v) static TyTypeObject Xxo_Type = { /* The ob_type field must be initialized in the module init function * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "xxmodule.Xxo", /*tp_name*/ sizeof(XxoObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -148,7 +148,7 @@ static TyTypeObject Xxo_Type = { /* Function of two integers returning integer */ -PyDoc_STRVAR(xx_foo_doc, +TyDoc_STRVAR(xx_foo_doc, "foo(i,j)\n\ \n\ Return the sum of i and j."); @@ -218,7 +218,7 @@ xx_roj(TyObject *self, TyObject *args) static TyTypeObject Str_Type = { /* The ob_type field must be initialized in the module init function * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "xxmodule.Str", /*tp_name*/ 0, /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -272,7 +272,7 @@ null_richcompare(TyObject *self, TyObject *other, int op) static TyTypeObject Null_Type = { /* The ob_type field must be initialized in the module init function * to be portable to Windows without using C++. */ - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "xxmodule.Null", /*tp_name*/ 0, /*tp_basicsize*/ 0, /*tp_itemsize*/ @@ -323,17 +323,17 @@ static TyTypeObject Null_Type = { static TyMethodDef xx_methods[] = { {"roj", xx_roj, METH_VARARGS, - PyDoc_STR("roj(a,b) -> None")}, + TyDoc_STR("roj(a,b) -> None")}, {"foo", xx_foo, METH_VARARGS, xx_foo_doc}, {"new", xx_new, METH_VARARGS, - PyDoc_STR("new() -> new Xx object")}, + TyDoc_STR("new() -> new Xx object")}, {"bug", xx_bug, METH_VARARGS, - PyDoc_STR("bug(o) -> None")}, + TyDoc_STR("bug(o) -> None")}, {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This is a template module just for instruction."); diff --git a/Modules/xxsubtype.c b/Modules/xxsubtype.c index ec171a7..09afd7c 100644 --- a/Modules/xxsubtype.c +++ b/Modules/xxsubtype.c @@ -4,7 +4,7 @@ #include // clock() -PyDoc_STRVAR(xxsubtype__doc__, +TyDoc_STRVAR(xxsubtype__doc__, "xxsubtype is an example module showing how to subtype builtin types from C.\n" "test_descr.py in the standard test suite requires it in order to complete.\n" "If you don't care about the examples, and don't intend to run the Python\n" @@ -69,17 +69,17 @@ spamlist_specialmeth(TyObject *self, TyObject *args, TyObject *kw) static TyMethodDef spamlist_methods[] = { {"getstate", spamlist_getstate, METH_VARARGS, - PyDoc_STR("getstate() -> state")}, + TyDoc_STR("getstate() -> state")}, {"setstate", spamlist_setstate, METH_VARARGS, - PyDoc_STR("setstate(state)")}, + TyDoc_STR("setstate(state)")}, /* These entries differ only in the flags; they are used by the tests in test.test_descr. */ {"classmeth", _PyCFunction_CAST(spamlist_specialmeth), METH_VARARGS | METH_KEYWORDS | METH_CLASS, - PyDoc_STR("classmeth(*args, **kw)")}, + TyDoc_STR("classmeth(*args, **kw)")}, {"staticmeth", _PyCFunction_CAST(spamlist_specialmeth), METH_VARARGS | METH_KEYWORDS | METH_STATIC, - PyDoc_STR("staticmeth(*args, **kw)")}, + TyDoc_STR("staticmeth(*args, **kw)")}, {NULL, NULL}, }; @@ -103,12 +103,12 @@ spamlist_state_get(TyObject *op, void *Py_UNUSED(closure)) static TyGetSetDef spamlist_getsets[] = { {"state", spamlist_state_get, NULL, - PyDoc_STR("an int variable for demonstration purposes")}, + TyDoc_STR("an int variable for demonstration purposes")}, {0} }; static TyTypeObject spamlist_type = { - PyVarObject_HEAD_INIT(DEFERRED_ADDRESS(&TyType_Type), 0) + TyVarObject_HEAD_INIT(DEFERRED_ADDRESS(&TyType_Type), 0) "xxsubtype.spamlist", sizeof(spamlistobject), 0, @@ -182,9 +182,9 @@ spamdict_setstate(TyObject *op, TyObject *args) static TyMethodDef spamdict_methods[] = { {"getstate", spamdict_getstate, METH_VARARGS, - PyDoc_STR("getstate() -> state")}, + TyDoc_STR("getstate() -> state")}, {"setstate", spamdict_setstate, METH_VARARGS, - PyDoc_STR("setstate(state)")}, + TyDoc_STR("setstate(state)")}, {NULL, NULL}, }; @@ -201,12 +201,12 @@ spamdict_init(TyObject *op, TyObject *args, TyObject *kwds) static TyMemberDef spamdict_members[] = { {"state", Ty_T_INT, offsetof(spamdictobject, state), Py_READONLY, - PyDoc_STR("an int variable for demonstration purposes")}, + TyDoc_STR("an int variable for demonstration purposes")}, {0} }; static TyTypeObject spamdict_type = { - PyVarObject_HEAD_INIT(DEFERRED_ADDRESS(&TyType_Type), 0) + TyVarObject_HEAD_INIT(DEFERRED_ADDRESS(&TyType_Type), 0) "xxsubtype.spamdict", sizeof(spamdictobject), 0, diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index da63116..2d76a5e 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -172,12 +172,12 @@ OutputBuffer_WindowOnError(_BlocksOutputBuffer *buffer, _Uint32Window *window) #define ENTER_ZLIB(obj) do { \ - if (!PyThread_acquire_lock((obj)->lock, 0)) { \ + if (!TyThread_acquire_lock((obj)->lock, 0)) { \ Ty_BEGIN_ALLOW_THREADS \ - PyThread_acquire_lock((obj)->lock, 1); \ + TyThread_acquire_lock((obj)->lock, 1); \ Ty_END_ALLOW_THREADS \ } } while (0) -#define LEAVE_ZLIB(obj) PyThread_release_lock((obj)->lock); +#define LEAVE_ZLIB(obj) TyThread_release_lock((obj)->lock); /* The following parameters are copied from zutil.h, version 0.95 */ @@ -218,7 +218,7 @@ typedef struct char eof; bool is_initialised; TyObject *zdict; - PyThread_type_lock lock; + TyThread_type_lock lock; } compobject; #define _compobject_CAST(op) ((compobject *)op) @@ -279,7 +279,7 @@ newcompobject(TyTypeObject *type) Ty_DECREF(self); return NULL; } - self->lock = PyThread_allocate_lock(); + self->lock = TyThread_allocate_lock(); if (self->lock == NULL) { Ty_DECREF(self); TyErr_SetString(TyExc_MemoryError, "Unable to allocate lock"); @@ -709,7 +709,7 @@ static void Dealloc(compobject *self) { TyTypeObject *type = Ty_TYPE(self); - PyThread_free_lock(self->lock); + TyThread_free_lock(self->lock); Ty_XDECREF(self->unused_data); Ty_XDECREF(self->unconsumed_tail); Ty_XDECREF(self->zdict); @@ -1344,7 +1344,7 @@ typedef struct { PyObject_HEAD z_stream zst; TyObject *zdict; - PyThread_type_lock lock; + TyThread_type_lock lock; TyObject *unused_data; uint8_t *input_buffer; Ty_ssize_t input_buffer_size; @@ -1367,7 +1367,7 @@ ZlibDecompressor_dealloc(TyObject *op) { ZlibDecompressor *self = (ZlibDecompressor*)op; TyObject *type = (TyObject *)Ty_TYPE(self); - PyThread_free_lock(self->lock); + TyThread_free_lock(self->lock); if (self->is_initialised) { inflateEnd(&self->zst); } @@ -1698,7 +1698,7 @@ zlib_ZlibDecompressor_decompress_impl(ZlibDecompressor *self, return result; } -PyDoc_STRVAR(ZlibDecompressor__new____doc__, +TyDoc_STRVAR(ZlibDecompressor__new____doc__, "_ZlibDecompressor(wbits=15, zdict=b\'\')\n" "--\n" "\n" @@ -1749,7 +1749,7 @@ ZlibDecompressor__new__(TyTypeObject *cls, Ty_CLEAR(self); return NULL; } - self->lock = PyThread_allocate_lock(); + self->lock = TyThread_allocate_lock(); if (self->lock == NULL) { Ty_DECREF(self); TyErr_SetString(TyExc_MemoryError, "Unable to allocate lock"); @@ -1817,13 +1817,13 @@ static TyMemberDef Decomp_members[] = { {NULL}, }; -PyDoc_STRVAR(ZlibDecompressor_eof__doc__, +TyDoc_STRVAR(ZlibDecompressor_eof__doc__, "True if the end-of-stream marker has been reached."); -PyDoc_STRVAR(ZlibDecompressor_unused_data__doc__, +TyDoc_STRVAR(ZlibDecompressor_unused_data__doc__, "Data found after the end of the compressed stream."); -PyDoc_STRVAR(ZlibDecompressor_needs_input_doc, +TyDoc_STRVAR(ZlibDecompressor_needs_input_doc, "True if more input is needed before more decompressed data can be produced."); static TyMemberDef ZlibDecompressor_members[] = { @@ -1981,7 +1981,7 @@ static TyType_Spec ZlibDecompressor_type_spec = { .flags = (Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_IMMUTABLETYPE), .slots = ZlibDecompressor_type_slots, }; -PyDoc_STRVAR(zlib_module_documentation, +TyDoc_STRVAR(zlib_module_documentation, "The functions in this module allow compression and decompression using the\n" "zlib library, which is based on GNU zip.\n" "\n" diff --git a/Objects/abstract.c b/Objects/abstract.c index d9c860f..49057c9 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -826,14 +826,14 @@ _buffer_release_call(void *arg) } int -_PyBuffer_ReleaseInInterpreter(PyInterpreterState *interp, +_PyBuffer_ReleaseInInterpreter(TyInterpreterState *interp, Ty_buffer *view) { return _Ty_CallInInterpreter(interp, _buffer_release_call, view); } int -_PyBuffer_ReleaseInInterpreterAndRawFree(PyInterpreterState *interp, +_PyBuffer_ReleaseInInterpreterAndRawFree(TyInterpreterState *interp, Ty_buffer *view) { return _Ty_CallInInterpreterAndRawFree(interp, _buffer_release_call, view); diff --git a/Objects/boolobject.c b/Objects/boolobject.c index de759ad..fcb896f 100644 --- a/Objects/boolobject.c +++ b/Objects/boolobject.c @@ -109,7 +109,7 @@ bool_xor(TyObject *a, TyObject *b) /* Doc string */ -PyDoc_STRVAR(bool_doc, +TyDoc_STRVAR(bool_doc, "bool(object=False, /)\n\ --\n\ \n\ @@ -169,7 +169,7 @@ bool_dealloc(TyObject *boolean) /* The type object for bool. Note that this cannot be subclassed! */ TyTypeObject TyBool_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "bool", offsetof(struct _longobject, long_value.ob_digit), /* tp_basicsize */ sizeof(digit), /* tp_itemsize */ diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 31b1ef2..2e33695 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -2454,7 +2454,7 @@ bytearray_decode_impl(PyByteArrayObject *self, const char *encoding, return TyUnicode_FromEncodedObject((TyObject*)self, encoding, errors); } -PyDoc_STRVAR(alloc_doc, +TyDoc_STRVAR(alloc_doc, "B.__alloc__() -> int\n\ \n\ Return the number of bytes actually allocated."); @@ -2782,7 +2782,7 @@ static PyNumberMethods bytearray_as_number = { bytearray_mod, /*nb_remainder*/ }; -PyDoc_STRVAR(bytearray_doc, +TyDoc_STRVAR(bytearray_doc, "bytearray(iterable_of_ints) -> bytearray\n\ bytearray(string, encoding[, errors]) -> bytearray\n\ bytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer\n\ @@ -2800,7 +2800,7 @@ Construct a mutable bytearray object from:\n\ static TyObject *bytearray_iter(TyObject *seq); TyTypeObject TyByteArray_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "bytearray", sizeof(PyByteArrayObject), 0, @@ -2919,7 +2919,7 @@ bytearrayiter_length_hint(TyObject *self, TyObject *Py_UNUSED(ignored)) return TyLong_FromSsize_t(len); } -PyDoc_STRVAR(length_hint_doc, +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * @@ -2962,7 +2962,7 @@ bytearrayiter_setstate(TyObject *self, TyObject *state) Py_RETURN_NONE; } -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef bytearrayiter_methods[] = { {"__length_hint__", bytearrayiter_length_hint, METH_NOARGS, @@ -2975,7 +2975,7 @@ static TyMethodDef bytearrayiter_methods[] = { }; TyTypeObject PyByteArrayIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "bytearray_iterator", /* tp_name */ sizeof(bytesiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index 31ef132..84e6eb6 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -3076,7 +3076,7 @@ bytes_subtype_new(TyTypeObject *type, TyObject *tmp) return pnew; } -PyDoc_STRVAR(bytes_doc, +TyDoc_STRVAR(bytes_doc, "bytes(iterable_of_ints) -> bytes\n\ bytes(string, encoding[, errors]) -> bytes\n\ bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\n\ @@ -3092,7 +3092,7 @@ Construct an immutable array of bytes from:\n\ static TyObject *bytes_iter(TyObject *seq); TyTypeObject TyBytes_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "bytes", PyBytesObject_SIZE, sizeof(char), @@ -3328,7 +3328,7 @@ striter_len(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromSsize_t(len); } -PyDoc_STRVAR(length_hint_doc, +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * @@ -3347,7 +3347,7 @@ striter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) } } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyObject * striter_setstate(TyObject *op, TyObject *state) @@ -3366,7 +3366,7 @@ striter_setstate(TyObject *op, TyObject *state) Py_RETURN_NONE; } -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef striter_methods[] = { {"__length_hint__", striter_len, METH_NOARGS, length_hint_doc}, @@ -3376,7 +3376,7 @@ static TyMethodDef striter_methods[] = { }; TyTypeObject PyBytesIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "bytes_iterator", /* tp_name */ sizeof(striterobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/call.c b/Objects/call.c index 64f3699..37039f4 100644 --- a/Objects/call.c +++ b/Objects/call.c @@ -2,7 +2,7 @@ #include "pycore_call.h" // _TyObject_CallNoArgsTstate() #include "pycore_ceval.h" // _Ty_EnterRecursiveCallTstate() #include "pycore_dict.h" // _TyDict_FromItems() -#include "pycore_function.h" // _PyFunction_Vectorcall() definition +#include "pycore_function.h" // _TyFunction_Vectorcall() definition #include "pycore_modsupport.h" // _Ty_VaBuildStack() #include "pycore_object.h" // _PyCFunctionWithKeywords_TrampolineCall() #include "pycore_pyerrors.h" // _TyErr_Occurred() @@ -399,7 +399,7 @@ PyObject_CallOneArg(TyObject *func, TyObject *arg) /* --- PyFunction call functions ---------------------------------- */ TyObject * -_PyFunction_Vectorcall(TyObject *func, TyObject* const* stack, +_TyFunction_Vectorcall(TyObject *func, TyObject* const* stack, size_t nargsf, TyObject *kwnames) { assert(TyFunction_Check(func)); diff --git a/Objects/capsule.c b/Objects/capsule.c index 1de5683..314efe1 100644 --- a/Objects/capsule.c +++ b/Objects/capsule.c @@ -340,7 +340,7 @@ capsule_clear(TyObject *self) } -PyDoc_STRVAR(PyCapsule_Type__doc__, +TyDoc_STRVAR(PyCapsule_Type__doc__, "Capsule objects let you wrap a C \"void *\" pointer in a Python\n\ object. They're a way of passing data through the Python interpreter\n\ without creating your own custom type.\n\ @@ -352,7 +352,7 @@ Python import mechanism to link to one another.\n\ "); TyTypeObject PyCapsule_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "PyCapsule", .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_HAVE_GC, .tp_basicsize = sizeof(PyCapsule), diff --git a/Objects/cellobject.c b/Objects/cellobject.c index 76b4907..6d55b2c 100644 --- a/Objects/cellobject.c +++ b/Objects/cellobject.c @@ -21,7 +21,7 @@ TyCell_New(TyObject *obj) return (TyObject *)op; } -PyDoc_STRVAR(cell_new_doc, +TyDoc_STRVAR(cell_new_doc, "cell([contents])\n" "--\n" "\n" @@ -170,7 +170,7 @@ static TyGetSetDef cell_getsetlist[] = { }; TyTypeObject TyCell_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "cell", sizeof(PyCellObject), 0, diff --git a/Objects/classobject.c b/Objects/classobject.c index 18a126f..38c4a83 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -343,7 +343,7 @@ method_descr_get(TyObject *meth, TyObject *obj, TyObject *cls) } TyTypeObject TyMethod_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "method", .tp_basicsize = sizeof(PyMethodObject), .tp_dealloc = method_dealloc, @@ -546,7 +546,7 @@ instancemethod_new_impl(TyTypeObject *type, TyObject *function) } TyTypeObject PyInstanceMethod_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "instancemethod", .tp_basicsize = sizeof(PyInstanceMethodObject), .tp_dealloc = instancemethod_dealloc, diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h index 1a16baf..45d0312 100644 --- a/Objects/clinic/bytearrayobject.c.h +++ b/Objects/clinic/bytearrayobject.c.h @@ -27,7 +27,7 @@ bytearray___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(source), &_Ty_ID(encoding), &_Ty_ID(errors), }, }; @@ -105,7 +105,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_find__doc__, +TyDoc_STRVAR(bytearray_find__doc__, "find($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -158,7 +158,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_count__doc__, +TyDoc_STRVAR(bytearray_count__doc__, "count($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -209,7 +209,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_clear__doc__, +TyDoc_STRVAR(bytearray_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -227,7 +227,7 @@ bytearray_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return bytearray_clear_impl((PyByteArrayObject *)self); } -PyDoc_STRVAR(bytearray_copy__doc__, +TyDoc_STRVAR(bytearray_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -251,7 +251,7 @@ bytearray_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(bytearray_index__doc__, +TyDoc_STRVAR(bytearray_index__doc__, "index($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -304,7 +304,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_rfind__doc__, +TyDoc_STRVAR(bytearray_rfind__doc__, "rfind($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -357,7 +357,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_rindex__doc__, +TyDoc_STRVAR(bytearray_rindex__doc__, "rindex($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -410,7 +410,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_startswith__doc__, +TyDoc_STRVAR(bytearray_startswith__doc__, "startswith($self, prefix[, start[, end]], /)\n" "--\n" "\n" @@ -463,7 +463,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_endswith__doc__, +TyDoc_STRVAR(bytearray_endswith__doc__, "endswith($self, suffix[, start[, end]], /)\n" "--\n" "\n" @@ -516,7 +516,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_removeprefix__doc__, +TyDoc_STRVAR(bytearray_removeprefix__doc__, "removeprefix($self, prefix, /)\n" "--\n" "\n" @@ -554,7 +554,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_removesuffix__doc__, +TyDoc_STRVAR(bytearray_removesuffix__doc__, "removesuffix($self, suffix, /)\n" "--\n" "\n" @@ -592,7 +592,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_resize__doc__, +TyDoc_STRVAR(bytearray_resize__doc__, "resize($self, size, /)\n" "--\n" "\n" @@ -631,7 +631,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_translate__doc__, +TyDoc_STRVAR(bytearray_translate__doc__, "translate($self, table, /, delete=b\'\')\n" "--\n" "\n" @@ -663,7 +663,7 @@ bytearray_translate(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(delete), }, }; @@ -705,7 +705,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_maketrans__doc__, +TyDoc_STRVAR(bytearray_maketrans__doc__, "maketrans(frm, to, /)\n" "--\n" "\n" @@ -753,7 +753,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_replace__doc__, +TyDoc_STRVAR(bytearray_replace__doc__, "replace($self, old, new, count=-1, /)\n" "--\n" "\n" @@ -823,7 +823,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_split__doc__, +TyDoc_STRVAR(bytearray_split__doc__, "split($self, /, sep=None, maxsplit=-1)\n" "--\n" "\n" @@ -857,7 +857,7 @@ bytearray_split(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(maxsplit), }, }; @@ -915,7 +915,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_partition__doc__, +TyDoc_STRVAR(bytearray_partition__doc__, "partition($self, sep, /)\n" "--\n" "\n" @@ -946,7 +946,7 @@ bytearray_partition(TyObject *self, TyObject *sep) return return_value; } -PyDoc_STRVAR(bytearray_rpartition__doc__, +TyDoc_STRVAR(bytearray_rpartition__doc__, "rpartition($self, sep, /)\n" "--\n" "\n" @@ -978,7 +978,7 @@ bytearray_rpartition(TyObject *self, TyObject *sep) return return_value; } -PyDoc_STRVAR(bytearray_rsplit__doc__, +TyDoc_STRVAR(bytearray_rsplit__doc__, "rsplit($self, /, sep=None, maxsplit=-1)\n" "--\n" "\n" @@ -1014,7 +1014,7 @@ bytearray_rsplit(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(maxsplit), }, }; @@ -1072,7 +1072,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_reverse__doc__, +TyDoc_STRVAR(bytearray_reverse__doc__, "reverse($self, /)\n" "--\n" "\n" @@ -1096,7 +1096,7 @@ bytearray_reverse(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(bytearray_insert__doc__, +TyDoc_STRVAR(bytearray_insert__doc__, "insert($self, index, item, /)\n" "--\n" "\n" @@ -1146,7 +1146,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_append__doc__, +TyDoc_STRVAR(bytearray_append__doc__, "append($self, item, /)\n" "--\n" "\n" @@ -1178,7 +1178,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_extend__doc__, +TyDoc_STRVAR(bytearray_extend__doc__, "extend($self, iterable_of_ints, /)\n" "--\n" "\n" @@ -1205,7 +1205,7 @@ bytearray_extend(TyObject *self, TyObject *iterable_of_ints) return return_value; } -PyDoc_STRVAR(bytearray_pop__doc__, +TyDoc_STRVAR(bytearray_pop__doc__, "pop($self, index=-1, /)\n" "--\n" "\n" @@ -1256,7 +1256,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_remove__doc__, +TyDoc_STRVAR(bytearray_remove__doc__, "remove($self, value, /)\n" "--\n" "\n" @@ -1288,7 +1288,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_strip__doc__, +TyDoc_STRVAR(bytearray_strip__doc__, "strip($self, bytes=None, /)\n" "--\n" "\n" @@ -1324,7 +1324,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_lstrip__doc__, +TyDoc_STRVAR(bytearray_lstrip__doc__, "lstrip($self, bytes=None, /)\n" "--\n" "\n" @@ -1360,7 +1360,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_rstrip__doc__, +TyDoc_STRVAR(bytearray_rstrip__doc__, "rstrip($self, bytes=None, /)\n" "--\n" "\n" @@ -1396,7 +1396,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_decode__doc__, +TyDoc_STRVAR(bytearray_decode__doc__, "decode($self, /, encoding=\'utf-8\', errors=\'strict\')\n" "--\n" "\n" @@ -1431,7 +1431,7 @@ bytearray_decode(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(encoding), &_Ty_ID(errors), }, }; @@ -1502,7 +1502,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_join__doc__, +TyDoc_STRVAR(bytearray_join__doc__, "join($self, iterable_of_bytes, /)\n" "--\n" "\n" @@ -1530,7 +1530,7 @@ bytearray_join(TyObject *self, TyObject *iterable_of_bytes) return return_value; } -PyDoc_STRVAR(bytearray_splitlines__doc__, +TyDoc_STRVAR(bytearray_splitlines__doc__, "splitlines($self, /, keepends=False)\n" "--\n" "\n" @@ -1558,7 +1558,7 @@ bytearray_splitlines(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(keepends), }, }; @@ -1601,7 +1601,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_fromhex__doc__, +TyDoc_STRVAR(bytearray_fromhex__doc__, "fromhex($type, string, /)\n" "--\n" "\n" @@ -1626,7 +1626,7 @@ bytearray_fromhex(TyObject *type, TyObject *string) return return_value; } -PyDoc_STRVAR(bytearray_hex__doc__, +TyDoc_STRVAR(bytearray_hex__doc__, "hex($self, /, sep=, bytes_per_sep=1)\n" "--\n" "\n" @@ -1668,7 +1668,7 @@ bytearray_hex(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(bytes_per_sep), }, }; @@ -1718,7 +1718,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_reduce__doc__, +TyDoc_STRVAR(bytearray_reduce__doc__, "__reduce__($self, /)\n" "--\n" "\n" @@ -1742,7 +1742,7 @@ bytearray_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(bytearray_reduce_ex__doc__, +TyDoc_STRVAR(bytearray_reduce_ex__doc__, "__reduce_ex__($self, proto=0, /)\n" "--\n" "\n" @@ -1779,7 +1779,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytearray_sizeof__doc__, +TyDoc_STRVAR(bytearray_sizeof__doc__, "__sizeof__($self, /)\n" "--\n" "\n" diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h index d5c2467..1e1ad5f 100644 --- a/Objects/clinic/bytesobject.c.h +++ b/Objects/clinic/bytesobject.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(bytes___bytes____doc__, +TyDoc_STRVAR(bytes___bytes____doc__, "__bytes__($self, /)\n" "--\n" "\n" @@ -27,7 +27,7 @@ bytes___bytes__(TyObject *self, TyObject *Py_UNUSED(ignored)) return bytes___bytes___impl((PyBytesObject *)self); } -PyDoc_STRVAR(bytes_split__doc__, +TyDoc_STRVAR(bytes_split__doc__, "split($self, /, sep=None, maxsplit=-1)\n" "--\n" "\n" @@ -60,7 +60,7 @@ bytes_split(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *k Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(maxsplit), }, }; @@ -116,7 +116,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_partition__doc__, +TyDoc_STRVAR(bytes_partition__doc__, "partition($self, sep, /)\n" "--\n" "\n" @@ -155,7 +155,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_rpartition__doc__, +TyDoc_STRVAR(bytes_rpartition__doc__, "rpartition($self, sep, /)\n" "--\n" "\n" @@ -194,7 +194,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_rsplit__doc__, +TyDoc_STRVAR(bytes_rsplit__doc__, "rsplit($self, /, sep=None, maxsplit=-1)\n" "--\n" "\n" @@ -229,7 +229,7 @@ bytes_rsplit(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(maxsplit), }, }; @@ -285,7 +285,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_join__doc__, +TyDoc_STRVAR(bytes_join__doc__, "join($self, iterable_of_bytes, /)\n" "--\n" "\n" @@ -313,7 +313,7 @@ bytes_join(TyObject *self, TyObject *iterable_of_bytes) return return_value; } -PyDoc_STRVAR(bytes_find__doc__, +TyDoc_STRVAR(bytes_find__doc__, "find($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -364,7 +364,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_index__doc__, +TyDoc_STRVAR(bytes_index__doc__, "index($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -415,7 +415,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_rfind__doc__, +TyDoc_STRVAR(bytes_rfind__doc__, "rfind($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -466,7 +466,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_rindex__doc__, +TyDoc_STRVAR(bytes_rindex__doc__, "rindex($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -517,7 +517,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_strip__doc__, +TyDoc_STRVAR(bytes_strip__doc__, "strip($self, bytes=None, /)\n" "--\n" "\n" @@ -551,7 +551,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_lstrip__doc__, +TyDoc_STRVAR(bytes_lstrip__doc__, "lstrip($self, bytes=None, /)\n" "--\n" "\n" @@ -585,7 +585,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_rstrip__doc__, +TyDoc_STRVAR(bytes_rstrip__doc__, "rstrip($self, bytes=None, /)\n" "--\n" "\n" @@ -619,7 +619,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_count__doc__, +TyDoc_STRVAR(bytes_count__doc__, "count($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -668,7 +668,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_translate__doc__, +TyDoc_STRVAR(bytes_translate__doc__, "translate($self, table, /, delete=b\'\')\n" "--\n" "\n" @@ -700,7 +700,7 @@ bytes_translate(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(delete), }, }; @@ -740,7 +740,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_maketrans__doc__, +TyDoc_STRVAR(bytes_maketrans__doc__, "maketrans(frm, to, /)\n" "--\n" "\n" @@ -788,7 +788,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_replace__doc__, +TyDoc_STRVAR(bytes_replace__doc__, "replace($self, old, new, count=-1, /)\n" "--\n" "\n" @@ -856,7 +856,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_removeprefix__doc__, +TyDoc_STRVAR(bytes_removeprefix__doc__, "removeprefix($self, prefix, /)\n" "--\n" "\n" @@ -891,7 +891,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_removesuffix__doc__, +TyDoc_STRVAR(bytes_removesuffix__doc__, "removesuffix($self, suffix, /)\n" "--\n" "\n" @@ -927,7 +927,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_startswith__doc__, +TyDoc_STRVAR(bytes_startswith__doc__, "startswith($self, prefix[, start[, end]], /)\n" "--\n" "\n" @@ -978,7 +978,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_endswith__doc__, +TyDoc_STRVAR(bytes_endswith__doc__, "endswith($self, suffix[, start[, end]], /)\n" "--\n" "\n" @@ -1029,7 +1029,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_decode__doc__, +TyDoc_STRVAR(bytes_decode__doc__, "decode($self, /, encoding=\'utf-8\', errors=\'strict\')\n" "--\n" "\n" @@ -1064,7 +1064,7 @@ bytes_decode(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(encoding), &_Ty_ID(errors), }, }; @@ -1133,7 +1133,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_splitlines__doc__, +TyDoc_STRVAR(bytes_splitlines__doc__, "splitlines($self, /, keepends=False)\n" "--\n" "\n" @@ -1161,7 +1161,7 @@ bytes_splitlines(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(keepends), }, }; @@ -1202,7 +1202,7 @@ exit: return return_value; } -PyDoc_STRVAR(bytes_fromhex__doc__, +TyDoc_STRVAR(bytes_fromhex__doc__, "fromhex($type, string, /)\n" "--\n" "\n" @@ -1227,7 +1227,7 @@ bytes_fromhex(TyObject *type, TyObject *string) return return_value; } -PyDoc_STRVAR(bytes_hex__doc__, +TyDoc_STRVAR(bytes_hex__doc__, "hex($self, /, sep=, bytes_per_sep=1)\n" "--\n" "\n" @@ -1269,7 +1269,7 @@ bytes_hex(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(bytes_per_sep), }, }; @@ -1334,7 +1334,7 @@ bytes_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(source), &_Ty_ID(encoding), &_Ty_ID(errors), }, }; diff --git a/Objects/clinic/classobject.c.h b/Objects/clinic/classobject.c.h index 4ff8086..79a317e 100644 --- a/Objects/clinic/classobject.c.h +++ b/Objects/clinic/classobject.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(method___reduce____doc__, +TyDoc_STRVAR(method___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n"); @@ -21,7 +21,7 @@ method___reduce__(TyObject *self, TyObject *Py_UNUSED(ignored)) return method___reduce___impl((PyMethodObject *)self); } -PyDoc_STRVAR(method_new__doc__, +TyDoc_STRVAR(method_new__doc__, "method(function, instance, /)\n" "--\n" "\n" @@ -53,7 +53,7 @@ exit: return return_value; } -PyDoc_STRVAR(instancemethod_new__doc__, +TyDoc_STRVAR(instancemethod_new__doc__, "instancemethod(function, /)\n" "--\n" "\n" diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h index aa80558..46d9957 100644 --- a/Objects/clinic/codeobject.c.h +++ b/Objects/clinic/codeobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(code_new__doc__, +TyDoc_STRVAR(code_new__doc__, "code(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize,\n" " flags, codestring, constants, names, varnames, filename, name,\n" " qualname, firstlineno, linetable, exceptiontable, freevars=(),\n" @@ -153,7 +153,7 @@ exit: return return_value; } -PyDoc_STRVAR(code_replace__doc__, +TyDoc_STRVAR(code_replace__doc__, "replace($self, /, **changes)\n" "--\n" "\n" @@ -186,7 +186,7 @@ code_replace(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(co_argcount), &_Ty_ID(co_posonlyargcount), &_Ty_ID(co_kwonlyargcount), &_Ty_ID(co_nlocals), &_Ty_ID(co_stacksize), &_Ty_ID(co_flags), &_Ty_ID(co_firstlineno), &_Ty_ID(co_code), &_Ty_ID(co_consts), &_Ty_ID(co_names), &_Ty_ID(co_varnames), &_Ty_ID(co_freevars), &_Ty_ID(co_cellvars), &_Ty_ID(co_filename), &_Ty_ID(co_name), &_Ty_ID(co_qualname), &_Ty_ID(co_linetable), &_Ty_ID(co_exceptiontable), }, }; @@ -408,7 +408,7 @@ exit: return return_value; } -PyDoc_STRVAR(code__varname_from_oparg__doc__, +TyDoc_STRVAR(code__varname_from_oparg__doc__, "_varname_from_oparg($self, /, oparg)\n" "--\n" "\n" @@ -435,7 +435,7 @@ code__varname_from_oparg(TyObject *self, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(oparg), }, }; diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h index 389225e..8a0117d 100644 --- a/Objects/clinic/complexobject.c.h +++ b/Objects/clinic/complexobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(complex_conjugate__doc__, +TyDoc_STRVAR(complex_conjugate__doc__, "conjugate($self, /)\n" "--\n" "\n" @@ -26,7 +26,7 @@ complex_conjugate(TyObject *self, TyObject *Py_UNUSED(ignored)) return complex_conjugate_impl((PyComplexObject *)self); } -PyDoc_STRVAR(complex___getnewargs____doc__, +TyDoc_STRVAR(complex___getnewargs____doc__, "__getnewargs__($self, /)\n" "--\n" "\n"); @@ -43,7 +43,7 @@ complex___getnewargs__(TyObject *self, TyObject *Py_UNUSED(ignored)) return complex___getnewargs___impl((PyComplexObject *)self); } -PyDoc_STRVAR(complex___format____doc__, +TyDoc_STRVAR(complex___format____doc__, "__format__($self, format_spec, /)\n" "--\n" "\n" @@ -72,7 +72,7 @@ exit: return return_value; } -PyDoc_STRVAR(complex___complex____doc__, +TyDoc_STRVAR(complex___complex____doc__, "__complex__($self, /)\n" "--\n" "\n" @@ -90,7 +90,7 @@ complex___complex__(TyObject *self, TyObject *Py_UNUSED(ignored)) return complex___complex___impl((PyComplexObject *)self); } -PyDoc_STRVAR(complex_new__doc__, +TyDoc_STRVAR(complex_new__doc__, "complex(real=0, imag=0)\n" "--\n" "\n" @@ -117,7 +117,7 @@ complex_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(real), &_Ty_ID(imag), }, }; @@ -164,7 +164,7 @@ exit: return return_value; } -PyDoc_STRVAR(complex_from_number__doc__, +TyDoc_STRVAR(complex_from_number__doc__, "from_number($type, number, /)\n" "--\n" "\n" diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h index 3e73ebe..19b79f0 100644 --- a/Objects/clinic/descrobject.c.h +++ b/Objects/clinic/descrobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(mappingproxy_new__doc__, +TyDoc_STRVAR(mappingproxy_new__doc__, "mappingproxy(mapping)\n" "--\n" "\n" @@ -30,7 +30,7 @@ mappingproxy_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(mapping), }, }; @@ -65,7 +65,7 @@ exit: return return_value; } -PyDoc_STRVAR(property_init__doc__, +TyDoc_STRVAR(property_init__doc__, "property(fget=None, fset=None, fdel=None, doc=None)\n" "--\n" "\n" @@ -119,7 +119,7 @@ property_init(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(fget), &_Ty_ID(fset), &_Ty_ID(fdel), &_Ty_ID(doc), }, }; diff --git a/Objects/clinic/dictobject.c.h b/Objects/clinic/dictobject.c.h index 18aebcd..4bd67f3 100644 --- a/Objects/clinic/dictobject.c.h +++ b/Objects/clinic/dictobject.c.h @@ -5,7 +5,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(dict_fromkeys__doc__, +TyDoc_STRVAR(dict_fromkeys__doc__, "fromkeys($type, iterable, value=None, /)\n" "--\n" "\n" @@ -39,7 +39,7 @@ exit: return return_value; } -PyDoc_STRVAR(dict_copy__doc__, +TyDoc_STRVAR(dict_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -57,7 +57,7 @@ dict_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return dict_copy_impl((PyDictObject *)self); } -PyDoc_STRVAR(dict___contains____doc__, +TyDoc_STRVAR(dict___contains____doc__, "__contains__($self, key, /)\n" "--\n" "\n" @@ -79,7 +79,7 @@ dict___contains__(TyObject *self, TyObject *key) return return_value; } -PyDoc_STRVAR(dict_get__doc__, +TyDoc_STRVAR(dict_get__doc__, "get($self, key, default=None, /)\n" "--\n" "\n" @@ -113,7 +113,7 @@ exit: return return_value; } -PyDoc_STRVAR(dict_setdefault__doc__, +TyDoc_STRVAR(dict_setdefault__doc__, "setdefault($self, key, default=None, /)\n" "--\n" "\n" @@ -152,7 +152,7 @@ exit: return return_value; } -PyDoc_STRVAR(dict_clear__doc__, +TyDoc_STRVAR(dict_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -170,7 +170,7 @@ dict_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return dict_clear_impl((PyDictObject *)self); } -PyDoc_STRVAR(dict_pop__doc__, +TyDoc_STRVAR(dict_pop__doc__, "pop($self, key, default=, /)\n" "--\n" "\n" @@ -207,7 +207,7 @@ exit: return return_value; } -PyDoc_STRVAR(dict_popitem__doc__, +TyDoc_STRVAR(dict_popitem__doc__, "popitem($self, /)\n" "--\n" "\n" @@ -234,7 +234,7 @@ dict_popitem(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(dict___sizeof____doc__, +TyDoc_STRVAR(dict___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -252,7 +252,7 @@ dict___sizeof__(TyObject *self, TyObject *Py_UNUSED(ignored)) return dict___sizeof___impl((PyDictObject *)self); } -PyDoc_STRVAR(dict___reversed____doc__, +TyDoc_STRVAR(dict___reversed____doc__, "__reversed__($self, /)\n" "--\n" "\n" @@ -270,7 +270,7 @@ dict___reversed__(TyObject *self, TyObject *Py_UNUSED(ignored)) return dict___reversed___impl((PyDictObject *)self); } -PyDoc_STRVAR(dict_keys__doc__, +TyDoc_STRVAR(dict_keys__doc__, "keys($self, /)\n" "--\n" "\n" @@ -288,7 +288,7 @@ dict_keys(TyObject *self, TyObject *Py_UNUSED(ignored)) return dict_keys_impl((PyDictObject *)self); } -PyDoc_STRVAR(dict_items__doc__, +TyDoc_STRVAR(dict_items__doc__, "items($self, /)\n" "--\n" "\n" @@ -306,7 +306,7 @@ dict_items(TyObject *self, TyObject *Py_UNUSED(ignored)) return dict_items_impl((PyDictObject *)self); } -PyDoc_STRVAR(dict_values__doc__, +TyDoc_STRVAR(dict_values__doc__, "values($self, /)\n" "--\n" "\n" diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h index ef3d273..f9cdb0d 100644 --- a/Objects/clinic/enumobject.c.h +++ b/Objects/clinic/enumobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(enum_new__doc__, +TyDoc_STRVAR(enum_new__doc__, "enumerate(iterable, start=0)\n" "--\n" "\n" @@ -39,7 +39,7 @@ enum_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), &_Ty_ID(start), }, }; @@ -81,7 +81,7 @@ exit: return return_value; } -PyDoc_STRVAR(reversed_new__doc__, +TyDoc_STRVAR(reversed_new__doc__, "reversed(sequence, /)\n" "--\n" "\n" diff --git a/Objects/clinic/exceptions.c.h b/Objects/clinic/exceptions.c.h index c59b615..20f4d9e 100644 --- a/Objects/clinic/exceptions.c.h +++ b/Objects/clinic/exceptions.c.h @@ -5,7 +5,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(BaseException___reduce____doc__, +TyDoc_STRVAR(BaseException___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n"); @@ -14,7 +14,7 @@ PyDoc_STRVAR(BaseException___reduce____doc__, {"__reduce__", (PyCFunction)BaseException___reduce__, METH_NOARGS, BaseException___reduce____doc__}, static TyObject * -BaseException___reduce___impl(PyBaseExceptionObject *self); +BaseException___reduce___impl(TyBaseExceptionObject *self); static TyObject * BaseException___reduce__(TyObject *self, TyObject *Py_UNUSED(ignored)) @@ -22,13 +22,13 @@ BaseException___reduce__(TyObject *self, TyObject *Py_UNUSED(ignored)) TyObject *return_value = NULL; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___reduce___impl((PyBaseExceptionObject *)self); + return_value = BaseException___reduce___impl((TyBaseExceptionObject *)self); Ty_END_CRITICAL_SECTION(); return return_value; } -PyDoc_STRVAR(BaseException___setstate____doc__, +TyDoc_STRVAR(BaseException___setstate____doc__, "__setstate__($self, state, /)\n" "--\n" "\n"); @@ -37,7 +37,7 @@ PyDoc_STRVAR(BaseException___setstate____doc__, {"__setstate__", (PyCFunction)BaseException___setstate__, METH_O, BaseException___setstate____doc__}, static TyObject * -BaseException___setstate___impl(PyBaseExceptionObject *self, TyObject *state); +BaseException___setstate___impl(TyBaseExceptionObject *self, TyObject *state); static TyObject * BaseException___setstate__(TyObject *self, TyObject *state) @@ -45,13 +45,13 @@ BaseException___setstate__(TyObject *self, TyObject *state) TyObject *return_value = NULL; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___setstate___impl((PyBaseExceptionObject *)self, state); + return_value = BaseException___setstate___impl((TyBaseExceptionObject *)self, state); Ty_END_CRITICAL_SECTION(); return return_value; } -PyDoc_STRVAR(BaseException_with_traceback__doc__, +TyDoc_STRVAR(BaseException_with_traceback__doc__, "with_traceback($self, tb, /)\n" "--\n" "\n" @@ -61,7 +61,7 @@ PyDoc_STRVAR(BaseException_with_traceback__doc__, {"with_traceback", (PyCFunction)BaseException_with_traceback, METH_O, BaseException_with_traceback__doc__}, static TyObject * -BaseException_with_traceback_impl(PyBaseExceptionObject *self, TyObject *tb); +BaseException_with_traceback_impl(TyBaseExceptionObject *self, TyObject *tb); static TyObject * BaseException_with_traceback(TyObject *self, TyObject *tb) @@ -69,13 +69,13 @@ BaseException_with_traceback(TyObject *self, TyObject *tb) TyObject *return_value = NULL; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException_with_traceback_impl((PyBaseExceptionObject *)self, tb); + return_value = BaseException_with_traceback_impl((TyBaseExceptionObject *)self, tb); Ty_END_CRITICAL_SECTION(); return return_value; } -PyDoc_STRVAR(BaseException_add_note__doc__, +TyDoc_STRVAR(BaseException_add_note__doc__, "add_note($self, note, /)\n" "--\n" "\n" @@ -85,7 +85,7 @@ PyDoc_STRVAR(BaseException_add_note__doc__, {"add_note", (PyCFunction)BaseException_add_note, METH_O, BaseException_add_note__doc__}, static TyObject * -BaseException_add_note_impl(PyBaseExceptionObject *self, TyObject *note); +BaseException_add_note_impl(TyBaseExceptionObject *self, TyObject *note); static TyObject * BaseException_add_note(TyObject *self, TyObject *arg) @@ -99,7 +99,7 @@ BaseException_add_note(TyObject *self, TyObject *arg) } note = arg; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException_add_note_impl((PyBaseExceptionObject *)self, note); + return_value = BaseException_add_note_impl((TyBaseExceptionObject *)self, note); Ty_END_CRITICAL_SECTION(); exit: @@ -117,7 +117,7 @@ exit: #endif static TyObject * -BaseException_args_get_impl(PyBaseExceptionObject *self); +BaseException_args_get_impl(TyBaseExceptionObject *self); static TyObject * BaseException_args_get(TyObject *self, void *Py_UNUSED(context)) @@ -125,7 +125,7 @@ BaseException_args_get(TyObject *self, void *Py_UNUSED(context)) TyObject *return_value = NULL; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException_args_get_impl((PyBaseExceptionObject *)self); + return_value = BaseException_args_get_impl((TyBaseExceptionObject *)self); Ty_END_CRITICAL_SECTION(); return return_value; @@ -142,7 +142,7 @@ BaseException_args_get(TyObject *self, void *Py_UNUSED(context)) #endif static int -BaseException_args_set_impl(PyBaseExceptionObject *self, TyObject *value); +BaseException_args_set_impl(TyBaseExceptionObject *self, TyObject *value); static int BaseException_args_set(TyObject *self, TyObject *value, void *Py_UNUSED(context)) @@ -150,7 +150,7 @@ BaseException_args_set(TyObject *self, TyObject *value, void *Py_UNUSED(context) int return_value; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException_args_set_impl((PyBaseExceptionObject *)self, value); + return_value = BaseException_args_set_impl((TyBaseExceptionObject *)self, value); Ty_END_CRITICAL_SECTION(); return return_value; @@ -167,7 +167,7 @@ BaseException_args_set(TyObject *self, TyObject *value, void *Py_UNUSED(context) #endif static TyObject * -BaseException___traceback___get_impl(PyBaseExceptionObject *self); +BaseException___traceback___get_impl(TyBaseExceptionObject *self); static TyObject * BaseException___traceback___get(TyObject *self, void *Py_UNUSED(context)) @@ -175,7 +175,7 @@ BaseException___traceback___get(TyObject *self, void *Py_UNUSED(context)) TyObject *return_value = NULL; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___traceback___get_impl((PyBaseExceptionObject *)self); + return_value = BaseException___traceback___get_impl((TyBaseExceptionObject *)self); Ty_END_CRITICAL_SECTION(); return return_value; @@ -192,7 +192,7 @@ BaseException___traceback___get(TyObject *self, void *Py_UNUSED(context)) #endif static int -BaseException___traceback___set_impl(PyBaseExceptionObject *self, +BaseException___traceback___set_impl(TyBaseExceptionObject *self, TyObject *value); static int @@ -201,7 +201,7 @@ BaseException___traceback___set(TyObject *self, TyObject *value, void *Py_UNUSED int return_value; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___traceback___set_impl((PyBaseExceptionObject *)self, value); + return_value = BaseException___traceback___set_impl((TyBaseExceptionObject *)self, value); Ty_END_CRITICAL_SECTION(); return return_value; @@ -218,7 +218,7 @@ BaseException___traceback___set(TyObject *self, TyObject *value, void *Py_UNUSED #endif static TyObject * -BaseException___context___get_impl(PyBaseExceptionObject *self); +BaseException___context___get_impl(TyBaseExceptionObject *self); static TyObject * BaseException___context___get(TyObject *self, void *Py_UNUSED(context)) @@ -226,7 +226,7 @@ BaseException___context___get(TyObject *self, void *Py_UNUSED(context)) TyObject *return_value = NULL; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___context___get_impl((PyBaseExceptionObject *)self); + return_value = BaseException___context___get_impl((TyBaseExceptionObject *)self); Ty_END_CRITICAL_SECTION(); return return_value; @@ -243,7 +243,7 @@ BaseException___context___get(TyObject *self, void *Py_UNUSED(context)) #endif static int -BaseException___context___set_impl(PyBaseExceptionObject *self, +BaseException___context___set_impl(TyBaseExceptionObject *self, TyObject *value); static int @@ -252,7 +252,7 @@ BaseException___context___set(TyObject *self, TyObject *value, void *Py_UNUSED(c int return_value; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___context___set_impl((PyBaseExceptionObject *)self, value); + return_value = BaseException___context___set_impl((TyBaseExceptionObject *)self, value); Ty_END_CRITICAL_SECTION(); return return_value; @@ -269,7 +269,7 @@ BaseException___context___set(TyObject *self, TyObject *value, void *Py_UNUSED(c #endif static TyObject * -BaseException___cause___get_impl(PyBaseExceptionObject *self); +BaseException___cause___get_impl(TyBaseExceptionObject *self); static TyObject * BaseException___cause___get(TyObject *self, void *Py_UNUSED(context)) @@ -277,7 +277,7 @@ BaseException___cause___get(TyObject *self, void *Py_UNUSED(context)) TyObject *return_value = NULL; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___cause___get_impl((PyBaseExceptionObject *)self); + return_value = BaseException___cause___get_impl((TyBaseExceptionObject *)self); Ty_END_CRITICAL_SECTION(); return return_value; @@ -294,7 +294,7 @@ BaseException___cause___get(TyObject *self, void *Py_UNUSED(context)) #endif static int -BaseException___cause___set_impl(PyBaseExceptionObject *self, +BaseException___cause___set_impl(TyBaseExceptionObject *self, TyObject *value); static int @@ -303,13 +303,13 @@ BaseException___cause___set(TyObject *self, TyObject *value, void *Py_UNUSED(con int return_value; Ty_BEGIN_CRITICAL_SECTION(self); - return_value = BaseException___cause___set_impl((PyBaseExceptionObject *)self, value); + return_value = BaseException___cause___set_impl((TyBaseExceptionObject *)self, value); Ty_END_CRITICAL_SECTION(); return return_value; } -PyDoc_STRVAR(BaseExceptionGroup_derive__doc__, +TyDoc_STRVAR(BaseExceptionGroup_derive__doc__, "derive($self, excs, /)\n" "--\n" "\n"); @@ -333,7 +333,7 @@ BaseExceptionGroup_derive(TyObject *self, TyObject *excs) return return_value; } -PyDoc_STRVAR(BaseExceptionGroup_split__doc__, +TyDoc_STRVAR(BaseExceptionGroup_split__doc__, "split($self, matcher_value, /)\n" "--\n" "\n"); @@ -357,7 +357,7 @@ BaseExceptionGroup_split(TyObject *self, TyObject *matcher_value) return return_value; } -PyDoc_STRVAR(BaseExceptionGroup_subgroup__doc__, +TyDoc_STRVAR(BaseExceptionGroup_subgroup__doc__, "subgroup($self, matcher_value, /)\n" "--\n" "\n"); diff --git a/Objects/clinic/floatobject.c.h b/Objects/clinic/floatobject.c.h index ec36cc1..6f4009e 100644 --- a/Objects/clinic/floatobject.c.h +++ b/Objects/clinic/floatobject.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(float_is_integer__doc__, +TyDoc_STRVAR(float_is_integer__doc__, "is_integer($self, /)\n" "--\n" "\n" @@ -22,7 +22,7 @@ float_is_integer(TyObject *self, TyObject *Py_UNUSED(ignored)) return float_is_integer_impl(self); } -PyDoc_STRVAR(float___trunc____doc__, +TyDoc_STRVAR(float___trunc____doc__, "__trunc__($self, /)\n" "--\n" "\n" @@ -40,7 +40,7 @@ float___trunc__(TyObject *self, TyObject *Py_UNUSED(ignored)) return float___trunc___impl(self); } -PyDoc_STRVAR(float___floor____doc__, +TyDoc_STRVAR(float___floor____doc__, "__floor__($self, /)\n" "--\n" "\n" @@ -58,7 +58,7 @@ float___floor__(TyObject *self, TyObject *Py_UNUSED(ignored)) return float___floor___impl(self); } -PyDoc_STRVAR(float___ceil____doc__, +TyDoc_STRVAR(float___ceil____doc__, "__ceil__($self, /)\n" "--\n" "\n" @@ -76,7 +76,7 @@ float___ceil__(TyObject *self, TyObject *Py_UNUSED(ignored)) return float___ceil___impl(self); } -PyDoc_STRVAR(float___round____doc__, +TyDoc_STRVAR(float___round____doc__, "__round__($self, ndigits=None, /)\n" "--\n" "\n" @@ -110,7 +110,7 @@ exit: return return_value; } -PyDoc_STRVAR(float_conjugate__doc__, +TyDoc_STRVAR(float_conjugate__doc__, "conjugate($self, /)\n" "--\n" "\n" @@ -128,7 +128,7 @@ float_conjugate(TyObject *self, TyObject *Py_UNUSED(ignored)) return float_conjugate_impl(self); } -PyDoc_STRVAR(float_hex__doc__, +TyDoc_STRVAR(float_hex__doc__, "hex($self, /)\n" "--\n" "\n" @@ -151,7 +151,7 @@ float_hex(TyObject *self, TyObject *Py_UNUSED(ignored)) return float_hex_impl(self); } -PyDoc_STRVAR(float_fromhex__doc__, +TyDoc_STRVAR(float_fromhex__doc__, "fromhex($type, string, /)\n" "--\n" "\n" @@ -178,7 +178,7 @@ float_fromhex(TyObject *type, TyObject *string) return return_value; } -PyDoc_STRVAR(float_as_integer_ratio__doc__, +TyDoc_STRVAR(float_as_integer_ratio__doc__, "as_integer_ratio($self, /)\n" "--\n" "\n" @@ -206,7 +206,7 @@ float_as_integer_ratio(TyObject *self, TyObject *Py_UNUSED(ignored)) return float_as_integer_ratio_impl(self); } -PyDoc_STRVAR(float_new__doc__, +TyDoc_STRVAR(float_new__doc__, "float(x=0, /)\n" "--\n" "\n" @@ -240,7 +240,7 @@ exit: return return_value; } -PyDoc_STRVAR(float_from_number__doc__, +TyDoc_STRVAR(float_from_number__doc__, "from_number($type, number, /)\n" "--\n" "\n" @@ -262,7 +262,7 @@ float_from_number(TyObject *type, TyObject *number) return return_value; } -PyDoc_STRVAR(float___getnewargs____doc__, +TyDoc_STRVAR(float___getnewargs____doc__, "__getnewargs__($self, /)\n" "--\n" "\n"); @@ -279,7 +279,7 @@ float___getnewargs__(TyObject *self, TyObject *Py_UNUSED(ignored)) return float___getnewargs___impl(self); } -PyDoc_STRVAR(float___getformat____doc__, +TyDoc_STRVAR(float___getformat____doc__, "__getformat__($type, typestr, /)\n" "--\n" "\n" @@ -325,7 +325,7 @@ exit: return return_value; } -PyDoc_STRVAR(float___format____doc__, +TyDoc_STRVAR(float___format____doc__, "__format__($self, format_spec, /)\n" "--\n" "\n" diff --git a/Objects/clinic/frameobject.c.h b/Objects/clinic/frameobject.c.h index 2a77865..d2a0811 100644 --- a/Objects/clinic/frameobject.c.h +++ b/Objects/clinic/frameobject.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() -PyDoc_STRVAR(frame_locals__doc__, +TyDoc_STRVAR(frame_locals__doc__, "Return the mapping used by the frame to look up local variables."); #if defined(frame_locals_DOCSTR) # undef frame_locals_DOCSTR @@ -36,7 +36,7 @@ frame_locals_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_lineno__doc__, +TyDoc_STRVAR(frame_lineno__doc__, "Return the current line number in the frame."); #if defined(frame_lineno_DOCSTR) # undef frame_lineno_DOCSTR @@ -68,7 +68,7 @@ frame_lineno_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_lasti__doc__, +TyDoc_STRVAR(frame_lasti__doc__, "Return the index of the last attempted instruction in the frame."); #if defined(frame_lasti_DOCSTR) # undef frame_lasti_DOCSTR @@ -100,7 +100,7 @@ frame_lasti_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_globals__doc__, +TyDoc_STRVAR(frame_globals__doc__, "Return the global variables in the frame."); #if defined(frame_globals_DOCSTR) # undef frame_globals_DOCSTR @@ -132,7 +132,7 @@ frame_globals_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_builtins__doc__, +TyDoc_STRVAR(frame_builtins__doc__, "Return the built-in variables in the frame."); #if defined(frame_builtins_DOCSTR) # undef frame_builtins_DOCSTR @@ -164,7 +164,7 @@ frame_builtins_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_code__doc__, +TyDoc_STRVAR(frame_code__doc__, "Return the code object being executed in this frame."); #if defined(frame_code_DOCSTR) # undef frame_code_DOCSTR @@ -215,7 +215,7 @@ frame_back_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_trace_opcodes__doc__, +TyDoc_STRVAR(frame_trace_opcodes__doc__, "Return True if opcode tracing is enabled, False otherwise."); #if defined(frame_trace_opcodes_DOCSTR) # undef frame_trace_opcodes_DOCSTR @@ -297,7 +297,7 @@ frame_lineno_set(TyObject *self, TyObject *value, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_trace__doc__, +TyDoc_STRVAR(frame_trace__doc__, "Return the trace function for this frame, or None if no trace function is set."); #if defined(frame_trace_DOCSTR) # undef frame_trace_DOCSTR @@ -354,7 +354,7 @@ frame_trace_set(TyObject *self, TyObject *value, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_generator__doc__, +TyDoc_STRVAR(frame_generator__doc__, "Return the generator or coroutine associated with this frame, or None."); #if defined(frame_generator_DOCSTR) # undef frame_generator_DOCSTR @@ -386,7 +386,7 @@ frame_generator_get(TyObject *self, void *Py_UNUSED(context)) return return_value; } -PyDoc_STRVAR(frame_clear__doc__, +TyDoc_STRVAR(frame_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -410,7 +410,7 @@ frame_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(frame___sizeof____doc__, +TyDoc_STRVAR(frame___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h index 6db5ffd..39e5f96 100644 --- a/Objects/clinic/funcobject.c.h +++ b/Objects/clinic/funcobject.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(function___annotate____doc__, +TyDoc_STRVAR(function___annotate____doc__, "Get the code object for a function."); #if defined(function___annotate___DOCSTR) # undef function___annotate___DOCSTR @@ -66,7 +66,7 @@ function___annotate___set(TyObject *self, TyObject *value, void *Py_UNUSED(conte return return_value; } -PyDoc_STRVAR(function___annotations____doc__, +TyDoc_STRVAR(function___annotations____doc__, "Dict of annotations in a function object."); #if defined(function___annotations___DOCSTR) # undef function___annotations___DOCSTR @@ -123,7 +123,7 @@ function___annotations___set(TyObject *self, TyObject *value, void *Py_UNUSED(co return return_value; } -PyDoc_STRVAR(function___type_params____doc__, +TyDoc_STRVAR(function___type_params____doc__, "Get the declared type parameters for a function."); #if defined(function___type_params___DOCSTR) # undef function___type_params___DOCSTR @@ -180,7 +180,7 @@ function___type_params___set(TyObject *self, TyObject *value, void *Py_UNUSED(co return return_value; } -PyDoc_STRVAR(func_new__doc__, +TyDoc_STRVAR(func_new__doc__, "function(code, globals, name=None, argdefs=None, closure=None,\n" " kwdefaults=None)\n" "--\n" @@ -218,7 +218,7 @@ func_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(code), &_Ty_ID(globals), &_Ty_ID(name), &_Ty_ID(argdefs), &_Ty_ID(closure), &_Ty_ID(kwdefaults), }, }; diff --git a/Objects/clinic/interpolationobject.c.h b/Objects/clinic/interpolationobject.c.h index 4776a7d..caad75b 100644 --- a/Objects/clinic/interpolationobject.c.h +++ b/Objects/clinic/interpolationobject.c.h @@ -26,7 +26,7 @@ interpolation_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(value), &_Ty_ID(expression), &_Ty_ID(conversion), &_Ty_ID(format_spec), }, }; diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h index 41885fd..58a7814 100644 --- a/Objects/clinic/listobject.c.h +++ b/Objects/clinic/listobject.c.h @@ -10,7 +10,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(list_insert__doc__, +TyDoc_STRVAR(list_insert__doc__, "insert($self, index, object, /)\n" "--\n" "\n" @@ -53,7 +53,7 @@ exit: return return_value; } -PyDoc_STRVAR(py_list_clear__doc__, +TyDoc_STRVAR(py_list_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -77,7 +77,7 @@ py_list_clear(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(list_copy__doc__, +TyDoc_STRVAR(list_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -101,7 +101,7 @@ list_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(list_append__doc__, +TyDoc_STRVAR(list_append__doc__, "append($self, object, /)\n" "--\n" "\n" @@ -125,7 +125,7 @@ list_append(TyObject *self, TyObject *object) return return_value; } -PyDoc_STRVAR(list_extend__doc__, +TyDoc_STRVAR(list_extend__doc__, "extend($self, iterable, /)\n" "--\n" "\n" @@ -147,7 +147,7 @@ list_extend(TyObject *self, TyObject *iterable) return return_value; } -PyDoc_STRVAR(list_pop__doc__, +TyDoc_STRVAR(list_pop__doc__, "pop($self, index=-1, /)\n" "--\n" "\n" @@ -194,7 +194,7 @@ exit: return return_value; } -PyDoc_STRVAR(list_sort__doc__, +TyDoc_STRVAR(list_sort__doc__, "sort($self, /, *, key=None, reverse=False)\n" "--\n" "\n" @@ -227,7 +227,7 @@ list_sort(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *kwn Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(reverse), }, }; @@ -277,7 +277,7 @@ exit: return return_value; } -PyDoc_STRVAR(list_reverse__doc__, +TyDoc_STRVAR(list_reverse__doc__, "reverse($self, /)\n" "--\n" "\n" @@ -301,7 +301,7 @@ list_reverse(TyObject *self, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(list_index__doc__, +TyDoc_STRVAR(list_index__doc__, "index($self, value, start=0, stop=sys.maxsize, /)\n" "--\n" "\n" @@ -347,7 +347,7 @@ exit: return return_value; } -PyDoc_STRVAR(list_count__doc__, +TyDoc_STRVAR(list_count__doc__, "count($self, value, /)\n" "--\n" "\n" @@ -369,7 +369,7 @@ list_count(TyObject *self, TyObject *value) return return_value; } -PyDoc_STRVAR(list_remove__doc__, +TyDoc_STRVAR(list_remove__doc__, "remove($self, value, /)\n" "--\n" "\n" @@ -395,7 +395,7 @@ list_remove(TyObject *self, TyObject *value) return return_value; } -PyDoc_STRVAR(list___init____doc__, +TyDoc_STRVAR(list___init____doc__, "list(iterable=(), /)\n" "--\n" "\n" @@ -433,7 +433,7 @@ exit: return return_value; } -PyDoc_STRVAR(list___sizeof____doc__, +TyDoc_STRVAR(list___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -451,7 +451,7 @@ list___sizeof__(TyObject *self, TyObject *Py_UNUSED(ignored)) return list___sizeof___impl((PyListObject *)self); } -PyDoc_STRVAR(list___reversed____doc__, +TyDoc_STRVAR(list___reversed____doc__, "__reversed__($self, /)\n" "--\n" "\n" diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h index 0a4bb7a..076f8a4 100644 --- a/Objects/clinic/longobject.c.h +++ b/Objects/clinic/longobject.c.h @@ -25,7 +25,7 @@ long_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(base), }, }; @@ -72,7 +72,7 @@ exit: return return_value; } -PyDoc_STRVAR(int___getnewargs____doc__, +TyDoc_STRVAR(int___getnewargs____doc__, "__getnewargs__($self, /)\n" "--\n" "\n"); @@ -89,7 +89,7 @@ int___getnewargs__(TyObject *self, TyObject *Py_UNUSED(ignored)) return int___getnewargs___impl(self); } -PyDoc_STRVAR(int___format____doc__, +TyDoc_STRVAR(int___format____doc__, "__format__($self, format_spec, /)\n" "--\n" "\n" @@ -118,7 +118,7 @@ exit: return return_value; } -PyDoc_STRVAR(int___round____doc__, +TyDoc_STRVAR(int___round____doc__, "__round__($self, ndigits=None, /)\n" "--\n" "\n" @@ -152,7 +152,7 @@ exit: return return_value; } -PyDoc_STRVAR(int___sizeof____doc__, +TyDoc_STRVAR(int___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -180,7 +180,7 @@ exit: return return_value; } -PyDoc_STRVAR(int_bit_length__doc__, +TyDoc_STRVAR(int_bit_length__doc__, "bit_length($self, /)\n" "--\n" "\n" @@ -203,7 +203,7 @@ int_bit_length(TyObject *self, TyObject *Py_UNUSED(ignored)) return int_bit_length_impl(self); } -PyDoc_STRVAR(int_bit_count__doc__, +TyDoc_STRVAR(int_bit_count__doc__, "bit_count($self, /)\n" "--\n" "\n" @@ -228,7 +228,7 @@ int_bit_count(TyObject *self, TyObject *Py_UNUSED(ignored)) return int_bit_count_impl(self); } -PyDoc_STRVAR(int_as_integer_ratio__doc__, +TyDoc_STRVAR(int_as_integer_ratio__doc__, "as_integer_ratio($self, /)\n" "--\n" "\n" @@ -255,7 +255,7 @@ int_as_integer_ratio(TyObject *self, TyObject *Py_UNUSED(ignored)) return int_as_integer_ratio_impl(self); } -PyDoc_STRVAR(int_to_bytes__doc__, +TyDoc_STRVAR(int_to_bytes__doc__, "to_bytes($self, /, length=1, byteorder=\'big\', *, signed=False)\n" "--\n" "\n" @@ -296,7 +296,7 @@ int_to_bytes(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject * Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(length), &_Ty_ID(byteorder), &_Ty_ID(signed), }, }; @@ -370,7 +370,7 @@ exit: return return_value; } -PyDoc_STRVAR(int_from_bytes__doc__, +TyDoc_STRVAR(int_from_bytes__doc__, "from_bytes($type, /, bytes, byteorder=\'big\', *, signed=False)\n" "--\n" "\n" @@ -410,7 +410,7 @@ int_from_bytes(TyObject *type, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(bytes), &_Ty_ID(byteorder), &_Ty_ID(signed), }, }; @@ -468,7 +468,7 @@ exit: return return_value; } -PyDoc_STRVAR(int_is_integer__doc__, +TyDoc_STRVAR(int_is_integer__doc__, "is_integer($self, /)\n" "--\n" "\n" diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h index cc9a3e4..d1a1337 100644 --- a/Objects/clinic/memoryobject.c.h +++ b/Objects/clinic/memoryobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(memoryview__doc__, +TyDoc_STRVAR(memoryview__doc__, "memoryview(object)\n" "--\n" "\n" @@ -30,7 +30,7 @@ memoryview(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(object), }, }; @@ -65,7 +65,7 @@ exit: return return_value; } -PyDoc_STRVAR(memoryview__from_flags__doc__, +TyDoc_STRVAR(memoryview__from_flags__doc__, "_from_flags($type, /, object, flags)\n" "--\n" "\n" @@ -90,7 +90,7 @@ memoryview__from_flags(TyObject *type, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(object), &_Ty_ID(flags), }, }; @@ -128,7 +128,7 @@ exit: return return_value; } -PyDoc_STRVAR(memoryview_release__doc__, +TyDoc_STRVAR(memoryview_release__doc__, "release($self, /)\n" "--\n" "\n" @@ -146,7 +146,7 @@ memoryview_release(TyObject *self, TyObject *Py_UNUSED(ignored)) return memoryview_release_impl((PyMemoryViewObject *)self); } -PyDoc_STRVAR(memoryview_cast__doc__, +TyDoc_STRVAR(memoryview_cast__doc__, "cast($self, /, format, shape=)\n" "--\n" "\n" @@ -172,7 +172,7 @@ memoryview_cast(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(format), &_Ty_ID(shape), }, }; @@ -216,7 +216,7 @@ exit: return return_value; } -PyDoc_STRVAR(memoryview_toreadonly__doc__, +TyDoc_STRVAR(memoryview_toreadonly__doc__, "toreadonly($self, /)\n" "--\n" "\n" @@ -234,7 +234,7 @@ memoryview_toreadonly(TyObject *self, TyObject *Py_UNUSED(ignored)) return memoryview_toreadonly_impl((PyMemoryViewObject *)self); } -PyDoc_STRVAR(memoryview_tolist__doc__, +TyDoc_STRVAR(memoryview_tolist__doc__, "tolist($self, /)\n" "--\n" "\n" @@ -252,7 +252,7 @@ memoryview_tolist(TyObject *self, TyObject *Py_UNUSED(ignored)) return memoryview_tolist_impl((PyMemoryViewObject *)self); } -PyDoc_STRVAR(memoryview_tobytes__doc__, +TyDoc_STRVAR(memoryview_tobytes__doc__, "tobytes($self, /, order=\'C\')\n" "--\n" "\n" @@ -283,7 +283,7 @@ memoryview_tobytes(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(order), }, }; @@ -338,7 +338,7 @@ exit: return return_value; } -PyDoc_STRVAR(memoryview_hex__doc__, +TyDoc_STRVAR(memoryview_hex__doc__, "hex($self, /, sep=, bytes_per_sep=1)\n" "--\n" "\n" @@ -381,7 +381,7 @@ memoryview_hex(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(bytes_per_sep), }, }; @@ -429,7 +429,7 @@ exit: return return_value; } -PyDoc_STRVAR(memoryview_count__doc__, +TyDoc_STRVAR(memoryview_count__doc__, "count($self, value, /)\n" "--\n" "\n" @@ -451,7 +451,7 @@ memoryview_count(TyObject *self, TyObject *value) return return_value; } -PyDoc_STRVAR(memoryview_index__doc__, +TyDoc_STRVAR(memoryview_index__doc__, "index($self, value, start=0, stop=sys.maxsize, /)\n" "--\n" "\n" diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h index e0fcfc8..2734402 100644 --- a/Objects/clinic/moduleobject.c.h +++ b/Objects/clinic/moduleobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(module___init____doc__, +TyDoc_STRVAR(module___init____doc__, "module(name, doc=None)\n" "--\n" "\n" @@ -32,7 +32,7 @@ module___init__(TyObject *self, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(doc), }, }; diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h index a7d2a99..4dbb180 100644 --- a/Objects/clinic/odictobject.c.h +++ b/Objects/clinic/odictobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(OrderedDict_fromkeys__doc__, +TyDoc_STRVAR(OrderedDict_fromkeys__doc__, "fromkeys($type, /, iterable, value=None)\n" "--\n" "\n" @@ -33,7 +33,7 @@ OrderedDict_fromkeys(TyObject *type, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(iterable), &_Ty_ID(value), }, }; @@ -73,7 +73,7 @@ exit: return return_value; } -PyDoc_STRVAR(OrderedDict_setdefault__doc__, +TyDoc_STRVAR(OrderedDict_setdefault__doc__, "setdefault($self, /, key, default=None)\n" "--\n" "\n" @@ -101,7 +101,7 @@ OrderedDict_setdefault(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(default), }, }; @@ -141,7 +141,7 @@ exit: return return_value; } -PyDoc_STRVAR(OrderedDict_pop__doc__, +TyDoc_STRVAR(OrderedDict_pop__doc__, "pop($self, /, key, default=)\n" "--\n" "\n" @@ -170,7 +170,7 @@ OrderedDict_pop(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(default), }, }; @@ -210,7 +210,7 @@ exit: return return_value; } -PyDoc_STRVAR(OrderedDict_popitem__doc__, +TyDoc_STRVAR(OrderedDict_popitem__doc__, "popitem($self, /, last=True)\n" "--\n" "\n" @@ -237,7 +237,7 @@ OrderedDict_popitem(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyO Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(last), }, }; @@ -278,7 +278,7 @@ exit: return return_value; } -PyDoc_STRVAR(OrderedDict_move_to_end__doc__, +TyDoc_STRVAR(OrderedDict_move_to_end__doc__, "move_to_end($self, /, key, last=True)\n" "--\n" "\n" @@ -305,7 +305,7 @@ OrderedDict_move_to_end(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(last), }, }; diff --git a/Objects/clinic/setobject.c.h b/Objects/clinic/setobject.c.h index 7816b8e..2ce0504 100644 --- a/Objects/clinic/setobject.c.h +++ b/Objects/clinic/setobject.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() -PyDoc_STRVAR(set_pop__doc__, +TyDoc_STRVAR(set_pop__doc__, "pop($self, /)\n" "--\n" "\n" @@ -30,7 +30,7 @@ set_pop(TyObject *so, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(set_update__doc__, +TyDoc_STRVAR(set_update__doc__, "update($self, /, *others)\n" "--\n" "\n" @@ -57,7 +57,7 @@ set_update(TyObject *so, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(set_copy__doc__, +TyDoc_STRVAR(set_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -81,7 +81,7 @@ set_copy(TyObject *so, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(frozenset_copy__doc__, +TyDoc_STRVAR(frozenset_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -105,7 +105,7 @@ frozenset_copy(TyObject *so, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(set_clear__doc__, +TyDoc_STRVAR(set_clear__doc__, "clear($self, /)\n" "--\n" "\n" @@ -129,7 +129,7 @@ set_clear(TyObject *so, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(set_union__doc__, +TyDoc_STRVAR(set_union__doc__, "union($self, /, *others)\n" "--\n" "\n" @@ -156,7 +156,7 @@ set_union(TyObject *so, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(set_intersection_multi__doc__, +TyDoc_STRVAR(set_intersection_multi__doc__, "intersection($self, /, *others)\n" "--\n" "\n" @@ -183,7 +183,7 @@ set_intersection_multi(TyObject *so, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(set_intersection_update_multi__doc__, +TyDoc_STRVAR(set_intersection_update_multi__doc__, "intersection_update($self, /, *others)\n" "--\n" "\n" @@ -210,7 +210,7 @@ set_intersection_update_multi(TyObject *so, TyObject *const *args, Ty_ssize_t na return return_value; } -PyDoc_STRVAR(set_isdisjoint__doc__, +TyDoc_STRVAR(set_isdisjoint__doc__, "isdisjoint($self, other, /)\n" "--\n" "\n" @@ -234,7 +234,7 @@ set_isdisjoint(TyObject *so, TyObject *other) return return_value; } -PyDoc_STRVAR(set_difference_update__doc__, +TyDoc_STRVAR(set_difference_update__doc__, "difference_update($self, /, *others)\n" "--\n" "\n" @@ -261,7 +261,7 @@ set_difference_update(TyObject *so, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(set_difference_multi__doc__, +TyDoc_STRVAR(set_difference_multi__doc__, "difference($self, /, *others)\n" "--\n" "\n" @@ -288,7 +288,7 @@ set_difference_multi(TyObject *so, TyObject *const *args, Ty_ssize_t nargs) return return_value; } -PyDoc_STRVAR(set_symmetric_difference_update__doc__, +TyDoc_STRVAR(set_symmetric_difference_update__doc__, "symmetric_difference_update($self, other, /)\n" "--\n" "\n" @@ -310,7 +310,7 @@ set_symmetric_difference_update(TyObject *so, TyObject *other) return return_value; } -PyDoc_STRVAR(set_symmetric_difference__doc__, +TyDoc_STRVAR(set_symmetric_difference__doc__, "symmetric_difference($self, other, /)\n" "--\n" "\n" @@ -334,7 +334,7 @@ set_symmetric_difference(TyObject *so, TyObject *other) return return_value; } -PyDoc_STRVAR(set_issubset__doc__, +TyDoc_STRVAR(set_issubset__doc__, "issubset($self, other, /)\n" "--\n" "\n" @@ -358,7 +358,7 @@ set_issubset(TyObject *so, TyObject *other) return return_value; } -PyDoc_STRVAR(set_issuperset__doc__, +TyDoc_STRVAR(set_issuperset__doc__, "issuperset($self, other, /)\n" "--\n" "\n" @@ -382,7 +382,7 @@ set_issuperset(TyObject *so, TyObject *other) return return_value; } -PyDoc_STRVAR(set_add__doc__, +TyDoc_STRVAR(set_add__doc__, "add($self, object, /)\n" "--\n" "\n" @@ -408,7 +408,7 @@ set_add(TyObject *so, TyObject *key) return return_value; } -PyDoc_STRVAR(set___contains____doc__, +TyDoc_STRVAR(set___contains____doc__, "__contains__($self, object, /)\n" "--\n" "\n" @@ -432,7 +432,7 @@ set___contains__(TyObject *so, TyObject *key) return return_value; } -PyDoc_STRVAR(frozenset___contains____doc__, +TyDoc_STRVAR(frozenset___contains____doc__, "__contains__($self, object, /)\n" "--\n" "\n" @@ -454,7 +454,7 @@ frozenset___contains__(TyObject *so, TyObject *key) return return_value; } -PyDoc_STRVAR(set_remove__doc__, +TyDoc_STRVAR(set_remove__doc__, "remove($self, object, /)\n" "--\n" "\n" @@ -480,7 +480,7 @@ set_remove(TyObject *so, TyObject *key) return return_value; } -PyDoc_STRVAR(set_discard__doc__, +TyDoc_STRVAR(set_discard__doc__, "discard($self, object, /)\n" "--\n" "\n" @@ -507,7 +507,7 @@ set_discard(TyObject *so, TyObject *key) return return_value; } -PyDoc_STRVAR(set___reduce____doc__, +TyDoc_STRVAR(set___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n" @@ -531,7 +531,7 @@ set___reduce__(TyObject *so, TyObject *Py_UNUSED(ignored)) return return_value; } -PyDoc_STRVAR(set___sizeof____doc__, +TyDoc_STRVAR(set___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h index c8f99cb..8fd7926 100644 --- a/Objects/clinic/structseq.c.h +++ b/Objects/clinic/structseq.c.h @@ -24,7 +24,7 @@ structseq_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sequence), &_Ty_ID(dict), }, }; diff --git a/Objects/clinic/tupleobject.c.h b/Objects/clinic/tupleobject.c.h index 5c0e903..f09e4d0 100644 --- a/Objects/clinic/tupleobject.c.h +++ b/Objects/clinic/tupleobject.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(tuple_index__doc__, +TyDoc_STRVAR(tuple_index__doc__, "index($self, value, start=0, stop=sys.maxsize, /)\n" "--\n" "\n" @@ -50,7 +50,7 @@ exit: return return_value; } -PyDoc_STRVAR(tuple_count__doc__, +TyDoc_STRVAR(tuple_count__doc__, "count($self, value, /)\n" "--\n" "\n" @@ -72,7 +72,7 @@ tuple_count(TyObject *self, TyObject *value) return return_value; } -PyDoc_STRVAR(tuple_new__doc__, +TyDoc_STRVAR(tuple_new__doc__, "tuple(iterable=(), /)\n" "--\n" "\n" @@ -111,7 +111,7 @@ exit: return return_value; } -PyDoc_STRVAR(tuple___getnewargs____doc__, +TyDoc_STRVAR(tuple___getnewargs____doc__, "__getnewargs__($self, /)\n" "--\n" "\n"); diff --git a/Objects/clinic/typeobject.c.h b/Objects/clinic/typeobject.c.h index 97b0095..26cd949 100644 --- a/Objects/clinic/typeobject.c.h +++ b/Objects/clinic/typeobject.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_BadArgument() -PyDoc_STRVAR(type___instancecheck____doc__, +TyDoc_STRVAR(type___instancecheck____doc__, "__instancecheck__($self, instance, /)\n" "--\n" "\n" @@ -32,7 +32,7 @@ exit: return return_value; } -PyDoc_STRVAR(type___subclasscheck____doc__, +TyDoc_STRVAR(type___subclasscheck____doc__, "__subclasscheck__($self, subclass, /)\n" "--\n" "\n" @@ -60,7 +60,7 @@ exit: return return_value; } -PyDoc_STRVAR(type_mro__doc__, +TyDoc_STRVAR(type_mro__doc__, "mro($self, /)\n" "--\n" "\n" @@ -78,7 +78,7 @@ type_mro(TyObject *self, TyObject *Py_UNUSED(ignored)) return type_mro_impl((TyTypeObject *)self); } -PyDoc_STRVAR(type___subclasses____doc__, +TyDoc_STRVAR(type___subclasses____doc__, "__subclasses__($self, /)\n" "--\n" "\n" @@ -96,7 +96,7 @@ type___subclasses__(TyObject *self, TyObject *Py_UNUSED(ignored)) return type___subclasses___impl((TyTypeObject *)self); } -PyDoc_STRVAR(type___dir____doc__, +TyDoc_STRVAR(type___dir____doc__, "__dir__($self, /)\n" "--\n" "\n" @@ -114,7 +114,7 @@ type___dir__(TyObject *self, TyObject *Py_UNUSED(ignored)) return type___dir___impl((TyTypeObject *)self); } -PyDoc_STRVAR(type___sizeof____doc__, +TyDoc_STRVAR(type___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -132,7 +132,7 @@ type___sizeof__(TyObject *self, TyObject *Py_UNUSED(ignored)) return type___sizeof___impl((TyTypeObject *)self); } -PyDoc_STRVAR(object___getstate____doc__, +TyDoc_STRVAR(object___getstate____doc__, "__getstate__($self, /)\n" "--\n" "\n" @@ -150,7 +150,7 @@ object___getstate__(TyObject *self, TyObject *Py_UNUSED(ignored)) return object___getstate___impl(self); } -PyDoc_STRVAR(object___reduce____doc__, +TyDoc_STRVAR(object___reduce____doc__, "__reduce__($self, /)\n" "--\n" "\n" @@ -168,7 +168,7 @@ object___reduce__(TyObject *self, TyObject *Py_UNUSED(ignored)) return object___reduce___impl(self); } -PyDoc_STRVAR(object___reduce_ex____doc__, +TyDoc_STRVAR(object___reduce_ex____doc__, "__reduce_ex__($self, protocol, /)\n" "--\n" "\n" @@ -196,7 +196,7 @@ exit: return return_value; } -PyDoc_STRVAR(object___format____doc__, +TyDoc_STRVAR(object___format____doc__, "__format__($self, format_spec, /)\n" "--\n" "\n" @@ -227,7 +227,7 @@ exit: return return_value; } -PyDoc_STRVAR(object___sizeof____doc__, +TyDoc_STRVAR(object___sizeof____doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -245,7 +245,7 @@ object___sizeof__(TyObject *self, TyObject *Py_UNUSED(ignored)) return object___sizeof___impl(self); } -PyDoc_STRVAR(object___dir____doc__, +TyDoc_STRVAR(object___dir____doc__, "__dir__($self, /)\n" "--\n" "\n" diff --git a/Objects/clinic/typevarobject.c.h b/Objects/clinic/typevarobject.c.h index 02376d8..2648253 100644 --- a/Objects/clinic/typevarobject.c.h +++ b/Objects/clinic/typevarobject.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(typevar_new__doc__, +TyDoc_STRVAR(typevar_new__doc__, "typevar(name, *constraints, bound=None, default=typing.NoDefault,\n" " covariant=False, contravariant=False, infer_variance=False)\n" "--\n" @@ -33,7 +33,7 @@ typevar_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(bound), &_Ty_ID(default), &_Ty_ID(covariant), &_Ty_ID(contravariant), &_Ty_ID(infer_variance), }, }; @@ -124,7 +124,7 @@ exit: return return_value; } -PyDoc_STRVAR(typevar_typing_subst__doc__, +TyDoc_STRVAR(typevar_typing_subst__doc__, "__typing_subst__($self, arg, /)\n" "--\n" "\n"); @@ -145,7 +145,7 @@ typevar_typing_subst(TyObject *self, TyObject *arg) return return_value; } -PyDoc_STRVAR(typevar_typing_prepare_subst__doc__, +TyDoc_STRVAR(typevar_typing_prepare_subst__doc__, "__typing_prepare_subst__($self, alias, args, /)\n" "--\n" "\n"); @@ -175,7 +175,7 @@ exit: return return_value; } -PyDoc_STRVAR(typevar_reduce__doc__, +TyDoc_STRVAR(typevar_reduce__doc__, "__reduce__($self, /)\n" "--\n" "\n"); @@ -192,7 +192,7 @@ typevar_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) return typevar_reduce_impl((typevarobject *)self); } -PyDoc_STRVAR(typevar_has_default__doc__, +TyDoc_STRVAR(typevar_has_default__doc__, "has_default($self, /)\n" "--\n" "\n"); @@ -209,7 +209,7 @@ typevar_has_default(TyObject *self, TyObject *Py_UNUSED(ignored)) return typevar_has_default_impl((typevarobject *)self); } -PyDoc_STRVAR(paramspecargs_new__doc__, +TyDoc_STRVAR(paramspecargs_new__doc__, "paramspecargs(origin)\n" "--\n" "\n" @@ -231,7 +231,7 @@ paramspecargs_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(origin), }, }; @@ -266,7 +266,7 @@ exit: return return_value; } -PyDoc_STRVAR(paramspeckwargs_new__doc__, +TyDoc_STRVAR(paramspeckwargs_new__doc__, "paramspeckwargs(origin)\n" "--\n" "\n" @@ -288,7 +288,7 @@ paramspeckwargs_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(origin), }, }; @@ -323,7 +323,7 @@ exit: return return_value; } -PyDoc_STRVAR(paramspec_new__doc__, +TyDoc_STRVAR(paramspec_new__doc__, "paramspec(name, *, bound=None, default=typing.NoDefault,\n" " covariant=False, contravariant=False, infer_variance=False)\n" "--\n" @@ -348,7 +348,7 @@ paramspec_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(bound), &_Ty_ID(default), &_Ty_ID(covariant), &_Ty_ID(contravariant), &_Ty_ID(infer_variance), }, }; @@ -431,7 +431,7 @@ exit: return return_value; } -PyDoc_STRVAR(paramspec_typing_subst__doc__, +TyDoc_STRVAR(paramspec_typing_subst__doc__, "__typing_subst__($self, arg, /)\n" "--\n" "\n"); @@ -452,7 +452,7 @@ paramspec_typing_subst(TyObject *self, TyObject *arg) return return_value; } -PyDoc_STRVAR(paramspec_typing_prepare_subst__doc__, +TyDoc_STRVAR(paramspec_typing_prepare_subst__doc__, "__typing_prepare_subst__($self, alias, args, /)\n" "--\n" "\n"); @@ -482,7 +482,7 @@ exit: return return_value; } -PyDoc_STRVAR(paramspec_reduce__doc__, +TyDoc_STRVAR(paramspec_reduce__doc__, "__reduce__($self, /)\n" "--\n" "\n"); @@ -499,7 +499,7 @@ paramspec_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) return paramspec_reduce_impl((paramspecobject *)self); } -PyDoc_STRVAR(paramspec_has_default__doc__, +TyDoc_STRVAR(paramspec_has_default__doc__, "has_default($self, /)\n" "--\n" "\n"); @@ -516,7 +516,7 @@ paramspec_has_default(TyObject *self, TyObject *Py_UNUSED(ignored)) return paramspec_has_default_impl((paramspecobject *)self); } -PyDoc_STRVAR(typevartuple__doc__, +TyDoc_STRVAR(typevartuple__doc__, "typevartuple(name, *, default=typing.NoDefault)\n" "--\n" "\n" @@ -539,7 +539,7 @@ typevartuple(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(default), }, }; @@ -585,7 +585,7 @@ exit: return return_value; } -PyDoc_STRVAR(typevartuple_typing_subst__doc__, +TyDoc_STRVAR(typevartuple_typing_subst__doc__, "__typing_subst__($self, arg, /)\n" "--\n" "\n"); @@ -606,7 +606,7 @@ typevartuple_typing_subst(TyObject *self, TyObject *arg) return return_value; } -PyDoc_STRVAR(typevartuple_typing_prepare_subst__doc__, +TyDoc_STRVAR(typevartuple_typing_prepare_subst__doc__, "__typing_prepare_subst__($self, alias, args, /)\n" "--\n" "\n"); @@ -636,7 +636,7 @@ exit: return return_value; } -PyDoc_STRVAR(typevartuple_reduce__doc__, +TyDoc_STRVAR(typevartuple_reduce__doc__, "__reduce__($self, /)\n" "--\n" "\n"); @@ -653,7 +653,7 @@ typevartuple_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) return typevartuple_reduce_impl((typevartupleobject *)self); } -PyDoc_STRVAR(typevartuple_has_default__doc__, +TyDoc_STRVAR(typevartuple_has_default__doc__, "has_default($self, /)\n" "--\n" "\n"); @@ -670,7 +670,7 @@ typevartuple_has_default(TyObject *self, TyObject *Py_UNUSED(ignored)) return typevartuple_has_default_impl((typevartupleobject *)self); } -PyDoc_STRVAR(typealias_reduce__doc__, +TyDoc_STRVAR(typealias_reduce__doc__, "__reduce__($self, /)\n" "--\n" "\n"); @@ -687,7 +687,7 @@ typealias_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) return typealias_reduce_impl((typealiasobject *)self); } -PyDoc_STRVAR(typealias_new__doc__, +TyDoc_STRVAR(typealias_new__doc__, "typealias(name, value, *, type_params=)\n" "--\n" "\n" @@ -710,7 +710,7 @@ typealias_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(value), &_Ty_ID(type_params), }, }; diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index 02d66a1..d9cd5c5 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(EncodingMap_size__doc__, +TyDoc_STRVAR(EncodingMap_size__doc__, "size($self, /)\n" "--\n" "\n" @@ -27,7 +27,7 @@ EncodingMap_size(TyObject *self, TyObject *Py_UNUSED(ignored)) return EncodingMap_size_impl((struct encoding_map *)self); } -PyDoc_STRVAR(unicode_title__doc__, +TyDoc_STRVAR(unicode_title__doc__, "title($self, /)\n" "--\n" "\n" @@ -48,7 +48,7 @@ unicode_title(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_title_impl(self); } -PyDoc_STRVAR(unicode_capitalize__doc__, +TyDoc_STRVAR(unicode_capitalize__doc__, "capitalize($self, /)\n" "--\n" "\n" @@ -69,7 +69,7 @@ unicode_capitalize(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_capitalize_impl(self); } -PyDoc_STRVAR(unicode_casefold__doc__, +TyDoc_STRVAR(unicode_casefold__doc__, "casefold($self, /)\n" "--\n" "\n" @@ -87,7 +87,7 @@ unicode_casefold(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_casefold_impl(self); } -PyDoc_STRVAR(unicode_center__doc__, +TyDoc_STRVAR(unicode_center__doc__, "center($self, width, fillchar=\' \', /)\n" "--\n" "\n" @@ -136,7 +136,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_count__doc__, +TyDoc_STRVAR(unicode_count__doc__, "count($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -191,7 +191,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_encode__doc__, +TyDoc_STRVAR(unicode_encode__doc__, "encode($self, /, encoding=\'utf-8\', errors=\'strict\')\n" "--\n" "\n" @@ -225,7 +225,7 @@ unicode_encode(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(encoding), &_Ty_ID(errors), }, }; @@ -294,7 +294,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_expandtabs__doc__, +TyDoc_STRVAR(unicode_expandtabs__doc__, "expandtabs($self, /, tabsize=8)\n" "--\n" "\n" @@ -321,7 +321,7 @@ unicode_expandtabs(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(tabsize), }, }; @@ -362,7 +362,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_find__doc__, +TyDoc_STRVAR(unicode_find__doc__, "find($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -418,7 +418,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_index__doc__, +TyDoc_STRVAR(unicode_index__doc__, "index($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -474,7 +474,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_isascii__doc__, +TyDoc_STRVAR(unicode_isascii__doc__, "isascii($self, /)\n" "--\n" "\n" @@ -495,7 +495,7 @@ unicode_isascii(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isascii_impl(self); } -PyDoc_STRVAR(unicode_islower__doc__, +TyDoc_STRVAR(unicode_islower__doc__, "islower($self, /)\n" "--\n" "\n" @@ -516,7 +516,7 @@ unicode_islower(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_islower_impl(self); } -PyDoc_STRVAR(unicode_isupper__doc__, +TyDoc_STRVAR(unicode_isupper__doc__, "isupper($self, /)\n" "--\n" "\n" @@ -537,7 +537,7 @@ unicode_isupper(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isupper_impl(self); } -PyDoc_STRVAR(unicode_istitle__doc__, +TyDoc_STRVAR(unicode_istitle__doc__, "istitle($self, /)\n" "--\n" "\n" @@ -558,7 +558,7 @@ unicode_istitle(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_istitle_impl(self); } -PyDoc_STRVAR(unicode_isspace__doc__, +TyDoc_STRVAR(unicode_isspace__doc__, "isspace($self, /)\n" "--\n" "\n" @@ -579,7 +579,7 @@ unicode_isspace(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isspace_impl(self); } -PyDoc_STRVAR(unicode_isalpha__doc__, +TyDoc_STRVAR(unicode_isalpha__doc__, "isalpha($self, /)\n" "--\n" "\n" @@ -600,7 +600,7 @@ unicode_isalpha(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isalpha_impl(self); } -PyDoc_STRVAR(unicode_isalnum__doc__, +TyDoc_STRVAR(unicode_isalnum__doc__, "isalnum($self, /)\n" "--\n" "\n" @@ -621,7 +621,7 @@ unicode_isalnum(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isalnum_impl(self); } -PyDoc_STRVAR(unicode_isdecimal__doc__, +TyDoc_STRVAR(unicode_isdecimal__doc__, "isdecimal($self, /)\n" "--\n" "\n" @@ -642,7 +642,7 @@ unicode_isdecimal(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isdecimal_impl(self); } -PyDoc_STRVAR(unicode_isdigit__doc__, +TyDoc_STRVAR(unicode_isdigit__doc__, "isdigit($self, /)\n" "--\n" "\n" @@ -663,7 +663,7 @@ unicode_isdigit(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isdigit_impl(self); } -PyDoc_STRVAR(unicode_isnumeric__doc__, +TyDoc_STRVAR(unicode_isnumeric__doc__, "isnumeric($self, /)\n" "--\n" "\n" @@ -684,7 +684,7 @@ unicode_isnumeric(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isnumeric_impl(self); } -PyDoc_STRVAR(unicode_isidentifier__doc__, +TyDoc_STRVAR(unicode_isidentifier__doc__, "isidentifier($self, /)\n" "--\n" "\n" @@ -705,7 +705,7 @@ unicode_isidentifier(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isidentifier_impl(self); } -PyDoc_STRVAR(unicode_isprintable__doc__, +TyDoc_STRVAR(unicode_isprintable__doc__, "isprintable($self, /)\n" "--\n" "\n" @@ -725,7 +725,7 @@ unicode_isprintable(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_isprintable_impl(self); } -PyDoc_STRVAR(unicode_join__doc__, +TyDoc_STRVAR(unicode_join__doc__, "join($self, iterable, /)\n" "--\n" "\n" @@ -739,7 +739,7 @@ PyDoc_STRVAR(unicode_join__doc__, #define UNICODE_JOIN_METHODDEF \ {"join", (PyCFunction)unicode_join, METH_O, unicode_join__doc__}, -PyDoc_STRVAR(unicode_ljust__doc__, +TyDoc_STRVAR(unicode_ljust__doc__, "ljust($self, width, fillchar=\' \', /)\n" "--\n" "\n" @@ -788,7 +788,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_lower__doc__, +TyDoc_STRVAR(unicode_lower__doc__, "lower($self, /)\n" "--\n" "\n" @@ -806,7 +806,7 @@ unicode_lower(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_lower_impl(self); } -PyDoc_STRVAR(unicode_strip__doc__, +TyDoc_STRVAR(unicode_strip__doc__, "strip($self, chars=None, /)\n" "--\n" "\n" @@ -840,7 +840,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_lstrip__doc__, +TyDoc_STRVAR(unicode_lstrip__doc__, "lstrip($self, chars=None, /)\n" "--\n" "\n" @@ -874,7 +874,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_rstrip__doc__, +TyDoc_STRVAR(unicode_rstrip__doc__, "rstrip($self, chars=None, /)\n" "--\n" "\n" @@ -908,7 +908,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_replace__doc__, +TyDoc_STRVAR(unicode_replace__doc__, "replace($self, old, new, /, count=-1)\n" "--\n" "\n" @@ -941,7 +941,7 @@ unicode_replace(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(count), }, }; @@ -1002,7 +1002,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_removeprefix__doc__, +TyDoc_STRVAR(unicode_removeprefix__doc__, "removeprefix($self, prefix, /)\n" "--\n" "\n" @@ -1034,7 +1034,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_removesuffix__doc__, +TyDoc_STRVAR(unicode_removesuffix__doc__, "removesuffix($self, suffix, /)\n" "--\n" "\n" @@ -1067,7 +1067,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_rfind__doc__, +TyDoc_STRVAR(unicode_rfind__doc__, "rfind($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -1123,7 +1123,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_rindex__doc__, +TyDoc_STRVAR(unicode_rindex__doc__, "rindex($self, sub[, start[, end]], /)\n" "--\n" "\n" @@ -1179,7 +1179,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_rjust__doc__, +TyDoc_STRVAR(unicode_rjust__doc__, "rjust($self, width, fillchar=\' \', /)\n" "--\n" "\n" @@ -1228,7 +1228,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_split__doc__, +TyDoc_STRVAR(unicode_split__doc__, "split($self, /, sep=None, maxsplit=-1)\n" "--\n" "\n" @@ -1269,7 +1269,7 @@ unicode_split(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(maxsplit), }, }; @@ -1325,7 +1325,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_partition__doc__, +TyDoc_STRVAR(unicode_partition__doc__, "partition($self, sep, /)\n" "--\n" "\n" @@ -1341,7 +1341,7 @@ PyDoc_STRVAR(unicode_partition__doc__, #define UNICODE_PARTITION_METHODDEF \ {"partition", (PyCFunction)unicode_partition, METH_O, unicode_partition__doc__}, -PyDoc_STRVAR(unicode_rpartition__doc__, +TyDoc_STRVAR(unicode_rpartition__doc__, "rpartition($self, sep, /)\n" "--\n" "\n" @@ -1357,7 +1357,7 @@ PyDoc_STRVAR(unicode_rpartition__doc__, #define UNICODE_RPARTITION_METHODDEF \ {"rpartition", (PyCFunction)unicode_rpartition, METH_O, unicode_rpartition__doc__}, -PyDoc_STRVAR(unicode_rsplit__doc__, +TyDoc_STRVAR(unicode_rsplit__doc__, "rsplit($self, /, sep=None, maxsplit=-1)\n" "--\n" "\n" @@ -1394,7 +1394,7 @@ unicode_rsplit(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(maxsplit), }, }; @@ -1450,7 +1450,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_splitlines__doc__, +TyDoc_STRVAR(unicode_splitlines__doc__, "splitlines($self, /, keepends=False)\n" "--\n" "\n" @@ -1478,7 +1478,7 @@ unicode_splitlines(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(keepends), }, }; @@ -1519,7 +1519,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_swapcase__doc__, +TyDoc_STRVAR(unicode_swapcase__doc__, "swapcase($self, /)\n" "--\n" "\n" @@ -1537,7 +1537,7 @@ unicode_swapcase(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_swapcase_impl(self); } -PyDoc_STRVAR(unicode_maketrans__doc__, +TyDoc_STRVAR(unicode_maketrans__doc__, "maketrans(x, y=, z=, /)\n" "--\n" "\n" @@ -1592,7 +1592,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_translate__doc__, +TyDoc_STRVAR(unicode_translate__doc__, "translate($self, table, /)\n" "--\n" "\n" @@ -1609,7 +1609,7 @@ PyDoc_STRVAR(unicode_translate__doc__, #define UNICODE_TRANSLATE_METHODDEF \ {"translate", (PyCFunction)unicode_translate, METH_O, unicode_translate__doc__}, -PyDoc_STRVAR(unicode_upper__doc__, +TyDoc_STRVAR(unicode_upper__doc__, "upper($self, /)\n" "--\n" "\n" @@ -1627,7 +1627,7 @@ unicode_upper(TyObject *self, TyObject *Py_UNUSED(ignored)) return unicode_upper_impl(self); } -PyDoc_STRVAR(unicode_zfill__doc__, +TyDoc_STRVAR(unicode_zfill__doc__, "zfill($self, width, /)\n" "--\n" "\n" @@ -1665,7 +1665,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_startswith__doc__, +TyDoc_STRVAR(unicode_startswith__doc__, "startswith($self, prefix[, start[, end]], /)\n" "--\n" "\n" @@ -1716,7 +1716,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_endswith__doc__, +TyDoc_STRVAR(unicode_endswith__doc__, "endswith($self, suffix[, start[, end]], /)\n" "--\n" "\n" @@ -1767,7 +1767,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode___format____doc__, +TyDoc_STRVAR(unicode___format____doc__, "__format__($self, format_spec, /)\n" "--\n" "\n" @@ -1796,7 +1796,7 @@ exit: return return_value; } -PyDoc_STRVAR(unicode_sizeof__doc__, +TyDoc_STRVAR(unicode_sizeof__doc__, "__sizeof__($self, /)\n" "--\n" "\n" @@ -1831,7 +1831,7 @@ unicode_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(object), &_Ty_ID(encoding), &_Ty_ID(errors), }, }; diff --git a/Objects/codeobject.c b/Objects/codeobject.c index afa087e..2336739 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -2,13 +2,13 @@ #include "opcode.h" #include "pycore_code.h" // _PyCodeConstructor -#include "pycore_function.h" // _PyFunction_ClearCodeByVersion() +#include "pycore_function.h" // _TyFunction_ClearCodeByVersion() #include "pycore_hashtable.h" // _Ty_hashtable_t #include "pycore_index_pool.h" // _PyIndexPool_Fini() #include "pycore_initconfig.h" // _TyStatus_OK() -#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs +#include "pycore_interp.h" // TyInterpreterState.co_extra_freefuncs #include "pycore_interpframe.h" // FRAME_SPECIALS_SIZE -#include "pycore_opcode_metadata.h" // _PyOpcode_Caches +#include "pycore_opcode_metadata.h" // _TyOpcode_Caches #include "pycore_opcode_utils.h" // RESUME_AT_FUNC_START #include "pycore_optimizer.h" // _Ty_ExecutorDetach #include "pycore_pymem.h" // _TyMem_FreeDelayed() @@ -41,7 +41,7 @@ static void notify_code_watchers(PyCodeEvent event, PyCodeObject *co) { assert(Ty_REFCNT(co) > 0); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->_initialized); uint8_t bits = interp->active_code_watchers; int i = 0; @@ -65,7 +65,7 @@ notify_code_watchers(PyCodeEvent event, PyCodeObject *co) int TyCode_AddWatcher(TyCode_WatchCallback callback) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->_initialized); for (int i = 0; i < CODE_MAX_WATCHERS; i++) { @@ -81,7 +81,7 @@ TyCode_AddWatcher(TyCode_WatchCallback callback) } static inline int -validate_watcher_id(PyInterpreterState *interp, int watcher_id) +validate_watcher_id(TyInterpreterState *interp, int watcher_id) { if (watcher_id < 0 || watcher_id >= CODE_MAX_WATCHERS) { TyErr_Format(TyExc_ValueError, "Invalid code watcher ID %d", watcher_id); @@ -97,7 +97,7 @@ validate_watcher_id(PyInterpreterState *interp, int watcher_id) int TyCode_ClearWatcher(int watcher_id) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->_initialized); if (validate_watcher_id(interp, watcher_id) < 0) { return -1; @@ -181,7 +181,7 @@ should_immortalize_constant(TyObject *v) static int intern_strings(TyObject *tuple) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); Ty_ssize_t i; for (i = TyTuple_GET_SIZE(tuple); --i >= 0; ) { @@ -202,7 +202,7 @@ intern_strings(TyObject *tuple) static int intern_constants(TyObject *tuple, int *modified) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); for (Ty_ssize_t i = TyTuple_GET_SIZE(tuple); --i >= 0; ) { TyObject *v = TyTuple_GET_ITEM(tuple, i); if (TyUnicode_CheckExact(v)) { @@ -518,7 +518,7 @@ init_code(PyCodeObject *co, struct _PyCodeConstructor *con) con->stacksize = 1; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); co->co_filename = Ty_NewRef(con->filename); co->co_name = Ty_NewRef(con->name); co->co_qualname = Ty_NewRef(con->qualname); @@ -687,7 +687,7 @@ static int intern_code_constants(struct _PyCodeConstructor *con) { #ifdef Ty_GIL_DISABLED - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _py_code_state *state = &interp->code_state; PyMutex_Lock(&state->mutex); #endif @@ -840,7 +840,7 @@ PyUnstable_Code_NewWithPosOnlyArgs( _Ty_CODEUNIT *code_data = (_Ty_CODEUNIT *)TyBytes_AS_STRING(code); Ty_ssize_t num_code_units = code_len / sizeof(_Ty_CODEUNIT); int extended_arg = 0; - for (int i = 0; i < num_code_units; i += 1 + _PyOpcode_Caches[code_data[i].op.code]) { + for (int i = 0; i < num_code_units; i += 1 + _TyOpcode_Caches[code_data[i].op.code]) { _Ty_CODEUNIT *instr = &code_data[i]; uint8_t opcode = instr->op.code; if (opcode == EXTENDED_ARG) { @@ -1394,7 +1394,7 @@ lineiter_next(TyObject *self) } TyTypeObject _PyLineIterator = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "line_iterator", /* tp_name */ sizeof(lineiterator), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1487,7 +1487,7 @@ positionsiter_next(TyObject *self) } TyTypeObject _PyPositionsIterator = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "positions_iterator", /* tp_name */ sizeof(positionsiterator), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1579,7 +1579,7 @@ PyUnstable_Code_GetExtra(TyObject *code, Ty_ssize_t index, void **extra) int PyUnstable_Code_SetExtra(TyObject *code, Ty_ssize_t index, void *extra) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (!TyCode_Check(code) || index < 0 || index >= interp->co_extra_user_count) { @@ -2192,7 +2192,7 @@ deopt_code(PyCodeObject *code, _Ty_CODEUNIT *instructions) for (int i = 0; i < len; i++) { _Ty_CODEUNIT inst = _Ty_GetBaseCodeUnit(code, i); assert(inst.op.code < MIN_SPECIALIZED_OPCODE); - int caches = _PyOpcode_Caches[inst.op.code]; + int caches = _TyOpcode_Caches[inst.op.code]; instructions[i] = inst; for (int j = 1; j <= caches; j++) { instructions[i+j].cache = 0; @@ -2397,9 +2397,9 @@ code_dealloc(TyObject *self) PyObject_GC_UnTrack(co); #endif - _PyFunction_ClearCodeByVersion(co->co_version); + _TyFunction_ClearCodeByVersion(co->co_version); if (co->co_extra != NULL) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _PyCodeObjectExtra *co_extra = co->co_extra; for (Ty_ssize_t i = 0; i < co_extra->ce_size; i++) { @@ -2522,7 +2522,7 @@ code_richcompare(TyObject *self, TyObject *other, int op) if (co_instr.cache != cp_instr.cache) { goto unequal; } - i += _PyOpcode_Caches[co_instr.op.code]; + i += _TyOpcode_Caches[co_instr.op.code]; } /* compare constants */ @@ -2605,7 +2605,7 @@ code_hash(TyObject *self) _Ty_CODEUNIT co_instr = _Ty_GetBaseCodeUnit(co, i); SCRAMBLE_IN(co_instr.op.code); SCRAMBLE_IN(co_instr.op.arg); - i += _PyOpcode_Caches[co_instr.op.code]; + i += _TyOpcode_Caches[co_instr.op.code]; } if ((Ty_hash_t)uhash == -1) { return -2; @@ -2867,13 +2867,13 @@ static struct TyMethodDef code_methods[] = { CODE_REPLACE_METHODDEF CODE__VARNAME_FROM_OPARG_METHODDEF {"__replace__", _PyCFunction_CAST(code_replace), METH_FASTCALL|METH_KEYWORDS, - PyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, + TyDoc_STR("__replace__($self, /, **changes)\n--\n\nThe same as replace().")}, {NULL, NULL} /* sentinel */ }; TyTypeObject TyCode_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "code", offsetof(PyCodeObject, co_code_adaptive), sizeof(_Ty_CODEUNIT), @@ -3093,7 +3093,7 @@ _TyCode_ConstantKey(TyObject *op) static TyObject * intern_one_constant(TyObject *op) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _Ty_hashtable_t *consts = interp->code_state.constants; assert(!TyUnicode_CheckExact(op)); // strings are interned separately @@ -3248,7 +3248,7 @@ destroy_key(void *key) #endif TyStatus -_TyCode_Init(PyInterpreterState *interp) +_TyCode_Init(TyInterpreterState *interp) { #ifdef Ty_GIL_DISABLED struct _py_code_state *state = &interp->code_state; @@ -3262,7 +3262,7 @@ _TyCode_Init(PyInterpreterState *interp) } void -_TyCode_Fini(PyInterpreterState *interp) +_TyCode_Fini(TyInterpreterState *interp) { #ifdef Ty_GIL_DISABLED // Free interned constants @@ -3299,7 +3299,7 @@ _TyCode_Fini(PyInterpreterState *interp) // not to overwrite an instruction that was instrumented concurrently. int32_t -_Ty_ReserveTLBCIndex(PyInterpreterState *interp) +_Ty_ReserveTLBCIndex(TyInterpreterState *interp) { if (interp->config.tlbc_enabled) { return _PyIndexPool_AllocIndex(&interp->tlbc_indices); @@ -3311,7 +3311,7 @@ _Ty_ReserveTLBCIndex(PyInterpreterState *interp) void _Ty_ClearTLBCIndex(_PyThreadStateImpl *tstate) { - PyInterpreterState *interp = ((TyThreadState *)tstate)->interp; + TyInterpreterState *interp = ((TyThreadState *)tstate)->interp; if (interp->config.tlbc_enabled) { _PyIndexPool_FreeIndex(&interp->tlbc_indices, tstate->tlbc_index); } @@ -3339,7 +3339,7 @@ deopt_code_unit(PyCodeObject *code, int i) .cache = FT_ATOMIC_LOAD_UINT16_RELAXED(*(uint16_t *)src_instr)}; int opcode = inst.op.code; if (opcode < MIN_INSTRUMENTED_OPCODE) { - inst.op.code = _PyOpcode_Deopt[opcode]; + inst.op.code = _TyOpcode_Deopt[opcode]; assert(inst.op.code < MIN_SPECIALIZED_OPCODE); } // JIT should not be enabled with free-threading @@ -3436,7 +3436,7 @@ flag_is_set(struct flag_set *flags, Ty_ssize_t idx) // Set the flag for each tlbc index in use static int -get_indices_in_use(PyInterpreterState *interp, struct flag_set *in_use) +get_indices_in_use(TyInterpreterState *interp, struct flag_set *in_use) { assert(interp->stoptheworld.world_stopped); assert(in_use->flags == NULL); @@ -3522,7 +3522,7 @@ free_unused_bytecode(PyCodeObject *co, struct flag_set *indices_in_use) } int -_Ty_ClearUnusedTLBC(PyInterpreterState *interp) +_Ty_ClearUnusedTLBC(TyInterpreterState *interp) { struct get_code_args args = { .code_objs = {NULL}, diff --git a/Objects/complexobject.c b/Objects/complexobject.c index 2680ebf..6b79fe4 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -1379,7 +1379,7 @@ static PyNumberMethods complex_as_number = { }; TyTypeObject TyComplex_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "complex", sizeof(PyComplexObject), 0, diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 495ae88..53c1ebf 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -715,7 +715,7 @@ descr_traverse(TyObject *self, visitproc visit, void *arg) } TyTypeObject PyMethodDescr_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "method_descriptor", sizeof(PyMethodDescrObject), 0, @@ -755,7 +755,7 @@ TyTypeObject PyMethodDescr_Type = { /* This is for METH_CLASS in C, not for "f = classmethod(f)" in Python! */ TyTypeObject PyClassMethodDescr_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "classmethod_descriptor", sizeof(PyMethodDescrObject), 0, @@ -792,7 +792,7 @@ TyTypeObject PyClassMethodDescr_Type = { }; TyTypeObject PyMemberDescr_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "member_descriptor", sizeof(PyMemberDescrObject), 0, @@ -829,7 +829,7 @@ TyTypeObject PyMemberDescr_Type = { }; TyTypeObject PyGetSetDescr_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "getset_descriptor", sizeof(PyGetSetDescrObject), 0, @@ -866,7 +866,7 @@ TyTypeObject PyGetSetDescr_Type = { }; TyTypeObject PyWrapperDescr_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "wrapper_descriptor", sizeof(PyWrapperDescrObject), 0, @@ -1167,20 +1167,20 @@ mappingproxy_reversed(TyObject *self, TyObject *Py_UNUSED(ignored)) static TyMethodDef mappingproxy_methods[] = { {"get", _PyCFunction_CAST(mappingproxy_get), METH_FASTCALL, - PyDoc_STR("get($self, key, default=None, /)\n--\n\n" + TyDoc_STR("get($self, key, default=None, /)\n--\n\n" "Return the value for key if key is in the mapping, else default.")}, {"keys", mappingproxy_keys, METH_NOARGS, - PyDoc_STR("D.keys() -> a set-like object providing a view on D's keys")}, + TyDoc_STR("D.keys() -> a set-like object providing a view on D's keys")}, {"values", mappingproxy_values, METH_NOARGS, - PyDoc_STR("D.values() -> an object providing a view on D's values")}, + TyDoc_STR("D.values() -> an object providing a view on D's values")}, {"items", mappingproxy_items, METH_NOARGS, - PyDoc_STR("D.items() -> a set-like object providing a view on D's items")}, + TyDoc_STR("D.items() -> a set-like object providing a view on D's items")}, {"copy", mappingproxy_copy, METH_NOARGS, - PyDoc_STR("D.copy() -> a shallow copy of D")}, + TyDoc_STR("D.copy() -> a shallow copy of D")}, {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, - PyDoc_STR("See PEP 585")}, + TyDoc_STR("See PEP 585")}, {"__reversed__", mappingproxy_reversed, METH_NOARGS, - PyDoc_STR("D.__reversed__() -> reverse iterator")}, + TyDoc_STR("D.__reversed__() -> reverse iterator")}, {0} }; @@ -1447,7 +1447,7 @@ wrapper_traverse(TyObject *self, visitproc visit, void *arg) } TyTypeObject _PyMethodWrapper_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "method-wrapper", /* tp_name */ sizeof(wrapperobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1566,7 +1566,7 @@ static TyMemberDef property_members[] = { }; -PyDoc_STRVAR(getter_doc, +TyDoc_STRVAR(getter_doc, "Descriptor to obtain a copy of the property with a different getter."); static TyObject * @@ -1576,7 +1576,7 @@ property_getter(TyObject *self, TyObject *getter) } -PyDoc_STRVAR(setter_doc, +TyDoc_STRVAR(setter_doc, "Descriptor to obtain a copy of the property with a different setter."); static TyObject * @@ -1586,7 +1586,7 @@ property_setter(TyObject *self, TyObject *setter) } -PyDoc_STRVAR(deleter_doc, +TyDoc_STRVAR(deleter_doc, "Descriptor to obtain a copy of the property with a different deleter."); static TyObject * @@ -1596,7 +1596,7 @@ property_deleter(TyObject *self, TyObject *deleter) } -PyDoc_STRVAR(set_name_doc, +TyDoc_STRVAR(set_name_doc, "__set_name__($self, owner, name, /)\n" "--\n" "\n" @@ -1995,7 +1995,7 @@ property_clear(TyObject *self) #include "clinic/descrobject.c.h" TyTypeObject PyDictProxy_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "mappingproxy", /* tp_name */ sizeof(mappingproxyobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2038,7 +2038,7 @@ TyTypeObject PyDictProxy_Type = { }; TyTypeObject TyProperty_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "property", /* tp_name */ sizeof(propertyobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 72e87cd..6fba4f8 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -380,7 +380,7 @@ equally good collision statistics, needed less code & used less memory. */ -static int dictresize(PyInterpreterState *interp, PyDictObject *mp, +static int dictresize(TyInterpreterState *interp, PyDictObject *mp, uint8_t log_newsize, int unicode); static TyObject* dict_iter(TyObject *dict); @@ -444,7 +444,7 @@ dictkeys_incref(PyDictKeysObject *dk) } static inline void -dictkeys_decref(PyInterpreterState *interp, PyDictKeysObject *dk, bool use_qsbr) +dictkeys_decref(TyInterpreterState *interp, PyDictKeysObject *dk, bool use_qsbr) { if (FT_ATOMIC_LOAD_SSIZE_RELAXED(dk->dk_refcnt) < 0) { assert(FT_ATOMIC_LOAD_SSIZE_RELAXED(dk->dk_refcnt) == _Ty_DICT_IMMORTAL_INITIAL_REFCNT); @@ -753,7 +753,7 @@ _TyDict_CheckConsistency(TyObject *op, int check_content) static PyDictKeysObject* -new_keys_object(PyInterpreterState *interp, uint8_t log2_size, bool unicode) +new_keys_object(TyInterpreterState *interp, uint8_t log2_size, bool unicode) { Ty_ssize_t usable; int log2_bytes; @@ -867,7 +867,7 @@ free_values(PyDictValues *values, bool use_qsbr) /* Consumes a reference to the keys object */ static TyObject * -new_dict(PyInterpreterState *interp, +new_dict(TyInterpreterState *interp, PyDictKeysObject *keys, PyDictValues *values, Ty_ssize_t used, int free_values_on_failure) { @@ -894,7 +894,7 @@ new_dict(PyInterpreterState *interp, } static TyObject * -new_dict_with_shared_keys(PyInterpreterState *interp, PyDictKeysObject *keys) +new_dict_with_shared_keys(TyInterpreterState *interp, PyDictKeysObject *keys) { size_t size = shared_keys_usable_size(keys); PyDictValues *values = new_values(size); @@ -971,7 +971,7 @@ clone_combined_dict_keys(PyDictObject *orig) TyObject * TyDict_New(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* We don't incref Ty_EMPTY_KEYS here because it is immortal. */ return new_dict(interp, Ty_EMPTY_KEYS, NULL, 0, 0); } @@ -1714,13 +1714,13 @@ find_empty_slot(PyDictKeysObject *keys, Ty_hash_t hash) } static int -insertion_resize(PyInterpreterState *interp, PyDictObject *mp, int unicode) +insertion_resize(TyInterpreterState *interp, PyDictObject *mp, int unicode) { return dictresize(interp, mp, calculate_log2_keysize(GROWTH_RATE(mp)), unicode); } static inline int -insert_combined_dict(PyInterpreterState *interp, PyDictObject *mp, +insert_combined_dict(TyInterpreterState *interp, PyDictObject *mp, Ty_hash_t hash, TyObject *key, TyObject *value) { if (mp->ma_keys->dk_usable <= 0) { @@ -1787,7 +1787,7 @@ insert_split_key(PyDictKeysObject *keys, TyObject *key, Ty_hash_t hash) } static void -insert_split_value(PyInterpreterState *interp, PyDictObject *mp, TyObject *key, TyObject *value, Ty_ssize_t ix) +insert_split_value(TyInterpreterState *interp, PyDictObject *mp, TyObject *key, TyObject *value, Ty_ssize_t ix) { assert(TyUnicode_CheckExact(key)); ASSERT_DICT_LOCKED(mp); @@ -1815,7 +1815,7 @@ Returns -1 if an error occurred, or 0 on success. Consumes key and value references. */ static int -insertdict(PyInterpreterState *interp, PyDictObject *mp, +insertdict(TyInterpreterState *interp, PyDictObject *mp, TyObject *key, Ty_hash_t hash, TyObject *value) { TyObject *old_value; @@ -1886,7 +1886,7 @@ Fail: // Same as insertdict but specialized for ma_keys == Ty_EMPTY_KEYS. // Consumes key and value references. static int -insert_to_emptydict(PyInterpreterState *interp, PyDictObject *mp, +insert_to_emptydict(TyInterpreterState *interp, PyDictObject *mp, TyObject *key, Ty_hash_t hash, TyObject *value) { assert(mp->ma_keys == Ty_EMPTY_KEYS); @@ -1989,7 +1989,7 @@ This function supports: - Generic -> Generic */ static int -dictresize(PyInterpreterState *interp, PyDictObject *mp, +dictresize(TyInterpreterState *interp, PyDictObject *mp, uint8_t log2_newsize, int unicode) { PyDictKeysObject *oldkeys, *newkeys; @@ -2141,7 +2141,7 @@ dictresize(PyInterpreterState *interp, PyDictObject *mp, } static TyObject * -dict_new_presized(PyInterpreterState *interp, Ty_ssize_t minused, bool unicode) +dict_new_presized(TyInterpreterState *interp, Ty_ssize_t minused, bool unicode) { const uint8_t log2_max_presize = 17; const Ty_ssize_t max_presize = ((Ty_ssize_t)1) << log2_max_presize; @@ -2171,7 +2171,7 @@ dict_new_presized(PyInterpreterState *interp, Ty_ssize_t minused, bool unicode) TyObject * _TyDict_NewPresized(Ty_ssize_t minused) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return dict_new_presized(interp, minused, false); } @@ -2182,7 +2182,7 @@ _TyDict_FromItems(TyObject *const *keys, Ty_ssize_t keys_offset, { bool unicode = true; TyObject *const *ks = keys; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); for (Ty_ssize_t i = 0; i < length; i++) { if (!TyUnicode_CheckExact(*ks)) { @@ -2617,7 +2617,7 @@ setitem_take2_lock_held(PyDictObject *mp, TyObject *key, TyObject *value) return -1; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (mp->ma_keys == Ty_EMPTY_KEYS) { return insert_to_emptydict(interp, mp, key, hash, value); @@ -2669,7 +2669,7 @@ int _TyDict_SetItem_KnownHash_LockHeld(PyDictObject *mp, TyObject *key, TyObject *value, Ty_hash_t hash) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (mp->ma_keys == Ty_EMPTY_KEYS) { return insert_to_emptydict(interp, mp, Ty_NewRef(key), hash, Ty_NewRef(value)); } @@ -2795,7 +2795,7 @@ delitem_knownhash_lock_held(TyObject *op, TyObject *key, Ty_hash_t hash) return -1; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyDict_NotifyEvent(interp, TyDict_EVENT_DELETED, mp, key, NULL); delitem_common(mp, hash, ix, old_value); return 0; @@ -2842,7 +2842,7 @@ delitemif_lock_held(TyObject *op, TyObject *key, return -1; if (res > 0) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyDict_NotifyEvent(interp, TyDict_EVENT_DELETED, mp, key, NULL); delitem_common(mp, hash, ix, old_value); return 1; @@ -2887,7 +2887,7 @@ clear_lock_held(TyObject *op) return; } /* Empty the dict... */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyDict_NotifyEvent(interp, TyDict_EVENT_CLEARED, mp, NULL, NULL); // We don't inc ref empty keys because they're immortal ensure_shared_on_resize(mp); @@ -3054,7 +3054,7 @@ _TyDict_Pop_KnownHash(PyDictObject *mp, TyObject *key, Ty_hash_t hash, } assert(old_value != NULL); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyDict_NotifyEvent(interp, TyDict_EVENT_DELETED, mp, key, NULL); delitem_common(mp, hash, ix, Ty_NewRef(old_value)); @@ -3150,7 +3150,7 @@ _TyDict_Pop(TyObject *dict, TyObject *key, TyObject *default_value) } static PyDictObject * -dict_dict_fromkeys(PyInterpreterState *interp, PyDictObject *mp, +dict_dict_fromkeys(TyInterpreterState *interp, PyDictObject *mp, TyObject *iterable, TyObject *value) { TyObject *oldvalue; @@ -3177,7 +3177,7 @@ dict_dict_fromkeys(PyInterpreterState *interp, PyDictObject *mp, } static PyDictObject * -dict_set_fromkeys(PyInterpreterState *interp, PyDictObject *mp, +dict_set_fromkeys(TyInterpreterState *interp, PyDictObject *mp, TyObject *iterable, TyObject *value) { Ty_ssize_t pos = 0; @@ -3209,7 +3209,7 @@ _TyDict_FromKeys(TyObject *cls, TyObject *iterable, TyObject *value) TyObject *key; TyObject *d; int status; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); d = _TyObject_CallNoArgs(cls); if (d == NULL) @@ -3279,7 +3279,7 @@ static void dict_dealloc(TyObject *self) { PyDictObject *mp = (PyDictObject *)self; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyObject_ResurrectStart(self); _TyDict_NotifyEvent(interp, TyDict_EVENT_DEALLOCATED, mp, NULL, NULL); if (_TyObject_ResurrectEnd(self)) { @@ -3803,7 +3803,7 @@ TyDict_MergeFromSeq2(TyObject *d, TyObject *seq2, int override) } static int -dict_dict_merge(PyInterpreterState *interp, PyDictObject *mp, PyDictObject *other, int override) +dict_dict_merge(TyInterpreterState *interp, PyDictObject *mp, PyDictObject *other, int override) { ASSERT_DICT_LOCKED(mp); ASSERT_DICT_LOCKED(other); @@ -3902,7 +3902,7 @@ dict_dict_merge(PyInterpreterState *interp, PyDictObject *mp, PyDictObject *othe } static int -dict_merge(PyInterpreterState *interp, TyObject *a, TyObject *b, int override) +dict_merge(TyInterpreterState *interp, TyObject *a, TyObject *b, int override) { PyDictObject *mp, *other; @@ -4004,14 +4004,14 @@ slow_exit: int TyDict_Update(TyObject *a, TyObject *b) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return dict_merge(interp, a, b, 1); } int TyDict_Merge(TyObject *a, TyObject *b, int override) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* XXX Deprecate override not in (0, 1). */ return dict_merge(interp, a, b, override != 0); } @@ -4019,7 +4019,7 @@ TyDict_Merge(TyObject *a, TyObject *b, int override) int _TyDict_MergeEx(TyObject *a, TyObject *b, int override) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return dict_merge(interp, a, b, override); } @@ -4062,7 +4062,7 @@ copy_lock_held(TyObject *o) { TyObject *copy; PyDictObject *mp; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); ASSERT_DICT_LOCKED(o); @@ -4326,7 +4326,7 @@ dict_setdefault_ref_lock_held(TyObject *d, TyObject *key, TyObject *default_valu PyDictObject *mp = (PyDictObject *)d; TyObject *value; Ty_hash_t hash; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); ASSERT_DICT_LOCKED(d); @@ -4532,7 +4532,7 @@ dict_popitem_impl(PyDictObject *self) { Ty_ssize_t i, j; TyObject *res; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); ASSERT_DICT_LOCKED(self); @@ -4731,10 +4731,10 @@ dict_ior(TyObject *self, TyObject *other) return Ty_NewRef(self); } -PyDoc_STRVAR(getitem__doc__, +TyDoc_STRVAR(getitem__doc__, "__getitem__($self, key, /)\n--\n\nReturn self[key]."); -PyDoc_STRVAR(update__doc__, +TyDoc_STRVAR(update__doc__, "D.update([E, ]**F) -> None. Update D from mapping/iterable E and F.\n\ If E is present and has a .keys() method, then does: for k in E.keys(): D[k] = E[k]\n\ If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v\n\ @@ -4760,7 +4760,7 @@ static TyMethodDef mapp_methods[] = { DICT_CLEAR_METHODDEF DICT_COPY_METHODDEF DICT___REVERSED___METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -4913,7 +4913,7 @@ dict_iter(TyObject *self) return dictiter_new(dict, &PyDictIterKey_Type); } -PyDoc_STRVAR(dictionary_doc, +TyDoc_STRVAR(dictionary_doc, "dict() -> new empty dictionary\n" "dict(mapping) -> new dictionary initialized from a mapping object's\n" " (key, value) pairs\n" @@ -4925,7 +4925,7 @@ PyDoc_STRVAR(dictionary_doc, " in the keyword argument list. For example: dict(one=1, two=2)"); TyTypeObject TyDict_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict", sizeof(PyDictObject), 0, @@ -5021,7 +5021,7 @@ TyDict_SetItemString(TyObject *v, const char *key, TyObject *item) kv = TyUnicode_FromString(key); if (kv == NULL) return -1; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, &kv); /* XXX Should we really? */ err = TyDict_SetItem(v, kv, item); Ty_DECREF(kv); @@ -5132,13 +5132,13 @@ dictiter_len(TyObject *self, TyObject *Py_UNUSED(ignored)) return TyLong_FromSize_t(len); } -PyDoc_STRVAR(length_hint_doc, +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * dictiter_reduce(TyObject *di, TyObject *Py_UNUSED(ignored)); -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyMethodDef dictiter_methods[] = { {"__length_hint__", dictiter_len, METH_NOARGS, @@ -5247,7 +5247,7 @@ dictiter_iternextkey(TyObject *self) } TyTypeObject PyDictIterKey_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_keyiterator", /* tp_name */ sizeof(dictiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -5370,7 +5370,7 @@ dictiter_iternextvalue(TyObject *self) } TyTypeObject PyDictIterValue_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_valueiterator", /* tp_name */ sizeof(dictiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -5679,7 +5679,7 @@ dictiter_iternextitem(TyObject *self) } TyTypeObject PyDictIterItem_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_itemiterator", /* tp_name */ sizeof(dictiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -5827,7 +5827,7 @@ dictreviter_iternext(TyObject *self) } TyTypeObject PyDictRevIterKey_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_reversekeyiterator", sizeof(dictiterobject), .tp_dealloc = dictiter_dealloc, @@ -5869,7 +5869,7 @@ dictiter_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) } TyTypeObject PyDictRevIterItem_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_reverseitemiterator", sizeof(dictiterobject), .tp_dealloc = dictiter_dealloc, @@ -5881,7 +5881,7 @@ TyTypeObject PyDictRevIterItem_Type = { }; TyTypeObject PyDictRevIterValue_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_reversevalueiterator", sizeof(dictiterobject), .tp_dealloc = dictiter_dealloc, @@ -5961,7 +5961,7 @@ dictview_mapping(TyObject *view, void *Py_UNUSED(ignored)) { static TyGetSetDef dictview_getset[] = { {"mapping", dictview_mapping, NULL, - PyDoc_STR("dictionary that this view refers to"), NULL}, + TyDoc_STR("dictionary that this view refers to"), NULL}, {0} }; @@ -6445,12 +6445,12 @@ dictviews_isdisjoint(TyObject *self, TyObject *other) Py_RETURN_TRUE; } -PyDoc_STRVAR(isdisjoint_doc, +TyDoc_STRVAR(isdisjoint_doc, "Return True if the view and the given iterable have a null intersection."); static TyObject* dictkeys_reversed(TyObject *dv, TyObject *Py_UNUSED(ignored)); -PyDoc_STRVAR(reversed_keys_doc, +TyDoc_STRVAR(reversed_keys_doc, "Return a reverse iterator over the dict keys."); static TyMethodDef dictkeys_methods[] = { @@ -6462,7 +6462,7 @@ static TyMethodDef dictkeys_methods[] = { }; TyTypeObject PyDictKeys_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_keys", /* tp_name */ sizeof(_PyDictViewObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -6562,7 +6562,7 @@ static PySequenceMethods dictitems_as_sequence = { static TyObject* dictitems_reversed(TyObject *dv, TyObject *Py_UNUSED(ignored)); -PyDoc_STRVAR(reversed_items_doc, +TyDoc_STRVAR(reversed_items_doc, "Return a reverse iterator over the dict items."); static TyMethodDef dictitems_methods[] = { @@ -6574,7 +6574,7 @@ static TyMethodDef dictitems_methods[] = { }; TyTypeObject PyDictItems_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_items", /* tp_name */ sizeof(_PyDictViewObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -6654,7 +6654,7 @@ static PySequenceMethods dictvalues_as_sequence = { static TyObject* dictvalues_reversed(TyObject *dv, TyObject *Py_UNUSED(ignored)); -PyDoc_STRVAR(reversed_values_doc, +TyDoc_STRVAR(reversed_values_doc, "Return a reverse iterator over the dict values."); static TyMethodDef dictvalues_methods[] = { @@ -6664,7 +6664,7 @@ static TyMethodDef dictvalues_methods[] = { }; TyTypeObject PyDictValues_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "dict_values", /* tp_name */ sizeof(_PyDictViewObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -6725,7 +6725,7 @@ dictvalues_reversed(TyObject *self, TyObject *Py_UNUSED(ignored)) PyDictKeysObject * _TyDict_NewKeysForClass(PyHeapTypeObject *cls) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyDictKeysObject *keys = new_keys_object( interp, NEXT_LOG2_SHARED_KEYS_MAX_SIZE, 1); @@ -6792,7 +6792,7 @@ _TyObject_InitInlineValues(TyObject *obj, TyTypeObject *tp) } static PyDictObject * -make_dict_from_instance_attributes(PyInterpreterState *interp, +make_dict_from_instance_attributes(TyInterpreterState *interp, PyDictKeysObject *keys, PyDictValues *values) { dictkeys_incref(keys); @@ -6818,7 +6818,7 @@ _TyObject_MaterializeManagedDict_LockHeld(TyObject *obj) PyDictValues *values = _TyObject_InlineValues(obj); PyDictObject *dict; if (values->valid) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyDictKeysObject *keys = CACHED_KEYS(Ty_TYPE(obj)); dict = make_dict_from_instance_attributes(interp, keys, values); } @@ -6943,7 +6943,7 @@ store_instance_attr_lock_held(TyObject *obj, PyDictValues *values, } if (dict) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyDict_WatchEvent event = (old_value == NULL ? TyDict_EVENT_ADDED : value == NULL ? TyDict_EVENT_DELETED : TyDict_EVENT_MODIFIED); @@ -7449,7 +7449,7 @@ PyObject_ClearManagedDict(TyObject *obj) "clearing an object managed dict"); /* Clear the dict */ Ty_BEGIN_CRITICAL_SECTION(dict); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyDictKeysObject *oldkeys = dict->ma_keys; set_keys(dict, Ty_EMPTY_KEYS); dict->ma_values = NULL; @@ -7520,7 +7520,7 @@ ensure_nonmanaged_dict(TyObject *obj, TyObject **dictptr) #endif TyTypeObject *tp = Ty_TYPE(obj); if (_TyType_HasFeature(tp, Ty_TPFLAGS_HEAPTYPE) && (cached = CACHED_KEYS(tp))) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(!_TyType_HasFeature(tp, Ty_TPFLAGS_INLINE_VALUES)); dict = new_dict_with_shared_keys(interp, cached); } @@ -7578,12 +7578,12 @@ _PyObjectDict_SetItem(TyTypeObject *tp, TyObject *obj, TyObject **dictptr, void _PyDictKeys_DecRef(PyDictKeysObject *keys) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); dictkeys_decref(interp, keys, false); } static inline uint32_t -get_next_dict_keys_version(PyInterpreterState *interp) +get_next_dict_keys_version(TyInterpreterState *interp) { #ifdef Ty_GIL_DISABLED uint32_t v; @@ -7607,7 +7607,7 @@ get_next_dict_keys_version(PyInterpreterState *interp) // In free-threaded builds the caller must ensure that the keys object is not // being mutated concurrently by another thread. uint32_t -_PyDictKeys_GetVersionForCurrentState(PyInterpreterState *interp, +_PyDictKeys_GetVersionForCurrentState(TyInterpreterState *interp, PyDictKeysObject *dictkeys) { uint32_t dk_version = FT_ATOMIC_LOAD_UINT32_RELAXED(dictkeys->dk_version); @@ -7620,7 +7620,7 @@ _PyDictKeys_GetVersionForCurrentState(PyInterpreterState *interp, } uint32_t -_TyDict_GetKeysVersionForCurrentState(PyInterpreterState *interp, +_TyDict_GetKeysVersionForCurrentState(TyInterpreterState *interp, PyDictObject *dict) { ASSERT_DICT_LOCKED((TyObject *) dict); @@ -7631,7 +7631,7 @@ _TyDict_GetKeysVersionForCurrentState(PyInterpreterState *interp, } static inline int -validate_watcher_id(PyInterpreterState *interp, int watcher_id) +validate_watcher_id(TyInterpreterState *interp, int watcher_id) { if (watcher_id < 0 || watcher_id >= DICT_MAX_WATCHERS) { TyErr_Format(TyExc_ValueError, "Invalid dict watcher ID %d", watcher_id); @@ -7651,7 +7651,7 @@ TyDict_Watch(int watcher_id, TyObject* dict) TyErr_SetString(TyExc_ValueError, "Cannot watch non-dictionary"); return -1; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (validate_watcher_id(interp, watcher_id)) { return -1; } @@ -7666,7 +7666,7 @@ TyDict_Unwatch(int watcher_id, TyObject* dict) TyErr_SetString(TyExc_ValueError, "Cannot watch non-dictionary"); return -1; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (validate_watcher_id(interp, watcher_id)) { return -1; } @@ -7677,7 +7677,7 @@ TyDict_Unwatch(int watcher_id, TyObject* dict) int TyDict_AddWatcher(TyDict_WatchCallback callback) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* Start at 2, as 0 and 1 are reserved for CPython */ for (int i = 2; i < DICT_MAX_WATCHERS; i++) { @@ -7694,7 +7694,7 @@ TyDict_AddWatcher(TyDict_WatchCallback callback) int TyDict_ClearWatcher(int watcher_id) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (validate_watcher_id(interp, watcher_id)) { return -1; } @@ -7721,7 +7721,7 @@ _TyDict_SendEvent(int watcher_bits, TyObject *key, TyObject *value) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); for (int i = 0; i < DICT_MAX_WATCHERS; i++) { if (watcher_bits & 1) { TyDict_WatchCallback cb = interp->dict_state.watchers[i]; diff --git a/Objects/enumobject.c b/Objects/enumobject.c index c7bb41f..ab4b348 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -299,17 +299,17 @@ enum_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) return result; } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyMethodDef enum_methods[] = { {"__reduce__", enum_reduce, METH_NOARGS, reduce_doc}, {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; TyTypeObject PyEnum_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "enumerate", /* tp_name */ sizeof(enumobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -491,7 +491,7 @@ reversed_len(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromSsize_t((seqsize < position) ? 0 : position); } -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * reversed_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -530,7 +530,7 @@ reversed_setstate(TyObject *op, TyObject *state) Py_RETURN_NONE; } -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef reversediter_methods[] = { {"__length_hint__", reversed_len, METH_NOARGS, length_hint_doc}, @@ -540,7 +540,7 @@ static TyMethodDef reversediter_methods[] = { }; TyTypeObject PyReversed_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "reversed", /* tp_name */ sizeof(reversedobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 19ce4bc..b5b3155 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -20,7 +20,7 @@ /*[clinic input] -class BaseException "PyBaseExceptionObject *" "&TyExc_BaseException" +class BaseException "TyBaseExceptionObject *" "&TyExc_BaseException" class BaseExceptionGroup "PyBaseExceptionGroupObject *" "&TyExc_BaseExceptionGroup" [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=b7c45e78cff8edc3]*/ @@ -37,7 +37,7 @@ TyObject *TyExc_WindowsError = NULL; // borrowed ref static struct _Py_exc_state* get_exc_state(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return &interp->exc_state; } @@ -46,11 +46,11 @@ get_exc_state(void) * Lib/test/exception_hierarchy.txt */ -static inline PyBaseExceptionObject * +static inline TyBaseExceptionObject * PyBaseExceptionObject_CAST(TyObject *exc) { assert(PyExceptionInstance_Check(exc)); - return (PyBaseExceptionObject *)exc; + return (TyBaseExceptionObject *)exc; } /* @@ -59,9 +59,9 @@ PyBaseExceptionObject_CAST(TyObject *exc) static TyObject * BaseException_new(TyTypeObject *type, TyObject *args, TyObject *kwds) { - PyBaseExceptionObject *self; + TyBaseExceptionObject *self; - self = (PyBaseExceptionObject *)type->tp_alloc(type, 0); + self = (TyBaseExceptionObject *)type->tp_alloc(type, 0); if (!self) return NULL; /* the dict is created on the fly in PyObject_GenericSetAttr */ @@ -87,7 +87,7 @@ BaseException_new(TyTypeObject *type, TyObject *args, TyObject *kwds) static int BaseException_init(TyObject *op, TyObject *args, TyObject *kwds) { - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); if (!_TyArg_NoKeywords(Ty_TYPE(self)->tp_name, kwds)) return -1; @@ -105,8 +105,8 @@ BaseException_vectorcall(TyObject *type_obj, TyObject * const*args, return NULL; } - PyBaseExceptionObject *self; - self = (PyBaseExceptionObject *)type->tp_alloc(type, 0); + TyBaseExceptionObject *self; + self = (TyBaseExceptionObject *)type->tp_alloc(type, 0); if (!self) { return NULL; } @@ -132,7 +132,7 @@ BaseException_vectorcall(TyObject *type_obj, TyObject * const*args, static int BaseException_clear(TyObject *op) { - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); Ty_CLEAR(self->dict); Ty_CLEAR(self->args); Ty_CLEAR(self->notes); @@ -145,7 +145,7 @@ BaseException_clear(TyObject *op) static void BaseException_dealloc(TyObject *op) { - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); PyObject_GC_UnTrack(self); // bpo-44348: The trashcan mechanism prevents stack overflow when deleting // long chains of exceptions. For example, exceptions can be chained @@ -157,7 +157,7 @@ BaseException_dealloc(TyObject *op) static int BaseException_traverse(TyObject *op, visitproc visit, void *arg) { - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); Ty_VISIT(self->dict); Ty_VISIT(self->args); Ty_VISIT(self->notes); @@ -170,7 +170,7 @@ BaseException_traverse(TyObject *op, visitproc visit, void *arg) static TyObject * BaseException_str(TyObject *op) { - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); TyObject *res; Ty_BEGIN_CRITICAL_SECTION(self); @@ -193,7 +193,7 @@ static TyObject * BaseException_repr(TyObject *op) { - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); TyObject *res; Ty_BEGIN_CRITICAL_SECTION(self); @@ -217,7 +217,7 @@ BaseException.__reduce__ [clinic start generated code]*/ static TyObject * -BaseException___reduce___impl(PyBaseExceptionObject *self) +BaseException___reduce___impl(TyBaseExceptionObject *self) /*[clinic end generated code: output=af87c1247ef98748 input=283be5a10d9c964f]*/ { if (self->args && self->dict) @@ -240,7 +240,7 @@ BaseException.__setstate__ [clinic start generated code]*/ static TyObject * -BaseException___setstate___impl(PyBaseExceptionObject *self, TyObject *state) +BaseException___setstate___impl(TyBaseExceptionObject *self, TyObject *state) /*[clinic end generated code: output=f3834889950453ab input=5524b61cfe9b9856]*/ { TyObject *d_key, *d_value; @@ -276,7 +276,7 @@ Set self.__traceback__ to tb and return self. [clinic start generated code]*/ static TyObject * -BaseException_with_traceback_impl(PyBaseExceptionObject *self, TyObject *tb) +BaseException_with_traceback_impl(TyBaseExceptionObject *self, TyObject *tb) /*[clinic end generated code: output=81e92f2387927f10 input=b5fb64d834717e36]*/ { if (BaseException___traceback___set_impl(self, tb) < 0){ @@ -295,7 +295,7 @@ Add a note to the exception [clinic start generated code]*/ static TyObject * -BaseException_add_note_impl(PyBaseExceptionObject *self, TyObject *note) +BaseException_add_note_impl(TyBaseExceptionObject *self, TyObject *note) /*[clinic end generated code: output=fb7cbcba611c187b input=e60a6b6e9596acaf]*/ { TyObject *notes; @@ -340,7 +340,7 @@ BaseException.args [clinic start generated code]*/ static TyObject * -BaseException_args_get_impl(PyBaseExceptionObject *self) +BaseException_args_get_impl(TyBaseExceptionObject *self) /*[clinic end generated code: output=e02e34e35cf4d677 input=64282386e4d7822d]*/ { if (self->args == NULL) { @@ -356,7 +356,7 @@ BaseException.args [clinic start generated code]*/ static int -BaseException_args_set_impl(PyBaseExceptionObject *self, TyObject *value) +BaseException_args_set_impl(TyBaseExceptionObject *self, TyObject *value) /*[clinic end generated code: output=331137e11d8f9e80 input=2400047ea5970a84]*/ { TyObject *seq; @@ -378,7 +378,7 @@ BaseException.__traceback__ [clinic start generated code]*/ static TyObject * -BaseException___traceback___get_impl(PyBaseExceptionObject *self) +BaseException___traceback___get_impl(TyBaseExceptionObject *self) /*[clinic end generated code: output=17cf874a52339398 input=a2277f0de62170cf]*/ { if (self->traceback == NULL) { @@ -395,7 +395,7 @@ BaseException.__traceback__ [clinic start generated code]*/ static int -BaseException___traceback___set_impl(PyBaseExceptionObject *self, +BaseException___traceback___set_impl(TyBaseExceptionObject *self, TyObject *value) /*[clinic end generated code: output=a82c86d9f29f48f0 input=12676035676badad]*/ { @@ -424,7 +424,7 @@ BaseException.__context__ [clinic start generated code]*/ static TyObject * -BaseException___context___get_impl(PyBaseExceptionObject *self) +BaseException___context___get_impl(TyBaseExceptionObject *self) /*[clinic end generated code: output=6ec5d296ce8d1c93 input=b2d22687937e66ab]*/ { if (self->context == NULL) { @@ -440,7 +440,7 @@ BaseException.__context__ [clinic start generated code]*/ static int -BaseException___context___set_impl(PyBaseExceptionObject *self, +BaseException___context___set_impl(TyBaseExceptionObject *self, TyObject *value) /*[clinic end generated code: output=b4cb52dcca1da3bd input=c0971adf47fa1858]*/ { @@ -467,7 +467,7 @@ BaseException.__cause__ [clinic start generated code]*/ static TyObject * -BaseException___cause___get_impl(PyBaseExceptionObject *self) +BaseException___cause___get_impl(TyBaseExceptionObject *self) /*[clinic end generated code: output=987f6c4d8a0bdbab input=40e0eac427b6e602]*/ { if (self->cause == NULL) { @@ -483,7 +483,7 @@ BaseException.__cause__ [clinic start generated code]*/ static int -BaseException___cause___set_impl(PyBaseExceptionObject *self, +BaseException___cause___set_impl(TyBaseExceptionObject *self, TyObject *value) /*[clinic end generated code: output=6161315398aaf541 input=e1b403c0bde3f62a]*/ { @@ -551,7 +551,7 @@ void PyException_SetCause(TyObject *self, TyObject *cause) { Ty_BEGIN_CRITICAL_SECTION(self); - PyBaseExceptionObject *base_self = PyBaseExceptionObject_CAST(self); + TyBaseExceptionObject *base_self = PyBaseExceptionObject_CAST(self); base_self->suppress_context = 1; Ty_XSETREF(base_self->cause, cause); Ty_END_CRITICAL_SECTION(); @@ -604,15 +604,15 @@ PyExceptionClass_Name(TyObject *ob) static struct TyMemberDef BaseException_members[] = { {"__suppress_context__", Ty_T_BOOL, - offsetof(PyBaseExceptionObject, suppress_context)}, + offsetof(TyBaseExceptionObject, suppress_context)}, {NULL} }; -static TyTypeObject _PyExc_BaseException = { - PyVarObject_HEAD_INIT(NULL, 0) +static TyTypeObject _TyExc_BaseException = { + TyVarObject_HEAD_INIT(NULL, 0) "BaseException", /*tp_name*/ - sizeof(PyBaseExceptionObject), /*tp_basicsize*/ + sizeof(TyBaseExceptionObject), /*tp_basicsize*/ 0, /*tp_itemsize*/ BaseException_dealloc, /*tp_dealloc*/ 0, /*tp_vectorcall_offset*/ @@ -631,7 +631,7 @@ static TyTypeObject _PyExc_BaseException = { 0, /*tp_as_buffer*/ Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC | Ty_TPFLAGS_BASE_EXC_SUBCLASS, /*tp_flags*/ - PyDoc_STR("Common base class for all exceptions"), /* tp_doc */ + TyDoc_STR("Common base class for all exceptions"), /* tp_doc */ BaseException_traverse, /* tp_traverse */ BaseException_clear, /* tp_clear */ 0, /* tp_richcompare */ @@ -645,7 +645,7 @@ static TyTypeObject _PyExc_BaseException = { 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ - offsetof(PyBaseExceptionObject, dict), /* tp_dictoffset */ + offsetof(TyBaseExceptionObject, dict), /* tp_dictoffset */ BaseException_init, /* tp_init */ 0, /* tp_alloc */ BaseException_new, /* tp_new */ @@ -660,29 +660,29 @@ TyObject *TyExc_BaseException = (TyObject *)&_PyExc_BaseException; * include it and not look strange. */ #define SimpleExtendsException(EXCBASE, EXCNAME, EXCDOC) \ -static TyTypeObject _PyExc_ ## EXCNAME = { \ - PyVarObject_HEAD_INIT(NULL, 0) \ +static TyTypeObject _TyExc_ ## EXCNAME = { \ + TyVarObject_HEAD_INIT(NULL, 0) \ # EXCNAME, \ - sizeof(PyBaseExceptionObject), \ + sizeof(TyBaseExceptionObject), \ 0, BaseException_dealloc, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, 0, 0, \ Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, \ - PyDoc_STR(EXCDOC), BaseException_traverse, \ + TyDoc_STR(EXCDOC), BaseException_traverse, \ BaseException_clear, 0, 0, 0, 0, 0, 0, 0, &_ ## EXCBASE, \ - 0, 0, 0, offsetof(PyBaseExceptionObject, dict), \ + 0, 0, 0, offsetof(TyBaseExceptionObject, dict), \ BaseException_init, 0, BaseException_new,\ }; \ -TyObject *TyExc_ ## EXCNAME = (TyObject *)&_PyExc_ ## EXCNAME +TyObject *TyExc_ ## EXCNAME = (TyObject *)TyExc_ ## EXCNAME = (TyObject *)&_PyExc__TyExc_ ## EXCNAME #define MiddlingExtendsExceptionEx(EXCBASE, EXCNAME, PYEXCNAME, EXCSTORE, EXCDOC) \ TyTypeObject _PyExc_ ## EXCNAME = { \ - PyVarObject_HEAD_INIT(NULL, 0) \ + TyVarObject_HEAD_INIT(NULL, 0) \ # PYEXCNAME, \ sizeof(Py ## EXCSTORE ## Object), \ 0, EXCSTORE ## _dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ 0, 0, 0, 0, 0, \ Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, \ - PyDoc_STR(EXCDOC), EXCSTORE ## _traverse, \ + TyDoc_STR(EXCDOC), EXCSTORE ## _traverse, \ EXCSTORE ## _clear, 0, 0, 0, 0, 0, 0, 0, &_ ## EXCBASE, \ 0, 0, 0, offsetof(Py ## EXCSTORE ## Object, dict), \ EXCSTORE ## _init, 0, 0, \ @@ -691,25 +691,25 @@ TyTypeObject _PyExc_ ## EXCNAME = { \ #define MiddlingExtendsException(EXCBASE, EXCNAME, EXCSTORE, EXCDOC) \ static MiddlingExtendsExceptionEx( \ EXCBASE, EXCNAME, EXCNAME, EXCSTORE, EXCDOC); \ - TyObject *TyExc_ ## EXCNAME = (TyObject *)&_PyExc_ ## EXCNAME + TyObject *TyExc_ ## EXCNAME = (TyObject *)TyExc_ ## EXCNAME = (TyObject *)&_PyExc__TyExc_ ## EXCNAME #define ComplexExtendsException(EXCBASE, EXCNAME, EXCSTORE, EXCNEW, \ EXCMETHODS, EXCMEMBERS, EXCGETSET, \ EXCSTR, EXCDOC) \ -static TyTypeObject _PyExc_ ## EXCNAME = { \ - PyVarObject_HEAD_INIT(NULL, 0) \ +static TyTypeObject _TyExc_ ## EXCNAME = { \ + TyVarObject_HEAD_INIT(NULL, 0) \ # EXCNAME, \ sizeof(Py ## EXCSTORE ## Object), 0, \ EXCSTORE ## _dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ EXCSTR, 0, 0, 0, \ Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, \ - PyDoc_STR(EXCDOC), EXCSTORE ## _traverse, \ + TyDoc_STR(EXCDOC), EXCSTORE ## _traverse, \ EXCSTORE ## _clear, 0, 0, 0, 0, EXCMETHODS, \ EXCMEMBERS, EXCGETSET, &_ ## EXCBASE, \ 0, 0, 0, offsetof(Py ## EXCSTORE ## Object, dict), \ EXCSTORE ## _init, 0, EXCNEW,\ }; \ -TyObject *TyExc_ ## EXCNAME = (TyObject *)&_PyExc_ ## EXCNAME +TyObject *TyExc_ ## EXCNAME = (TyObject *)TyExc_ ## EXCNAME = (TyObject *)&_PyExc__TyExc_ ## EXCNAME /* @@ -739,7 +739,7 @@ SimpleExtendsException(TyExc_Exception, StopAsyncIteration, static TyMemberDef StopIteration_members[] = { {"value", _Ty_T_OBJECT, offsetof(PyStopIterationObject, value), 0, - PyDoc_STR("generator return value")}, + TyDoc_STR("generator return value")}, {NULL} /* Sentinel */ }; @@ -861,7 +861,7 @@ SystemExit_traverse(TyObject *op, visitproc visit, void *arg) static TyMemberDef SystemExit_members[] = { {"code", _Ty_T_OBJECT, offsetof(PySystemExitObject, code), 0, - PyDoc_STR("exception code")}, + TyDoc_STR("exception code")}, {NULL} /* Sentinel */ }; @@ -1524,8 +1524,8 @@ is_same_exception_metadata(TyObject *exc1, TyObject *exc2) assert(PyExceptionInstance_Check(exc1)); assert(PyExceptionInstance_Check(exc2)); - PyBaseExceptionObject *e1 = (PyBaseExceptionObject *)exc1; - PyBaseExceptionObject *e2 = (PyBaseExceptionObject *)exc2; + TyBaseExceptionObject *e1 = (TyBaseExceptionObject *)exc1; + TyBaseExceptionObject *e2 = (TyBaseExceptionObject *)exc2; return (e1->notes == e2->notes && e1->traceback == e2->traceback && @@ -1680,15 +1680,15 @@ PyUnstable_Exc_PrepReraiseStar(TyObject *orig, TyObject *excs) static TyMemberDef BaseExceptionGroup_members[] = { {"message", _Ty_T_OBJECT, offsetof(PyBaseExceptionGroupObject, msg), Py_READONLY, - PyDoc_STR("exception message")}, + TyDoc_STR("exception message")}, {"exceptions", _Ty_T_OBJECT, offsetof(PyBaseExceptionGroupObject, excs), Py_READONLY, - PyDoc_STR("nested exceptions")}, + TyDoc_STR("nested exceptions")}, {NULL} /* Sentinel */ }; static TyMethodDef BaseExceptionGroup_methods[] = { {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, BASEEXCEPTIONGROUP_DERIVE_METHODDEF BASEEXCEPTIONGROUP_SPLIT_METHODDEF BASEEXCEPTIONGROUP_SUBGROUP_METHODDEF @@ -1855,7 +1855,7 @@ ImportError_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) TyObject *state = ImportError_getstate(self); if (state == NULL) return NULL; - PyBaseExceptionObject *exc = PyBaseExceptionObject_CAST(self); + TyBaseExceptionObject *exc = PyBaseExceptionObject_CAST(self); if (state == Ty_None) res = TyTuple_Pack(2, Ty_TYPE(self), exc->args); else @@ -1866,13 +1866,13 @@ ImportError_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) static TyMemberDef ImportError_members[] = { {"msg", _Ty_T_OBJECT, offsetof(PyImportErrorObject, msg), 0, - PyDoc_STR("exception message")}, + TyDoc_STR("exception message")}, {"name", _Ty_T_OBJECT, offsetof(PyImportErrorObject, name), 0, - PyDoc_STR("module name")}, + TyDoc_STR("module name")}, {"path", _Ty_T_OBJECT, offsetof(PyImportErrorObject, path), 0, - PyDoc_STR("module path")}, + TyDoc_STR("module path")}, {"name_from", _Ty_T_OBJECT, offsetof(PyImportErrorObject, name_from), 0, - PyDoc_STR("name imported from module")}, + TyDoc_STR("name imported from module")}, {NULL} /* Sentinel */ }; @@ -2327,16 +2327,16 @@ OSError_written_set(TyObject *op, TyObject *arg, void *context) static TyMemberDef OSError_members[] = { {"errno", _Ty_T_OBJECT, offsetof(PyOSErrorObject, myerrno), 0, - PyDoc_STR("POSIX exception code")}, + TyDoc_STR("POSIX exception code")}, {"strerror", _Ty_T_OBJECT, offsetof(PyOSErrorObject, strerror), 0, - PyDoc_STR("exception strerror")}, + TyDoc_STR("exception strerror")}, {"filename", _Ty_T_OBJECT, offsetof(PyOSErrorObject, filename), 0, - PyDoc_STR("exception filename")}, + TyDoc_STR("exception filename")}, {"filename2", _Ty_T_OBJECT, offsetof(PyOSErrorObject, filename2), 0, - PyDoc_STR("second exception filename")}, + TyDoc_STR("second exception filename")}, #ifdef MS_WINDOWS {"winerror", _Ty_T_OBJECT, offsetof(PyOSErrorObject, winerror), 0, - PyDoc_STR("Win32 exception code")}, + TyDoc_STR("Win32 exception code")}, #endif {NULL} /* Sentinel */ }; @@ -2486,7 +2486,7 @@ NameError_traverse(TyObject *op, visitproc visit, void *arg) } static TyMemberDef NameError_members[] = { - {"name", _Ty_T_OBJECT, offsetof(PyNameErrorObject, name), 0, PyDoc_STR("name")}, + {"name", _Ty_T_OBJECT, offsetof(PyNameErrorObject, name), 0, TyDoc_STR("name")}, {NULL} /* Sentinel */ }; @@ -2617,8 +2617,8 @@ AttributeError_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) } static TyMemberDef AttributeError_members[] = { - {"name", _Ty_T_OBJECT, offsetof(PyAttributeErrorObject, name), 0, PyDoc_STR("attribute name")}, - {"obj", _Ty_T_OBJECT, offsetof(PyAttributeErrorObject, obj), 0, PyDoc_STR("object")}, + {"name", _Ty_T_OBJECT, offsetof(PyAttributeErrorObject, name), 0, TyDoc_STR("attribute name")}, + {"obj", _Ty_T_OBJECT, offsetof(PyAttributeErrorObject, obj), 0, TyDoc_STR("object")}, {NULL} /* Sentinel */ }; @@ -2807,24 +2807,24 @@ SyntaxError_str(TyObject *op) static TyMemberDef SyntaxError_members[] = { {"msg", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, msg), 0, - PyDoc_STR("exception msg")}, + TyDoc_STR("exception msg")}, {"filename", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, filename), 0, - PyDoc_STR("exception filename")}, + TyDoc_STR("exception filename")}, {"lineno", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, lineno), 0, - PyDoc_STR("exception lineno")}, + TyDoc_STR("exception lineno")}, {"offset", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, offset), 0, - PyDoc_STR("exception offset")}, + TyDoc_STR("exception offset")}, {"text", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, text), 0, - PyDoc_STR("exception text")}, + TyDoc_STR("exception text")}, {"end_lineno", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, end_lineno), 0, - PyDoc_STR("exception end lineno")}, + TyDoc_STR("exception end lineno")}, {"end_offset", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, end_offset), 0, - PyDoc_STR("exception end offset")}, + TyDoc_STR("exception end offset")}, {"print_file_and_line", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, print_file_and_line), 0, - PyDoc_STR("exception print_file_and_line")}, + TyDoc_STR("exception print_file_and_line")}, {"_metadata", _Ty_T_OBJECT, offsetof(PySyntaxErrorObject, metadata), 0, - PyDoc_STR("exception private metadata")}, + TyDoc_STR("exception private metadata")}, {NULL} /* Sentinel */ }; @@ -2882,7 +2882,7 @@ KeyError_str(TyObject *op) string, that string will be displayed in quotes. Too bad. If args is anything else, use the default BaseException__str__(). */ - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); if (TyTuple_GET_SIZE(self->args) == 1) { return PyObject_Repr(TyTuple_GET_ITEM(self->args, 0)); } @@ -3550,15 +3550,15 @@ UnicodeError_traverse(TyObject *self, visitproc visit, void *arg) static TyMemberDef UnicodeError_members[] = { {"encoding", _Ty_T_OBJECT, offsetof(PyUnicodeErrorObject, encoding), 0, - PyDoc_STR("exception encoding")}, + TyDoc_STR("exception encoding")}, {"object", _Ty_T_OBJECT, offsetof(PyUnicodeErrorObject, object), 0, - PyDoc_STR("exception object")}, + TyDoc_STR("exception object")}, {"start", Ty_T_PYSSIZET, offsetof(PyUnicodeErrorObject, start), 0, - PyDoc_STR("exception start")}, + TyDoc_STR("exception start")}, {"end", Ty_T_PYSSIZET, offsetof(PyUnicodeErrorObject, end), 0, - PyDoc_STR("exception end")}, + TyDoc_STR("exception end")}, {"reason", _Ty_T_OBJECT, offsetof(PyUnicodeErrorObject, reason), 0, - PyDoc_STR("exception reason")}, + TyDoc_STR("exception reason")}, {NULL} /* Sentinel */ }; @@ -3655,14 +3655,14 @@ done: return result; } -static TyTypeObject _PyExc_UnicodeEncodeError = { - PyVarObject_HEAD_INIT(NULL, 0) +static TyTypeObject _TyExc_UnicodeEncodeError = { + TyVarObject_HEAD_INIT(NULL, 0) "UnicodeEncodeError", sizeof(PyUnicodeErrorObject), 0, UnicodeError_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, UnicodeEncodeError_str, 0, 0, 0, Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, - PyDoc_STR("Unicode encoding error."), UnicodeError_traverse, + TyDoc_STR("Unicode encoding error."), UnicodeError_traverse, UnicodeError_clear, 0, 0, 0, 0, 0, UnicodeError_members, 0, &_PyExc_UnicodeError, 0, 0, 0, offsetof(PyUnicodeErrorObject, dict), UnicodeEncodeError_init, 0, BaseException_new, @@ -3768,14 +3768,14 @@ done: return result; } -static TyTypeObject _PyExc_UnicodeDecodeError = { - PyVarObject_HEAD_INIT(NULL, 0) +static TyTypeObject _TyExc_UnicodeDecodeError = { + TyVarObject_HEAD_INIT(NULL, 0) "UnicodeDecodeError", sizeof(PyUnicodeErrorObject), 0, UnicodeError_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, UnicodeDecodeError_str, 0, 0, 0, Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, - PyDoc_STR("Unicode decoding error."), UnicodeError_traverse, + TyDoc_STR("Unicode decoding error."), UnicodeError_traverse, UnicodeError_clear, 0, 0, 0, 0, 0, UnicodeError_members, 0, &_PyExc_UnicodeError, 0, 0, 0, offsetof(PyUnicodeErrorObject, dict), UnicodeDecodeError_init, 0, BaseException_new, @@ -3874,14 +3874,14 @@ done: return result; } -static TyTypeObject _PyExc_UnicodeTranslateError = { - PyVarObject_HEAD_INIT(NULL, 0) +static TyTypeObject _TyExc_UnicodeTranslateError = { + TyVarObject_HEAD_INIT(NULL, 0) "UnicodeTranslateError", sizeof(PyUnicodeErrorObject), 0, UnicodeError_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, UnicodeTranslateError_str, 0, 0, 0, Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, - PyDoc_STR("Unicode translation error."), UnicodeError_traverse, + TyDoc_STR("Unicode translation error."), UnicodeError_traverse, UnicodeError_clear, 0, 0, 0, 0, 0, UnicodeError_members, 0, &_PyExc_UnicodeError, 0, 0, 0, offsetof(PyUnicodeErrorObject, dict), UnicodeTranslateError_init, 0, BaseException_new, @@ -3966,14 +3966,14 @@ SimpleExtendsException(TyExc_Exception, ReferenceError, static TyObject * get_memory_error(int allow_allocation, TyObject *args, TyObject *kwds) { - PyBaseExceptionObject *self = NULL; + TyBaseExceptionObject *self = NULL; struct _Py_exc_state *state = get_exc_state(); MEMERRORS_LOCK(state); if (state->memerrors_freelist != NULL) { /* Fetch MemoryError from freelist and initialize it */ self = state->memerrors_freelist; - state->memerrors_freelist = (PyBaseExceptionObject *) self->dict; + state->memerrors_freelist = (TyBaseExceptionObject *) self->dict; state->memerrors_numfree--; self->dict = NULL; self->args = (TyObject *)&_Ty_SINGLETON(tuple_empty); @@ -3987,7 +3987,7 @@ get_memory_error(int allow_allocation, TyObject *args, TyObject *kwds) } if (!allow_allocation) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return Ty_NewRef( &_Ty_INTERP_SINGLETON(interp, last_resort_memory_error)); } @@ -4024,7 +4024,7 @@ _TyErr_NoMemory(TyThreadState *tstate) static void MemoryError_dealloc(TyObject *op) { - PyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); + TyBaseExceptionObject *self = PyBaseExceptionObject_CAST(op); _TyObject_GC_UNTRACK(self); (void)BaseException_clear(op); @@ -4076,22 +4076,22 @@ free_preallocated_memerrors(struct _Py_exc_state *state) { while (state->memerrors_freelist != NULL) { TyObject *self = (TyObject *) state->memerrors_freelist; - state->memerrors_freelist = (PyBaseExceptionObject *)state->memerrors_freelist->dict; + state->memerrors_freelist = (TyBaseExceptionObject *)state->memerrors_freelist->dict; Ty_TYPE(self)->tp_free(self); } } TyTypeObject _PyExc_MemoryError = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "MemoryError", - sizeof(PyBaseExceptionObject), + sizeof(TyBaseExceptionObject), 0, MemoryError_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, - PyDoc_STR("Out of memory."), BaseException_traverse, + TyDoc_STR("Out of memory."), BaseException_traverse, BaseException_clear, 0, 0, 0, 0, 0, 0, 0, &_PyExc_Exception, - 0, 0, 0, offsetof(PyBaseExceptionObject, dict), + 0, 0, 0, offsetof(TyBaseExceptionObject, dict), BaseException_init, 0, MemoryError_new }; TyObject *TyExc_MemoryError = (TyObject *) &_PyExc_MemoryError; @@ -4346,7 +4346,7 @@ static struct static_exception static_exceptions[] = { int -_PyExc_InitTypes(PyInterpreterState *interp) +_PyExc_InitTypes(TyInterpreterState *interp) { for (size_t i=0; i < Ty_ARRAY_LENGTH(static_exceptions); i++) { TyTypeObject *exc = static_exceptions[i].exc; @@ -4364,7 +4364,7 @@ _PyExc_InitTypes(PyInterpreterState *interp) static void -_PyExc_FiniTypes(PyInterpreterState *interp) +_PyExc_FiniTypes(TyInterpreterState *interp) { for (Ty_ssize_t i=Ty_ARRAY_LENGTH(static_exceptions) - 1; i >= 0; i--) { TyTypeObject *exc = static_exceptions[i].exc; @@ -4374,7 +4374,7 @@ _PyExc_FiniTypes(PyInterpreterState *interp) TyStatus -_PyExc_InitGlobalObjects(PyInterpreterState *interp) +_PyExc_InitGlobalObjects(TyInterpreterState *interp) { if (preallocate_memerrors() < 0) { return _TyStatus_NO_MEMORY(); @@ -4383,7 +4383,7 @@ _PyExc_InitGlobalObjects(PyInterpreterState *interp) } TyStatus -_PyExc_InitState(PyInterpreterState *interp) +_PyExc_InitState(TyInterpreterState *interp) { struct _Py_exc_state *state = &interp->exc_state; @@ -4486,14 +4486,14 @@ _PyBuiltins_AddExceptions(TyObject *bltinmod) } void -_PyExc_ClearExceptionGroupType(PyInterpreterState *interp) +_PyExc_ClearExceptionGroupType(TyInterpreterState *interp) { struct _Py_exc_state *state = &interp->exc_state; Ty_CLEAR(state->TyExc_ExceptionGroup); } void -_PyExc_Fini(PyInterpreterState *interp) +_PyExc_Fini(TyInterpreterState *interp) { struct _Py_exc_state *state = &interp->exc_state; free_preallocated_memerrors(state); diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 176790e..bfd76cf 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c @@ -429,7 +429,7 @@ static TyGetSetDef stdprinter_getsetlist[] = { }; TyTypeObject PyStdPrinter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "stderrprinter", /* tp_name */ sizeof(PyStdPrinter_Object), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/floatobject.c b/Objects/floatobject.c index b3144d0..a93d63a 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -42,14 +42,14 @@ TyFloat_GetMin(void) static TyTypeObject FloatInfoType; -PyDoc_STRVAR(floatinfo__doc__, +TyDoc_STRVAR(floatinfo__doc__, "sys.float_info\n\ \n\ A named tuple holding information about the float type. It contains low level\n\ information about the precision and internal representation. Please study\n\ your system's :file:`float.h` for more information."); -static PyStructSequence_Field floatinfo_fields[] = { +static TyStructSequence_Field floatinfo_fields[] = { {"max", "DBL_MAX -- maximum representable finite float"}, {"max_exp", "DBL_MAX_EXP -- maximum int e such that radix**(e-1) " "is representable"}, @@ -71,7 +71,7 @@ static PyStructSequence_Field floatinfo_fields[] = { {0} }; -static PyStructSequence_Desc floatinfo_desc = { +static TyStructSequence_Desc floatinfo_desc = { "sys.float_info", /* name */ floatinfo__doc__, /* doc */ floatinfo_fields, /* fields */ @@ -84,7 +84,7 @@ TyFloat_GetInfo(void) TyObject* floatinfo; int pos = 0; - floatinfo = PyStructSequence_New(&FloatInfoType); + floatinfo = TyStructSequence_New(&FloatInfoType); if (floatinfo == NULL) { return NULL; } @@ -96,7 +96,7 @@ TyFloat_GetInfo(void) Ty_CLEAR(floatinfo); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(floatinfo, pos++, flag); \ + TyStructSequence_SET_ITEM(floatinfo, pos++, flag); \ } while (0) #define SetIntFlag(FLAG) SetFlag(TyLong_FromLong((FLAG))) @@ -1855,7 +1855,7 @@ static PyNumberMethods float_as_number = { }; TyTypeObject TyFloat_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "float", sizeof(PyFloatObject), 0, @@ -1951,7 +1951,7 @@ _init_global_state(void) } void -_TyFloat_InitState(PyInterpreterState *interp) +_TyFloat_InitState(TyInterpreterState *interp) { if (!_Ty_IsMainInterpreter(interp)) { return; @@ -1960,7 +1960,7 @@ _TyFloat_InitState(PyInterpreterState *interp) } TyStatus -_TyFloat_InitTypes(PyInterpreterState *interp) +_TyFloat_InitTypes(TyInterpreterState *interp) { /* Init float info */ if (_PyStructSequence_InitBuiltin(interp, &FloatInfoType, @@ -1973,7 +1973,7 @@ _TyFloat_InitTypes(PyInterpreterState *interp) } void -_TyFloat_FiniType(PyInterpreterState *interp) +_TyFloat_FiniType(TyInterpreterState *interp) { _PyStructSequence_FiniBuiltin(interp, &FloatInfoType); } diff --git a/Objects/frameobject.c b/Objects/frameobject.c index f641766..3891428 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -6,12 +6,12 @@ #include "pycore_code.h" // CO_FAST_LOCAL #include "pycore_dict.h" // _TyDict_LoadBuiltinsFromGlobals() #include "pycore_frame.h" // PyFrameObject -#include "pycore_function.h" // _PyFunction_FromConstructor() +#include "pycore_function.h" // _TyFunction_FromConstructor() #include "pycore_genobject.h" // _TyGen_GetGeneratorFromFrame() #include "pycore_interpframe.h" // _TyFrame_GetLocalsArray() #include "pycore_modsupport.h" // _TyArg_CheckPositional() #include "pycore_object.h" // _TyObject_GC_UNTRACK() -#include "pycore_opcode_metadata.h" // _PyOpcode_Caches +#include "pycore_opcode_metadata.h" // _TyOpcode_Caches #include "pycore_optimizer.h" // _Ty_Executors_InvalidateDependency() #include "pycore_unicodeobject.h" // _TyUnicode_Equal() @@ -914,7 +914,7 @@ static TyMethodDef framelocalsproxy_methods[] = { }; TyTypeObject PyFrameLocalsProxy_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "FrameLocalsProxy", .tp_basicsize = sizeof(PyFrameLocalsProxyObject), .tp_dealloc = framelocalsproxy_dealloc, @@ -1340,7 +1340,7 @@ mark_stacks(PyCodeObject *code_obj, int len) stacks[i] = next_stack; } oparg = (oparg << 8) | inst.op.arg; - int next_i = i + _PyOpcode_Caches[opcode] + 1; + int next_i = i + _TyOpcode_Caches[opcode] + 1; if (next_stack == UNINITIALIZED) { i = next_i; continue; @@ -2056,7 +2056,7 @@ static TyMethodDef frame_methods[] = { }; TyTypeObject TyFrame_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "frame", offsetof(PyFrameObject, _f_frame_data) + offsetof(_PyInterpreterFrame, localsplus), @@ -2139,7 +2139,7 @@ TyFrame_New(TyThreadState *tstate, PyCodeObject *code, .fc_kwdefaults = NULL, .fc_closure = NULL }; - PyFunctionObject *func = _PyFunction_FromConstructor(&desc); + PyFunctionObject *func = _TyFunction_FromConstructor(&desc); _Ty_DECREF_BUILTINS(builtins); if (func == NULL) { return NULL; @@ -2164,7 +2164,7 @@ TyFrame_New(TyThreadState *tstate, PyCodeObject *code, static void frame_init_get_vars(_PyInterpreterFrame *frame) { - // COPY_FREE_VARS has no quickened forms, so no need to use _PyOpcode_Deopt + // COPY_FREE_VARS has no quickened forms, so no need to use _TyOpcode_Deopt // here: PyCodeObject *co = _TyFrame_GetCode(frame); int lasti = _PyInterpreterFrame_LASTI(frame); diff --git a/Objects/funcobject.c b/Objects/funcobject.c index e0447de..d83ba2b 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -3,7 +3,7 @@ #include "Python.h" #include "pycore_code.h" // _TyCode_VerifyStateless() #include "pycore_dict.h" // _Ty_INCREF_DICT() -#include "pycore_function.h" // _PyFunction_Vectorcall +#include "pycore_function.h" // _TyFunction_Vectorcall #include "pycore_long.h" // _TyLong_GetOne() #include "pycore_modsupport.h" // _TyArg_NoKeywords() #include "pycore_object.h" // _TyObject_GC_UNTRACK() @@ -26,7 +26,7 @@ func_event_name(TyFunction_WatchEvent event) { } static void -notify_func_watchers(PyInterpreterState *interp, TyFunction_WatchEvent event, +notify_func_watchers(TyInterpreterState *interp, TyFunction_WatchEvent event, PyFunctionObject *func, TyObject *new_value) { uint8_t bits = interp->active_func_watchers; @@ -53,7 +53,7 @@ handle_func_event(TyFunction_WatchEvent event, PyFunctionObject *func, TyObject *new_value) { assert(Ty_REFCNT(func) > 0); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->_initialized); if (interp->active_func_watchers) { notify_func_watchers(interp, event, func, new_value); @@ -72,7 +72,7 @@ handle_func_event(TyFunction_WatchEvent event, PyFunctionObject *func, int TyFunction_AddWatcher(TyFunction_WatchCallback callback) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->_initialized); for (int i = 0; i < FUNC_MAX_WATCHERS; i++) { if (interp->func_watchers[i] == NULL) { @@ -88,7 +88,7 @@ TyFunction_AddWatcher(TyFunction_WatchCallback callback) int TyFunction_ClearWatcher(int watcher_id) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (watcher_id < 0 || watcher_id >= FUNC_MAX_WATCHERS) { TyErr_Format(TyExc_ValueError, "invalid func watcher ID %d", watcher_id); @@ -104,7 +104,7 @@ TyFunction_ClearWatcher(int watcher_id) return 0; } PyFunctionObject * -_PyFunction_FromConstructor(PyFrameConstructor *constr) +_TyFunction_FromConstructor(PyFrameConstructor *constr) { TyObject *module; if (TyDict_GetItemRef(constr->fc_globals, &_Ty_ID(__name__), &module) < 0) { @@ -134,7 +134,7 @@ _PyFunction_FromConstructor(PyFrameConstructor *constr) op->func_annotations = NULL; op->func_annotate = NULL; op->func_typeparams = NULL; - op->vectorcall = _PyFunction_Vectorcall; + op->vectorcall = _TyFunction_Vectorcall; op->func_version = FUNC_VERSION_UNSET; // NOTE: functions created via FrameConstructor do not use deferred // reference counting because they are typically not part of cycles @@ -212,7 +212,7 @@ TyFunction_NewWithQualName(TyObject *code, TyObject *globals, TyObject *qualname op->func_annotations = NULL; op->func_annotate = NULL; op->func_typeparams = NULL; - op->vectorcall = _PyFunction_Vectorcall; + op->vectorcall = _TyFunction_Vectorcall; op->func_version = FUNC_VERSION_UNSET; if (((code_obj->co_flags & CO_NESTED) == 0) || (code_obj->co_flags & CO_METHOD)) { @@ -299,7 +299,7 @@ functions is running. #ifndef Ty_GIL_DISABLED static inline struct _func_version_cache_item * -get_cache_item(PyInterpreterState *interp, uint32_t version) +get_cache_item(TyInterpreterState *interp, uint32_t version) { return interp->func_state.func_version_cache + (version % FUNC_VERSION_CACHE_SIZE); @@ -307,7 +307,7 @@ get_cache_item(PyInterpreterState *interp, uint32_t version) #endif void -_PyFunction_SetVersion(PyFunctionObject *func, uint32_t version) +_TyFunction_SetVersion(PyFunctionObject *func, uint32_t version) { assert(func->func_version == FUNC_VERSION_UNSET); assert(version >= FUNC_VERSION_FIRST_VALID); @@ -315,7 +315,7 @@ _PyFunction_SetVersion(PyFunctionObject *func, uint32_t version) // based on the version, so we do not need to stop the world to set it. func->func_version = version; #ifndef Ty_GIL_DISABLED - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _func_version_cache_item *slot = get_cache_item(interp, version); slot->func = func; slot->code = func->func_code; @@ -323,7 +323,7 @@ _PyFunction_SetVersion(PyFunctionObject *func, uint32_t version) } static void -func_clear_version(PyInterpreterState *interp, PyFunctionObject *func) +func_clear_version(TyInterpreterState *interp, PyFunctionObject *func) { if (func->func_version < FUNC_VERSION_FIRST_VALID) { // Version was never set or has already been cleared. @@ -342,23 +342,23 @@ func_clear_version(PyInterpreterState *interp, PyFunctionObject *func) // Called when any of the critical function attributes are changed static void -_PyFunction_ClearVersion(PyFunctionObject *func) +_TyFunction_ClearVersion(PyFunctionObject *func) { if (func->func_version < FUNC_VERSION_FIRST_VALID) { // Version was never set or has already been cleared. return; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyEval_StopTheWorld(interp); func_clear_version(interp, func); _TyEval_StartTheWorld(interp); } void -_PyFunction_ClearCodeByVersion(uint32_t version) +_TyFunction_ClearCodeByVersion(uint32_t version) { #ifndef Ty_GIL_DISABLED - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _func_version_cache_item *slot = get_cache_item(interp, version); if (slot->code) { assert(TyCode_Check(slot->code)); @@ -372,12 +372,12 @@ _PyFunction_ClearCodeByVersion(uint32_t version) } PyFunctionObject * -_PyFunction_LookupByVersion(uint32_t version, TyObject **p_code) +_TyFunction_LookupByVersion(uint32_t version, TyObject **p_code) { #ifdef Ty_GIL_DISABLED return NULL; #else - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _func_version_cache_item *slot = get_cache_item(interp, version); if (slot->code) { assert(TyCode_Check(slot->code)); @@ -398,7 +398,7 @@ _PyFunction_LookupByVersion(uint32_t version, TyObject **p_code) } uint32_t -_PyFunction_GetVersionForCurrentState(PyFunctionObject *func) +_TyFunction_GetVersionForCurrentState(PyFunctionObject *func) { return func->func_version; } @@ -467,7 +467,7 @@ TyFunction_SetDefaults(TyObject *op, TyObject *defaults) } handle_func_event(TyFunction_EVENT_MODIFY_DEFAULTS, (PyFunctionObject *) op, defaults); - _PyFunction_ClearVersion((PyFunctionObject *)op); + _TyFunction_ClearVersion((PyFunctionObject *)op); Ty_XSETREF(((PyFunctionObject *)op)->func_defaults, defaults); return 0; } @@ -476,7 +476,7 @@ void TyFunction_SetVectorcall(PyFunctionObject *func, vectorcallfunc vectorcall) { assert(func != NULL); - _PyFunction_ClearVersion(func); + _TyFunction_ClearVersion(func); func->vectorcall = vectorcall; } @@ -509,7 +509,7 @@ TyFunction_SetKwDefaults(TyObject *op, TyObject *defaults) } handle_func_event(TyFunction_EVENT_MODIFY_KWDEFAULTS, (PyFunctionObject *) op, defaults); - _PyFunction_ClearVersion((PyFunctionObject *)op); + _TyFunction_ClearVersion((PyFunctionObject *)op); Ty_XSETREF(((PyFunctionObject *)op)->func_kwdefaults, defaults); return 0; } @@ -542,7 +542,7 @@ TyFunction_SetClosure(TyObject *op, TyObject *closure) Ty_TYPE(closure)->tp_name); return -1; } - _PyFunction_ClearVersion((PyFunctionObject *)op); + _TyFunction_ClearVersion((PyFunctionObject *)op); Ty_XSETREF(((PyFunctionObject *)op)->func_closure, closure); return 0; } @@ -649,7 +649,7 @@ class function "PyFunctionObject *" "&TyFunction_Type" static TyObject * func_get_code(TyObject *self, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); if (TySys_Audit("object.__getattr__", "Os", op, "__code__") < 0) { return NULL; } @@ -660,7 +660,7 @@ func_get_code(TyObject *self, void *Py_UNUSED(ignored)) static int func_set_code(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); /* Not legal to del f.func_code or to set it to anything * other than a code object. */ @@ -701,7 +701,7 @@ func_set_code(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) } handle_func_event(TyFunction_EVENT_MODIFY_CODE, op, value); - _PyFunction_ClearVersion(op); + _TyFunction_ClearVersion(op); Ty_XSETREF(op->func_code, Ty_NewRef(value)); return 0; } @@ -709,14 +709,14 @@ func_set_code(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) static TyObject * func_get_name(TyObject *self, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); return Ty_NewRef(op->func_name); } static int func_set_name(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); /* Not legal to del f.func_name or to set it to anything * other than a string object. */ if (value == NULL || !TyUnicode_Check(value)) { @@ -731,14 +731,14 @@ func_set_name(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) static TyObject * func_get_qualname(TyObject *self, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); return Ty_NewRef(op->func_qualname); } static int func_set_qualname(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); /* Not legal to del f.__qualname__ or to set it to anything * other than a string object. */ if (value == NULL || !TyUnicode_Check(value)) { @@ -753,7 +753,7 @@ func_set_qualname(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) static TyObject * func_get_defaults(TyObject *self, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); if (TySys_Audit("object.__getattr__", "Os", op, "__defaults__") < 0) { return NULL; } @@ -768,7 +768,7 @@ func_set_defaults(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) { /* Legal to del f.func_defaults. * Can only set func_defaults to NULL or a tuple. */ - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); if (value == Ty_None) value = NULL; if (value != NULL && !TyTuple_Check(value)) { @@ -787,7 +787,7 @@ func_set_defaults(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) } handle_func_event(TyFunction_EVENT_MODIFY_DEFAULTS, op, value); - _PyFunction_ClearVersion(op); + _TyFunction_ClearVersion(op); Ty_XSETREF(op->func_defaults, Ty_XNewRef(value)); return 0; } @@ -795,7 +795,7 @@ func_set_defaults(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) static TyObject * func_get_kwdefaults(TyObject *self, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); if (TySys_Audit("object.__getattr__", "Os", op, "__kwdefaults__") < 0) { return NULL; @@ -809,7 +809,7 @@ func_get_kwdefaults(TyObject *self, void *Py_UNUSED(ignored)) static int func_set_kwdefaults(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); if (value == Ty_None) value = NULL; /* Legal to del f.func_kwdefaults. @@ -830,7 +830,7 @@ func_set_kwdefaults(TyObject *self, TyObject *value, void *Py_UNUSED(ignored)) } handle_func_event(TyFunction_EVENT_MODIFY_KWDEFAULTS, op, value); - _PyFunction_ClearVersion(op); + _TyFunction_ClearVersion(op); Ty_XSETREF(op->func_kwdefaults, Ty_XNewRef(value)); return 0; } @@ -1108,7 +1108,7 @@ func_new_impl(TyTypeObject *type, PyCodeObject *code, TyObject *globals, static int func_clear(TyObject *self) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); func_clear_version(_TyInterpreterState_GET(), op); TyObject *globals = op->func_globals; op->func_globals = NULL; @@ -1142,7 +1142,7 @@ func_clear(TyObject *self) static void func_dealloc(TyObject *self) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); _TyObject_ResurrectStart(self); handle_func_event(TyFunction_EVENT_DESTROY, op, NULL); if (_TyObject_ResurrectEnd(self)) { @@ -1161,7 +1161,7 @@ func_dealloc(TyObject *self) static TyObject* func_repr(TyObject *self) { - PyFunctionObject *op = _PyFunction_CAST(self); + PyFunctionObject *op = _TyFunction_CAST(self); return TyUnicode_FromFormat("", op->func_qualname, op); } @@ -1169,7 +1169,7 @@ func_repr(TyObject *self) static int func_traverse(TyObject *self, visitproc visit, void *arg) { - PyFunctionObject *f = _PyFunction_CAST(self); + PyFunctionObject *f = _TyFunction_CAST(self); Ty_VISIT(f->func_code); Ty_VISIT(f->func_globals); Ty_VISIT(f->func_builtins); @@ -1198,7 +1198,7 @@ func_descr_get(TyObject *func, TyObject *obj, TyObject *type) } TyTypeObject TyFunction_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "function", sizeof(PyFunctionObject), 0, @@ -1242,7 +1242,7 @@ TyTypeObject TyFunction_Type = { int -_PyFunction_VerifyStateless(TyThreadState *tstate, TyObject *func) +_TyFunction_VerifyStateless(TyThreadState *tstate, TyObject *func) { assert(!TyErr_Occurred()); assert(TyFunction_Check(func)); @@ -1255,7 +1255,7 @@ _PyFunction_VerifyStateless(TyThreadState *tstate, TyObject *func) return -1; } // Check the builtins. - TyObject *builtinsns = _PyFunction_GET_BUILTINS(func); + TyObject *builtinsns = _TyFunction_GET_BUILTINS(func); if (builtinsns != NULL && !TyDict_Check(builtinsns)) { _TyErr_Format(tstate, TyExc_TypeError, "unsupported builtins %R", builtinsns); @@ -1555,7 +1555,7 @@ cm_repr(TyObject *self) return TyUnicode_FromFormat("", cm->cm_callable); } -PyDoc_STRVAR(classmethod_doc, +TyDoc_STRVAR(classmethod_doc, "classmethod(function, /)\n\ --\n\ \n\ @@ -1579,7 +1579,7 @@ Class methods are different than C++ or Java static methods.\n\ If you want those, see the staticmethod builtin."); TyTypeObject TyClassMethod_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "classmethod", sizeof(classmethod), 0, @@ -1792,7 +1792,7 @@ sm_repr(TyObject *self) return TyUnicode_FromFormat("", sm->sm_callable); } -PyDoc_STRVAR(staticmethod_doc, +TyDoc_STRVAR(staticmethod_doc, "staticmethod(function, /)\n\ --\n\ \n\ @@ -1814,7 +1814,7 @@ Static methods in Python are similar to those found in Java or C++.\n\ For a more advanced concept, see the classmethod builtin."); TyTypeObject TyStaticMethod_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "staticmethod", sizeof(staticmethod), 0, diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c index bccd790..81713af 100644 --- a/Objects/genericaliasobject.c +++ b/Objects/genericaliasobject.c @@ -545,7 +545,7 @@ _Ty_subs_parameters(TyObject *self, TyObject *args, TyObject *parameters, TyObje return newargs; } -PyDoc_STRVAR(genericalias__doc__, +TyDoc_STRVAR(genericalias__doc__, "GenericAlias(origin, args, /)\n" "--\n\n" "Represent a PEP 585 generic type\n" @@ -823,7 +823,7 @@ ga_unpacked_tuple_args(TyObject *self, void *unused) } static TyGetSetDef ga_properties[] = { - {"__parameters__", ga_parameters, NULL, PyDoc_STR("Type variables in the GenericAlias."), NULL}, + {"__parameters__", ga_parameters, NULL, TyDoc_STR("Type variables in the GenericAlias."), NULL}, {"__typing_unpacked_tuple_args__", ga_unpacked_tuple_args, NULL, NULL}, {0} }; @@ -951,7 +951,7 @@ static TyMethodDef ga_iter_methods[] = { // gh-91632: _Ty_GenericAliasIterType is exported to be cleared // in _PyTypes_FiniTypes. TyTypeObject _Ty_GenericAliasIterType = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "generic_alias_iterator", .tp_basicsize = sizeof(gaiterobject), .tp_iter = PyObject_SelfIter, @@ -978,7 +978,7 @@ ga_iter(TyObject *self) { // - argument clinic? // - cache? TyTypeObject Ty_GenericAliasType = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "types.GenericAlias", .tp_doc = genericalias__doc__, .tp_basicsize = sizeof(gaobject), diff --git a/Objects/genobject.c b/Objects/genobject.c index 63e9887..0b603a8 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -314,7 +314,7 @@ gen_send_ex(PyGenObject *gen, TyObject *arg, int exc, int closing) return result; } -PyDoc_STRVAR(send_doc, +TyDoc_STRVAR(send_doc, "send(arg) -> send 'arg' into generator,\n\ return next yielded value or raise StopIteration."); @@ -324,7 +324,7 @@ gen_send(TyObject *gen, TyObject *arg) return gen_send_ex((PyGenObject*)gen, arg, 0, 0); } -PyDoc_STRVAR(close_doc, +TyDoc_STRVAR(close_doc, "close() -> raise GeneratorExit inside generator."); /* @@ -451,7 +451,7 @@ gen_close(TyObject *self, TyObject *args) } -PyDoc_STRVAR(throw_doc, +TyDoc_STRVAR(throw_doc, "throw(value)\n\ throw(type[,value[,tb]])\n\ \n\ @@ -809,11 +809,11 @@ gen_getcode(TyObject *self, void *Py_UNUSED(ignored)) static TyGetSetDef gen_getsetlist[] = { {"__name__", gen_get_name, gen_set_name, - PyDoc_STR("name of the generator")}, + TyDoc_STR("name of the generator")}, {"__qualname__", gen_get_qualname, gen_set_qualname, - PyDoc_STR("qualified name of the generator")}, + TyDoc_STR("qualified name of the generator")}, {"gi_yieldfrom", gen_getyieldfrom, NULL, - PyDoc_STR("object being iterated by yield from, or None")}, + TyDoc_STR("object being iterated by yield from, or None")}, {"gi_running", gen_getrunning, NULL, NULL}, {"gi_frame", gen_getframe, NULL, NULL}, {"gi_suspended", gen_getsuspended, NULL, NULL}, @@ -836,7 +836,7 @@ gen_sizeof(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromSsize_t(res); } -PyDoc_STRVAR(sizeof__doc__, +TyDoc_STRVAR(sizeof__doc__, "gen.__sizeof__() -> size of gen in memory, in bytes"); static TyMethodDef gen_methods[] = { @@ -844,7 +844,7 @@ static TyMethodDef gen_methods[] = { {"throw", _PyCFunction_CAST(gen_throw), METH_FASTCALL, throw_doc}, {"close", gen_close, METH_NOARGS, close_doc}, {"__sizeof__", gen_sizeof, METH_NOARGS, sizeof__doc__}, - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* Sentinel */ }; @@ -857,7 +857,7 @@ static PyAsyncMethods gen_as_async = { TyTypeObject TyGen_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "generator", /* tp_name */ offsetof(PyGenObject, gi_iframe.localsplus), /* tp_basicsize */ sizeof(TyObject *), /* tp_itemsize */ @@ -1165,11 +1165,11 @@ cr_getcode(TyObject *coro, void *Py_UNUSED(ignored)) static TyGetSetDef coro_getsetlist[] = { {"__name__", gen_get_name, gen_set_name, - PyDoc_STR("name of the coroutine")}, + TyDoc_STR("name of the coroutine")}, {"__qualname__", gen_get_qualname, gen_set_qualname, - PyDoc_STR("qualified name of the coroutine")}, + TyDoc_STR("qualified name of the coroutine")}, {"cr_await", coro_get_cr_await, NULL, - PyDoc_STR("object being awaited on, or None")}, + TyDoc_STR("object being awaited on, or None")}, {"cr_running", cr_getrunning, NULL, NULL}, {"cr_frame", cr_getframe, NULL, NULL}, {"cr_code", cr_getcode, NULL, NULL}, @@ -1182,11 +1182,11 @@ static TyMemberDef coro_memberlist[] = { {NULL} /* Sentinel */ }; -PyDoc_STRVAR(coro_send_doc, +TyDoc_STRVAR(coro_send_doc, "send(arg) -> send 'arg' into coroutine,\n\ return next iterated value or raise StopIteration."); -PyDoc_STRVAR(coro_throw_doc, +TyDoc_STRVAR(coro_throw_doc, "throw(value)\n\ throw(type[,value[,traceback]])\n\ \n\ @@ -1196,7 +1196,7 @@ the (type, val, tb) signature is deprecated, \n\ and may be removed in a future version of Python."); -PyDoc_STRVAR(coro_close_doc, +TyDoc_STRVAR(coro_close_doc, "close() -> raise GeneratorExit inside coroutine."); static TyMethodDef coro_methods[] = { @@ -1204,7 +1204,7 @@ static TyMethodDef coro_methods[] = { {"throw",_PyCFunction_CAST(gen_throw), METH_FASTCALL, coro_throw_doc}, {"close", gen_close, METH_NOARGS, coro_close_doc}, {"__sizeof__", gen_sizeof, METH_NOARGS, sizeof__doc__}, - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* Sentinel */ }; @@ -1216,7 +1216,7 @@ static PyAsyncMethods coro_as_async = { }; TyTypeObject TyCoro_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "coroutine", /* tp_name */ offsetof(PyCoroObject, cr_iframe.localsplus),/* tp_basicsize */ sizeof(TyObject *), /* tp_itemsize */ @@ -1321,7 +1321,7 @@ static TyMethodDef coro_wrapper_methods[] = { }; TyTypeObject _PyCoroWrapper_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "coroutine_wrapper", sizeof(PyCoroWrapper), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1599,11 +1599,11 @@ ag_getsuspended(TyObject *self, void *Py_UNUSED(ignored)) static TyGetSetDef async_gen_getsetlist[] = { {"__name__", gen_get_name, gen_set_name, - PyDoc_STR("name of the async generator")}, + TyDoc_STR("name of the async generator")}, {"__qualname__", gen_get_qualname, gen_set_qualname, - PyDoc_STR("qualified name of the async generator")}, + TyDoc_STR("qualified name of the async generator")}, {"ag_await", coro_get_cr_await, NULL, - PyDoc_STR("object being awaited on, or None")}, + TyDoc_STR("object being awaited on, or None")}, {"ag_frame", ag_getframe, NULL, NULL}, {"ag_code", ag_getcode, NULL, NULL}, {"ag_suspended", ag_getsuspended, NULL, NULL}, @@ -1616,13 +1616,13 @@ static TyMemberDef async_gen_memberlist[] = { {NULL} /* Sentinel */ }; -PyDoc_STRVAR(async_aclose_doc, +TyDoc_STRVAR(async_aclose_doc, "aclose() -> raise GeneratorExit inside generator."); -PyDoc_STRVAR(async_asend_doc, +TyDoc_STRVAR(async_asend_doc, "asend(v) -> send 'v' in generator."); -PyDoc_STRVAR(async_athrow_doc, +TyDoc_STRVAR(async_athrow_doc, "athrow(value)\n\ athrow(type[,value[,tb]])\n\ \n\ @@ -1636,7 +1636,7 @@ static TyMethodDef async_gen_methods[] = { {"aclose", async_gen_aclose, METH_NOARGS, async_aclose_doc}, {"__sizeof__", gen_sizeof, METH_NOARGS, sizeof__doc__}, {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* Sentinel */ }; @@ -1650,7 +1650,7 @@ static PyAsyncMethods async_gen_as_async = { TyTypeObject PyAsyncGen_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "async_generator", /* tp_name */ offsetof(PyAsyncGenObject, ag_iframe.localsplus), /* tp_basicsize */ sizeof(TyObject *), /* tp_itemsize */ @@ -1914,7 +1914,7 @@ static PyAsyncMethods async_gen_asend_as_async = { TyTypeObject _PyAsyncGenASend_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "async_generator_asend", /* tp_name */ sizeof(PyAsyncGenASend), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2000,7 +2000,7 @@ async_gen_wrapped_val_traverse(TyObject *self, visitproc visit, void *arg) TyTypeObject _PyAsyncGenWrappedValue_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "async_generator_wrapped_value", /* tp_name */ sizeof(_PyAsyncGenWrappedValue), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2357,7 +2357,7 @@ static PyAsyncMethods async_gen_athrow_as_async = { TyTypeObject _PyAsyncGenAThrow_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "async_generator_athrow", /* tp_name */ sizeof(PyAsyncGenAThrow), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/interpolationobject.c b/Objects/interpolationobject.c index b72e8fe..20992f7 100644 --- a/Objects/interpolationobject.c +++ b/Objects/interpolationobject.c @@ -136,16 +136,16 @@ interpolation_reduce(TyObject *op, TyObject *Py_UNUSED(dummy)) static TyMethodDef interpolation_methods[] = { {"__reduce__", interpolation_reduce, METH_NOARGS, - PyDoc_STR("__reduce__() -> (cls, state)")}, + TyDoc_STR("__reduce__() -> (cls, state)")}, {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL}, }; TyTypeObject _PyInterpolation_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "string.templatelib.Interpolation", - .tp_doc = PyDoc_STR("Interpolation object"), + .tp_doc = TyDoc_STR("Interpolation object"), .tp_basicsize = sizeof(interpolationobject), .tp_itemsize = 0, .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_HAVE_GC, @@ -161,7 +161,7 @@ TyTypeObject _PyInterpolation_Type = { }; TyStatus -_PyInterpolation_InitTypes(PyInterpreterState *interp) +_PyInterpolation_InitTypes(TyInterpreterState *interp) { TyObject *tuple = Ty_BuildValue("(ssss)", "value", "expression", "conversion", "format_spec"); if (!tuple) { diff --git a/Objects/iterobject.c b/Objects/iterobject.c index 9ca956f..4e78723 100644 --- a/Objects/iterobject.c +++ b/Objects/iterobject.c @@ -104,7 +104,7 @@ iter_len(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromLong(0); } -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * iter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -122,7 +122,7 @@ iter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) return Ty_BuildValue("N(())", iter); } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyObject * iter_setstate(TyObject *op, TyObject *state) @@ -139,7 +139,7 @@ iter_setstate(TyObject *op, TyObject *state) Py_RETURN_NONE; } -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef seqiter_methods[] = { {"__length_hint__", iter_len, METH_NOARGS, length_hint_doc}, @@ -149,7 +149,7 @@ static TyMethodDef seqiter_methods[] = { }; TyTypeObject TySeqIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "iterator", /* tp_name */ sizeof(seqiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -275,7 +275,7 @@ static TyMethodDef calliter_methods[] = { }; TyTypeObject TyCallIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "callable_iterator", /* tp_name */ sizeof(calliterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -460,12 +460,12 @@ anextawaitable_close(TyObject *op, TyObject *Py_UNUSED(dummy)) } -PyDoc_STRVAR(send_doc, +TyDoc_STRVAR(send_doc, "send(arg) -> send 'arg' into the wrapped iterator,\n\ return next yielded value or raise StopIteration."); -PyDoc_STRVAR(throw_doc, +TyDoc_STRVAR(throw_doc, "throw(value)\n\ throw(typ[,val[,tb]])\n\ \n\ @@ -475,7 +475,7 @@ the (type, val, tb) signature is deprecated, \n\ and may be removed in a future version of Python."); -PyDoc_STRVAR(close_doc, +TyDoc_STRVAR(close_doc, "close() -> raise GeneratorExit inside generator."); @@ -495,7 +495,7 @@ static PyAsyncMethods anextawaitable_as_async = { }; TyTypeObject _PyAnextAwaitable_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "anext_awaitable", /* tp_name */ sizeof(anextawaitableobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/listobject.c b/Objects/listobject.c index 2d44c08..f8c5c34 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -7,8 +7,8 @@ #include "pycore_dict.h" // _PyDictViewObject #include "pycore_freelist.h" // _Ty_FREELIST_FREE(), _Ty_FREELIST_POP() #include "pycore_pyatomic_ft_wrappers.h" -#include "pycore_interp.h" // PyInterpreterState.list -#include "pycore_list.h" // struct _Ty_list_freelist, _PyListIterObject +#include "pycore_interp.h" // TyInterpreterState.list +#include "pycore_list.h" // struct _Ty_list_freelist, _TyListIterObject #include "pycore_long.h" // _TyLong_DigitCount #include "pycore_modsupport.h" // _TyArg_NoKwnames() #include "pycore_object.h" // _TyObject_GC_TRACK(), _PyDebugAllocatorStats() @@ -3548,7 +3548,7 @@ static TyObject *list_subscript(TyObject*, TyObject*); static TyMethodDef list_methods[] = { {"__getitem__", list_subscript, METH_O|METH_COEXIST, - PyDoc_STR("__getitem__($self, index, /)\n--\n\nReturn self[index].")}, + TyDoc_STR("__getitem__($self, index, /)\n--\n\nReturn self[index].")}, LIST___REVERSED___METHODDEF LIST___SIZEOF___METHODDEF PY_LIST_CLEAR_METHODDEF @@ -3562,7 +3562,7 @@ static TyMethodDef list_methods[] = { LIST_COUNT_METHODDEF LIST_REVERSE_METHODDEF LIST_SORT_METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -3871,7 +3871,7 @@ static PyMappingMethods list_as_mapping = { }; TyTypeObject TyList_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "list", sizeof(PyListObject), 0, @@ -3926,9 +3926,9 @@ static TyObject *listiter_reduce_general(void *_it, int forward); static TyObject *listiter_reduce(TyObject *, TyObject *); static TyObject *listiter_setstate(TyObject *, TyObject *state); -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef listiter_methods[] = { {"__length_hint__", listiter_len, METH_NOARGS, length_hint_doc}, @@ -3938,9 +3938,9 @@ static TyMethodDef listiter_methods[] = { }; TyTypeObject PyListIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "list_iterator", /* tp_name */ - sizeof(_PyListIterObject), /* tp_basicsize */ + sizeof(_TyListIterObject), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ listiter_dealloc, /* tp_dealloc */ @@ -3978,9 +3978,9 @@ list_iter(TyObject *seq) TyErr_BadInternalCall(); return NULL; } - _PyListIterObject *it = _Ty_FREELIST_POP(_PyListIterObject, list_iters); + _TyListIterObject *it = _Ty_FREELIST_POP(_TyListIterObject, list_iters); if (it == NULL) { - it = PyObject_GC_New(_PyListIterObject, &PyListIter_Type); + it = PyObject_GC_New(_TyListIterObject, &PyListIter_Type); if (it == NULL) { return NULL; } @@ -3994,7 +3994,7 @@ list_iter(TyObject *seq) static void listiter_dealloc(TyObject *self) { - _PyListIterObject *it = (_PyListIterObject *)self; + _TyListIterObject *it = (_TyListIterObject *)self; _TyObject_GC_UNTRACK(it); Ty_XDECREF(it->it_seq); assert(Ty_IS_TYPE(self, &PyListIter_Type)); @@ -4004,14 +4004,14 @@ listiter_dealloc(TyObject *self) static int listiter_traverse(TyObject *it, visitproc visit, void *arg) { - Ty_VISIT(((_PyListIterObject *)it)->it_seq); + Ty_VISIT(((_TyListIterObject *)it)->it_seq); return 0; } static TyObject * listiter_next(TyObject *self) { - _PyListIterObject *it = (_PyListIterObject *)self; + _TyListIterObject *it = (_TyListIterObject *)self; Ty_ssize_t index = FT_ATOMIC_LOAD_SSIZE_RELAXED(it->it_index); if (index < 0) { return NULL; @@ -4036,7 +4036,7 @@ static TyObject * listiter_len(TyObject *self, TyObject *Py_UNUSED(ignored)) { assert(self != NULL); - _PyListIterObject *it = (_PyListIterObject *)self; + _TyListIterObject *it = (_TyListIterObject *)self; Ty_ssize_t index = FT_ATOMIC_LOAD_SSIZE_RELAXED(it->it_index); if (index >= 0) { Ty_ssize_t len = TyList_GET_SIZE(it->it_seq) - index; @@ -4055,7 +4055,7 @@ listiter_reduce(TyObject *it, TyObject *Py_UNUSED(ignored)) static TyObject * listiter_setstate(TyObject *self, TyObject *state) { - _PyListIterObject *it = (_PyListIterObject *)self; + _TyListIterObject *it = (_TyListIterObject *)self; Ty_ssize_t index = TyLong_AsSsize_t(state); if (index == -1 && TyErr_Occurred()) return NULL; @@ -4092,7 +4092,7 @@ static TyMethodDef listreviter_methods[] = { }; TyTypeObject PyListRevIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "list_reverseiterator", /* tp_name */ sizeof(listreviterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -4235,7 +4235,7 @@ listiter_reduce_general(void *_it, int forward) if (forward) { iter = _TyEval_GetBuiltin(&_Ty_ID(iter)); - _PyListIterObject *it = (_PyListIterObject *)_it; + _TyListIterObject *it = (_TyListIterObject *)_it; Ty_ssize_t idx = FT_ATOMIC_LOAD_SSIZE_RELAXED(it->it_index); if (idx >= 0) { return Ty_BuildValue("N(O)n", iter, it->it_seq, idx); diff --git a/Objects/longobject.c b/Objects/longobject.c index b15e1a3..e730df0 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -2042,7 +2042,7 @@ long_to_decimal_string_internal(TyObject *aa, */ if (size_a >= 10 * _PY_LONG_MAX_STR_DIGITS_THRESHOLD / (3 * TyLong_SHIFT) + 2) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int max_str_digits = interp->long_state.max_str_digits; if ((max_str_digits > 0) && (max_str_digits / (3 * TyLong_SHIFT) <= (size_a - 11) / 10)) { @@ -2123,7 +2123,7 @@ long_to_decimal_string_internal(TyObject *aa, strlen++; } if (strlen > _PY_LONG_MAX_STR_DIGITS_THRESHOLD) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int max_str_digits = interp->long_state.max_str_digits; Ty_ssize_t strlen_nosign = strlen - negative; if ((max_str_digits > 0) && (strlen_nosign > max_str_digits)) { @@ -2935,7 +2935,7 @@ long_from_string_base(const char **str, int base, PyLongObject **res) /* Limit the size to avoid excessive computation attacks exploiting the * quadratic algorithm. */ if (digits > _PY_LONG_MAX_STR_DIGITS_THRESHOLD) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int max_str_digits = interp->long_state.max_str_digits; if ((max_str_digits > 0) && (digits > max_str_digits)) { TyErr_Format(TyExc_ValueError, _MAX_STR_DIGITS_ERROR_FMT_TO_INT, @@ -6486,7 +6486,7 @@ static TyGetSetDef long_getset[] = { {NULL} /* Sentinel */ }; -PyDoc_STRVAR(long_doc, +TyDoc_STRVAR(long_doc, "int([x]) -> integer\n\ int(x, base=10) -> integer\n\ \n\ @@ -6540,7 +6540,7 @@ static PyNumberMethods long_as_number = { }; TyTypeObject TyLong_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "int", /* tp_name */ offsetof(PyLongObject, long_value.ob_digit), /* tp_basicsize */ sizeof(digit), /* tp_itemsize */ @@ -6587,13 +6587,13 @@ TyTypeObject TyLong_Type = { static TyTypeObject Int_InfoType; -PyDoc_STRVAR(int_info__doc__, +TyDoc_STRVAR(int_info__doc__, "sys.int_info\n\ \n\ A named tuple that holds information about Python's\n\ internal representation of integers. The attributes are read only."); -static PyStructSequence_Field int_info_fields[] = { +static TyStructSequence_Field int_info_fields[] = { {"bits_per_digit", "size of a digit in bits"}, {"sizeof_digit", "size in bytes of the C type used to represent a digit"}, {"default_max_str_digits", "maximum string conversion digits limitation"}, @@ -6601,7 +6601,7 @@ static PyStructSequence_Field int_info_fields[] = { {NULL, NULL} }; -static PyStructSequence_Desc int_info_desc = { +static TyStructSequence_Desc int_info_desc = { "sys.int_info", /* name */ int_info__doc__, /* doc */ int_info_fields, /* fields */ @@ -6613,12 +6613,12 @@ TyLong_GetInfo(void) { TyObject* int_info; int field = 0; - int_info = PyStructSequence_New(&Int_InfoType); + int_info = TyStructSequence_New(&Int_InfoType); if (int_info == NULL) return NULL; - PyStructSequence_SET_ITEM(int_info, field++, + TyStructSequence_SET_ITEM(int_info, field++, TyLong_FromLong(TyLong_SHIFT)); - PyStructSequence_SET_ITEM(int_info, field++, + TyStructSequence_SET_ITEM(int_info, field++, TyLong_FromLong(sizeof(digit))); /* * The following two fields were added after investigating uses of @@ -6627,9 +6627,9 @@ TyLong_GetInfo(void) * sequence unpacking. Cython and sympy also refer to sys.int_info but only * as info for debugging. No concern about adding these in a backport. */ - PyStructSequence_SET_ITEM(int_info, field++, + TyStructSequence_SET_ITEM(int_info, field++, TyLong_FromLong(_PY_LONG_DEFAULT_MAX_STR_DIGITS)); - PyStructSequence_SET_ITEM(int_info, field++, + TyStructSequence_SET_ITEM(int_info, field++, TyLong_FromLong(_PY_LONG_MAX_STR_DIGITS_THRESHOLD)); if (TyErr_Occurred()) { Ty_CLEAR(int_info); @@ -6642,7 +6642,7 @@ TyLong_GetInfo(void) /* runtime lifecycle */ TyStatus -_TyLong_InitTypes(PyInterpreterState *interp) +_TyLong_InitTypes(TyInterpreterState *interp) { /* initialize int_info */ if (_PyStructSequence_InitBuiltin(interp, &Int_InfoType, @@ -6656,7 +6656,7 @@ _TyLong_InitTypes(PyInterpreterState *interp) void -_TyLong_FiniTypes(PyInterpreterState *interp) +_TyLong_FiniTypes(TyInterpreterState *interp) { _PyStructSequence_FiniBuiltin(interp, &Int_InfoType); } diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c index 8fe9775..7d28927 100644 --- a/Objects/memoryobject.c +++ b/Objects/memoryobject.c @@ -145,7 +145,7 @@ mbuf_clear(TyObject *_self) } TyTypeObject _PyManagedBuffer_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "managedbuffer", sizeof(_PyManagedBufferObject), 0, @@ -3379,36 +3379,36 @@ memory_contiguous(TyObject *_self, void *Py_UNUSED(ignored)) return TyBool_FromLong(MV_ANY_CONTIGUOUS(self->flags)); } -PyDoc_STRVAR(memory_obj_doc, +TyDoc_STRVAR(memory_obj_doc, "The underlying object of the memoryview."); -PyDoc_STRVAR(memory_nbytes_doc, +TyDoc_STRVAR(memory_nbytes_doc, "The amount of space in bytes that the array would use in\n" " a contiguous representation."); -PyDoc_STRVAR(memory_readonly_doc, +TyDoc_STRVAR(memory_readonly_doc, "A bool indicating whether the memory is read only."); -PyDoc_STRVAR(memory_itemsize_doc, +TyDoc_STRVAR(memory_itemsize_doc, "The size in bytes of each element of the memoryview."); -PyDoc_STRVAR(memory_format_doc, +TyDoc_STRVAR(memory_format_doc, "A string containing the format (in struct module style)\n" " for each element in the view."); -PyDoc_STRVAR(memory_ndim_doc, +TyDoc_STRVAR(memory_ndim_doc, "An integer indicating how many dimensions of a multi-dimensional\n" " array the memory represents."); -PyDoc_STRVAR(memory_shape_doc, +TyDoc_STRVAR(memory_shape_doc, "A tuple of ndim integers giving the shape of the memory\n" " as an N-dimensional array."); -PyDoc_STRVAR(memory_strides_doc, +TyDoc_STRVAR(memory_strides_doc, "A tuple of ndim integers giving the size in bytes to access\n" " each element for each dimension of the array."); -PyDoc_STRVAR(memory_suboffsets_doc, +TyDoc_STRVAR(memory_suboffsets_doc, "A tuple of integers used internally for PIL-style arrays."); -PyDoc_STRVAR(memory_c_contiguous_doc, +TyDoc_STRVAR(memory_c_contiguous_doc, "A bool indicating whether the memory is C contiguous."); -PyDoc_STRVAR(memory_f_contiguous_doc, +TyDoc_STRVAR(memory_f_contiguous_doc, "A bool indicating whether the memory is Fortran contiguous."); -PyDoc_STRVAR(memory_contiguous_doc, +TyDoc_STRVAR(memory_contiguous_doc, "A bool indicating whether the memory is contiguous."); -PyDoc_STRVAR(memory_exit_doc, +TyDoc_STRVAR(memory_exit_doc, "__exit__($self, /, *exc_info)\n--\n\n" "Release the underlying buffer exposed by the memoryview object."); @@ -3442,7 +3442,7 @@ static TyMethodDef memory_methods[] = { MEMORYVIEW_INDEX_METHODDEF {"__enter__", memory_enter, METH_NOARGS, NULL}, {"__exit__", memory_exit, METH_VARARGS, memory_exit_doc}, - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} }; @@ -3544,7 +3544,7 @@ memory_iter(TyObject *seq) } TyTypeObject _PyMemoryIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "memory_iterator", .tp_basicsize = sizeof(memoryiterobject), // methods @@ -3557,7 +3557,7 @@ TyTypeObject _PyMemoryIter_Type = { }; TyTypeObject TyMemoryView_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "memoryview", /* tp_name */ offsetof(PyMemoryViewObject, ob_array), /* tp_basicsize */ sizeof(Ty_ssize_t), /* tp_itemsize */ diff --git a/Objects/methodobject.c b/Objects/methodobject.c index a3c9b58..755b904 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -354,7 +354,7 @@ meth_hash(TyObject *self) TyTypeObject PyCFunction_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "builtin_function_or_method", sizeof(PyCFunctionObject), 0, @@ -390,7 +390,7 @@ TyTypeObject PyCFunction_Type = { }; TyTypeObject PyCMethod_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "builtin_method", .tp_basicsize = sizeof(PyCMethodObject), .tp_base = &PyCFunction_Type, diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 1cdf57c..ee45e50 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -5,7 +5,7 @@ #include "pycore_dict.h" // _TyDict_EnablePerThreadRefcounting() #include "pycore_fileutils.h" // _Ty_wgetcwd #include "pycore_import.h" // _TyImport_GetNextModuleIndex() -#include "pycore_interp.h" // PyInterpreterState.importlib +#include "pycore_interp.h" // TyInterpreterState.importlib #include "pycore_long.h" // _TyLong_GetOne() #include "pycore_modsupport.h" // _TyModule_CreateInitialized() #include "pycore_moduleobject.h" // _TyModule_GetDef() @@ -30,7 +30,7 @@ static TyMemberDef module_members[] = { TyTypeObject PyModuleDef_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "moduledef", /* tp_name */ sizeof(TyModuleDef), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -279,7 +279,7 @@ TyModule_FromDefAndSpec2(TyModuleDef* def, TyObject *spec, int module_api_versio int has_execution_slots = 0; const char *name; int ret; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyModuleDef_Init(def); @@ -848,7 +848,7 @@ static TyObject * module_repr(TyObject *self) { PyModuleObject *m = _TyModule_CAST(self); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return _TyImport_ImportlibModuleRepr(interp, (TyObject *)m); } @@ -1210,7 +1210,7 @@ module_dir(TyObject *self, TyObject *args) static TyMethodDef module_methods[] = { {"__dir__", module_dir, METH_NOARGS, - PyDoc_STR("__dir__() -> list\nspecialized dir() implementation")}, + TyDoc_STR("__dir__() -> list\nspecialized dir() implementation")}, {0} }; @@ -1397,7 +1397,7 @@ static TyGetSetDef module_getsets[] = { }; TyTypeObject TyModule_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "module", /* tp_name */ sizeof(PyModuleObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/namespaceobject.c b/Objects/namespaceobject.c index 7f5585d..48f8981 100644 --- a/Objects/namespaceobject.c +++ b/Objects/namespaceobject.c @@ -202,7 +202,7 @@ namespace_richcompare(TyObject *self, TyObject *other, int op) } -PyDoc_STRVAR(namespace_reduce__doc__, "Return state information for pickling"); +TyDoc_STRVAR(namespace_reduce__doc__, "Return state information for pickling"); static TyObject * namespace_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -250,19 +250,19 @@ static TyMethodDef namespace_methods[] = { {"__reduce__", namespace_reduce, METH_NOARGS, namespace_reduce__doc__}, {"__replace__", _PyCFunction_CAST(namespace_replace), METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("__replace__($self, /, **changes)\n--\n\n" + TyDoc_STR("__replace__($self, /, **changes)\n--\n\n" "Return a copy of the namespace object with new values for the specified attributes.")}, {NULL, NULL} // sentinel }; -PyDoc_STRVAR(namespace_doc, +TyDoc_STRVAR(namespace_doc, "SimpleNamespace(mapping_or_iterable=(), /, **kwargs)\n\ --\n\n\ A simple attribute-based namespace."); TyTypeObject _PyNamespace_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "types.SimpleNamespace", /* tp_name */ sizeof(_PyNamespaceObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/object.c b/Objects/object.c index 6cac8e0..acc9648 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -111,14 +111,14 @@ _Ty_FinalizeRefTotal(_PyRuntimeState *runtime) } void -_TyInterpreterState_FinalizeRefTotal(PyInterpreterState *interp) +_TyInterpreterState_FinalizeRefTotal(TyInterpreterState *interp) { interp->runtime->object_state.interpreter_leaks += REFTOTAL(interp); REFTOTAL(interp) = 0; } static inline Ty_ssize_t -get_reftotal(PyInterpreterState *interp) +get_reftotal(TyInterpreterState *interp) { /* For a single interpreter, we ignore the legacy _Ty_RefTotal, since we can't determine which interpreter updated it. */ @@ -140,7 +140,7 @@ get_global_reftotal(_PyRuntimeState *runtime) /* Add up the total from each interpreter. */ HEAD_LOCK(&_PyRuntime); - PyInterpreterState *interp = TyInterpreterState_Head(); + TyInterpreterState *interp = TyInterpreterState_Head(); for (; interp != NULL; interp = TyInterpreterState_Next(interp)) { total += get_reftotal(interp); } @@ -177,7 +177,7 @@ _PyDebug_PrintTotalRefs(void) { #define REFCHAIN_VALUE ((void*)(uintptr_t)1) static inline int -has_own_refchain(PyInterpreterState *interp) +has_own_refchain(TyInterpreterState *interp) { if (interp->feature_flags & Ty_RTFLAGS_USE_MAIN_OBMALLOC) { return (_Ty_IsMainInterpreter(interp) @@ -187,7 +187,7 @@ has_own_refchain(PyInterpreterState *interp) } static int -refchain_init(PyInterpreterState *interp) +refchain_init(TyInterpreterState *interp) { if (!has_own_refchain(interp)) { // Legacy subinterpreters share a refchain with the main interpreter. @@ -210,7 +210,7 @@ refchain_init(PyInterpreterState *interp) } static void -refchain_fini(PyInterpreterState *interp) +refchain_fini(TyInterpreterState *interp) { if (has_own_refchain(interp) && REFCHAIN(interp) != NULL) { _Ty_hashtable_destroy(REFCHAIN(interp)); @@ -219,14 +219,14 @@ refchain_fini(PyInterpreterState *interp) } bool -_PyRefchain_IsTraced(PyInterpreterState *interp, TyObject *obj) +_PyRefchain_IsTraced(TyInterpreterState *interp, TyObject *obj) { return (_Ty_hashtable_get(REFCHAIN(interp), obj) == REFCHAIN_VALUE); } static void -_PyRefchain_Trace(PyInterpreterState *interp, TyObject *obj) +_PyRefchain_Trace(TyInterpreterState *interp, TyObject *obj) { if (_Ty_hashtable_set(REFCHAIN(interp), obj, REFCHAIN_VALUE) < 0) { // Use a fatal error because _Ty_NewReference() cannot report @@ -237,7 +237,7 @@ _PyRefchain_Trace(PyInterpreterState *interp, TyObject *obj) static void -_PyRefchain_Remove(PyInterpreterState *interp, TyObject *obj) +_PyRefchain_Remove(TyInterpreterState *interp, TyObject *obj) { void *value = _Ty_hashtable_steal(REFCHAIN(interp), obj); #ifndef NDEBUG @@ -257,7 +257,7 @@ _PyRefchain_Remove(PyInterpreterState *interp, TyObject *obj) void _Ty_AddToAllObjects(TyObject *op) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (!_PyRefchain_IsTraced(interp, op)) { _PyRefchain_Trace(interp, op); } @@ -320,7 +320,7 @@ _Ty_GetLegacyRefTotal(void) } Ty_ssize_t -_TyInterpreterState_GetRefTotal(PyInterpreterState *interp) +_TyInterpreterState_GetRefTotal(TyInterpreterState *interp) { HEAD_LOCK(&_PyRuntime); Ty_ssize_t total = get_reftotal(interp); @@ -1447,7 +1447,7 @@ PyObject_SetAttr(TyObject *v, TyObject *name, TyObject *value) } Ty_INCREF(name); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternMortal(interp, &name); if (tp->tp_setattro != NULL) { err = (*tp->tp_setattro)(v, name, value); @@ -2133,13 +2133,13 @@ static PyNumberMethods none_as_number = { 0, /* nb_index */ }; -PyDoc_STRVAR(none_doc, +TyDoc_STRVAR(none_doc, "NoneType()\n" "--\n\n" "The type of the None singleton."); TyTypeObject _PyNone_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "NoneType", 0, 0, @@ -2233,13 +2233,13 @@ static PyNumberMethods notimplemented_as_number = { .nb_bool = notimplemented_bool, }; -PyDoc_STRVAR(notimplemented_doc, +TyDoc_STRVAR(notimplemented_doc, "NotImplementedType()\n" "--\n\n" "The type of the NotImplemented singleton."); TyTypeObject _PyNotImplemented_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "NotImplementedType", 0, 0, @@ -2283,7 +2283,7 @@ TyObject _Ty_NotImplementedStruct = _TyObject_HEAD_INIT(&_PyNotImplemented_Type) TyStatus -_TyObject_InitState(PyInterpreterState *interp) +_TyObject_InitState(TyInterpreterState *interp) { #ifdef Ty_TRACE_REFS if (refchain_init(interp) < 0) { @@ -2294,7 +2294,7 @@ _TyObject_InitState(PyInterpreterState *interp) } void -_TyObject_FiniState(PyInterpreterState *interp) +_TyObject_FiniState(TyInterpreterState *interp) { #ifdef Ty_TRACE_REFS refchain_fini(interp); @@ -2440,7 +2440,7 @@ static TyTypeObject* static_types[] = { TyStatus -_PyTypes_InitTypes(PyInterpreterState *interp) +_PyTypes_InitTypes(TyInterpreterState *interp) { // All other static types (unless initialized elsewhere) for (size_t i=0; i < Ty_ARRAY_LENGTH(static_types); i++) { @@ -2479,7 +2479,7 @@ _PyTypes_InitTypes(PyInterpreterState *interp) // subclasses are not cleared properly. Leave the static type unchanged in this // case. void -_PyTypes_FiniTypes(PyInterpreterState *interp) +_PyTypes_FiniTypes(TyInterpreterState *interp) { // Deallocate types in the reverse order to deallocate subclasses before // their base classes. @@ -2668,7 +2668,7 @@ _Ty_ForgetReference(TyObject *op) _TyObject_ASSERT_FAILED_MSG(op, "negative refcnt"); } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); #ifdef SLOW_UNREF_CHECK if (!_PyRefchain_Get(interp, op)) { @@ -2704,7 +2704,7 @@ _Ty_PrintReference(_Ty_hashtable_t *ht, * interpreter must be in a healthy state. */ void -_Ty_PrintReferences(PyInterpreterState *interp, FILE *fp) +_Ty_PrintReferences(TyInterpreterState *interp, FILE *fp) { if (interp == NULL) { interp = _TyInterpreterState_Main(); @@ -2735,7 +2735,7 @@ _Ty_PrintReferenceAddress(_Ty_hashtable_t *ht, // The call in Ty_FinalizeEx() is okay since the main interpreter // is statically allocated. void -_Ty_PrintReferenceAddresses(PyInterpreterState *interp, FILE *fp) +_Ty_PrintReferenceAddresses(TyInterpreterState *interp, FILE *fp) { fprintf(fp, "Remaining object addresses:\n"); _Ty_hashtable_foreach(REFCHAIN(interp), _Ty_PrintReferenceAddress, fp); @@ -2816,7 +2816,7 @@ _Ty_GetObjects(TyObject *self, TyObject *args) .type = type, .limit = limit, }; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int res = _Ty_hashtable_foreach(REFCHAIN(interp), _Ty_GetObject, &data); if (res == _PY_GETOBJECTS_ERROR) { Ty_DECREF(list); diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index b4abd39..583f318 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -1217,7 +1217,7 @@ free_delayed(uintptr_t ptr, size_t size) #ifndef Ty_GIL_DISABLED free_work_item(ptr, NULL, NULL); #else - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_TyInterpreterState_GetFinalizing(interp) != NULL || interp->stoptheworld.world_stopped) { @@ -1381,7 +1381,7 @@ maybe_process_interp_queue(struct _Ty_mem_interp_free_queue *queue, void _TyMem_ProcessDelayed(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; _PyThreadStateImpl *tstate_impl = (_PyThreadStateImpl *)tstate; tstate_impl->qsbr->should_process = false; @@ -1396,7 +1396,7 @@ _TyMem_ProcessDelayed(TyThreadState *tstate) void _TyMem_ProcessDelayedNoDealloc(TyThreadState *tstate, delayed_dealloc_cb cb, void *state) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; _PyThreadStateImpl *tstate_impl = (_PyThreadStateImpl *)tstate; // Process thread-local work @@ -1409,7 +1409,7 @@ _TyMem_ProcessDelayedNoDealloc(TyThreadState *tstate, delayed_dealloc_cb cb, voi void _TyMem_AbandonDelayed(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; struct llist_node *queue = &((_PyThreadStateImpl *)tstate)->mem_free_queue; if (llist_empty(queue)) { @@ -1440,7 +1440,7 @@ _TyMem_AbandonDelayed(TyThreadState *tstate) } void -_TyMem_FiniDelayed(PyInterpreterState *interp) +_TyMem_FiniDelayed(TyInterpreterState *interp) { struct llist_node *head = &interp->mem_free_queue.head; while (!llist_empty(head)) { @@ -1537,7 +1537,7 @@ static struct _obmalloc_state obmalloc_state_main; static bool obmalloc_state_initialized; static inline int -has_own_state(PyInterpreterState *interp) +has_own_state(TyInterpreterState *interp) { return (_Ty_IsMainInterpreter(interp) || !(interp->feature_flags & Ty_RTFLAGS_USE_MAIN_OBMALLOC) || @@ -1547,7 +1547,7 @@ has_own_state(PyInterpreterState *interp) static inline OMState * get_state(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->obmalloc != NULL); // otherwise not initialized or freed return interp->obmalloc; } @@ -1574,7 +1574,7 @@ static bool count_blocks( } static Ty_ssize_t -get_mimalloc_allocated_blocks(PyInterpreterState *interp) +get_mimalloc_allocated_blocks(TyInterpreterState *interp) { size_t allocated_blocks = 0; #ifdef Ty_GIL_DISABLED @@ -1601,7 +1601,7 @@ get_mimalloc_allocated_blocks(PyInterpreterState *interp) #endif Ty_ssize_t -_TyInterpreterState_GetAllocatedBlocks(PyInterpreterState *interp) +_TyInterpreterState_GetAllocatedBlocks(TyInterpreterState *interp) { #ifdef WITH_MIMALLOC if (_TyMem_MimallocEnabled()) { @@ -1643,10 +1643,10 @@ _TyInterpreterState_GetAllocatedBlocks(PyInterpreterState *interp) return n; } -static void free_obmalloc_arenas(PyInterpreterState *interp); +static void free_obmalloc_arenas(TyInterpreterState *interp); void -_TyInterpreterState_FinalizeAllocatedBlocks(PyInterpreterState *interp) +_TyInterpreterState_FinalizeAllocatedBlocks(TyInterpreterState *interp) { #ifdef WITH_MIMALLOC if (_TyMem_MimallocEnabled()) { @@ -1692,7 +1692,7 @@ get_num_global_allocated_blocks(_PyRuntimeState *runtime) { Ty_ssize_t total = 0; if (_PyRuntimeState_GetFinalizing(runtime) != NULL) { - PyInterpreterState *interp = _TyInterpreterState_Main(); + TyInterpreterState *interp = _TyInterpreterState_Main(); if (interp == NULL) { /* We are at the very end of runtime finalization. We can't rely on finalizing->interp since that thread @@ -1710,7 +1710,7 @@ get_num_global_allocated_blocks(_PyRuntimeState *runtime) else { _TyEval_StopTheWorldAll(&_PyRuntime); HEAD_LOCK(runtime); - PyInterpreterState *interp = TyInterpreterState_Head(); + TyInterpreterState *interp = TyInterpreterState_Head(); assert(interp != NULL); #ifdef Ty_DEBUG int got_main = 0; @@ -2700,7 +2700,7 @@ _TyObject_Realloc(void *ctx, void *ptr, size_t nbytes) * only be used by extensions that are compiled with pymalloc enabled. */ Ty_ssize_t -_TyInterpreterState_GetAllocatedBlocks(PyInterpreterState *Py_UNUSED(interp)) +_TyInterpreterState_GetAllocatedBlocks(TyInterpreterState *Py_UNUSED(interp)) { return 0; } @@ -2712,7 +2712,7 @@ _Ty_GetGlobalAllocatedBlocks(void) } void -_TyInterpreterState_FinalizeAllocatedBlocks(PyInterpreterState *Py_UNUSED(interp)) +_TyInterpreterState_FinalizeAllocatedBlocks(TyInterpreterState *Py_UNUSED(interp)) { return; } @@ -3308,7 +3308,7 @@ _PyDebugAllocatorStats(FILE *out, // memory is for the arena_map_top array. Since normally only one entry // of that array is used, only one page of resident memory is actually // used, rather than the full 256 kB. -bool _TyMem_obmalloc_state_on_heap(PyInterpreterState *interp) +bool _TyMem_obmalloc_state_on_heap(TyInterpreterState *interp) { #if WITH_PYMALLOC return interp->obmalloc && interp->obmalloc != &obmalloc_state_main; @@ -3319,7 +3319,7 @@ bool _TyMem_obmalloc_state_on_heap(PyInterpreterState *interp) #ifdef WITH_PYMALLOC static void -init_obmalloc_pools(PyInterpreterState *interp) +init_obmalloc_pools(TyInterpreterState *interp) { // initialize the obmalloc->pools structure. This must be done // before the obmalloc alloc/free functions can be called. @@ -3329,7 +3329,7 @@ init_obmalloc_pools(PyInterpreterState *interp) } #endif /* WITH_PYMALLOC */ -int _TyMem_init_obmalloc(PyInterpreterState *interp) +int _TyMem_init_obmalloc(TyInterpreterState *interp) { #ifdef WITH_PYMALLOC /* Initialize obmalloc, but only for subinterpreters, @@ -3357,7 +3357,7 @@ int _TyMem_init_obmalloc(PyInterpreterState *interp) #ifdef WITH_PYMALLOC static void -free_obmalloc_arenas(PyInterpreterState *interp) +free_obmalloc_arenas(TyInterpreterState *interp) { OMState *state = interp->obmalloc; for (uint i = 0; i < maxarenas; ++i) { diff --git a/Objects/odictobject.c b/Objects/odictobject.c index ac1b2bc..91a13bd 100644 --- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -954,7 +954,7 @@ OrderedDict_fromkeys_impl(TyTypeObject *type, TyObject *seq, TyObject *value) /* __sizeof__() */ /* OrderedDict.__sizeof__() does not have a docstring. */ -PyDoc_STRVAR(odict_sizeof__doc__, ""); +TyDoc_STRVAR(odict_sizeof__doc__, ""); static TyObject * odict_sizeof(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -970,7 +970,7 @@ odict_sizeof(TyObject *op, TyObject *Py_UNUSED(ignored)) /* __reduce__() */ -PyDoc_STRVAR(odict_reduce__doc__, "Return state information for pickling"); +TyDoc_STRVAR(odict_reduce__doc__, "Return state information for pickling"); static TyObject * odict_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -1164,28 +1164,28 @@ OrderedDict_popitem_impl(PyODictObject *self, int last) /* keys() */ /* MutableMapping.keys() does not have a docstring. */ -PyDoc_STRVAR(odict_keys__doc__, ""); +TyDoc_STRVAR(odict_keys__doc__, ""); static TyObject * odictkeys_new(TyObject *od, TyObject *Py_UNUSED(ignored)); /* forward */ /* values() */ /* MutableMapping.values() does not have a docstring. */ -PyDoc_STRVAR(odict_values__doc__, ""); +TyDoc_STRVAR(odict_values__doc__, ""); static TyObject * odictvalues_new(TyObject *od, TyObject *Py_UNUSED(ignored)); /* forward */ /* items() */ /* MutableMapping.items() does not have a docstring. */ -PyDoc_STRVAR(odict_items__doc__, ""); +TyDoc_STRVAR(odict_items__doc__, ""); static TyObject * odictitems_new(TyObject *od, TyObject *Py_UNUSED(ignored)); /* forward */ /* update() */ /* MutableMapping.update() does not have a docstring. */ -PyDoc_STRVAR(odict_update__doc__, ""); +TyDoc_STRVAR(odict_update__doc__, ""); /* forward */ static TyObject * mutablemapping_update(TyObject *, TyObject *, TyObject *); @@ -1194,7 +1194,7 @@ static TyObject * mutablemapping_update(TyObject *, TyObject *, TyObject *); /* clear() */ -PyDoc_STRVAR(odict_clear__doc__, +TyDoc_STRVAR(odict_clear__doc__, "od.clear() -> None. Remove all items from od."); static TyObject * @@ -1212,7 +1212,7 @@ odict_clear(TyObject *op, TyObject *Py_UNUSED(ignored)) static int _PyODict_SetItem_KnownHash(TyObject *, TyObject *, TyObject *, Ty_hash_t); -PyDoc_STRVAR(odict_copy__doc__, "od.copy() -> a shallow copy of od"); +TyDoc_STRVAR(odict_copy__doc__, "od.copy() -> a shallow copy of od"); static TyObject * odict_copy(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -1265,7 +1265,7 @@ fail: /* __reversed__() */ -PyDoc_STRVAR(odict_reversed__doc__, "od.__reversed__() <==> reversed(od)"); +TyDoc_STRVAR(odict_reversed__doc__, "od.__reversed__() <==> reversed(od)"); #define _odict_ITER_REVERSED 1 #define _odict_ITER_KEYS 2 @@ -1432,7 +1432,7 @@ Done: /* tp_doc */ -PyDoc_STRVAR(odict_doc, +TyDoc_STRVAR(odict_doc, "Dictionary that remembers insertion order"); /* tp_traverse */ @@ -1535,7 +1535,7 @@ odict_init(TyObject *self, TyObject *args, TyObject *kwds) /* PyODict_Type */ TyTypeObject PyODict_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "collections.OrderedDict", /* tp_name */ sizeof(PyODictObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1783,7 +1783,7 @@ done: /* No need for tp_clear because odictiterobject is not mutable. */ -PyDoc_STRVAR(reduce_doc, "Return state information for pickling"); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling"); static TyObject * odictiter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -1811,7 +1811,7 @@ static TyMethodDef odictiter_methods[] = { }; TyTypeObject PyODictIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "odict_iterator", /* tp_name */ sizeof(odictiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1906,7 +1906,7 @@ static TyMethodDef odictkeys_methods[] = { }; TyTypeObject PyODictKeys_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "odict_keys", /* tp_name */ 0, /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1975,7 +1975,7 @@ static TyMethodDef odictitems_methods[] = { }; TyTypeObject PyODictItems_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "odict_items", /* tp_name */ 0, /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2044,7 +2044,7 @@ static TyMethodDef odictvalues_methods[] = { }; TyTypeObject PyODictValues_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "odict_values", /* tp_name */ 0, /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/picklebufobject.c b/Objects/picklebufobject.c index 5ae9d28..8c43be7 100644 --- a/Objects/picklebufobject.c +++ b/Objects/picklebufobject.c @@ -183,7 +183,7 @@ picklebuf_raw(TyObject *op, TyObject *Py_UNUSED(ignored)) return m; } -PyDoc_STRVAR(picklebuf_raw_doc, +TyDoc_STRVAR(picklebuf_raw_doc, "raw($self, /)\n--\n\ \n\ Return a memoryview of the raw memory underlying this buffer.\n\ @@ -197,7 +197,7 @@ picklebuf_release(TyObject *op, TyObject *Py_UNUSED(ignored)) Py_RETURN_NONE; } -PyDoc_STRVAR(picklebuf_release_doc, +TyDoc_STRVAR(picklebuf_release_doc, "release($self, /)\n--\n\ \n\ Release the underlying buffer exposed by the PickleBuffer object."); @@ -209,9 +209,9 @@ static TyMethodDef picklebuf_methods[] = { }; TyTypeObject PyPickleBuffer_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "pickle.PickleBuffer", - .tp_doc = PyDoc_STR("Wrapper for potentially out-of-band buffers"), + .tp_doc = TyDoc_STR("Wrapper for potentially out-of-band buffers"), .tp_basicsize = sizeof(PyPickleBufferObject), .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_HAVE_GC, .tp_new = picklebuf_new, diff --git a/Objects/rangeobject.c b/Objects/rangeobject.c index 0b30fea..b46fa9c 100644 --- a/Objects/rangeobject.c +++ b/Objects/rangeobject.c @@ -156,7 +156,7 @@ range_vectorcall(TyObject *rangetype, TyObject *const *args, return range_from_array((TyTypeObject *)rangetype, args, nargs); } -PyDoc_STRVAR(range_doc, +TyDoc_STRVAR(range_doc, "range(stop) -> range object\n\ range(start, stop[, step]) -> range object\n\ \n\ @@ -753,13 +753,13 @@ static PyNumberMethods range_as_number = { static TyObject * range_iter(TyObject *seq); static TyObject * range_reverse(TyObject *seq, TyObject *Py_UNUSED(ignored)); -PyDoc_STRVAR(reverse_doc, +TyDoc_STRVAR(reverse_doc, "Return a reverse iterator."); -PyDoc_STRVAR(count_doc, +TyDoc_STRVAR(count_doc, "rangeobject.count(value) -> integer -- return number of occurrences of value"); -PyDoc_STRVAR(index_doc, +TyDoc_STRVAR(index_doc, "rangeobject.index(value) -> integer -- return index of value.\n" "Raise ValueError if the value is not present."); @@ -779,7 +779,7 @@ static TyMemberDef range_members[] = { }; TyTypeObject TyRange_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "range", /* Name of this type */ sizeof(rangeobject), /* Basic object size */ 0, /* Item size for varobject */ @@ -847,7 +847,7 @@ rangeiter_len(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromLong(r->len); } -PyDoc_STRVAR(length_hint_doc, +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * @@ -904,8 +904,8 @@ rangeiter_dealloc(TyObject *self) _Ty_FREELIST_FREE(range_iters, (_PyRangeIterObject *)self, PyObject_Free); } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef rangeiter_methods[] = { {"__length_hint__", rangeiter_len, METH_NOARGS, length_hint_doc}, @@ -915,7 +915,7 @@ static TyMethodDef rangeiter_methods[] = { }; TyTypeObject PyRangeIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "range_iterator", /* tp_name */ sizeof(_PyRangeIterObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1119,7 +1119,7 @@ longrangeiter_next(TyObject *op) } TyTypeObject PyLongRangeIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "longrange_iterator", /* tp_name */ sizeof(longrangeiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/setobject.c b/Objects/setobject.c index 5c980bb..6a078c6 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -858,7 +858,7 @@ setiter_len(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromSsize_t(len); } -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * setiter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -878,7 +878,7 @@ setiter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) return Ty_BuildValue("N(N)", _TyEval_GetBuiltin(&_Ty_ID(iter)), list); } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyMethodDef setiter_methods[] = { {"__length_hint__", setiter_len, METH_NOARGS, length_hint_doc}, @@ -930,7 +930,7 @@ static TyObject *setiter_iternext(TyObject *self) } TyTypeObject PySetIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "set_iterator", /* tp_name */ sizeof(setiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2502,7 +2502,7 @@ static TyMethodDef set_methods[] = { SET_SYMMETRIC_DIFFERENCE_UPDATE_METHODDEF SET_UNION_METHODDEF SET_UPDATE_METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -2538,14 +2538,14 @@ static PyNumberMethods set_as_number = { set_ior, /*nb_inplace_or*/ }; -PyDoc_STRVAR(set_doc, +TyDoc_STRVAR(set_doc, "set(iterable=(), /)\n\ --\n\ \n\ Build an unordered collection of unique elements."); TyTypeObject TySet_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "set", /* tp_name */ sizeof(PySetObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2606,7 +2606,7 @@ static TyMethodDef frozenset_methods[] = { SET___SIZEOF___METHODDEF SET_SYMMETRIC_DIFFERENCE_METHODDEF SET_UNION_METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -2629,14 +2629,14 @@ static PyNumberMethods frozenset_as_number = { set_or, /*nb_or*/ }; -PyDoc_STRVAR(frozenset_doc, +TyDoc_STRVAR(frozenset_doc, "frozenset(iterable=(), /)\n\ --\n\ \n\ Build an immutable unordered collection of unique elements."); TyTypeObject TyFrozenSet_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "frozenset", /* tp_name */ sizeof(PySetObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -2841,7 +2841,7 @@ dummy_dealloc(TyObject* ignore) } static TyTypeObject _PySetDummy_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) " type", 0, 0, diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c index 16944dd..74a6061 100644 --- a/Objects/sliceobject.c +++ b/Objects/sliceobject.c @@ -61,13 +61,13 @@ static TyMethodDef ellipsis_methods[] = { {NULL, NULL} }; -PyDoc_STRVAR(ellipsis_doc, +TyDoc_STRVAR(ellipsis_doc, "ellipsis()\n" "--\n\n" "The type of the Ellipsis singleton."); TyTypeObject PyEllipsis_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "ellipsis", /* tp_name */ 0, /* tp_basicsize */ 0, /* tp_itemsize */ @@ -337,7 +337,7 @@ slice_new(TyTypeObject *type, TyObject *args, TyObject *kw) return TySlice_New(start, stop, step); } -PyDoc_STRVAR(slice_doc, +TyDoc_STRVAR(slice_doc, "slice(stop)\n\ slice(start, stop[, step])\n\ \n\ @@ -549,7 +549,7 @@ slice_indices(TyObject *op, TyObject* len) return Ty_BuildValue("(NNN)", start, stop, step); } -PyDoc_STRVAR(slice_indices_doc, +TyDoc_STRVAR(slice_indices_doc, "S.indices(len) -> (start, stop, stride)\n\ \n\ Assuming a sequence of length len, calculate the start and stop\n\ @@ -564,7 +564,7 @@ slice_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) return Ty_BuildValue("O(OOO)", Ty_TYPE(self), self->start, self->stop, self->step); } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyMethodDef slice_methods[] = { {"indices", slice_indices, METH_O, slice_indices_doc}, @@ -667,7 +667,7 @@ slice_hash(TyObject *op) } TyTypeObject TySlice_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "slice", /* Name of this type */ sizeof(PySliceObject), /* Basic object size */ 0, /* Item size for varobject */ diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h index 1fb153b..f479c97 100644 --- a/Objects/stringlib/clinic/transmogrify.h.h +++ b/Objects/stringlib/clinic/transmogrify.h.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(stringlib_expandtabs__doc__, +TyDoc_STRVAR(stringlib_expandtabs__doc__, "expandtabs($self, /, tabsize=8)\n" "--\n" "\n" @@ -36,7 +36,7 @@ stringlib_expandtabs(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(tabsize), }, }; @@ -77,7 +77,7 @@ exit: return return_value; } -PyDoc_STRVAR(stringlib_ljust__doc__, +TyDoc_STRVAR(stringlib_ljust__doc__, "ljust($self, width, fillchar=b\' \', /)\n" "--\n" "\n" @@ -147,7 +147,7 @@ exit: return return_value; } -PyDoc_STRVAR(stringlib_rjust__doc__, +TyDoc_STRVAR(stringlib_rjust__doc__, "rjust($self, width, fillchar=b\' \', /)\n" "--\n" "\n" @@ -217,7 +217,7 @@ exit: return return_value; } -PyDoc_STRVAR(stringlib_center__doc__, +TyDoc_STRVAR(stringlib_center__doc__, "center($self, width, fillchar=b\' \', /)\n" "--\n" "\n" @@ -287,7 +287,7 @@ exit: return return_value; } -PyDoc_STRVAR(stringlib_zfill__doc__, +TyDoc_STRVAR(stringlib_zfill__doc__, "zfill($self, width, /)\n" "--\n" "\n" diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h index caeebad..003bec3 100644 --- a/Objects/stringlib/unicode_format.h +++ b/Objects/stringlib/unicode_format.h @@ -1063,7 +1063,7 @@ static TyMethodDef formatteriter_methods[] = { }; static TyTypeObject PyFormatterIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "formatteriterator", /* tp_name */ sizeof(formatteriterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1197,7 +1197,7 @@ static TyMethodDef fieldnameiter_methods[] = { }; static TyTypeObject PyFieldNameIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "fieldnameiterator", /* tp_name */ sizeof(fieldnameiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/structseq.c b/Objects/structseq.c index 4b36762..28d08a9 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -11,7 +11,7 @@ #include "pycore_initconfig.h" // _TyStatus_OK() #include "pycore_modsupport.h" // _TyArg_NoPositional() #include "pycore_object.h" // _TyObject_GC_TRACK() -#include "pycore_structseq.h" // PyStructSequence_InitType() +#include "pycore_structseq.h" // TyStructSequence_InitType() #include "pycore_tuple.h" // _TyTuple_FromArray() #include "pycore_typeobject.h" // _PyStaticType_FiniBuiltin() @@ -22,7 +22,7 @@ static const char match_args_key[] = "__match_args__"; /* Fields with this name have only a field index, not a field name. They are only allowed for indices < n_visible_fields. */ -const char * const PyStructSequence_UnnamedField = "unnamed field"; +const char * const TyStructSequence_UnnamedField = "unnamed field"; static Ty_ssize_t get_type_attr_as_size(TyTypeObject *tp, TyObject *name) @@ -58,7 +58,7 @@ get_real_size(TyObject *op) } TyObject * -PyStructSequence_New(TyTypeObject *type) +TyStructSequence_New(TyTypeObject *type) { PyStructSequence *obj; Ty_ssize_t size = REAL_SIZE_TP(type), i; @@ -84,7 +84,7 @@ PyStructSequence_New(TyTypeObject *type) } void -PyStructSequence_SetItem(TyObject *op, Ty_ssize_t index, TyObject *value) +TyStructSequence_SetItem(TyObject *op, Ty_ssize_t index, TyObject *value) { PyTupleObject *tuple = _TyTuple_CAST(op); assert(0 <= index); @@ -97,7 +97,7 @@ PyStructSequence_SetItem(TyObject *op, Ty_ssize_t index, TyObject *value) } TyObject* -PyStructSequence_GetItem(TyObject *op, Ty_ssize_t index) +TyStructSequence_GetItem(TyObject *op, Ty_ssize_t index) { assert(0 <= index); #ifndef NDEBUG @@ -221,7 +221,7 @@ structseq_new_impl(TyTypeObject *type, TyObject *arg, TyObject *dict) } } - res = (PyStructSequence*) PyStructSequence_New(type); + res = (PyStructSequence*) TyStructSequence_New(type); if (res == NULL) { Ty_DECREF(arg); return NULL; @@ -316,7 +316,7 @@ structseq_repr(TyObject *op) if (PyUnicodeWriter_WriteChar(writer, '=') < 0) { goto error; } - TyObject *value = PyStructSequence_GetItem((TyObject*)obj, i); + TyObject *value = TyStructSequence_GetItem((TyObject*)obj, i); assert(value != NULL); if (PyUnicodeWriter_WriteRepr(writer, value) < 0) { goto error; @@ -408,7 +408,7 @@ structseq_replace(TyObject *op, TyObject *args, TyObject *kwargs) return NULL; } - result = (PyStructSequence *) PyStructSequence_New(Ty_TYPE(self)); + result = (PyStructSequence *) TyStructSequence_New(Ty_TYPE(self)); if (!result) { return NULL; } @@ -455,18 +455,18 @@ error: static TyMethodDef structseq_methods[] = { {"__reduce__", structseq_reduce, METH_NOARGS, NULL}, {"__replace__", _PyCFunction_CAST(structseq_replace), METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("__replace__($self, /, **changes)\n--\n\n" + TyDoc_STR("__replace__($self, /, **changes)\n--\n\n" "Return a copy of the structure with new values for the specified fields.")}, {NULL, NULL} // sentinel }; static Ty_ssize_t -count_members(PyStructSequence_Desc *desc, Ty_ssize_t *n_unnamed_members) { +count_members(TyStructSequence_Desc *desc, Ty_ssize_t *n_unnamed_members) { Ty_ssize_t i; *n_unnamed_members = 0; for (i = 0; desc->fields[i].name != NULL; ++i) { - if (desc->fields[i].name == PyStructSequence_UnnamedField) { + if (desc->fields[i].name == TyStructSequence_UnnamedField) { (*n_unnamed_members)++; } } @@ -474,7 +474,7 @@ count_members(PyStructSequence_Desc *desc, Ty_ssize_t *n_unnamed_members) { } static int -initialize_structseq_dict(PyStructSequence_Desc *desc, TyObject* dict, +initialize_structseq_dict(TyStructSequence_Desc *desc, TyObject* dict, Ty_ssize_t n_members, Ty_ssize_t n_unnamed_members) { TyObject *v; @@ -503,7 +503,7 @@ initialize_structseq_dict(PyStructSequence_Desc *desc, TyObject* dict, } for (i = k = 0; i < desc->n_in_sequence; ++i) { - if (desc->fields[i].name == PyStructSequence_UnnamedField) { + if (desc->fields[i].name == TyStructSequence_UnnamedField) { continue; } TyObject* new_member = TyUnicode_FromString(desc->fields[i].name); @@ -531,7 +531,7 @@ error: } static TyMemberDef * -initialize_members(PyStructSequence_Desc *desc, +initialize_members(TyStructSequence_Desc *desc, Ty_ssize_t n_members, Ty_ssize_t n_unnamed_members) { TyMemberDef *members; @@ -544,7 +544,7 @@ initialize_members(PyStructSequence_Desc *desc, Ty_ssize_t i, k; for (i = k = 0; i < n_members; ++i) { - if (desc->fields[i].name == PyStructSequence_UnnamedField) { + if (desc->fields[i].name == TyStructSequence_UnnamedField) { continue; } @@ -565,7 +565,7 @@ initialize_members(PyStructSequence_Desc *desc, static void -initialize_static_fields(TyTypeObject *type, PyStructSequence_Desc *desc, +initialize_static_fields(TyTypeObject *type, TyStructSequence_Desc *desc, TyMemberDef *tp_members, Ty_ssize_t n_members, unsigned long tp_flags) { @@ -587,7 +587,7 @@ initialize_static_fields(TyTypeObject *type, PyStructSequence_Desc *desc, } static int -initialize_static_type(TyTypeObject *type, PyStructSequence_Desc *desc, +initialize_static_type(TyTypeObject *type, TyStructSequence_Desc *desc, Ty_ssize_t n_members, Ty_ssize_t n_unnamed_members) { /* initialize_static_fields() should have been called already. */ if (TyType_Ready(type) < 0) { @@ -605,9 +605,9 @@ initialize_static_type(TyTypeObject *type, PyStructSequence_Desc *desc, } int -_PyStructSequence_InitBuiltinWithFlags(PyInterpreterState *interp, +_PyStructSequence_InitBuiltinWithFlags(TyInterpreterState *interp, TyTypeObject *type, - PyStructSequence_Desc *desc, + TyStructSequence_Desc *desc, unsigned long tp_flags) { if (Ty_TYPE(type) == NULL) { @@ -664,7 +664,7 @@ error: } int -PyStructSequence_InitType2(TyTypeObject *type, PyStructSequence_Desc *desc) +TyStructSequence_InitType2(TyTypeObject *type, TyStructSequence_Desc *desc) { TyMemberDef *members; Ty_ssize_t n_members, n_unnamed_members; @@ -672,7 +672,7 @@ PyStructSequence_InitType2(TyTypeObject *type, PyStructSequence_Desc *desc) #ifdef Ty_TRACE_REFS /* if the type object was traced, remove it first before overwriting its storage */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_PyRefchain_IsTraced(interp, (TyObject *)type)) { _Ty_ForgetReference((TyObject *)type); } @@ -698,9 +698,9 @@ PyStructSequence_InitType2(TyTypeObject *type, PyStructSequence_Desc *desc) } void -PyStructSequence_InitType(TyTypeObject *type, PyStructSequence_Desc *desc) +TyStructSequence_InitType(TyTypeObject *type, TyStructSequence_Desc *desc) { - (void)PyStructSequence_InitType2(type, desc); + (void)TyStructSequence_InitType2(type, desc); } @@ -709,7 +709,7 @@ PyStructSequence_InitType(TyTypeObject *type, PyStructSequence_Desc *desc) initialized via _PyStructSequence_InitBuiltinWithFlags(). */ void -_PyStructSequence_FiniBuiltin(PyInterpreterState *interp, TyTypeObject *type) +_PyStructSequence_FiniBuiltin(TyInterpreterState *interp, TyTypeObject *type) { // Ensure that the type is initialized assert(type->tp_name != NULL); @@ -736,7 +736,7 @@ _PyStructSequence_FiniBuiltin(PyInterpreterState *interp, TyTypeObject *type) TyTypeObject * -_PyStructSequence_NewType(PyStructSequence_Desc *desc, unsigned long tp_flags) +_PyStructSequence_NewType(TyStructSequence_Desc *desc, unsigned long tp_flags) { TyMemberDef *members; TyTypeObject *type; @@ -788,7 +788,7 @@ _PyStructSequence_NewType(PyStructSequence_Desc *desc, unsigned long tp_flags) TyTypeObject * -PyStructSequence_NewType(PyStructSequence_Desc *desc) +TyStructSequence_NewType(TyStructSequence_Desc *desc) { return _PyStructSequence_NewType(desc, 0); } diff --git a/Objects/templateobject.c b/Objects/templateobject.c index 4d3ff5a..313a269 100644 --- a/Objects/templateobject.c +++ b/Objects/templateobject.c @@ -65,9 +65,9 @@ templateiter_traverse(TyObject *op, visitproc visit, void *arg) } TyTypeObject _PyTemplateIter_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "string.templatelib.TemplateIter", - .tp_doc = PyDoc_STR("Template iterator object"), + .tp_doc = TyDoc_STR("Template iterator object"), .tp_basicsize = sizeof(templateiterobject), .tp_itemsize = 0, .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_HAVE_GC, @@ -337,7 +337,7 @@ static TyMemberDef template_members[] = { static TyGetSetDef template_getset[] = { {"values", template_values_get, NULL, - PyDoc_STR("Values of interpolations"), NULL}, + TyDoc_STR("Values of interpolations"), NULL}, {NULL}, }; @@ -371,14 +371,14 @@ template_reduce(TyObject *op, TyObject *Py_UNUSED(dummy)) static TyMethodDef template_methods[] = { {"__reduce__", template_reduce, METH_NOARGS, NULL}, {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL}, }; TyTypeObject _PyTemplate_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "string.templatelib.Template", - .tp_doc = PyDoc_STR("Template object"), + .tp_doc = TyDoc_STR("Template object"), .tp_basicsize = sizeof(templateobject), .tp_itemsize = 0, .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_HAVE_GC, diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 048bc89..25b4a24 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -848,7 +848,7 @@ static TyMethodDef tuple_methods[] = { TUPLE___GETNEWARGS___METHODDEF TUPLE_INDEX_METHODDEF TUPLE_COUNT_METHODDEF - {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Ty_GenericAlias, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; @@ -861,7 +861,7 @@ static PyMappingMethods tuple_as_mapping = { static TyObject *tuple_iter(TyObject *seq); TyTypeObject TyTuple_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "tuple", sizeof(PyTupleObject) - sizeof(TyObject *), sizeof(TyObject *), @@ -1048,7 +1048,7 @@ tupleiter_len(TyObject *self, TyObject *Py_UNUSED(ignored)) return TyLong_FromSsize_t(len); } -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * tupleiter_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) @@ -1088,8 +1088,8 @@ tupleiter_setstate(TyObject *self, TyObject *state) Py_RETURN_NONE; } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef tupleiter_methods[] = { {"__length_hint__", tupleiter_len, METH_NOARGS, length_hint_doc}, @@ -1099,7 +1099,7 @@ static TyMethodDef tupleiter_methods[] = { }; TyTypeObject PyTupleIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "tuple_iterator", /* tp_name */ sizeof(_PyTupleIterObject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/typeobject.c b/Objects/typeobject.c index ce20457..267d82b 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -5,7 +5,7 @@ #include "pycore_call.h" // _TyObject_VectorcallTstate() #include "pycore_code.h" // CO_FAST_FREE #include "pycore_dict.h" // _TyDict_KeysSize() -#include "pycore_function.h" // _PyFunction_GetVersionForCurrentState() +#include "pycore_function.h" // _TyFunction_GetVersionForCurrentState() #include "pycore_interpframe.h" // _PyInterpreterFrame #include "pycore_lock.h" // _PySeqLock_* #include "pycore_long.h" // _TyLong_IsNegative(), _TyLong_GetOne() @@ -149,7 +149,7 @@ managed_static_type_index_clear(TyTypeObject *self) } static TyTypeObject * -static_ext_type_lookup(PyInterpreterState *interp, size_t index, +static_ext_type_lookup(TyInterpreterState *interp, size_t index, int64_t *p_interp_count) { assert(interp->runtime == &_PyRuntime); @@ -173,7 +173,7 @@ static_ext_type_lookup(PyInterpreterState *interp, size_t index, } static managed_static_type_state * -managed_static_type_state_get(PyInterpreterState *interp, TyTypeObject *self) +managed_static_type_state_get(TyInterpreterState *interp, TyTypeObject *self) { // It's probably a builtin type. size_t index = managed_static_type_index_get(self); @@ -190,7 +190,7 @@ managed_static_type_state_get(PyInterpreterState *interp, TyTypeObject *self) /* For static types we store some state in an array on each interpreter. */ managed_static_type_state * -_PyStaticType_GetState(PyInterpreterState *interp, TyTypeObject *self) +_PyStaticType_GetState(TyInterpreterState *interp, TyTypeObject *self) { assert(self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN); return managed_static_type_state_get(interp, self); @@ -198,7 +198,7 @@ _PyStaticType_GetState(PyInterpreterState *interp, TyTypeObject *self) /* Set the type's per-interpreter state. */ static void -managed_static_type_state_init(PyInterpreterState *interp, TyTypeObject *self, +managed_static_type_state_init(TyInterpreterState *interp, TyTypeObject *self, int isbuiltin, int initial) { assert(interp->runtime == &_PyRuntime); @@ -270,7 +270,7 @@ managed_static_type_state_init(PyInterpreterState *interp, TyTypeObject *self, /* Reset the type's per-interpreter state. This basically undoes what managed_static_type_state_init() did. */ static void -managed_static_type_state_clear(PyInterpreterState *interp, TyTypeObject *self, +managed_static_type_state_clear(TyInterpreterState *interp, TyTypeObject *self, int isbuiltin, int final) { size_t index = managed_static_type_index_get(self); @@ -319,7 +319,7 @@ managed_static_type_state_clear(PyInterpreterState *interp, TyTypeObject *self, TyObject * _PyStaticType_GetBuiltins(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); Ty_ssize_t count = (Ty_ssize_t)interp->types.builtins.num_initialized; assert(count <= _Ty_MAX_MANAGED_STATIC_BUILTIN_TYPES); @@ -380,7 +380,7 @@ static inline void start_readying(TyTypeObject *type) { if (type->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = managed_static_type_state_get(interp, type); assert(state != NULL); assert(!state->readying); @@ -395,7 +395,7 @@ static inline void stop_readying(TyTypeObject *type) { if (type->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = managed_static_type_state_get(interp, type); assert(state != NULL); assert(state->readying); @@ -410,7 +410,7 @@ static inline int is_readying(TyTypeObject *type) { if (type->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = managed_static_type_state_get(interp, type); assert(state != NULL); return state->readying; @@ -425,7 +425,7 @@ static inline TyObject * lookup_tp_dict(TyTypeObject *self) { if (self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = _PyStaticType_GetState(interp, self); assert(state != NULL); return state->tp_dict; @@ -451,7 +451,7 @@ static inline void set_tp_dict(TyTypeObject *self, TyObject *dict) { if (self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = _PyStaticType_GetState(interp, self); assert(state != NULL); state->tp_dict = dict; @@ -464,7 +464,7 @@ static inline void clear_tp_dict(TyTypeObject *self) { if (self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = _PyStaticType_GetState(interp, self); assert(state != NULL); Ty_CLEAR(state->tp_dict); @@ -613,7 +613,7 @@ init_tp_subclasses(TyTypeObject *self) return NULL; } if (self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = _PyStaticType_GetState(interp, self); state->tp_subclasses = subclasses; return subclasses; @@ -629,7 +629,7 @@ clear_tp_subclasses(TyTypeObject *self) callers also test if tp_subclasses is NULL to check if a static type has no subclass. */ if (self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = _PyStaticType_GetState(interp, self); Ty_CLEAR(state->tp_subclasses); return; @@ -641,7 +641,7 @@ static inline TyObject * lookup_tp_subclasses(TyTypeObject *self) { if (self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); managed_static_type_state *state = _PyStaticType_GetState(interp, self); assert(state != NULL); return state->tp_subclasses; @@ -652,7 +652,7 @@ lookup_tp_subclasses(TyTypeObject *self) int _TyType_HasSubclasses(TyTypeObject *self) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (self->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN // XXX _PyStaticType_GetState() should never return NULL. && _PyStaticType_GetState(interp, self) == NULL) @@ -865,7 +865,7 @@ _TyType_GetTextSignatureFromInternalDoc(const char *name, const char *internal_d static struct type_cache* get_type_cache(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return &interp->types.type_cache; } @@ -889,7 +889,7 @@ type_cache_clear(struct type_cache *cache, TyObject *value) void -_TyType_InitCache(PyInterpreterState *interp) +_TyType_InitCache(TyInterpreterState *interp) { struct type_cache *cache = &interp->types.type_cache; for (Ty_ssize_t i = 0; i < (1 << MCACHE_SIZE_EXP); i++) { @@ -906,7 +906,7 @@ _TyType_InitCache(PyInterpreterState *interp) static unsigned int -_TyType_ClearCache(PyInterpreterState *interp) +_TyType_ClearCache(TyInterpreterState *interp) { struct type_cache *cache = &interp->types.type_cache; // Set to None, rather than NULL, so _TyType_LookupRef() can @@ -920,13 +920,13 @@ _TyType_ClearCache(PyInterpreterState *interp) unsigned int TyType_ClearCache(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return _TyType_ClearCache(interp); } void -_PyTypes_Fini(PyInterpreterState *interp) +_PyTypes_Fini(TyInterpreterState *interp) { struct type_cache *cache = &interp->types.type_cache; type_cache_clear(cache, NULL); @@ -946,7 +946,7 @@ _PyTypes_Fini(PyInterpreterState *interp) int TyType_AddWatcher(TyType_WatchCallback callback) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); // start at 1, 0 is reserved for cpython optimizer for (int i = 1; i < TYPE_MAX_WATCHERS; i++) { @@ -961,7 +961,7 @@ TyType_AddWatcher(TyType_WatchCallback callback) } static inline int -validate_watcher_id(PyInterpreterState *interp, int watcher_id) +validate_watcher_id(TyInterpreterState *interp, int watcher_id) { if (watcher_id < 0 || watcher_id >= TYPE_MAX_WATCHERS) { TyErr_Format(TyExc_ValueError, "Invalid type watcher ID %d", watcher_id); @@ -977,7 +977,7 @@ validate_watcher_id(PyInterpreterState *interp, int watcher_id) int TyType_ClearWatcher(int watcher_id) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (validate_watcher_id(interp, watcher_id) < 0) { return -1; } @@ -985,7 +985,7 @@ TyType_ClearWatcher(int watcher_id) return 0; } -static int assign_version_tag(PyInterpreterState *interp, TyTypeObject *type); +static int assign_version_tag(TyInterpreterState *interp, TyTypeObject *type); int TyType_Watch(int watcher_id, TyObject* obj) @@ -995,7 +995,7 @@ TyType_Watch(int watcher_id, TyObject* obj) return -1; } TyTypeObject *type = (TyTypeObject *)obj; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (validate_watcher_id(interp, watcher_id) < 0) { return -1; } @@ -1015,7 +1015,7 @@ TyType_Unwatch(int watcher_id, TyObject* obj) return -1; } TyTypeObject *type = (TyTypeObject *)obj; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (validate_watcher_id(interp, watcher_id)) { return -1; } @@ -1029,7 +1029,7 @@ set_version_unlocked(TyTypeObject *tp, unsigned int version) ASSERT_TYPE_LOCK_HELD(); assert(version == 0 || (tp->tp_versions_used != _Ty_ATTR_CACHE_UNUSED)); #ifndef Ty_GIL_DISABLED - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); // lookup the old version and set to null if (tp->tp_version_tag != 0) { TyTypeObject **slot = @@ -1099,7 +1099,7 @@ type_modified_unlocked(TyTypeObject *type) // Notify registered type watchers, if any if (type->tp_watched) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int bits = type->tp_watched; int i = 0; while (bits) { @@ -1233,7 +1233,7 @@ _TyType_LookupByVersion(unsigned int version) #ifdef Ty_GIL_DISABLED return NULL; #else - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyTypeObject **slot = interp->types.type_version_cache + (version % TYPE_VERSION_CACHE_SIZE); @@ -1271,7 +1271,7 @@ next_global_version_tag(void) } static int -assign_version_tag(PyInterpreterState *interp, TyTypeObject *type) +assign_version_tag(TyInterpreterState *interp, TyTypeObject *type) { ASSERT_TYPE_LOCK_HELD(); @@ -1322,7 +1322,7 @@ assign_version_tag(PyInterpreterState *interp, TyTypeObject *type) int PyUnstable_Type_AssignVersionTag(TyTypeObject *type) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int assigned; BEGIN_TYPE_LOCK(); assigned = assign_version_tag(interp, type); @@ -1476,7 +1476,7 @@ type_module(TyTypeObject *type) mod = TyUnicode_FromStringAndSize( type->tp_name, (Ty_ssize_t)(s - type->tp_name)); if (mod != NULL) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternMortal(interp, &mod); } } @@ -3772,21 +3772,21 @@ subtype_getweakref(TyObject *obj, void *context) static TyGetSetDef subtype_getsets_full[] = { {"__dict__", subtype_dict, subtype_setdict, - PyDoc_STR("dictionary for instance variables")}, + TyDoc_STR("dictionary for instance variables")}, {"__weakref__", subtype_getweakref, NULL, - PyDoc_STR("list of weak references to the object")}, + TyDoc_STR("list of weak references to the object")}, {0} }; static TyGetSetDef subtype_getsets_dict_only[] = { {"__dict__", subtype_dict, subtype_setdict, - PyDoc_STR("dictionary for instance variables")}, + TyDoc_STR("dictionary for instance variables")}, {0} }; static TyGetSetDef subtype_getsets_weakref_only[] = { {"__weakref__", subtype_getweakref, NULL, - PyDoc_STR("list of weak references to the object")}, + TyDoc_STR("list of weak references to the object")}, {0} }; @@ -5819,7 +5819,7 @@ _TyType_LookupStackRefAndVersion(TyTypeObject *type, TyObject *name, _PyStackRef TyObject *res; int error; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int has_version = 0; unsigned int assigned_version = 0; BEGIN_TYPE_LOCK(); @@ -5913,8 +5913,8 @@ _TyType_CacheGetItemForSpecialization(PyHeapTypeObject *ht, TyObject *descriptor // This pointer is invalidated by TyType_Modified (see the comment on // struct _specialization_cache): PyFunctionObject *func = (PyFunctionObject *)descriptor; - uint32_t version = _PyFunction_GetVersionForCurrentState(func); - can_cache = can_cache && _PyFunction_IsVersionValid(version); + uint32_t version = _TyFunction_GetVersionForCurrentState(func); + can_cache = can_cache && _TyFunction_IsVersionValid(version); #ifdef Ty_GIL_DISABLED can_cache = can_cache && _TyObject_HasDeferredRefcount(descriptor); #endif @@ -6158,7 +6158,7 @@ type_setattro(TyObject *self, TyObject *name, TyObject *value) return -1; } if (!TyUnicode_CHECK_INTERNED(name)) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternMortal(interp, &name); if (!TyUnicode_CHECK_INTERNED(name)) { TyErr_SetString(TyExc_MemoryError, @@ -6271,7 +6271,7 @@ clear_static_tp_subclasses(TyTypeObject *type, int isbuiltin) } static void -clear_static_type_objects(PyInterpreterState *interp, TyTypeObject *type, +clear_static_type_objects(TyInterpreterState *interp, TyTypeObject *type, int isbuiltin, int final) { if (final) { @@ -6285,7 +6285,7 @@ clear_static_type_objects(PyInterpreterState *interp, TyTypeObject *type, static void -fini_static_type(PyInterpreterState *interp, TyTypeObject *type, +fini_static_type(TyInterpreterState *interp, TyTypeObject *type, int isbuiltin, int final) { assert(type->tp_flags & _Ty_TPFLAGS_STATIC_BUILTIN); @@ -6308,7 +6308,7 @@ fini_static_type(PyInterpreterState *interp, TyTypeObject *type, } void -_PyTypes_FiniExtTypes(PyInterpreterState *interp) +_PyTypes_FiniExtTypes(TyInterpreterState *interp) { for (size_t i = _Ty_MAX_MANAGED_STATIC_EXT_TYPES; i > 0; i--) { if (interp->types.for_extensions.num_initialized == 0) { @@ -6325,7 +6325,7 @@ _PyTypes_FiniExtTypes(PyInterpreterState *interp) } void -_PyStaticType_FiniBuiltin(PyInterpreterState *interp, TyTypeObject *type) +_PyStaticType_FiniBuiltin(TyInterpreterState *interp, TyTypeObject *type) { fini_static_type(interp, type, 1, _Ty_IsMainInterpreter(interp)); } @@ -6509,7 +6509,7 @@ static TyMethodDef type_methods[] = { TYPE___SUBCLASSES___METHODDEF {"__prepare__", _PyCFunction_CAST(type_prepare), METH_FASTCALL | METH_KEYWORDS | METH_CLASS, - PyDoc_STR("__prepare__($cls, name, bases, /, **kwds)\n" + TyDoc_STR("__prepare__($cls, name, bases, /, **kwds)\n" "--\n" "\n" "Create the namespace for the class statement")}, @@ -6520,7 +6520,7 @@ static TyMethodDef type_methods[] = { {0} }; -PyDoc_STRVAR(type_doc, +TyDoc_STRVAR(type_doc, "type(object) -> the object's type\n" "type(name, bases, dict, **kwds) -> a new type"); @@ -6618,7 +6618,7 @@ static PyNumberMethods type_as_number = { }; TyTypeObject TyType_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "type", /* tp_name */ sizeof(PyHeapTypeObject), /* tp_basicsize */ sizeof(TyMemberDef), /* tp_itemsize */ @@ -7130,7 +7130,7 @@ object_set_class(TyObject *self, TyObject *value, void *closure) } #ifdef Ty_GIL_DISABLED - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyEval_StopTheWorld(interp); #endif TyTypeObject *oldto = Ty_TYPE(self); @@ -7151,7 +7151,7 @@ object_set_class(TyObject *self, TyObject *value, void *closure) static TyGetSetDef object_getsets[] = { {"__class__", object_get_class, object_set_class, - PyDoc_STR("the object's class")}, + TyDoc_STR("the object's class")}, {0} }; @@ -7700,7 +7700,7 @@ object___reduce_ex___impl(TyObject *self, int protocol) return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); override = (clsreduce != _Ty_INTERP_CACHED_OBJECT(interp, objreduce)); Ty_DECREF(clsreduce); if (override) { @@ -7721,7 +7721,7 @@ object_subclasshook(TyObject *cls, TyObject *args) Py_RETURN_NOTIMPLEMENTED; } -PyDoc_STRVAR(object_subclasshook_doc, +TyDoc_STRVAR(object_subclasshook_doc, "Abstract classes can override this to customize issubclass().\n" "\n" "This is invoked early on by abc.ABCMeta.__subclasscheck__().\n" @@ -7735,7 +7735,7 @@ object_init_subclass(TyObject *cls, TyObject *arg) Py_RETURN_NONE; } -PyDoc_STRVAR(object_init_subclass_doc, +TyDoc_STRVAR(object_init_subclass_doc, "This method is called when a class is subclassed.\n" "\n" "The default implementation does nothing. It may be\n" @@ -7859,14 +7859,14 @@ static TyMethodDef object_methods[] = { {0} }; -PyDoc_STRVAR(object_doc, +TyDoc_STRVAR(object_doc, "object()\n--\n\n" "The base class of the class hierarchy.\n\n" "When called, it accepts no arguments and returns a new featureless\n" "instance that has no instance attributes and cannot be given any.\n"); TyTypeObject PyBaseObject_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "object", /* tp_name */ sizeof(TyObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -8924,7 +8924,7 @@ TyType_Ready(TyTypeObject *type) static int -init_static_type(PyInterpreterState *interp, TyTypeObject *self, +init_static_type(TyInterpreterState *interp, TyTypeObject *self, int isbuiltin, int initial) { assert(_Ty_IsImmortal((TyObject *)self)); @@ -8964,13 +8964,13 @@ init_static_type(PyInterpreterState *interp, TyTypeObject *self, } int -_PyStaticType_InitForExtension(PyInterpreterState *interp, TyTypeObject *self) +_PyStaticType_InitForExtension(TyInterpreterState *interp, TyTypeObject *self) { return init_static_type(interp, self, 0, ((self->tp_flags & Ty_TPFLAGS_READY) == 0)); } int -_PyStaticType_InitBuiltin(PyInterpreterState *interp, TyTypeObject *self) +_PyStaticType_InitBuiltin(TyInterpreterState *interp, TyTypeObject *self) { return init_static_type(interp, self, 1, _Ty_IsMainInterpreter(interp)); } @@ -9767,7 +9767,7 @@ tp_new_wrapper(TyObject *self, TyObject *args, TyObject *kwds) static struct TyMethodDef tp_new_methoddef[] = { {"__new__", _PyCFunction_CAST(tp_new_wrapper), METH_VARARGS|METH_KEYWORDS, - PyDoc_STR("__new__($type, *args, **kwargs)\n--\n\n" + TyDoc_STR("__new__($type, *args, **kwargs)\n--\n\n" "Create and return a new object. " "See help(type) for accurate signature.")}, {0} @@ -10563,7 +10563,7 @@ static PyBufferProcs bufferwrapper_as_buffer = { TyTypeObject _PyBufferWrapper_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "_buffer_wrapper", .tp_basicsize = sizeof(PyBufferWrapper), .tp_alloc = TyType_GenericAlloc, @@ -10803,13 +10803,13 @@ an all-zero entry. #define TPSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \ {#NAME, offsetof(TyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \ - PyDoc_STR(DOC), .name_strobj = &_Ty_ID(NAME)} + TyDoc_STR(DOC), .name_strobj = &_Ty_ID(NAME)} #define FLSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC, FLAGS) \ {#NAME, offsetof(TyTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \ - PyDoc_STR(DOC), FLAGS, .name_strobj = &_Ty_ID(NAME) } + TyDoc_STR(DOC), FLAGS, .name_strobj = &_Ty_ID(NAME) } #define ETSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \ {#NAME, offsetof(PyHeapTypeObject, SLOT), (void *)(FUNCTION), WRAPPER, \ - PyDoc_STR(DOC), .name_strobj = &_Ty_ID(NAME) } + TyDoc_STR(DOC), .name_strobj = &_Ty_ID(NAME) } #define BUFSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \ ETSLOT(NAME, as_buffer.SLOT, FUNCTION, WRAPPER, DOC) #define AMSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \ @@ -11088,7 +11088,7 @@ resolve_slotdups(TyTypeObject *type, TyObject *name) /* XXX Maybe this could be optimized more -- but is it worth it? */ /* pname and ptrs act as a little cache */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); #define pname _Ty_INTERP_CACHED_OBJECT(interp, type_slots_pname) #define ptrs _Ty_INTERP_CACHED_OBJECT(interp, type_slots_ptrs) pytype_slotdef *p, **pp; @@ -11965,7 +11965,7 @@ super_init_without_args(_PyInterpreterFrame *cframe, TyTypeObject **type_p, if ((_PyLocals_GetKind(co->co_localspluskinds, 0) & CO_FAST_CELL) && (_PyInterpreterFrame_LASTI(cframe) >= 0)) { // MAKE_CELL and COPY_FREE_VARS have no quickened forms, so no need - // to use _PyOpcode_Deopt here: + // to use _TyOpcode_Deopt here: assert(_TyCode_CODE(co)[0].op.code == MAKE_CELL || _TyCode_CODE(co)[0].op.code == COPY_FREE_VARS); assert(TyCell_Check(firstarg)); @@ -12085,7 +12085,7 @@ super_init_impl(TyObject *self, TyTypeObject *type, TyObject *obj) { return 0; } -PyDoc_STRVAR(super_doc, +TyDoc_STRVAR(super_doc, "super() -> same as super(__class__, )\n" "super(type) -> unbound super object\n" "super(type, obj) -> bound super object; requires isinstance(obj, type)\n" @@ -12154,7 +12154,7 @@ fail: } TyTypeObject TySuper_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "super", /* tp_name */ sizeof(superobject), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Objects/typevarobject.c b/Objects/typevarobject.c index 2101978..acfdbbc 100644 --- a/Objects/typevarobject.c +++ b/Objects/typevarobject.c @@ -105,13 +105,13 @@ nodefault_dealloc(TyObject *nodefault) _Ty_SetImmortal(nodefault); } -PyDoc_STRVAR(nodefault_doc, +TyDoc_STRVAR(nodefault_doc, "NoDefaultType()\n" "--\n\n" "The type of the NoDefault singleton."); TyTypeObject _PyNoDefault_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "NoDefaultType", .tp_dealloc = nodefault_dealloc, .tp_repr = NoDefault_repr, @@ -233,7 +233,7 @@ constevaluator_alloc(TyObject *value) } -PyDoc_STRVAR(constevaluator_doc, +TyDoc_STRVAR(constevaluator_doc, "_ConstEvaluator()\n" "--\n\n" "Internal type for implementing evaluation functions."); @@ -865,7 +865,7 @@ static TyMethodDef typevar_methods[] = { {0} }; -PyDoc_STRVAR(typevar_doc, +TyDoc_STRVAR(typevar_doc, "Type variable.\n\ \n\ The preferred way to construct a type variable is via the dedicated\n\ @@ -1045,7 +1045,7 @@ static TyMethodDef paramspecargs_methods[] = { {0} }; -PyDoc_STRVAR(paramspecargs_doc, +TyDoc_STRVAR(paramspecargs_doc, "The args for a ParamSpec object.\n\ \n\ Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.\n\ @@ -1125,7 +1125,7 @@ static TyMethodDef paramspeckwargs_methods[] = { {0} }; -PyDoc_STRVAR(paramspeckwargs_doc, +TyDoc_STRVAR(paramspeckwargs_doc, "The kwargs for a ParamSpec object.\n\ \n\ Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.\n\ @@ -1270,8 +1270,8 @@ paramspec_evaluate_default(TyObject *op, void *Py_UNUSED(closure)) } static TyGetSetDef paramspec_getset[] = { - {"args", paramspec_args, NULL, PyDoc_STR("Represents positional arguments."), NULL}, - {"kwargs", paramspec_kwargs, NULL, PyDoc_STR("Represents keyword arguments."), NULL}, + {"args", paramspec_args, NULL, TyDoc_STR("Represents positional arguments."), NULL}, + {"kwargs", paramspec_kwargs, NULL, TyDoc_STR("Represents keyword arguments."), NULL}, {"__default__", paramspec_default, NULL, "The default value for this ParamSpec.", NULL}, {"evaluate_default", paramspec_evaluate_default, NULL, NULL, NULL}, {0}, @@ -1433,7 +1433,7 @@ static TyMethodDef paramspec_methods[] = { {0} }; -PyDoc_STRVAR(paramspec_doc, +TyDoc_STRVAR(paramspec_doc, "Parameter specification variable.\n\ \n\ The preferred way to construct a parameter specification is via the\n\ @@ -1742,7 +1742,7 @@ static TyMethodDef typevartuple_methods[] = { {0} }; -PyDoc_STRVAR(typevartuple_doc, +TyDoc_STRVAR(typevartuple_doc, "Type variable tuple. A specialized form of type variable that enables\n\ variadic generics.\n\ \n\ @@ -2118,7 +2118,7 @@ typealias_new_impl(TyTypeObject *type, TyObject *name, TyObject *value, return ta; } -PyDoc_STRVAR(typealias_doc, +TyDoc_STRVAR(typealias_doc, "Type alias.\n\ \n\ Type aliases are created through the type statement::\n\ @@ -2152,7 +2152,7 @@ static PyMappingMethods typealias_as_mapping = { }; TyTypeObject _PyTypeAlias_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "typing.TypeAliasType", .tp_basicsize = sizeof(typealiasobject), .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_IMMUTABLETYPE | Ty_TPFLAGS_HAVE_GC, @@ -2185,7 +2185,7 @@ _Ty_make_typealias(TyThreadState* unused, TyObject *args) return (TyObject *)typealias_alloc(name, type_params, compute_value, NULL, NULL); } -PyDoc_STRVAR(generic_doc, +TyDoc_STRVAR(generic_doc, "Abstract base class for generic types.\n\ \n\ On Python 3.12 and newer, generic classes implicitly inherit from\n\ @@ -2209,7 +2209,7 @@ follows::\n\ return default\n\ "); -PyDoc_STRVAR(generic_class_getitem_doc, +TyDoc_STRVAR(generic_class_getitem_doc, "Parameterizes a generic class.\n\ \n\ At least, parameterizing a generic class is the *main* thing this\n\ @@ -2274,7 +2274,7 @@ _Ty_subscript_generic(TyThreadState* unused, TyObject *params) { params = unpack_typevartuples(params); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (interp->cached_objects.generic_type == NULL) { TyErr_SetString(TyExc_SystemError, "Cannot find Generic type"); return NULL; @@ -2291,7 +2291,7 @@ static TyMethodDef generic_methods[] = { generic_class_getitem_doc}, {"__init_subclass__", _PyCFunction_CAST(generic_init_subclass), METH_VARARGS | METH_KEYWORDS | METH_CLASS, - PyDoc_STR("Function to initialize subclasses.")}, + TyDoc_STR("Function to initialize subclasses.")}, {NULL} /* Sentinel */ }; @@ -2328,7 +2328,7 @@ TyType_Spec generic_spec = { .slots = generic_slots, }; -int _Ty_initialize_generic(PyInterpreterState *interp) +int _Ty_initialize_generic(TyInterpreterState *interp) { #define MAKE_TYPE(name) \ do { \ @@ -2350,7 +2350,7 @@ int _Ty_initialize_generic(PyInterpreterState *interp) return 0; } -void _Ty_clear_generic_types(PyInterpreterState *interp) +void _Ty_clear_generic_types(TyInterpreterState *interp) { Ty_CLEAR(interp->cached_objects.generic_type); Ty_CLEAR(interp->cached_objects.typevar_type); diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 523dbb6..5be330b 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -48,7 +48,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "pycore_format.h" // F_LJUST #include "pycore_freelist.h" // _Ty_FREELIST_FREE(), _Ty_FREELIST_POP() #include "pycore_initconfig.h" // _TyStatus_OK() -#include "pycore_interp.h" // PyInterpreterState.fs_codec +#include "pycore_interp.h" // TyInterpreterState.fs_codec #include "pycore_long.h" // _TyLong_FormatWriter() #include "pycore_object.h" // _TyObject_GC_TRACK(), _Ty_FatalRefcountError() #include "pycore_pathconfig.h" // _Ty_DumpPathConfig() @@ -264,7 +264,7 @@ static inline TyObject* unicode_get_empty(void) /* This dictionary holds per-interpreter interned strings. * See InternalDocs/string_interning.md for details. */ -static inline TyObject *get_interned_dict(PyInterpreterState *interp) +static inline TyObject *get_interned_dict(TyInterpreterState *interp) { return _Ty_INTERP_CACHED_OBJECT(interp, interned_strings); } @@ -336,14 +336,14 @@ hashtable_unicode_compare(const void *key1, const void *key2) ensure they get freed after all other interpreters are freed. */ static bool -has_shared_intern_dict(PyInterpreterState *interp) +has_shared_intern_dict(TyInterpreterState *interp) { - PyInterpreterState *main_interp = _TyInterpreterState_Main(); + TyInterpreterState *main_interp = _TyInterpreterState_Main(); return interp != main_interp && interp->feature_flags & Ty_RTFLAGS_USE_MAIN_OBMALLOC; } static int -init_interned_dict(PyInterpreterState *interp) +init_interned_dict(TyInterpreterState *interp) { assert(get_interned_dict(interp) == NULL); TyObject *interned; @@ -362,7 +362,7 @@ init_interned_dict(PyInterpreterState *interp) } static void -clear_interned_dict(PyInterpreterState *interp) +clear_interned_dict(TyInterpreterState *interp) { TyObject *interned = get_interned_dict(interp); if (interned != NULL) { @@ -376,7 +376,7 @@ clear_interned_dict(PyInterpreterState *interp) } static TyStatus -init_global_interned_strings(PyInterpreterState *interp) +init_global_interned_strings(TyInterpreterState *interp) { assert(INTERNED_STRINGS == NULL); _Ty_hashtable_allocator_t hashtable_alloc = {TyMem_RawMalloc, TyMem_RawFree}; @@ -618,7 +618,7 @@ unicode_check_encoding_errors(const char *encoding, const char *errors) return 0; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); #ifndef Ty_DEBUG /* In release mode, only check in development mode (-X dev) */ if (!_TyInterpreterState_GetConfig(interp)->dev_mode) { @@ -1746,7 +1746,7 @@ unicode_dealloc(TyObject *unicode) _Ty_IncRefTotal(_TyThreadState_GET()); _Ty_IncRefTotal(_TyThreadState_GET()); #endif - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *interned = get_interned_dict(interp); assert(interned != NULL); TyObject *popped; @@ -2181,7 +2181,7 @@ TyObject * _TyUnicode_FromId(_Ty_Identifier *id) { PyMutex_Lock((PyMutex *)&id->mutex); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _Ty_unicode_ids *ids = &interp->unicode.ids; Ty_ssize_t index = _Ty_atomic_load_ssize(&id->index); @@ -3885,7 +3885,7 @@ TyUnicode_EncodeLocale(TyObject *unicode, const char *errors) TyObject * TyUnicode_EncodeFSDefault(TyObject *unicode) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _Ty_unicode_fs_codec *fs_codec = &interp->unicode.fs_codec; if (fs_codec->utf8) { return unicode_encode_utf8(unicode, @@ -4123,7 +4123,7 @@ TyUnicode_DecodeFSDefault(const char *s) { TyObject* TyUnicode_DecodeFSDefaultAndSize(const char *s, Ty_ssize_t size) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _Ty_unicode_fs_codec *fs_codec = &interp->unicode.fs_codec; if (fs_codec->utf8) { return unicode_decode_utf8(s, size, @@ -6603,7 +6603,7 @@ TyUnicode_AsUTF16String(TyObject *unicode) _TyUnicode_Name_CAPI * _TyUnicode_GetNameCAPI(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_Name_CAPI *ucnhash_capi; ucnhash_capi = _Ty_atomic_load_ptr(&interp->unicode.ucnhash_capi); @@ -8682,7 +8682,7 @@ static TyMethodDef encoding_map_methods[] = { }; static TyTypeObject EncodingMapType = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "EncodingMap", .tp_basicsize = sizeof(struct encoding_map), /* methods */ @@ -14225,14 +14225,14 @@ _PyUnicodeWriter_Dealloc(_PyUnicodeWriter *writer) #include "stringlib/unicode_format.h" -PyDoc_STRVAR(format__doc__, +TyDoc_STRVAR(format__doc__, "format($self, /, *args, **kwargs)\n\ --\n\ \n\ Return a formatted version of the string, using substitutions from args and kwargs.\n\ The substitutions are identified by braces ('{' and '}')."); -PyDoc_STRVAR(format_map__doc__, +TyDoc_STRVAR(format_map__doc__, "format_map($self, mapping, /)\n\ --\n\ \n\ @@ -15743,7 +15743,7 @@ _TyUnicode_ExactDealloc(TyObject *op) unicode_dealloc(op); } -PyDoc_STRVAR(unicode_doc, +TyDoc_STRVAR(unicode_doc, "str(object='') -> str\n\ str(bytes_or_buffer[, encoding[, errors]]) -> str\n\ \n\ @@ -15758,7 +15758,7 @@ errors defaults to 'strict'."); static TyObject *unicode_iter(TyObject *seq); TyTypeObject TyUnicode_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "str", /* tp_name */ sizeof(PyUnicodeObject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -15831,7 +15831,7 @@ _init_global_state(void) } void -_TyUnicode_InitState(PyInterpreterState *interp) +_TyUnicode_InitState(TyInterpreterState *interp) { if (!_Ty_IsMainInterpreter(interp)) { return; @@ -15841,7 +15841,7 @@ _TyUnicode_InitState(PyInterpreterState *interp) TyStatus -_TyUnicode_InitGlobalObjects(PyInterpreterState *interp) +_TyUnicode_InitGlobalObjects(TyInterpreterState *interp) { if (_Ty_IsMainInterpreter(interp)) { TyStatus status = init_global_interned_strings(interp); @@ -15861,7 +15861,7 @@ _TyUnicode_InitGlobalObjects(PyInterpreterState *interp) TyStatus -_TyUnicode_InitTypes(PyInterpreterState *interp) +_TyUnicode_InitTypes(TyInterpreterState *interp) { if (_PyStaticType_InitBuiltin(interp, &EncodingMapType) < 0) { goto error; @@ -15879,7 +15879,7 @@ error: } static /* non-null */ TyObject* -intern_static(PyInterpreterState *interp, TyObject *s /* stolen */) +intern_static(TyInterpreterState *interp, TyObject *s /* stolen */) { // Note that this steals a reference to `s`, but in many cases that // stolen ref is returned, requiring no decref/incref. @@ -15918,7 +15918,7 @@ intern_static(PyInterpreterState *interp, TyObject *s /* stolen */) } void -_TyUnicode_InternStatic(PyInterpreterState *interp, TyObject **p) +_TyUnicode_InternStatic(TyInterpreterState *interp, TyObject **p) { // This should only be called as part of runtime initialization assert(!Ty_IsInitialized()); @@ -15945,7 +15945,7 @@ immortalize_interned(TyObject *s) } static /* non-null */ TyObject* -intern_common(PyInterpreterState *interp, TyObject *s /* stolen */, +intern_common(TyInterpreterState *interp, TyObject *s /* stolen */, bool immortalize) { // Note that this steals a reference to `s`, but in many cases that @@ -16076,14 +16076,14 @@ intern_common(PyInterpreterState *interp, TyObject *s /* stolen */, } void -_TyUnicode_InternImmortal(PyInterpreterState *interp, TyObject **p) +_TyUnicode_InternImmortal(TyInterpreterState *interp, TyObject **p) { *p = intern_common(interp, *p, 1); assert(*p); } void -_TyUnicode_InternMortal(PyInterpreterState *interp, TyObject **p) +_TyUnicode_InternMortal(TyInterpreterState *interp, TyObject **p) { *p = intern_common(interp, *p, 0); assert(*p); @@ -16091,7 +16091,7 @@ _TyUnicode_InternMortal(PyInterpreterState *interp, TyObject **p) void -_TyUnicode_InternInPlace(PyInterpreterState *interp, TyObject **p) +_TyUnicode_InternInPlace(TyInterpreterState *interp, TyObject **p) { _TyUnicode_InternImmortal(interp, p); return; @@ -16100,7 +16100,7 @@ _TyUnicode_InternInPlace(PyInterpreterState *interp, TyObject **p) void TyUnicode_InternInPlace(TyObject **p) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternMortal(interp, p); } @@ -16109,7 +16109,7 @@ PyAPI_FUNC(void) TyUnicode_InternImmortal(TyObject **); void TyUnicode_InternImmortal(TyObject **p) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, p); } @@ -16120,14 +16120,14 @@ TyUnicode_InternFromString(const char *cp) if (s == NULL) { return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternMortal(interp, &s); return s; } void -_TyUnicode_ClearInterned(PyInterpreterState *interp) +_TyUnicode_ClearInterned(TyInterpreterState *interp) { TyObject *interned = get_interned_dict(interp); if (interned == NULL) { @@ -16298,7 +16298,7 @@ unicodeiter_len(TyObject *op, TyObject *Py_UNUSED(ignored)) return TyLong_FromSsize_t(len); } -PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); +TyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); static TyObject * unicodeiter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) @@ -16322,7 +16322,7 @@ unicodeiter_reduce(TyObject *op, TyObject *Py_UNUSED(ignored)) } } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyObject * unicodeiter_setstate(TyObject *op, TyObject *state) @@ -16341,7 +16341,7 @@ unicodeiter_setstate(TyObject *op, TyObject *state) Py_RETURN_NONE; } -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyMethodDef unicodeiter_methods[] = { {"__length_hint__", unicodeiter_len, METH_NOARGS, length_hint_doc}, @@ -16351,7 +16351,7 @@ static TyMethodDef unicodeiter_methods[] = { }; TyTypeObject PyUnicodeIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "str_iterator", /* tp_name */ sizeof(unicodeiterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -16384,7 +16384,7 @@ TyTypeObject PyUnicodeIter_Type = { }; TyTypeObject _PyUnicodeASCIIIter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "str_ascii_iterator", .tp_basicsize = sizeof(unicodeiterobject), .tp_dealloc = unicodeiter_dealloc, @@ -16484,7 +16484,7 @@ error: static TyStatus -init_stdio_encoding(PyInterpreterState *interp) +init_stdio_encoding(TyInterpreterState *interp) { /* Update the stdio encoding to the normalized Python codec name. */ PyConfig *config = (PyConfig*)_TyInterpreterState_GetConfig(interp); @@ -16497,7 +16497,7 @@ init_stdio_encoding(PyInterpreterState *interp) static int -init_fs_codec(PyInterpreterState *interp) +init_fs_codec(TyInterpreterState *interp) { const PyConfig *config = _TyInterpreterState_GetConfig(interp); @@ -16556,7 +16556,7 @@ init_fs_codec(PyInterpreterState *interp) static TyStatus init_fs_encoding(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; /* Update the filesystem encoding to the normalized Python codec name. For example, replace "ANSI_X3.4-1968" (locale encoding) with "ascii" @@ -16607,7 +16607,7 @@ _TyUnicode_FiniEncodings(struct _Ty_unicode_fs_codec *fs_codec) int _TyUnicode_EnableLegacyWindowsFSEncoding(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyConfig *config = (PyConfig *)_TyInterpreterState_GetConfig(interp); /* Set the filesystem encoding to mbcs/replace (PEP 529) */ @@ -16640,7 +16640,7 @@ unicode_is_finalizing(void) void -_TyUnicode_FiniTypes(PyInterpreterState *interp) +_TyUnicode_FiniTypes(TyInterpreterState *interp) { _PyStaticType_FiniBuiltin(interp, &EncodingMapType); _PyStaticType_FiniBuiltin(interp, &PyFieldNameIter_Type); @@ -16649,7 +16649,7 @@ _TyUnicode_FiniTypes(PyInterpreterState *interp) void -_TyUnicode_Fini(PyInterpreterState *interp) +_TyUnicode_Fini(TyInterpreterState *interp) { struct _Ty_unicode_state *state = &interp->unicode; @@ -16672,9 +16672,9 @@ _TyUnicode_Fini(PyInterpreterState *interp) static TyMethodDef _string_methods[] = { {"formatter_field_name_split", formatter_field_name_split, - METH_O, PyDoc_STR("split the argument as a field name")}, + METH_O, TyDoc_STR("split the argument as a field name")}, {"formatter_parser", formatter_parser, - METH_O, PyDoc_STR("parse the argument as a format string")}, + METH_O, TyDoc_STR("parse the argument as a format string")}, {NULL, NULL} }; @@ -16687,7 +16687,7 @@ static PyModuleDef_Slot module_slots[] = { static struct TyModuleDef _string_module = { PyModuleDef_HEAD_INIT, .m_name = "_string", - .m_doc = PyDoc_STR("string helper module"), + .m_doc = TyDoc_STR("string helper module"), .m_size = 0, .m_methods = _string_methods, .m_slots = module_slots, diff --git a/Objects/unionobject.c b/Objects/unionobject.c index 1d4872d..3133adf 100644 --- a/Objects/unionobject.c +++ b/Objects/unionobject.c @@ -383,13 +383,13 @@ union_origin(TyObject *Py_UNUSED(self), void *Py_UNUSED(ignored)) static TyGetSetDef union_properties[] = { {"__name__", union_name, NULL, - PyDoc_STR("Name of the type"), NULL}, + TyDoc_STR("Name of the type"), NULL}, {"__qualname__", union_name, NULL, - PyDoc_STR("Qualified name of the type"), NULL}, + TyDoc_STR("Qualified name of the type"), NULL}, {"__origin__", union_origin, NULL, - PyDoc_STR("Always returns the type"), NULL}, + TyDoc_STR("Always returns the type"), NULL}, {"__parameters__", union_parameters, NULL, - PyDoc_STR("Type variables in the types.UnionType."), NULL}, + TyDoc_STR("Type variables in the types.UnionType."), NULL}, {0} }; @@ -500,14 +500,14 @@ union_mro_entries(TyObject *self, TyObject *args) static TyMethodDef union_methods[] = { {"__mro_entries__", union_mro_entries, METH_O}, - {"__class_getitem__", union_class_getitem, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", union_class_getitem, METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {0} }; TyTypeObject _PyUnion_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "typing.Union", - .tp_doc = PyDoc_STR("Represent a union type\n" + .tp_doc = TyDoc_STR("Represent a union type\n" "\n" "E.g. for int | str"), .tp_basicsize = sizeof(unionobject), diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index e99eb25..59fcf42 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -491,13 +491,13 @@ static TyMemberDef weakref_members[] = { static TyMethodDef weakref_methods[] = { {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL} /* Sentinel */ }; TyTypeObject _TyWeakref_RefType = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "weakref.ReferenceType", .tp_basicsize = sizeof(PyWeakReference), .tp_dealloc = weakref_dealloc, @@ -850,7 +850,7 @@ static PyMappingMethods proxy_as_mapping = { TyTypeObject _TyWeakref_ProxyType = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "weakref.ProxyType", sizeof(PyWeakReference), 0, @@ -885,7 +885,7 @@ _TyWeakref_ProxyType = { TyTypeObject _TyWeakref_CallableProxyType = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "weakref.CallableProxyType", sizeof(PyWeakReference), 0, @@ -1101,7 +1101,7 @@ PyUnstable_Object_ClearWeakRefsNoCallbacks(TyObject *obj) * or anything else. */ void -_PyStaticType_ClearWeakRefs(PyInterpreterState *interp, TyTypeObject *type) +_PyStaticType_ClearWeakRefs(TyInterpreterState *interp, TyTypeObject *type) { managed_static_type_state *state = _PyStaticType_GetState(interp, type); TyObject **list = _PyStaticType_GET_WEAKREFS_LISTPTR(state); diff --git a/PC/_testconsole.c b/PC/_testconsole.c index e438c18..4e18c4b 100644 --- a/PC/_testconsole.c +++ b/PC/_testconsole.c @@ -151,7 +151,7 @@ TyMethodDef testconsole_methods[] = { static TyModuleDef testconsole_def = { PyModuleDef_HEAD_INIT, /* m_base */ "_testconsole", /* m_name */ - PyDoc_STR("Test module for the Windows console"), /* m_doc */ + TyDoc_STR("Test module for the Windows console"), /* m_doc */ 0, /* m_size */ testconsole_methods, /* m_methods */ testconsole_slots, /* m_slots */ diff --git a/PC/clinic/_testconsole.c.h b/PC/clinic/_testconsole.c.h index c83010e..74186dd 100644 --- a/PC/clinic/_testconsole.c.h +++ b/PC/clinic/_testconsole.c.h @@ -4,7 +4,7 @@ preserve #if defined(MS_WINDOWS) -PyDoc_STRVAR(_testconsole_write_input__doc__, +TyDoc_STRVAR(_testconsole_write_input__doc__, "write_input($module, /, file, s)\n" "--\n" "\n" @@ -42,7 +42,7 @@ exit: #if defined(MS_WINDOWS) -PyDoc_STRVAR(_testconsole_read_output__doc__, +TyDoc_STRVAR(_testconsole_read_output__doc__, "read_output($module, /, file)\n" "--\n" "\n" diff --git a/PC/clinic/_wmimodule.cpp.h b/PC/clinic/_wmimodule.cpp.h index f9f1417..9e6f6b3 100644 --- a/PC/clinic/_wmimodule.cpp.h +++ b/PC/clinic/_wmimodule.cpp.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(_wmi_exec_query__doc__, +TyDoc_STRVAR(_wmi_exec_query__doc__, "exec_query($module, /, query)\n" "--\n" "\n" @@ -36,7 +36,7 @@ _wmi_exec_query(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(query), }, }; diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h index e876a00..0992166 100644 --- a/PC/clinic/msvcrtmodule.c.h +++ b/PC/clinic/msvcrtmodule.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(msvcrt_heapmin__doc__, +TyDoc_STRVAR(msvcrt_heapmin__doc__, "heapmin($module, /)\n" "--\n" "\n" @@ -25,7 +25,7 @@ msvcrt_heapmin(TyObject *module, TyObject *Py_UNUSED(ignored)) return msvcrt_heapmin_impl(module); } -PyDoc_STRVAR(msvcrt_locking__doc__, +TyDoc_STRVAR(msvcrt_locking__doc__, "locking($module, fd, mode, nbytes, /)\n" "--\n" "\n" @@ -73,7 +73,7 @@ exit: return return_value; } -PyDoc_STRVAR(msvcrt_setmode__doc__, +TyDoc_STRVAR(msvcrt_setmode__doc__, "setmode($module, fd, mode, /)\n" "--\n" "\n" @@ -119,7 +119,7 @@ exit: return return_value; } -PyDoc_STRVAR(msvcrt_open_osfhandle__doc__, +TyDoc_STRVAR(msvcrt_open_osfhandle__doc__, "open_osfhandle($module, handle, flags, /)\n" "--\n" "\n" @@ -164,7 +164,7 @@ exit: return return_value; } -PyDoc_STRVAR(msvcrt_get_osfhandle__doc__, +TyDoc_STRVAR(msvcrt_get_osfhandle__doc__, "get_osfhandle($module, fd, /)\n" "--\n" "\n" @@ -199,7 +199,7 @@ exit: return return_value; } -PyDoc_STRVAR(msvcrt_kbhit__doc__, +TyDoc_STRVAR(msvcrt_kbhit__doc__, "kbhit($module, /)\n" "--\n" "\n" @@ -227,7 +227,7 @@ exit: return return_value; } -PyDoc_STRVAR(msvcrt_getch__doc__, +TyDoc_STRVAR(msvcrt_getch__doc__, "getch($module, /)\n" "--\n" "\n" @@ -259,7 +259,7 @@ msvcrt_getch(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(MS_WINDOWS_DESKTOP) -PyDoc_STRVAR(msvcrt_getwch__doc__, +TyDoc_STRVAR(msvcrt_getwch__doc__, "getwch($module, /)\n" "--\n" "\n" @@ -285,7 +285,7 @@ msvcrt_getwch(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(MS_WINDOWS_DESKTOP) */ -PyDoc_STRVAR(msvcrt_getche__doc__, +TyDoc_STRVAR(msvcrt_getche__doc__, "getche($module, /)\n" "--\n" "\n" @@ -311,7 +311,7 @@ msvcrt_getche(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(MS_WINDOWS_DESKTOP) -PyDoc_STRVAR(msvcrt_getwche__doc__, +TyDoc_STRVAR(msvcrt_getwche__doc__, "getwche($module, /)\n" "--\n" "\n" @@ -337,7 +337,7 @@ msvcrt_getwche(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(MS_WINDOWS_DESKTOP) */ -PyDoc_STRVAR(msvcrt_putch__doc__, +TyDoc_STRVAR(msvcrt_putch__doc__, "putch($module, char, /)\n" "--\n" "\n" @@ -387,7 +387,7 @@ exit: #if defined(MS_WINDOWS_DESKTOP) -PyDoc_STRVAR(msvcrt_putwch__doc__, +TyDoc_STRVAR(msvcrt_putwch__doc__, "putwch($module, unicode_char, /)\n" "--\n" "\n" @@ -425,7 +425,7 @@ exit: #endif /* defined(MS_WINDOWS_DESKTOP) */ -PyDoc_STRVAR(msvcrt_ungetch__doc__, +TyDoc_STRVAR(msvcrt_ungetch__doc__, "ungetch($module, char, /)\n" "--\n" "\n" @@ -479,7 +479,7 @@ exit: #if defined(MS_WINDOWS_DESKTOP) -PyDoc_STRVAR(msvcrt_ungetwch__doc__, +TyDoc_STRVAR(msvcrt_ungetwch__doc__, "ungetwch($module, unicode_char, /)\n" "--\n" "\n" @@ -519,7 +519,7 @@ exit: #if defined(_DEBUG) -PyDoc_STRVAR(msvcrt_CrtSetReportFile__doc__, +TyDoc_STRVAR(msvcrt_CrtSetReportFile__doc__, "CrtSetReportFile($module, type, file, /)\n" "--\n" "\n" @@ -566,7 +566,7 @@ exit: #if defined(_DEBUG) -PyDoc_STRVAR(msvcrt_CrtSetReportMode__doc__, +TyDoc_STRVAR(msvcrt_CrtSetReportMode__doc__, "CrtSetReportMode($module, type, mode, /)\n" "--\n" "\n" @@ -613,7 +613,7 @@ exit: #if defined(_DEBUG) -PyDoc_STRVAR(msvcrt_set_error_mode__doc__, +TyDoc_STRVAR(msvcrt_set_error_mode__doc__, "set_error_mode($module, mode, /)\n" "--\n" "\n" @@ -652,7 +652,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(msvcrt_GetErrorMode__doc__, +TyDoc_STRVAR(msvcrt_GetErrorMode__doc__, "GetErrorMode($module, /)\n" "--\n" "\n" @@ -672,7 +672,7 @@ msvcrt_GetErrorMode(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_APP) || defined(MS_WINDOWS_SYSTEM)) */ -PyDoc_STRVAR(msvcrt_SetErrorMode__doc__, +TyDoc_STRVAR(msvcrt_SetErrorMode__doc__, "SetErrorMode($module, mode, /)\n" "--\n" "\n" diff --git a/PC/clinic/winreg.c.h b/PC/clinic/winreg.c.h index ce8b599..447e456 100644 --- a/PC/clinic/winreg.c.h +++ b/PC/clinic/winreg.c.h @@ -11,7 +11,7 @@ preserve #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_HKEYType_Close__doc__, +TyDoc_STRVAR(winreg_HKEYType_Close__doc__, "Close($self, /)\n" "--\n" "\n" @@ -35,7 +35,7 @@ winreg_HKEYType_Close(TyObject *self, TyObject *Py_UNUSED(ignored)) #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_HKEYType_Detach__doc__, +TyDoc_STRVAR(winreg_HKEYType_Detach__doc__, "Detach($self, /)\n" "--\n" "\n" @@ -65,7 +65,7 @@ winreg_HKEYType_Detach(TyObject *self, TyObject *Py_UNUSED(ignored)) #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_HKEYType___enter____doc__, +TyDoc_STRVAR(winreg_HKEYType___enter____doc__, "__enter__($self, /)\n" "--\n" "\n"); @@ -92,7 +92,7 @@ winreg_HKEYType___enter__(TyObject *self, TyObject *Py_UNUSED(ignored)) #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_HKEYType___exit____doc__, +TyDoc_STRVAR(winreg_HKEYType___exit____doc__, "__exit__($self, exc_type, exc_value, traceback, /)\n" "--\n" "\n"); @@ -128,7 +128,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_CloseKey__doc__, +TyDoc_STRVAR(winreg_CloseKey__doc__, "CloseKey($module, hkey, /)\n" "--\n" "\n" @@ -147,7 +147,7 @@ PyDoc_STRVAR(winreg_CloseKey__doc__, #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(winreg_ConnectRegistry__doc__, +TyDoc_STRVAR(winreg_ConnectRegistry__doc__, "ConnectRegistry($module, computer_name, key, /)\n" "--\n" "\n" @@ -213,7 +213,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_CreateKey__doc__, +TyDoc_STRVAR(winreg_CreateKey__doc__, "CreateKey($module, key, sub_key, /)\n" "--\n" "\n" @@ -282,7 +282,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_CreateKeyEx__doc__, +TyDoc_STRVAR(winreg_CreateKeyEx__doc__, "CreateKeyEx($module, /, key, sub_key, reserved=0,\n" " access=winreg.KEY_WRITE)\n" "--\n" @@ -327,7 +327,7 @@ winreg_CreateKeyEx(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(sub_key), &_Ty_ID(reserved), &_Ty_ID(access), }, }; @@ -408,7 +408,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_DeleteKey__doc__, +TyDoc_STRVAR(winreg_DeleteKey__doc__, "DeleteKey($module, key, sub_key, /)\n" "--\n" "\n" @@ -466,7 +466,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_DeleteKeyEx__doc__, +TyDoc_STRVAR(winreg_DeleteKeyEx__doc__, "DeleteKeyEx($module, /, key, sub_key, access=winreg.KEY_WOW64_64KEY,\n" " reserved=0)\n" "--\n" @@ -514,7 +514,7 @@ winreg_DeleteKeyEx(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(sub_key), &_Ty_ID(access), &_Ty_ID(reserved), }, }; @@ -585,7 +585,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_DeleteValue__doc__, +TyDoc_STRVAR(winreg_DeleteValue__doc__, "DeleteValue($module, key, value, /)\n" "--\n" "\n" @@ -641,7 +641,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_EnumKey__doc__, +TyDoc_STRVAR(winreg_EnumKey__doc__, "EnumKey($module, key, index, /)\n" "--\n" "\n" @@ -689,7 +689,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_EnumValue__doc__, +TyDoc_STRVAR(winreg_EnumValue__doc__, "EnumValue($module, key, index, /)\n" "--\n" "\n" @@ -746,7 +746,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_ExpandEnvironmentStrings__doc__, +TyDoc_STRVAR(winreg_ExpandEnvironmentStrings__doc__, "ExpandEnvironmentStrings($module, string, /)\n" "--\n" "\n" @@ -785,7 +785,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(winreg_FlushKey__doc__, +TyDoc_STRVAR(winreg_FlushKey__doc__, "FlushKey($module, key, /)\n" "--\n" "\n" @@ -829,7 +829,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(winreg_LoadKey__doc__, +TyDoc_STRVAR(winreg_LoadKey__doc__, "LoadKey($module, key, sub_key, file_name, /)\n" "--\n" "\n" @@ -909,7 +909,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_OpenKey__doc__, +TyDoc_STRVAR(winreg_OpenKey__doc__, "OpenKey($module, /, key, sub_key, reserved=0, access=winreg.KEY_READ)\n" "--\n" "\n" @@ -948,7 +948,7 @@ winreg_OpenKey(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObje Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(sub_key), &_Ty_ID(reserved), &_Ty_ID(access), }, }; @@ -1029,7 +1029,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_OpenKeyEx__doc__, +TyDoc_STRVAR(winreg_OpenKeyEx__doc__, "OpenKeyEx($module, /, key, sub_key, reserved=0, access=winreg.KEY_READ)\n" "--\n" "\n" @@ -1068,7 +1068,7 @@ winreg_OpenKeyEx(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(sub_key), &_Ty_ID(reserved), &_Ty_ID(access), }, }; @@ -1149,7 +1149,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_QueryInfoKey__doc__, +TyDoc_STRVAR(winreg_QueryInfoKey__doc__, "QueryInfoKey($module, key, /)\n" "--\n" "\n" @@ -1189,7 +1189,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_QueryValue__doc__, +TyDoc_STRVAR(winreg_QueryValue__doc__, "QueryValue($module, key, sub_key, /)\n" "--\n" "\n" @@ -1254,7 +1254,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_QueryValueEx__doc__, +TyDoc_STRVAR(winreg_QueryValueEx__doc__, "QueryValueEx($module, key, name, /)\n" "--\n" "\n" @@ -1315,7 +1315,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(winreg_SaveKey__doc__, +TyDoc_STRVAR(winreg_SaveKey__doc__, "SaveKey($module, key, file_name, /)\n" "--\n" "\n" @@ -1376,7 +1376,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_SetValue__doc__, +TyDoc_STRVAR(winreg_SetValue__doc__, "SetValue($module, key, sub_key, type, value, /)\n" "--\n" "\n" @@ -1458,7 +1458,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) -PyDoc_STRVAR(winreg_SetValueEx__doc__, +TyDoc_STRVAR(winreg_SetValueEx__doc__, "SetValueEx($module, key, value_name, reserved, type, value, /)\n" "--\n" "\n" @@ -1555,7 +1555,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(winreg_DisableReflectionKey__doc__, +TyDoc_STRVAR(winreg_DisableReflectionKey__doc__, "DisableReflectionKey($module, key, /)\n" "--\n" "\n" @@ -1595,7 +1595,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(winreg_EnableReflectionKey__doc__, +TyDoc_STRVAR(winreg_EnableReflectionKey__doc__, "EnableReflectionKey($module, key, /)\n" "--\n" "\n" @@ -1633,7 +1633,7 @@ exit: #if (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM) || defined(MS_WINDOWS_GAMES)) && (defined(MS_WINDOWS_DESKTOP) || defined(MS_WINDOWS_SYSTEM)) -PyDoc_STRVAR(winreg_QueryReflectionKey__doc__, +TyDoc_STRVAR(winreg_QueryReflectionKey__doc__, "QueryReflectionKey($module, key, /)\n" "--\n" "\n" diff --git a/PC/clinic/winsound.c.h b/PC/clinic/winsound.c.h index ddf283a..a4b84e7 100644 --- a/PC/clinic/winsound.c.h +++ b/PC/clinic/winsound.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(winsound_PlaySound__doc__, +TyDoc_STRVAR(winsound_PlaySound__doc__, "PlaySound($module, /, sound, flags)\n" "--\n" "\n" @@ -36,7 +36,7 @@ exit: return return_value; } -PyDoc_STRVAR(winsound_Beep__doc__, +TyDoc_STRVAR(winsound_Beep__doc__, "Beep($module, /, frequency, duration)\n" "--\n" "\n" @@ -71,7 +71,7 @@ exit: return return_value; } -PyDoc_STRVAR(winsound_MessageBeep__doc__, +TyDoc_STRVAR(winsound_MessageBeep__doc__, "MessageBeep($module, /, type=MB_OK)\n" "--\n" "\n" diff --git a/PC/python3dll.c b/PC/python3dll.c index dc137ed..8f3bb78 100644 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -584,10 +584,10 @@ EXPORT_FUNC(TySlice_Unpack) EXPORT_FUNC(PyState_AddModule) EXPORT_FUNC(PyState_FindModule) EXPORT_FUNC(PyState_RemoveModule) -EXPORT_FUNC(PyStructSequence_GetItem) -EXPORT_FUNC(PyStructSequence_New) -EXPORT_FUNC(PyStructSequence_NewType) -EXPORT_FUNC(PyStructSequence_SetItem) +EXPORT_FUNC(TyStructSequence_GetItem) +EXPORT_FUNC(TyStructSequence_New) +EXPORT_FUNC(TyStructSequence_NewType) +EXPORT_FUNC(TyStructSequence_SetItem) EXPORT_FUNC(TySys_AddWarnOption) EXPORT_FUNC(TySys_AddWarnOptionUnicode) EXPORT_FUNC(TySys_AddXOption) @@ -605,32 +605,32 @@ EXPORT_FUNC(TySys_SetObject) EXPORT_FUNC(TySys_SetPath) EXPORT_FUNC(TySys_WriteStderr) EXPORT_FUNC(TySys_WriteStdout) -EXPORT_FUNC(PyThread_acquire_lock) -EXPORT_FUNC(PyThread_acquire_lock_timed) -EXPORT_FUNC(PyThread_allocate_lock) -EXPORT_FUNC(PyThread_create_key) -EXPORT_FUNC(PyThread_delete_key) -EXPORT_FUNC(PyThread_delete_key_value) -EXPORT_FUNC(PyThread_exit_thread) -EXPORT_FUNC(PyThread_free_lock) -EXPORT_FUNC(PyThread_get_key_value) -EXPORT_FUNC(PyThread_get_stacksize) -EXPORT_FUNC(PyThread_get_thread_ident) -EXPORT_FUNC(PyThread_get_thread_native_id) -EXPORT_FUNC(PyThread_GetInfo) -EXPORT_FUNC(PyThread_init_thread) -EXPORT_FUNC(PyThread_ReInitTLS) -EXPORT_FUNC(PyThread_release_lock) -EXPORT_FUNC(PyThread_set_key_value) -EXPORT_FUNC(PyThread_set_stacksize) -EXPORT_FUNC(PyThread_start_new_thread) -EXPORT_FUNC(PyThread_tss_alloc) -EXPORT_FUNC(PyThread_tss_create) -EXPORT_FUNC(PyThread_tss_delete) -EXPORT_FUNC(PyThread_tss_free) -EXPORT_FUNC(PyThread_tss_get) -EXPORT_FUNC(PyThread_tss_is_created) -EXPORT_FUNC(PyThread_tss_set) +EXPORT_FUNC(TyThread_acquire_lock) +EXPORT_FUNC(TyThread_acquire_lock_timed) +EXPORT_FUNC(TyThread_allocate_lock) +EXPORT_FUNC(TyThread_create_key) +EXPORT_FUNC(TyThread_delete_key) +EXPORT_FUNC(TyThread_delete_key_value) +EXPORT_FUNC(TyThread_exit_thread) +EXPORT_FUNC(TyThread_free_lock) +EXPORT_FUNC(TyThread_get_key_value) +EXPORT_FUNC(TyThread_get_stacksize) +EXPORT_FUNC(TyThread_get_thread_ident) +EXPORT_FUNC(TyThread_get_thread_native_id) +EXPORT_FUNC(TyThread_GetInfo) +EXPORT_FUNC(TyThread_init_thread) +EXPORT_FUNC(TyThread_ReInitTLS) +EXPORT_FUNC(TyThread_release_lock) +EXPORT_FUNC(TyThread_set_key_value) +EXPORT_FUNC(TyThread_set_stacksize) +EXPORT_FUNC(TyThread_start_new_thread) +EXPORT_FUNC(TyThread_tss_alloc) +EXPORT_FUNC(TyThread_tss_create) +EXPORT_FUNC(TyThread_tss_delete) +EXPORT_FUNC(TyThread_tss_free) +EXPORT_FUNC(TyThread_tss_get) +EXPORT_FUNC(TyThread_tss_is_created) +EXPORT_FUNC(TyThread_tss_set) EXPORT_FUNC(TyThreadState_Clear) EXPORT_FUNC(TyThreadState_Delete) EXPORT_FUNC(TyThreadState_DeleteCurrent) @@ -925,7 +925,7 @@ EXPORT_DATA(TySeqIter_Type) EXPORT_DATA(TySet_Type) EXPORT_DATA(PySetIter_Type) EXPORT_DATA(TySlice_Type) -EXPORT_DATA(PyStructSequence_UnnamedField) +EXPORT_DATA(TyStructSequence_UnnamedField) EXPORT_DATA(TySuper_Type) EXPORT_DATA(PyTraceBack_Type) EXPORT_DATA(TyTuple_Type) diff --git a/PC/winreg.c b/PC/winreg.c index 4f99ee4..f001b95 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -40,7 +40,7 @@ static BOOL PyHKEY_Close(winreg_state *st, TyObject *obHandle); TyErr_SetFromWindowsErr(rc) /* Doc strings */ -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module provides access to the Windows registry API.\n" "\n" "Functions:\n" @@ -82,7 +82,7 @@ PyDoc_STRVAR(module_doc, /* PyHKEY docstrings */ -PyDoc_STRVAR(PyHKEY_doc, +TyDoc_STRVAR(PyHKEY_doc, "PyHKEY Object - A Python object, representing a win32 registry key.\n" "\n" "This object wraps a Windows HKEY object, automatically closing it when\n" diff --git a/PC/winsound.c b/PC/winsound.c index 6caf9c7..8500d85 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -45,7 +45,7 @@ #include #include -PyDoc_STRVAR(sound_module_doc, +TyDoc_STRVAR(sound_module_doc, "PlaySound(sound, flags) - play a sound\n" "SND_FILENAME - sound is a wav file name\n" "SND_ALIAS - sound is a registry sound association name\n" diff --git a/Parser/action_helpers.c b/Parser/action_helpers.c index f4526bd..f2d97d7 100644 --- a/Parser/action_helpers.c +++ b/Parser/action_helpers.c @@ -126,7 +126,7 @@ _TyPegen_join_names_with_dot(Parser *p, expr_ty first_name, expr_ty second_name) if (!uni) { return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, &uni); if (_TyArena_AddPyObject(p->arena, uni) < 0) { Ty_DECREF(uni); diff --git a/Parser/pegen.c b/Parser/pegen.c index 0b908bc..852d92a 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -554,7 +554,7 @@ _TyPegen_new_identifier(Parser *p, const char *n) goto error; } } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, &id); if (_TyArena_AddPyObject(p->arena, id) < 0) { diff --git a/Programs/_testembed.c b/Programs/_testembed.c index 43459e0..1fb0cd1 100644 --- a/Programs/_testembed.c +++ b/Programs/_testembed.c @@ -8,7 +8,7 @@ #include #include "pycore_initconfig.h" // _TyConfig_InitCompatConfig() #include "pycore_runtime.h" // _PyRuntime -#include "pycore_pythread.h" // PyThread_start_joinable_thread() +#include "pycore_pythread.h" // TyThread_start_joinable_thread() #include "pycore_import.h" // _TyImport_FrozenBootstrap #include #include @@ -112,7 +112,7 @@ static void print_subinterp(void) /* Output information about the interpreter in the format expected in Lib/test/test_capi.py (test_subinterps). */ TyThreadState *ts = TyThreadState_Get(); - PyInterpreterState *interp = ts->interp; + TyInterpreterState *interp = ts->interp; int64_t id = TyInterpreterState_GetID(interp); printf("interp %" PRId64 " <0x%" PRIXPTR ">, thread state <0x%" PRIXPTR ">: ", id, (uintptr_t)interp, (uintptr_t)ts); @@ -405,7 +405,7 @@ static int test_pre_initialization_sys_options(void) /* bpo-20891: Avoid race condition when initialising the GIL */ static void bpo20891_thread(void *lockp) { - PyThread_type_lock lock = *((PyThread_type_lock*)lockp); + TyThread_type_lock lock = *((TyThread_type_lock*)lockp); TyGILState_STATE state = TyGILState_Ensure(); if (!TyGILState_Check()) { @@ -415,7 +415,7 @@ static void bpo20891_thread(void *lockp) TyGILState_Release(state); - PyThread_release_lock(lock); + TyThread_release_lock(lock); } static int test_bpo20891(void) @@ -425,27 +425,27 @@ static int test_bpo20891(void) /* bpo-20891: Calling TyGILState_Ensure in a non-Python thread must not crash. */ - PyThread_type_lock lock = PyThread_allocate_lock(); + TyThread_type_lock lock = TyThread_allocate_lock(); if (!lock) { - error("PyThread_allocate_lock failed!"); + error("TyThread_allocate_lock failed!"); return 1; } _testembed_Py_InitializeFromConfig(); - unsigned long thrd = PyThread_start_new_thread(bpo20891_thread, &lock); + unsigned long thrd = TyThread_start_new_thread(bpo20891_thread, &lock); if (thrd == PYTHREAD_INVALID_THREAD_ID) { - error("PyThread_start_new_thread failed!"); + error("TyThread_start_new_thread failed!"); return 1; } - PyThread_acquire_lock(lock, WAIT_LOCK); + TyThread_acquire_lock(lock, WAIT_LOCK); Ty_BEGIN_ALLOW_THREADS /* wait until the thread exit */ - PyThread_acquire_lock(lock, WAIT_LOCK); + TyThread_acquire_lock(lock, WAIT_LOCK); Ty_END_ALLOW_THREADS - PyThread_free_lock(lock); + TyThread_free_lock(lock); Ty_Finalize(); @@ -2212,12 +2212,12 @@ static void do_init(void *unused) static int test_init_in_background_thread(void) { - PyThread_handle_t handle; - PyThread_ident_t ident; - if (PyThread_start_joinable_thread(&do_init, NULL, &ident, &handle) < 0) { + TyThread_handle_t handle; + TyThread_ident_t ident; + if (TyThread_start_joinable_thread(&do_init, NULL, &ident, &handle) < 0) { return -1; } - return PyThread_join_thread(handle); + return TyThread_join_thread(handle); } diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 86b416e..36f30da 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -20,7 +20,7 @@ static int init_types(void *arg); static struct ast_state* get_ast_state(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct ast_state *state = &interp->ast; assert(!state->finalized); if (_PyOnceFlag_CallOnce(&state->once, (_Ty_once_fn_t *)&init_types, state) < 0) { @@ -29,7 +29,7 @@ get_ast_state(void) return state; } -void _TyAST_Fini(PyInterpreterState *interp) +void _TyAST_Fini(TyInterpreterState *interp) { struct ast_state *state = &interp->ast; @@ -5735,7 +5735,7 @@ static TyMemberDef ast_type_members[] = { static TyMethodDef ast_type_methods[] = { {"__reduce__", ast_type_reduce, METH_NOARGS, NULL}, {"__replace__", _PyCFunction_CAST(ast_type_replace), METH_VARARGS | METH_KEYWORDS, - PyDoc_STR("__replace__($self, /, **fields)\n--\n\n" + TyDoc_STR("__replace__($self, /, **fields)\n--\n\n" "Return a copy of the AST node with new values " "for the specified fields.")}, {NULL} @@ -18400,7 +18400,7 @@ static PyModuleDef_Slot astmodule_slots[] = { static struct TyModuleDef _astmodule = { PyModuleDef_HEAD_INIT, .m_name = "_ast", - // The _ast module uses a per-interpreter state (PyInterpreterState.ast) + // The _ast module uses a per-interpreter state (TyInterpreterState.ast) .m_size = 0, .m_slots = astmodule_slots, }; diff --git a/Python/_contextvars.c b/Python/_contextvars.c index 2afdcff..0da2229 100644 --- a/Python/_contextvars.c +++ b/Python/_contextvars.c @@ -20,7 +20,7 @@ _contextvars_copy_context_impl(TyObject *module) } -PyDoc_STRVAR(module_doc, "Context Variables"); +TyDoc_STRVAR(module_doc, "Context Variables"); static TyMethodDef _contextvars_methods[] = { _CONTEXTVARS_COPY_CONTEXT_METHODDEF diff --git a/Python/_warnings.c b/Python/_warnings.c index f8d2099..96b3a83 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -16,7 +16,7 @@ #define MODULE_NAME "_warnings" -PyDoc_STRVAR(warnings__doc__, +TyDoc_STRVAR(warnings__doc__, MODULE_NAME " provides basic warning filtering support.\n" "It is a helper module to speed up interpreter start-up."); @@ -26,7 +26,7 @@ MODULE_NAME " provides basic warning filtering support.\n" typedef struct _warnings_runtime_state WarningsState; static inline int -check_interp(PyInterpreterState *interp) +check_interp(TyInterpreterState *interp) { if (interp == NULL) { TyErr_SetString(TyExc_RuntimeError, @@ -37,10 +37,10 @@ check_interp(PyInterpreterState *interp) return 1; } -static inline PyInterpreterState * +static inline TyInterpreterState * get_current_interp(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return check_interp(interp) ? interp : NULL; } @@ -57,7 +57,7 @@ get_current_tstate(void) /* Given a module object, get its per-module state. */ static WarningsState * -warnings_get_state(PyInterpreterState *interp) +warnings_get_state(TyInterpreterState *interp) { return &interp->warnings; } @@ -97,7 +97,7 @@ create_filter(TyObject *category, TyObject *action_str, const char *modname) #endif static TyObject * -init_filters(PyInterpreterState *interp) +init_filters(TyInterpreterState *interp) { #ifdef Ty_DEBUG /* Ty_DEBUG builds show all warnings by default */ @@ -132,7 +132,7 @@ init_filters(PyInterpreterState *interp) /* Initialize the given warnings module state. */ int -_TyWarnings_InitState(PyInterpreterState *interp) +_TyWarnings_InitState(TyInterpreterState *interp) { WarningsState *st = &interp->warnings; @@ -172,7 +172,7 @@ _TyWarnings_InitState(PyInterpreterState *interp) /*************************************************************************/ static int -check_matched(PyInterpreterState *interp, TyObject *obj, TyObject *arg) +check_matched(TyInterpreterState *interp, TyObject *obj, TyObject *arg) { TyObject *result; int rc; @@ -208,7 +208,7 @@ check_matched(PyInterpreterState *interp, TyObject *obj, TyObject *arg) A NULL return value can mean false or an error. */ static TyObject * -get_warnings_attr(PyInterpreterState *interp, TyObject *attr, int try_import) +get_warnings_attr(TyInterpreterState *interp, TyObject *attr, int try_import) { TyObject *warnings_module, *obj; @@ -243,7 +243,7 @@ get_warnings_attr(PyInterpreterState *interp, TyObject *attr, int try_import) } static inline void -warnings_lock(PyInterpreterState *interp) +warnings_lock(TyInterpreterState *interp) { WarningsState *st = warnings_get_state(interp); assert(st != NULL); @@ -251,7 +251,7 @@ warnings_lock(PyInterpreterState *interp) } static inline int -warnings_unlock(PyInterpreterState *interp) +warnings_unlock(TyInterpreterState *interp) { WarningsState *st = warnings_get_state(interp); assert(st != NULL); @@ -265,7 +265,7 @@ warnings_lock_held(WarningsState *st) } static TyObject * -get_warnings_context(PyInterpreterState *interp) +get_warnings_context(TyInterpreterState *interp) { WarningsState *st = warnings_get_state(interp); assert(PyContextVar_CheckExact(st->context)); @@ -280,7 +280,7 @@ get_warnings_context(PyInterpreterState *interp) } static TyObject * -get_warnings_context_filters(PyInterpreterState *interp) +get_warnings_context_filters(TyInterpreterState *interp) { TyObject *ctx = get_warnings_context(interp); if (ctx == NULL) { @@ -305,7 +305,7 @@ get_warnings_context_filters(PyInterpreterState *interp) // Returns a borrowed reference to the list. static TyObject * -get_warnings_filters(PyInterpreterState *interp) +get_warnings_filters(TyInterpreterState *interp) { WarningsState *st = warnings_get_state(interp); TyObject *warnings_filters = GET_WARNINGS_ATTR(interp, filters, 0); @@ -335,7 +335,7 @@ static TyObject * warnings_acquire_lock_impl(TyObject *module) /*[clinic end generated code: output=594313457d1bf8e1 input=46ec20e55acca52f]*/ { - PyInterpreterState *interp = get_current_interp(); + TyInterpreterState *interp = get_current_interp(); if (interp == NULL) { return NULL; } @@ -352,7 +352,7 @@ static TyObject * warnings_release_lock_impl(TyObject *module) /*[clinic end generated code: output=d73d5a8789396750 input=ea01bb77870c5693]*/ { - PyInterpreterState *interp = get_current_interp(); + TyInterpreterState *interp = get_current_interp(); if (interp == NULL) { return NULL; } @@ -364,7 +364,7 @@ warnings_release_lock_impl(TyObject *module) } static TyObject * -get_once_registry(PyInterpreterState *interp) +get_once_registry(TyInterpreterState *interp) { WarningsState *st = warnings_get_state(interp); assert(st != NULL); @@ -392,7 +392,7 @@ get_once_registry(PyInterpreterState *interp) static TyObject * -get_default_action(PyInterpreterState *interp) +get_default_action(TyInterpreterState *interp) { WarningsState *st = warnings_get_state(interp); assert(st != NULL); @@ -422,7 +422,7 @@ get_default_action(PyInterpreterState *interp) /* Search filters list of match, returns false on error. If no match * then 'matched_action' is NULL. */ static bool -filter_search(PyInterpreterState *interp, TyObject *category, +filter_search(TyInterpreterState *interp, TyObject *category, TyObject *text, Ty_ssize_t lineno, TyObject *module, char *list_name, TyObject *filters, TyObject **item, TyObject **matched_action) { @@ -503,7 +503,7 @@ filter_search(PyInterpreterState *interp, TyObject *category, /* The item is a new reference. */ static TyObject* -get_filter(PyInterpreterState *interp, TyObject *category, +get_filter(TyInterpreterState *interp, TyObject *category, TyObject *text, Ty_ssize_t lineno, TyObject *module, TyObject **item) { @@ -562,7 +562,7 @@ get_filter(PyInterpreterState *interp, TyObject *category, static int -already_warned(PyInterpreterState *interp, TyObject *registry, TyObject *key, +already_warned(TyInterpreterState *interp, TyObject *registry, TyObject *key, int should_set) { TyObject *already_warned; @@ -647,7 +647,7 @@ normalize_module(TyObject *filename) } static int -update_registry(PyInterpreterState *interp, TyObject *registry, TyObject *text, +update_registry(TyInterpreterState *interp, TyObject *registry, TyObject *text, TyObject *category, int add_zero) { TyObject *altkey; @@ -740,7 +740,7 @@ call_show_warning(TyThreadState *tstate, TyObject *category, TyObject *sourceline, TyObject *source) { TyObject *show_fn, *msg, *res, *warnmsg_cls = NULL; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; /* The Python implementation is able to log the traceback where the source was allocated, whereas the C implementation doesn't. */ @@ -799,7 +799,7 @@ warn_explicit(TyThreadState *tstate, TyObject *category, TyObject *message, TyObject *item = NULL; TyObject *action; int rc; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; /* module can be None if a warning is emitted late during Python shutdown. In this case, the Python warnings module was probably unloaded, filters @@ -1049,7 +1049,7 @@ setup_context(Ty_ssize_t stack_level, } } } - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; PyFrameObject *f = TyThreadState_GetFrame(tstate); // Stack level comparisons to Python code is off by one as there is no // warnings-related stack level to avoid. @@ -1220,7 +1220,7 @@ warnings_warn_impl(TyObject *module, TyObject *message, TyObject *category, } static TyObject * -get_source_line(PyInterpreterState *interp, TyObject *module_globals, int lineno) +get_source_line(TyInterpreterState *interp, TyObject *module_globals, int lineno) { TyObject *loader; TyObject *module_name; @@ -1336,7 +1336,7 @@ static TyObject * warnings_filters_mutated_lock_held_impl(TyObject *module) /*[clinic end generated code: output=df5c84f044e856ec input=34208bf03d70e432]*/ { - PyInterpreterState *interp = get_current_interp(); + TyInterpreterState *interp = get_current_interp(); if (interp == NULL) { return NULL; } @@ -1615,7 +1615,7 @@ _TyErr_WarnUnawaitedCoroutine(TyObject *coro) an exception. */ int warned = 0; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp != NULL); TyObject *fn = GET_WARNINGS_ATTR(interp, _warn_unawaited_coroutine, 1); if (fn) { @@ -1658,7 +1658,7 @@ static TyMethodDef warnings_functions[] = { static int warnings_module_exec(TyObject *module) { - PyInterpreterState *interp = get_current_interp(); + TyInterpreterState *interp = get_current_interp(); if (interp == NULL) { return -1; } @@ -1707,7 +1707,7 @@ _TyWarnings_Init(void) // We need this to ensure that warnings still work until late in finalization. void -_TyWarnings_Fini(PyInterpreterState *interp) +_TyWarnings_Fini(TyInterpreterState *interp) { warnings_clear_state(&interp->warnings); } diff --git a/Python/assemble.c b/Python/assemble.c index d9f3950..82c214d 100644 --- a/Python/assemble.c +++ b/Python/assemble.c @@ -3,7 +3,7 @@ #include "pycore_compile.h" #include "pycore_instruction_sequence.h" #include "pycore_opcode_utils.h" // IS_BACKWARDS_JUMP_OPCODE -#include "pycore_opcode_metadata.h" // is_pseudo_target, _PyOpcode_Caches +#include "pycore_opcode_metadata.h" // is_pseudo_target, _TyOpcode_Caches #include "pycore_symtable.h" // _Ty_SourceLocation #include @@ -43,7 +43,7 @@ instr_size(instruction *instr) assert(!IS_PSEUDO_INSTR(opcode)); assert(OPCODE_HAS_ARG(opcode) || oparg == 0); int extended_args = (0xFFFFFF < oparg) + (0xFFFF < oparg) + (0xFF < oparg); - int caches = _PyOpcode_Caches[opcode]; + int caches = _TyOpcode_Caches[opcode]; return extended_args + 1 + caches; } @@ -372,7 +372,7 @@ write_instr(_Ty_CODEUNIT *codestr, instruction *instr, int ilen) assert(!IS_PSEUDO_INSTR(opcode)); int oparg = instr->i_oparg; assert(OPCODE_HAS_ARG(opcode) || oparg == 0); - int caches = _PyOpcode_Caches[opcode]; + int caches = _TyOpcode_Caches[opcode]; switch (ilen - caches) { case 4: codestr->op.code = EXTENDED_ARG; diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 9f82feb..801a419 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -246,7 +246,7 @@ error: return cls; } -PyDoc_STRVAR(build_class_doc, +TyDoc_STRVAR(build_class_doc, "__build_class__(func, name, /, *bases, [metaclass], **kwds) -> class\n\ \n\ Internal helper function used by the class statement."); @@ -480,7 +480,7 @@ builtin_breakpoint(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyOb return retval; } -PyDoc_STRVAR(breakpoint_doc, +TyDoc_STRVAR(breakpoint_doc, "breakpoint($module, /, *args, **kws)\n\ --\n\ \n\ @@ -623,14 +623,14 @@ filter_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) return Ty_BuildValue("O(OO)", Ty_TYPE(lz), lz->func, lz->it); } -PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); +TyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static TyMethodDef filter_methods[] = { {"__reduce__", filter_reduce, METH_NOARGS, reduce_doc}, {NULL, NULL} /* sentinel */ }; -PyDoc_STRVAR(filter_doc, +TyDoc_STRVAR(filter_doc, "filter(function, iterable, /)\n\ --\n\ \n\ @@ -638,7 +638,7 @@ Return an iterator yielding those items of iterable for which function(item)\n\ is true. If function is None, return the items that are true."); TyTypeObject PyFilter_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "filter", /* tp_name */ sizeof(filterobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -904,7 +904,7 @@ builtin_dir(TyObject *self, TyObject *args) return PyObject_Dir(arg); } -PyDoc_STRVAR(dir_doc, +TyDoc_STRVAR(dir_doc, "dir([object]) -> list of strings\n" "\n" "If called without an argument, return the names in the current scope.\n" @@ -1247,7 +1247,7 @@ builtin_getattr(TyObject *self, TyObject *const *args, Ty_ssize_t nargs) return result; } -PyDoc_STRVAR(getattr_doc, +TyDoc_STRVAR(getattr_doc, "getattr(object, name[, default]) -> value\n\ \n\ Get a named attribute from an object; getattr(x, 'y') is equivalent to x.y.\n\ @@ -1585,7 +1585,7 @@ map_reduce(TyObject *self, TyObject *Py_UNUSED(ignored)) return Ty_BuildValue("ON", Ty_TYPE(lz), args); } -PyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); +TyDoc_STRVAR(setstate_doc, "Set state information for unpickling."); static TyObject * map_setstate(TyObject *self, TyObject *state) @@ -1606,7 +1606,7 @@ static TyMethodDef map_methods[] = { }; -PyDoc_STRVAR(map_doc, +TyDoc_STRVAR(map_doc, "map(function, iterable, /, *iterables, strict=False)\n\ --\n\ \n\ @@ -1617,7 +1617,7 @@ If strict is true and one of the arguments is exhausted before the others,\n\ raise a ValueError."); TyTypeObject PyMap_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "map", /* tp_name */ sizeof(mapobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -1698,7 +1698,7 @@ builtin_next(TyObject *self, TyObject *const *args, Ty_ssize_t nargs) } } -PyDoc_STRVAR(next_doc, +TyDoc_STRVAR(next_doc, "next(iterator[, default])\n\ \n\ Return the next item from the iterator. If default is given and the iterator\n\ @@ -1817,7 +1817,7 @@ builtin_iter(TyObject *self, TyObject *const *args, Ty_ssize_t nargs) return TyCallIter_New(v, sentinel); } -PyDoc_STRVAR(iter_doc, +TyDoc_STRVAR(iter_doc, "iter(iterable) -> iterator\n\ iter(callable, sentinel) -> iterator\n\ \n\ @@ -2069,7 +2069,7 @@ builtin_min(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *k return min_max(args, nargs, kwnames, Py_LT); } -PyDoc_STRVAR(min_doc, +TyDoc_STRVAR(min_doc, "min(iterable, *[, default=obj, key=func]) -> value\n\ min(arg1, arg2, *args, *[, key=func]) -> value\n\ \n\ @@ -2086,7 +2086,7 @@ builtin_max(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyObject *k return min_max(args, nargs, kwnames, Py_GT); } -PyDoc_STRVAR(max_doc, +TyDoc_STRVAR(max_doc, "max(iterable, *[, default=obj, key=func]) -> value\n\ max(arg1, arg2, *args, *[, key=func]) -> value\n\ \n\ @@ -2622,7 +2622,7 @@ A custom key function can be supplied to customize the sort order, and the reverse flag can be set to request the result in descending order. [end disabled clinic input]*/ -PyDoc_STRVAR(builtin_sorted__doc__, +TyDoc_STRVAR(builtin_sorted__doc__, "sorted($module, iterable, /, *, key=None, reverse=False)\n" "--\n" "\n" @@ -2702,7 +2702,7 @@ builtin_vars(TyObject *self, TyObject *args) return d; } -PyDoc_STRVAR(vars_doc, +TyDoc_STRVAR(vars_doc, "vars([object]) -> dictionary\n\ \n\ Without arguments, equivalent to locals().\n\ @@ -3274,7 +3274,7 @@ static TyMethodDef zip_methods[] = { {NULL} /* sentinel */ }; -PyDoc_STRVAR(zip_doc, +TyDoc_STRVAR(zip_doc, "zip(*iterables, strict=False)\n\ --\n\ \n\ @@ -3290,7 +3290,7 @@ raise a ValueError.\n\ [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]"); TyTypeObject PyZip_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "zip", /* tp_name */ sizeof(zipobject), /* tp_basicsize */ 0, /* tp_itemsize */ @@ -3383,7 +3383,7 @@ static TyMethodDef builtin_methods[] = { {NULL, NULL}, }; -PyDoc_STRVAR(builtin_doc, +TyDoc_STRVAR(builtin_doc, "Built-in functions, types, exceptions, and other objects.\n\ \n\ This module provides direct access to all 'built-in'\n\ @@ -3409,7 +3409,7 @@ static struct TyModuleDef builtinsmodule = { TyObject * -_PyBuiltin_Init(PyInterpreterState *interp) +_PyBuiltin_Init(TyInterpreterState *interp) { TyObject *mod, *dict, *debug; diff --git a/Python/brc.c b/Python/brc.c index 6378827..2320726 100644 --- a/Python/brc.c +++ b/Python/brc.c @@ -27,7 +27,7 @@ // Get the hashtable bucket for a given thread id. static struct _brc_bucket * -get_bucket(PyInterpreterState *interp, uintptr_t tid) +get_bucket(TyInterpreterState *interp, uintptr_t tid) { return &interp->brc.table[tid % _Ty_BRC_NUM_BUCKETS]; } @@ -53,7 +53,7 @@ find_thread_state(struct _brc_bucket *bucket, uintptr_t thread_id) void _Ty_brc_queue_object(TyObject *ob) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); uintptr_t ob_tid = _Ty_atomic_load_uintptr(&ob->ob_tid); if (ob_tid == 0) { @@ -132,7 +132,7 @@ _Ty_brc_merge_refcounts(TyThreadState *tstate) } void -_Ty_brc_init_state(PyInterpreterState *interp) +_Ty_brc_init_state(TyInterpreterState *interp) { struct _brc_state *brc = &interp->brc; for (Ty_ssize_t i = 0; i < _Ty_BRC_NUM_BUCKETS; i++) { @@ -193,7 +193,7 @@ _Ty_brc_remove_thread(TyThreadState *tstate) } void -_Ty_brc_after_fork(PyInterpreterState *interp) +_Ty_brc_after_fork(TyInterpreterState *interp) { // Unlock all bucket mutexes. Some of the buckets may be locked because // locks can be handed off to a parked thread (see lock.c). We don't have diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 3462d0a..6224d13 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -1379,10 +1379,10 @@ dummy_func( #if TIER_ONE assert(frame->instr_ptr->op.code == INSTRUMENTED_LINE || frame->instr_ptr->op.code == INSTRUMENTED_INSTRUCTION || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); + _TyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); #endif RELOAD_STACK(); LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND); @@ -2983,7 +2983,7 @@ dummy_func( opcode = executor->vm_data.opcode; oparg = (oparg & ~255) | executor->vm_data.oparg; next_instr = this_instr; - if (_PyOpcode_Caches[_PyOpcode_Deopt[opcode]]) { + if (_TyOpcode_Caches[_TyOpcode_Deopt[opcode]]) { PAUSE_ADAPTIVE_COUNTER(this_instr[1].counter); } DISPATCH_GOTO(); @@ -3252,7 +3252,7 @@ dummy_func( EXIT_IF(Ty_TYPE(iter_o) != &PyListIter_Type); #ifdef Ty_GIL_DISABLED EXIT_IF(!_TyObject_IsUniquelyReferenced(iter_o)); - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; EXIT_IF(!_Ty_IsOwnedByCurrentThread((TyObject *)it->it_seq) || !_TyObject_GC_IS_SHARED(it->it_seq)); #endif @@ -3269,7 +3269,7 @@ dummy_func( assert(_TyObject_IsUniquelyReferenced(iter_o)); (void)iter_o; #else - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; STAT_INC(FOR_ITER, hit); PyListObject *seq = it->it_seq; if (seq == NULL || (size_t)it->it_index >= (size_t)TyList_GET_SIZE(seq)) { @@ -3289,7 +3289,7 @@ dummy_func( op(_GUARD_NOT_EXHAUSTED_LIST, (iter -- iter)) { #ifndef Ty_GIL_DISABLED TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; assert(Ty_TYPE(iter_o) == &PyListIter_Type); PyListObject *seq = it->it_seq; EXIT_IF(seq == NULL); @@ -3302,7 +3302,7 @@ dummy_func( replaced op(_ITER_NEXT_LIST, (iter -- iter, next)) { TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; assert(Ty_TYPE(iter_o) == &PyListIter_Type); PyListObject *seq = it->it_seq; assert(seq); @@ -3331,7 +3331,7 @@ dummy_func( // Only used by Tier 2 op(_ITER_NEXT_LIST_TIER_TWO, (iter -- iter, next)) { TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; assert(Ty_TYPE(iter_o) == &PyListIter_Type); PyListObject *seq = it->it_seq; assert(seq); @@ -3766,7 +3766,7 @@ dummy_func( // Check if the call can be inlined or not if (Ty_TYPE(callable_o) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall) + ((PyFunctionObject *)callable_o)->vectorcall == _TyFunction_Vectorcall) { int code_flags = ((PyCodeObject*)TyFunction_GET_CODE(callable_o))->co_flags; TyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Ty_NewRef(TyFunction_GET_GLOBALS(callable_o)); @@ -4356,7 +4356,7 @@ dummy_func( op(_GUARD_CALLABLE_LEN, (callable, unused, unused -- callable, unused, unused)){ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; DEOPT_IF(callable_o != interp->callable_cache.len); } @@ -4391,7 +4391,7 @@ dummy_func( total_args++; } DEOPT_IF(total_args != 2); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; DEOPT_IF(callable_o != interp->callable_cache.isinstance); STAT_INC(CALL, hit); _PyStackRef cls_stackref = arguments[1]; @@ -4411,7 +4411,7 @@ dummy_func( TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); TyObject *self_o = PyStackRef_AsPyObjectBorrow(self); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; DEOPT_IF(callable_o != interp->callable_cache.list_append); DEOPT_IF(self_o == NULL); DEOPT_IF(!TyList_Check(self_o)); @@ -4643,7 +4643,7 @@ dummy_func( // Check if the call can be inlined or not if (Ty_TYPE(callable_o) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall) + ((PyFunctionObject *)callable_o)->vectorcall == _TyFunction_Vectorcall) { int code_flags = ((PyCodeObject*)TyFunction_GET_CODE(callable_o))->co_flags; TyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Ty_NewRef(TyFunction_GET_GLOBALS(callable_o)); @@ -4906,7 +4906,7 @@ dummy_func( else { if (Ty_TYPE(func) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)func)->vectorcall == _PyFunction_Vectorcall) { + ((PyFunctionObject *)func)->vectorcall == _TyFunction_Vectorcall) { TyObject *callargs = PyStackRef_AsPyObjectSteal(callargs_st); assert(TyTuple_CheckExact(callargs)); TyObject *kwargs = PyStackRef_IsNull(kwargs_st) ? NULL : PyStackRef_AsPyObjectSteal(kwargs_st); @@ -4961,7 +4961,7 @@ dummy_func( PyStackRef_CLOSE(codeobj_st); ERROR_IF(func_obj == NULL); - _PyFunction_SetVersion( + _TyFunction_SetVersion( func_obj, ((PyCodeObject *)codeobj)->co_version); func = PyStackRef_FromPyObjectSteal((TyObject *)func_obj); } @@ -5107,7 +5107,7 @@ dummy_func( DISPATCH(); } } - if (_PyOpcode_Caches[original_opcode]) { + if (_TyOpcode_Caches[original_opcode]) { _PyBinaryOpCache *cache = (_PyBinaryOpCache *)(next_instr+1); /* Prevent the underlying instruction from specializing * and overwriting the instrumentation. */ @@ -5122,7 +5122,7 @@ dummy_func( tstate, frame, this_instr); ERROR_IF(next_opcode < 0); next_instr = this_instr; - if (_PyOpcode_Caches[next_opcode]) { + if (_TyOpcode_Caches[next_opcode]) { PAUSE_ADAPTIVE_COUNTER(next_instr[1].counter); } assert(next_opcode > 0 && next_opcode < 256); @@ -5278,7 +5278,7 @@ dummy_func( printf(", exit %lu, temp %d, target %d -> %s]\n", exit - current_executor->exits, exit->temperature.value_and_backoff, (int)(target - _TyFrame_GetBytecode(frame)), - _PyOpcode_OpName[target->op.code]); + _TyOpcode_OpName[target->op.code]); } #endif if (exit->executor && !exit->executor->vm_data.valid) { diff --git a/Python/ceval.c b/Python/ceval.c index 6ed9d12..194f3af 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -205,9 +205,9 @@ lltrace_instruction(_PyInterpreterFrame *frame, dump_stack(frame, stack_pointer); offset = (int)(next_instr - _TyFrame_GetBytecode(frame)); } - const char *opname = _PyOpcode_OpName[opcode]; + const char *opname = _TyOpcode_OpName[opcode]; assert(opname != NULL); - if (OPCODE_HAS_ARG((int)_PyOpcode_Deopt[opcode])) { + if (OPCODE_HAS_ARG((int)_TyOpcode_Deopt[opcode])) { printf("%d: %s %d\n", offset * 2, opname, oparg); } else { @@ -309,14 +309,14 @@ _PyEvalFramePushAndInit_Ex(TyThreadState *tstate, _PyStackRef func, int Ty_GetRecursionLimit(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return interp->ceval.recursion_limit; } void Ty_SetRecursionLimit(int new_limit) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyEval_StopTheWorld(interp); interp->ceval.recursion_limit = new_limit; _Ty_FOR_EACH_TSTATE_BEGIN(interp, p) { @@ -844,7 +844,7 @@ TyEval_EvalCode(TyObject *co, TyObject *globals, TyObject *locals) .fc_kwdefaults = NULL, .fc_closure = NULL }; - PyFunctionObject *func = _PyFunction_FromConstructor(&desc); + PyFunctionObject *func = _TyFunction_FromConstructor(&desc); _Ty_DECREF_BUILTINS(builtins); if (func == NULL) { return NULL; @@ -1190,7 +1190,7 @@ jump_to_error_target: _PyUOpPrint(&next_uop[-1]); printf(" @ %d -> %s]\n", (int)(next_uop - current_executor->trace - 1), - _PyOpcode_OpName[frame->instr_ptr->op.code]); + _TyOpcode_OpName[frame->instr_ptr->op.code]); } #endif assert(next_uop[-1].format == UOP_FORMAT_JUMP); @@ -2018,7 +2018,7 @@ TyEval_EvalCodeEx(TyObject *_co, TyObject *globals, TyObject *locals, .fc_kwdefaults = kwdefs, .fc_closure = closure }; - func = _PyFunction_FromConstructor(&constr); + func = _TyFunction_FromConstructor(&constr); if (func == NULL) { goto fail; } @@ -2490,7 +2490,7 @@ void TyEval_SetProfileAllThreads(Ty_tracefunc func, TyObject *arg) { TyThreadState *this_tstate = _TyThreadState_GET(); - PyInterpreterState* interp = this_tstate->interp; + TyInterpreterState* interp = this_tstate->interp; _PyRuntimeState *runtime = &_PyRuntime; HEAD_LOCK(runtime); @@ -2521,7 +2521,7 @@ void TyEval_SetTraceAllThreads(Ty_tracefunc func, TyObject *arg) { TyThreadState *this_tstate = _TyThreadState_GET(); - PyInterpreterState* interp = this_tstate->interp; + TyInterpreterState* interp = this_tstate->interp; _PyRuntimeState *runtime = &_PyRuntime; HEAD_LOCK(runtime); @@ -3378,7 +3378,7 @@ _TyEval_FormatAwaitableError(TyThreadState *tstate, TyTypeObject *type, int opar Ty_ssize_t PyUnstable_Eval_RequestCodeExtraIndex(freefunc free) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); Ty_ssize_t new_index; if (interp->co_extra_user_count == MAX_CO_EXTRA_USERS - 1) { diff --git a/Python/ceval_gil.c b/Python/ceval_gil.c index 662c552..aaf0110 100644 --- a/Python/ceval_gil.c +++ b/Python/ceval_gil.c @@ -70,7 +70,7 @@ copy_eval_breaker_bits(uintptr_t *from, uintptr_t *to, uintptr_t mask) // When attaching a thread, set the global instrumentation version and // _PY_CALLS_TO_DO_BIT from the current state of the interpreter. static inline void -update_eval_breaker_for_thread(PyInterpreterState *interp, TyThreadState *tstate) +update_eval_breaker_for_thread(TyInterpreterState *interp, TyThreadState *tstate) { #ifdef Ty_GIL_DISABLED // Free-threaded builds eagerly update the eval_breaker on *all* threads as @@ -213,7 +213,7 @@ drop_gil_impl(TyThreadState *tstate, struct _gil_runtime_state *gil) } static void -drop_gil(PyInterpreterState *interp, TyThreadState *tstate, int final_release) +drop_gil(TyInterpreterState *interp, TyThreadState *tstate, int final_release) { struct _ceval_state *ceval = &interp->ceval; /* If final_release is true, the caller is indicating that we're releasing @@ -307,7 +307,7 @@ take_gil(TyThreadState *tstate) } assert(_TyThreadState_CheckConsistency(tstate)); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; struct _gil_runtime_state *gil = interp->ceval.gil; #ifdef Ty_GIL_DISABLED if (!_Ty_atomic_load_int_relaxed(&gil->enabled)) { @@ -419,7 +419,7 @@ take_gil(TyThreadState *tstate) void _TyEval_SetSwitchInterval(unsigned long microseconds) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _gil_runtime_state *gil = interp->ceval.gil; assert(gil != NULL); _Ty_atomic_store_ulong_relaxed(&gil->interval, microseconds); @@ -427,7 +427,7 @@ void _TyEval_SetSwitchInterval(unsigned long microseconds) unsigned long _TyEval_GetSwitchInterval(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _gil_runtime_state *gil = interp->ceval.gil; assert(gil != NULL); return _Ty_atomic_load_ulong_relaxed(&gil->interval); @@ -440,7 +440,7 @@ _TyEval_ThreadsInitialized(void) /* XXX This is only needed for an assert in TyGILState_Ensure(), * which currently does not work with subinterpreters. * Thus we only use the main interpreter. */ - PyInterpreterState *interp = _TyInterpreterState_Main(); + TyInterpreterState *interp = _TyInterpreterState_Main(); if (interp == NULL) { return 0; } @@ -474,7 +474,7 @@ current_thread_holds_gil(struct _gil_runtime_state *gil, TyThreadState *tstate) #endif static void -init_shared_gil(PyInterpreterState *interp, struct _gil_runtime_state *gil) +init_shared_gil(TyInterpreterState *interp, struct _gil_runtime_state *gil) { assert(gil_created(gil)); interp->ceval.gil = gil; @@ -482,7 +482,7 @@ init_shared_gil(PyInterpreterState *interp, struct _gil_runtime_state *gil) } static void -init_own_gil(PyInterpreterState *interp, struct _gil_runtime_state *gil) +init_own_gil(TyInterpreterState *interp, struct _gil_runtime_state *gil) { assert(!gil_created(gil)); #ifdef Ty_GIL_DISABLED @@ -501,14 +501,14 @@ _TyEval_InitGIL(TyThreadState *tstate, int own_gil) assert(tstate->interp->ceval.gil == NULL); if (!own_gil) { /* The interpreter will share the main interpreter's instead. */ - PyInterpreterState *main_interp = _TyInterpreterState_Main(); + TyInterpreterState *main_interp = _TyInterpreterState_Main(); assert(tstate->interp != main_interp); struct _gil_runtime_state *gil = main_interp->ceval.gil; init_shared_gil(tstate->interp, gil); assert(!current_thread_holds_gil(gil, tstate)); } else { - PyThread_init_thread(); + TyThread_init_thread(); init_own_gil(tstate->interp, &tstate->interp->_gil); } @@ -517,7 +517,7 @@ _TyEval_InitGIL(TyThreadState *tstate, int own_gil) } void -_TyEval_FiniGIL(PyInterpreterState *interp) +_TyEval_FiniGIL(TyInterpreterState *interp) { struct _gil_runtime_state *gil = interp->ceval.gil; if (gil == NULL) { @@ -527,7 +527,7 @@ _TyEval_FiniGIL(PyInterpreterState *interp) } else if (!interp->ceval.own_gil) { #ifdef Ty_DEBUG - PyInterpreterState *main_interp = _TyInterpreterState_Main(); + TyInterpreterState *main_interp = _TyInterpreterState_Main(); assert(main_interp != NULL && interp != main_interp); assert(interp->ceval.gil == main_interp->ceval.gil); #endif @@ -589,7 +589,7 @@ _TyEval_AcquireLock(TyThreadState *tstate) } void -_TyEval_ReleaseLock(PyInterpreterState *interp, +_TyEval_ReleaseLock(TyInterpreterState *interp, TyThreadState *tstate, int final_release) { @@ -668,7 +668,7 @@ _TyEval_SignalReceived(void) #ifndef Ty_GIL_DISABLED static void -signal_active_thread(PyInterpreterState *interp, uintptr_t bit) +signal_active_thread(TyInterpreterState *interp, uintptr_t bit) { struct _gil_runtime_state *gil = interp->ceval.gil; @@ -773,7 +773,7 @@ _pop_pending_call(struct _pending_calls *pending, */ _Ty_add_pending_call_result -_TyEval_AddPendingCall(PyInterpreterState *interp, +_TyEval_AddPendingCall(TyInterpreterState *interp, _Ty_pending_call_func func, void *arg, int flags) { struct _pending_calls *pending = &interp->ceval.pending; @@ -808,7 +808,7 @@ Ty_AddPendingCall(_Ty_pending_call_func func, void *arg) { /* Legacy users of this API will continue to target the main thread (of the main interpreter). */ - PyInterpreterState *interp = _TyInterpreterState_Main(); + TyInterpreterState *interp = _TyInterpreterState_Main(); _Ty_add_pending_call_result r = _TyEval_AddPendingCall(interp, func, arg, _Ty_PENDING_MAINTHREADONLY); if (r == _Ty_ADD_PENDING_FULL) { @@ -885,7 +885,7 @@ finally: } static void -signal_pending_calls(TyThreadState *tstate, PyInterpreterState *interp) +signal_pending_calls(TyThreadState *tstate, TyInterpreterState *interp) { #ifdef Ty_GIL_DISABLED _Ty_set_eval_breaker_bit_all(interp, _PY_CALLS_TO_DO_BIT); @@ -895,7 +895,7 @@ signal_pending_calls(TyThreadState *tstate, PyInterpreterState *interp) } static void -unsignal_pending_calls(TyThreadState *tstate, PyInterpreterState *interp) +unsignal_pending_calls(TyThreadState *tstate, TyInterpreterState *interp) { #ifdef Ty_GIL_DISABLED _Ty_unset_eval_breaker_bit_all(interp, _PY_CALLS_TO_DO_BIT); @@ -919,7 +919,7 @@ clear_pending_handling_thread(struct _pending_calls *pending) static int make_pending_calls(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; struct _pending_calls *pending = &interp->ceval.pending; struct _pending_calls *pending_main = &_PyRuntime.ceval.pending_mainthread; @@ -977,7 +977,7 @@ make_pending_calls(TyThreadState *tstate) void -_Ty_set_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit) +_Ty_set_eval_breaker_bit_all(TyInterpreterState *interp, uintptr_t bit) { _Ty_FOR_EACH_TSTATE_BEGIN(interp, tstate) { _Ty_set_eval_breaker_bit(tstate, bit); @@ -986,7 +986,7 @@ _Ty_set_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit) } void -_Ty_unset_eval_breaker_bit_all(PyInterpreterState *interp, uintptr_t bit) +_Ty_unset_eval_breaker_bit_all(TyInterpreterState *interp, uintptr_t bit) { _Ty_FOR_EACH_TSTATE_BEGIN(interp, tstate) { _Ty_unset_eval_breaker_bit(tstate, bit); @@ -1071,7 +1071,7 @@ Ty_MakePendingCalls(void) } void -_TyEval_InitState(PyInterpreterState *interp) +_TyEval_InitState(TyInterpreterState *interp) { _gil_initialize(&interp->_gil); } @@ -1326,7 +1326,7 @@ int _PyRunRemoteDebugger(TyThreadState *tstate) * expensive if computed each time, so a while back we switched * to using pre-computed, per-interpreter variables for the checks, * and later consolidated that to a single "eval breaker" variable -* (now a PyInterpreterState field). +* (now a TyInterpreterState field). * * For the longest time, the eval breaker check would happen * frequently, every 5 or so times through the loop, regardless diff --git a/Python/clinic/Python-tokenize.c.h b/Python/clinic/Python-tokenize.c.h index 5c8d5aa..5394377 100644 --- a/Python/clinic/Python-tokenize.c.h +++ b/Python/clinic/Python-tokenize.c.h @@ -25,7 +25,7 @@ tokenizeriter_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(extra_tokens), &_Ty_ID(encoding), }, }; diff --git a/Python/clinic/_contextvars.c.h b/Python/clinic/_contextvars.c.h index efe74d8..6f25404 100644 --- a/Python/clinic/_contextvars.c.h +++ b/Python/clinic/_contextvars.c.h @@ -2,7 +2,7 @@ preserve [clinic start generated code]*/ -PyDoc_STRVAR(_contextvars_copy_context__doc__, +TyDoc_STRVAR(_contextvars_copy_context__doc__, "copy_context($module, /)\n" "--\n" "\n"); diff --git a/Python/clinic/_warnings.c.h b/Python/clinic/_warnings.c.h index 9b88355..e0e79d4 100644 --- a/Python/clinic/_warnings.c.h +++ b/Python/clinic/_warnings.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_abstract.h" // _PyNumber_Index() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(warnings_acquire_lock__doc__, +TyDoc_STRVAR(warnings_acquire_lock__doc__, "_acquire_lock($module, /)\n" "--\n" "\n"); @@ -26,7 +26,7 @@ warnings_acquire_lock(TyObject *module, TyObject *Py_UNUSED(ignored)) return warnings_acquire_lock_impl(module); } -PyDoc_STRVAR(warnings_release_lock__doc__, +TyDoc_STRVAR(warnings_release_lock__doc__, "_release_lock($module, /)\n" "--\n" "\n"); @@ -43,7 +43,7 @@ warnings_release_lock(TyObject *module, TyObject *Py_UNUSED(ignored)) return warnings_release_lock_impl(module); } -PyDoc_STRVAR(warnings_warn__doc__, +TyDoc_STRVAR(warnings_warn__doc__, "warn($module, /, message, category=None, stacklevel=1, source=None, *,\n" " skip_file_prefixes=)\n" "--\n" @@ -84,7 +84,7 @@ warnings_warn(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(message), &_Ty_ID(category), &_Ty_ID(stacklevel), &_Ty_ID(source), &_Ty_ID(skip_file_prefixes), }, }; @@ -164,7 +164,7 @@ exit: return return_value; } -PyDoc_STRVAR(warnings_warn_explicit__doc__, +TyDoc_STRVAR(warnings_warn_explicit__doc__, "warn_explicit($module, /, message, category, filename, lineno,\n" " module=, registry=None,\n" " module_globals=None, source=None)\n" @@ -194,7 +194,7 @@ warnings_warn_explicit(TyObject *module, TyObject *const *args, Ty_ssize_t nargs Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(message), &_Ty_ID(category), &_Ty_ID(filename), &_Ty_ID(lineno), &_Ty_ID(module), &_Ty_ID(registry), &_Ty_ID(module_globals), &_Ty_ID(source), }, }; @@ -268,7 +268,7 @@ exit: return return_value; } -PyDoc_STRVAR(warnings_filters_mutated_lock_held__doc__, +TyDoc_STRVAR(warnings_filters_mutated_lock_held__doc__, "_filters_mutated_lock_held($module, /)\n" "--\n" "\n"); diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index a687995..434f95a 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(builtin___import____doc__, +TyDoc_STRVAR(builtin___import____doc__, "__import__($module, /, name, globals=None, locals=None, fromlist=(),\n" " level=0)\n" "--\n" @@ -49,7 +49,7 @@ builtin___import__(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, Ty Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(name), &_Ty_ID(globals), &_Ty_ID(locals), &_Ty_ID(fromlist), &_Ty_ID(level), }, }; @@ -113,7 +113,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_abs__doc__, +TyDoc_STRVAR(builtin_abs__doc__, "abs($module, x, /)\n" "--\n" "\n" @@ -122,7 +122,7 @@ PyDoc_STRVAR(builtin_abs__doc__, #define BUILTIN_ABS_METHODDEF \ {"abs", (PyCFunction)builtin_abs, METH_O, builtin_abs__doc__}, -PyDoc_STRVAR(builtin_all__doc__, +TyDoc_STRVAR(builtin_all__doc__, "all($module, iterable, /)\n" "--\n" "\n" @@ -133,7 +133,7 @@ PyDoc_STRVAR(builtin_all__doc__, #define BUILTIN_ALL_METHODDEF \ {"all", (PyCFunction)builtin_all, METH_O, builtin_all__doc__}, -PyDoc_STRVAR(builtin_any__doc__, +TyDoc_STRVAR(builtin_any__doc__, "any($module, iterable, /)\n" "--\n" "\n" @@ -144,7 +144,7 @@ PyDoc_STRVAR(builtin_any__doc__, #define BUILTIN_ANY_METHODDEF \ {"any", (PyCFunction)builtin_any, METH_O, builtin_any__doc__}, -PyDoc_STRVAR(builtin_ascii__doc__, +TyDoc_STRVAR(builtin_ascii__doc__, "ascii($module, obj, /)\n" "--\n" "\n" @@ -158,7 +158,7 @@ PyDoc_STRVAR(builtin_ascii__doc__, #define BUILTIN_ASCII_METHODDEF \ {"ascii", (PyCFunction)builtin_ascii, METH_O, builtin_ascii__doc__}, -PyDoc_STRVAR(builtin_bin__doc__, +TyDoc_STRVAR(builtin_bin__doc__, "bin($module, number, /)\n" "--\n" "\n" @@ -170,7 +170,7 @@ PyDoc_STRVAR(builtin_bin__doc__, #define BUILTIN_BIN_METHODDEF \ {"bin", (PyCFunction)builtin_bin, METH_O, builtin_bin__doc__}, -PyDoc_STRVAR(builtin_callable__doc__, +TyDoc_STRVAR(builtin_callable__doc__, "callable($module, obj, /)\n" "--\n" "\n" @@ -182,7 +182,7 @@ PyDoc_STRVAR(builtin_callable__doc__, #define BUILTIN_CALLABLE_METHODDEF \ {"callable", (PyCFunction)builtin_callable, METH_O, builtin_callable__doc__}, -PyDoc_STRVAR(builtin_format__doc__, +TyDoc_STRVAR(builtin_format__doc__, "format($module, value, format_spec=\'\', /)\n" "--\n" "\n" @@ -227,7 +227,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_chr__doc__, +TyDoc_STRVAR(builtin_chr__doc__, "chr($module, i, /)\n" "--\n" "\n" @@ -236,7 +236,7 @@ PyDoc_STRVAR(builtin_chr__doc__, #define BUILTIN_CHR_METHODDEF \ {"chr", (PyCFunction)builtin_chr, METH_O, builtin_chr__doc__}, -PyDoc_STRVAR(builtin_compile__doc__, +TyDoc_STRVAR(builtin_compile__doc__, "compile($module, /, source, filename, mode, flags=0,\n" " dont_inherit=False, optimize=-1, *, _feature_version=-1)\n" "--\n" @@ -275,7 +275,7 @@ builtin_compile(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(source), &_Ty_ID(filename), &_Ty_ID(mode), &_Ty_ID(flags), &_Ty_ID(dont_inherit), &_Ty_ID(optimize), &_Ty_ID(_feature_version), }, }; @@ -370,7 +370,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_divmod__doc__, +TyDoc_STRVAR(builtin_divmod__doc__, "divmod($module, x, y, /)\n" "--\n" "\n" @@ -400,7 +400,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_eval__doc__, +TyDoc_STRVAR(builtin_eval__doc__, "eval($module, source, /, globals=None, locals=None)\n" "--\n" "\n" @@ -432,7 +432,7 @@ builtin_eval(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(globals), &_Ty_ID(locals), }, }; @@ -479,7 +479,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_exec__doc__, +TyDoc_STRVAR(builtin_exec__doc__, "exec($module, source, /, globals=None, locals=None, *, closure=None)\n" "--\n" "\n" @@ -513,7 +513,7 @@ builtin_exec(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(globals), &_Ty_ID(locals), &_Ty_ID(closure), }, }; @@ -571,7 +571,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_globals__doc__, +TyDoc_STRVAR(builtin_globals__doc__, "globals($module, /)\n" "--\n" "\n" @@ -592,7 +592,7 @@ builtin_globals(TyObject *module, TyObject *Py_UNUSED(ignored)) return builtin_globals_impl(module); } -PyDoc_STRVAR(builtin_hasattr__doc__, +TyDoc_STRVAR(builtin_hasattr__doc__, "hasattr($module, obj, name, /)\n" "--\n" "\n" @@ -624,7 +624,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_id__doc__, +TyDoc_STRVAR(builtin_id__doc__, "id($module, obj, /)\n" "--\n" "\n" @@ -649,7 +649,7 @@ builtin_id(TyObject *self, TyObject *v) return return_value; } -PyDoc_STRVAR(builtin_setattr__doc__, +TyDoc_STRVAR(builtin_setattr__doc__, "setattr($module, obj, name, value, /)\n" "--\n" "\n" @@ -684,7 +684,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_delattr__doc__, +TyDoc_STRVAR(builtin_delattr__doc__, "delattr($module, obj, name, /)\n" "--\n" "\n" @@ -716,7 +716,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_hash__doc__, +TyDoc_STRVAR(builtin_hash__doc__, "hash($module, obj, /)\n" "--\n" "\n" @@ -728,7 +728,7 @@ PyDoc_STRVAR(builtin_hash__doc__, #define BUILTIN_HASH_METHODDEF \ {"hash", (PyCFunction)builtin_hash, METH_O, builtin_hash__doc__}, -PyDoc_STRVAR(builtin_hex__doc__, +TyDoc_STRVAR(builtin_hex__doc__, "hex($module, number, /)\n" "--\n" "\n" @@ -740,7 +740,7 @@ PyDoc_STRVAR(builtin_hex__doc__, #define BUILTIN_HEX_METHODDEF \ {"hex", (PyCFunction)builtin_hex, METH_O, builtin_hex__doc__}, -PyDoc_STRVAR(builtin_aiter__doc__, +TyDoc_STRVAR(builtin_aiter__doc__, "aiter($module, async_iterable, /)\n" "--\n" "\n" @@ -749,7 +749,7 @@ PyDoc_STRVAR(builtin_aiter__doc__, #define BUILTIN_AITER_METHODDEF \ {"aiter", (PyCFunction)builtin_aiter, METH_O, builtin_aiter__doc__}, -PyDoc_STRVAR(builtin_anext__doc__, +TyDoc_STRVAR(builtin_anext__doc__, "anext($module, aiterator, default=, /)\n" "--\n" "\n" @@ -787,7 +787,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_len__doc__, +TyDoc_STRVAR(builtin_len__doc__, "len($module, obj, /)\n" "--\n" "\n" @@ -796,7 +796,7 @@ PyDoc_STRVAR(builtin_len__doc__, #define BUILTIN_LEN_METHODDEF \ {"len", (PyCFunction)builtin_len, METH_O, builtin_len__doc__}, -PyDoc_STRVAR(builtin_locals__doc__, +TyDoc_STRVAR(builtin_locals__doc__, "locals($module, /)\n" "--\n" "\n" @@ -818,7 +818,7 @@ builtin_locals(TyObject *module, TyObject *Py_UNUSED(ignored)) return builtin_locals_impl(module); } -PyDoc_STRVAR(builtin_oct__doc__, +TyDoc_STRVAR(builtin_oct__doc__, "oct($module, number, /)\n" "--\n" "\n" @@ -830,7 +830,7 @@ PyDoc_STRVAR(builtin_oct__doc__, #define BUILTIN_OCT_METHODDEF \ {"oct", (PyCFunction)builtin_oct, METH_O, builtin_oct__doc__}, -PyDoc_STRVAR(builtin_ord__doc__, +TyDoc_STRVAR(builtin_ord__doc__, "ord($module, c, /)\n" "--\n" "\n" @@ -839,7 +839,7 @@ PyDoc_STRVAR(builtin_ord__doc__, #define BUILTIN_ORD_METHODDEF \ {"ord", (PyCFunction)builtin_ord, METH_O, builtin_ord__doc__}, -PyDoc_STRVAR(builtin_pow__doc__, +TyDoc_STRVAR(builtin_pow__doc__, "pow($module, /, base, exp, mod=None)\n" "--\n" "\n" @@ -868,7 +868,7 @@ builtin_pow(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(base), &_Ty_ID(exp), &_Ty_ID(mod), }, }; @@ -910,7 +910,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_print__doc__, +TyDoc_STRVAR(builtin_print__doc__, "print($module, /, *args, sep=\' \', end=\'\\n\', file=None, flush=False)\n" "--\n" "\n" @@ -946,7 +946,7 @@ builtin_print(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(sep), &_Ty_ID(end), &_Ty_ID(file), &_Ty_ID(flush), }, }; @@ -1013,7 +1013,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_input__doc__, +TyDoc_STRVAR(builtin_input__doc__, "input($module, prompt=\'\', /)\n" "--\n" "\n" @@ -1051,7 +1051,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_repr__doc__, +TyDoc_STRVAR(builtin_repr__doc__, "repr($module, obj, /)\n" "--\n" "\n" @@ -1062,7 +1062,7 @@ PyDoc_STRVAR(builtin_repr__doc__, #define BUILTIN_REPR_METHODDEF \ {"repr", (PyCFunction)builtin_repr, METH_O, builtin_repr__doc__}, -PyDoc_STRVAR(builtin_round__doc__, +TyDoc_STRVAR(builtin_round__doc__, "round($module, /, number, ndigits=None)\n" "--\n" "\n" @@ -1090,7 +1090,7 @@ builtin_round(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(number), &_Ty_ID(ndigits), }, }; @@ -1130,7 +1130,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_sum__doc__, +TyDoc_STRVAR(builtin_sum__doc__, "sum($module, iterable, /, start=0)\n" "--\n" "\n" @@ -1159,7 +1159,7 @@ builtin_sum(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(start), }, }; @@ -1199,7 +1199,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_isinstance__doc__, +TyDoc_STRVAR(builtin_isinstance__doc__, "isinstance($module, obj, class_or_tuple, /)\n" "--\n" "\n" @@ -1234,7 +1234,7 @@ exit: return return_value; } -PyDoc_STRVAR(builtin_issubclass__doc__, +TyDoc_STRVAR(builtin_issubclass__doc__, "issubclass($module, cls, class_or_tuple, /)\n" "--\n" "\n" diff --git a/Python/clinic/context.c.h b/Python/clinic/context.c.h index 5fb2c8f..1ffc865 100644 --- a/Python/clinic/context.c.h +++ b/Python/clinic/context.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_contextvars_Context_get__doc__, +TyDoc_STRVAR(_contextvars_Context_get__doc__, "get($self, key, default=None, /)\n" "--\n" "\n" @@ -42,7 +42,7 @@ exit: return return_value; } -PyDoc_STRVAR(_contextvars_Context_items__doc__, +TyDoc_STRVAR(_contextvars_Context_items__doc__, "items($self, /)\n" "--\n" "\n" @@ -62,7 +62,7 @@ _contextvars_Context_items(TyObject *self, TyObject *Py_UNUSED(ignored)) return _contextvars_Context_items_impl((PyContext *)self); } -PyDoc_STRVAR(_contextvars_Context_keys__doc__, +TyDoc_STRVAR(_contextvars_Context_keys__doc__, "keys($self, /)\n" "--\n" "\n" @@ -80,7 +80,7 @@ _contextvars_Context_keys(TyObject *self, TyObject *Py_UNUSED(ignored)) return _contextvars_Context_keys_impl((PyContext *)self); } -PyDoc_STRVAR(_contextvars_Context_values__doc__, +TyDoc_STRVAR(_contextvars_Context_values__doc__, "values($self, /)\n" "--\n" "\n" @@ -98,7 +98,7 @@ _contextvars_Context_values(TyObject *self, TyObject *Py_UNUSED(ignored)) return _contextvars_Context_values_impl((PyContext *)self); } -PyDoc_STRVAR(_contextvars_Context_copy__doc__, +TyDoc_STRVAR(_contextvars_Context_copy__doc__, "copy($self, /)\n" "--\n" "\n" @@ -116,7 +116,7 @@ _contextvars_Context_copy(TyObject *self, TyObject *Py_UNUSED(ignored)) return _contextvars_Context_copy_impl((PyContext *)self); } -PyDoc_STRVAR(_contextvars_ContextVar_get__doc__, +TyDoc_STRVAR(_contextvars_ContextVar_get__doc__, "get($self, default=, /)\n" "--\n" "\n" @@ -154,7 +154,7 @@ exit: return return_value; } -PyDoc_STRVAR(_contextvars_ContextVar_set__doc__, +TyDoc_STRVAR(_contextvars_ContextVar_set__doc__, "set($self, value, /)\n" "--\n" "\n" @@ -181,7 +181,7 @@ _contextvars_ContextVar_set(TyObject *self, TyObject *value) return return_value; } -PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__, +TyDoc_STRVAR(_contextvars_ContextVar_reset__doc__, "reset($self, token, /)\n" "--\n" "\n" @@ -206,7 +206,7 @@ _contextvars_ContextVar_reset(TyObject *self, TyObject *token) return return_value; } -PyDoc_STRVAR(token_enter__doc__, +TyDoc_STRVAR(token_enter__doc__, "__enter__($self, /)\n" "--\n" "\n" @@ -224,7 +224,7 @@ token_enter(TyObject *self, TyObject *Py_UNUSED(ignored)) return token_enter_impl((PyContextToken *)self); } -PyDoc_STRVAR(token_exit__doc__, +TyDoc_STRVAR(token_exit__doc__, "__exit__($self, type, val, tb, /)\n" "--\n" "\n" diff --git a/Python/clinic/import.c.h b/Python/clinic/import.c.h index e5212f8..42e8e34 100644 --- a/Python/clinic/import.c.h +++ b/Python/clinic/import.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(_imp_lock_held__doc__, +TyDoc_STRVAR(_imp_lock_held__doc__, "lock_held($module, /)\n" "--\n" "\n" @@ -28,7 +28,7 @@ _imp_lock_held(TyObject *module, TyObject *Py_UNUSED(ignored)) return _imp_lock_held_impl(module); } -PyDoc_STRVAR(_imp_acquire_lock__doc__, +TyDoc_STRVAR(_imp_acquire_lock__doc__, "acquire_lock($module, /)\n" "--\n" "\n" @@ -49,7 +49,7 @@ _imp_acquire_lock(TyObject *module, TyObject *Py_UNUSED(ignored)) return _imp_acquire_lock_impl(module); } -PyDoc_STRVAR(_imp_release_lock__doc__, +TyDoc_STRVAR(_imp_release_lock__doc__, "release_lock($module, /)\n" "--\n" "\n" @@ -69,7 +69,7 @@ _imp_release_lock(TyObject *module, TyObject *Py_UNUSED(ignored)) return _imp_release_lock_impl(module); } -PyDoc_STRVAR(_imp__fix_co_filename__doc__, +TyDoc_STRVAR(_imp__fix_co_filename__doc__, "_fix_co_filename($module, code, path, /)\n" "--\n" "\n" @@ -113,7 +113,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp_create_builtin__doc__, +TyDoc_STRVAR(_imp_create_builtin__doc__, "create_builtin($module, spec, /)\n" "--\n" "\n" @@ -122,7 +122,7 @@ PyDoc_STRVAR(_imp_create_builtin__doc__, #define _IMP_CREATE_BUILTIN_METHODDEF \ {"create_builtin", (PyCFunction)_imp_create_builtin, METH_O, _imp_create_builtin__doc__}, -PyDoc_STRVAR(_imp_extension_suffixes__doc__, +TyDoc_STRVAR(_imp_extension_suffixes__doc__, "extension_suffixes($module, /)\n" "--\n" "\n" @@ -140,7 +140,7 @@ _imp_extension_suffixes(TyObject *module, TyObject *Py_UNUSED(ignored)) return _imp_extension_suffixes_impl(module); } -PyDoc_STRVAR(_imp_init_frozen__doc__, +TyDoc_STRVAR(_imp_init_frozen__doc__, "init_frozen($module, name, /)\n" "--\n" "\n" @@ -169,7 +169,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp_find_frozen__doc__, +TyDoc_STRVAR(_imp_find_frozen__doc__, "find_frozen($module, name, /, *, withdata=False)\n" "--\n" "\n" @@ -202,7 +202,7 @@ _imp_find_frozen(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(withdata), }, }; @@ -249,7 +249,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp_get_frozen_object__doc__, +TyDoc_STRVAR(_imp_get_frozen_object__doc__, "get_frozen_object($module, name, data=None, /)\n" "--\n" "\n" @@ -288,7 +288,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp_is_frozen_package__doc__, +TyDoc_STRVAR(_imp_is_frozen_package__doc__, "is_frozen_package($module, name, /)\n" "--\n" "\n" @@ -317,7 +317,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp_is_builtin__doc__, +TyDoc_STRVAR(_imp_is_builtin__doc__, "is_builtin($module, name, /)\n" "--\n" "\n" @@ -346,7 +346,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp_is_frozen__doc__, +TyDoc_STRVAR(_imp_is_frozen__doc__, "is_frozen($module, name, /)\n" "--\n" "\n" @@ -375,7 +375,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp__frozen_module_names__doc__, +TyDoc_STRVAR(_imp__frozen_module_names__doc__, "_frozen_module_names($module, /)\n" "--\n" "\n" @@ -393,7 +393,7 @@ _imp__frozen_module_names(TyObject *module, TyObject *Py_UNUSED(ignored)) return _imp__frozen_module_names_impl(module); } -PyDoc_STRVAR(_imp__override_frozen_modules_for_tests__doc__, +TyDoc_STRVAR(_imp__override_frozen_modules_for_tests__doc__, "_override_frozen_modules_for_tests($module, override, /)\n" "--\n" "\n" @@ -424,7 +424,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp__override_multi_interp_extensions_check__doc__, +TyDoc_STRVAR(_imp__override_multi_interp_extensions_check__doc__, "_override_multi_interp_extensions_check($module, override, /)\n" "--\n" "\n" @@ -457,7 +457,7 @@ exit: #if defined(HAVE_DYNAMIC_LOADING) -PyDoc_STRVAR(_imp_create_dynamic__doc__, +TyDoc_STRVAR(_imp_create_dynamic__doc__, "create_dynamic($module, spec, file=, /)\n" "--\n" "\n" @@ -495,7 +495,7 @@ exit: #if defined(HAVE_DYNAMIC_LOADING) -PyDoc_STRVAR(_imp_exec_dynamic__doc__, +TyDoc_STRVAR(_imp_exec_dynamic__doc__, "exec_dynamic($module, mod, /)\n" "--\n" "\n" @@ -525,7 +525,7 @@ exit: #endif /* defined(HAVE_DYNAMIC_LOADING) */ -PyDoc_STRVAR(_imp_exec_builtin__doc__, +TyDoc_STRVAR(_imp_exec_builtin__doc__, "exec_builtin($module, mod, /)\n" "--\n" "\n" @@ -553,7 +553,7 @@ exit: return return_value; } -PyDoc_STRVAR(_imp_source_hash__doc__, +TyDoc_STRVAR(_imp_source_hash__doc__, "source_hash($module, /, key, source)\n" "--\n" "\n"); @@ -577,7 +577,7 @@ _imp_source_hash(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(key), &_Ty_ID(source), }, }; diff --git a/Python/clinic/instruction_sequence.c.h b/Python/clinic/instruction_sequence.c.h index c049976..7f4204f 100644 --- a/Python/clinic/instruction_sequence.c.h +++ b/Python/clinic/instruction_sequence.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_NoKeywords() -PyDoc_STRVAR(inst_seq_new__doc__, +TyDoc_STRVAR(inst_seq_new__doc__, "InstructionSequenceType()\n" "--\n" "\n" @@ -37,7 +37,7 @@ exit: return return_value; } -PyDoc_STRVAR(InstructionSequenceType_use_label__doc__, +TyDoc_STRVAR(InstructionSequenceType_use_label__doc__, "use_label($self, /, label)\n" "--\n" "\n" @@ -63,7 +63,7 @@ InstructionSequenceType_use_label(TyObject *self, TyObject *const *args, Ty_ssiz Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(label), }, }; @@ -99,7 +99,7 @@ exit: return return_value; } -PyDoc_STRVAR(InstructionSequenceType_addop__doc__, +TyDoc_STRVAR(InstructionSequenceType_addop__doc__, "addop($self, /, opcode, oparg, lineno, col_offset, end_lineno,\n" " end_col_offset)\n" "--\n" @@ -127,7 +127,7 @@ InstructionSequenceType_addop(TyObject *self, TyObject *const *args, Ty_ssize_t Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(opcode), &_Ty_ID(oparg), &_Ty_ID(lineno), &_Ty_ID(col_offset), &_Ty_ID(end_lineno), &_Ty_ID(end_col_offset), }, }; @@ -188,7 +188,7 @@ exit: return return_value; } -PyDoc_STRVAR(InstructionSequenceType_new_label__doc__, +TyDoc_STRVAR(InstructionSequenceType_new_label__doc__, "new_label($self, /)\n" "--\n" "\n" @@ -216,7 +216,7 @@ exit: return return_value; } -PyDoc_STRVAR(InstructionSequenceType_add_nested__doc__, +TyDoc_STRVAR(InstructionSequenceType_add_nested__doc__, "add_nested($self, /, nested)\n" "--\n" "\n" @@ -242,7 +242,7 @@ InstructionSequenceType_add_nested(TyObject *self, TyObject *const *args, Ty_ssi Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(nested), }, }; @@ -275,7 +275,7 @@ exit: return return_value; } -PyDoc_STRVAR(InstructionSequenceType_get_nested__doc__, +TyDoc_STRVAR(InstructionSequenceType_get_nested__doc__, "get_nested($self, /)\n" "--\n" "\n" @@ -293,7 +293,7 @@ InstructionSequenceType_get_nested(TyObject *self, TyObject *Py_UNUSED(ignored)) return InstructionSequenceType_get_nested_impl((_PyInstructionSequence *)self); } -PyDoc_STRVAR(InstructionSequenceType_get_instructions__doc__, +TyDoc_STRVAR(InstructionSequenceType_get_instructions__doc__, "get_instructions($self, /)\n" "--\n" "\n" diff --git a/Python/clinic/instrumentation.c.h b/Python/clinic/instrumentation.c.h index a7bbe3e..b454ca3 100644 --- a/Python/clinic/instrumentation.c.h +++ b/Python/clinic/instrumentation.c.h @@ -4,7 +4,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_CheckPositional() -PyDoc_STRVAR(monitoring_use_tool_id__doc__, +TyDoc_STRVAR(monitoring_use_tool_id__doc__, "use_tool_id($module, tool_id, name, /)\n" "--\n" "\n"); @@ -36,7 +36,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_clear_tool_id__doc__, +TyDoc_STRVAR(monitoring_clear_tool_id__doc__, "clear_tool_id($module, tool_id, /)\n" "--\n" "\n"); @@ -63,7 +63,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_free_tool_id__doc__, +TyDoc_STRVAR(monitoring_free_tool_id__doc__, "free_tool_id($module, tool_id, /)\n" "--\n" "\n"); @@ -90,7 +90,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_get_tool__doc__, +TyDoc_STRVAR(monitoring_get_tool__doc__, "get_tool($module, tool_id, /)\n" "--\n" "\n"); @@ -117,7 +117,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_register_callback__doc__, +TyDoc_STRVAR(monitoring_register_callback__doc__, "register_callback($module, tool_id, event, func, /)\n" "--\n" "\n"); @@ -155,7 +155,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_get_events__doc__, +TyDoc_STRVAR(monitoring_get_events__doc__, "get_events($module, tool_id, /)\n" "--\n" "\n"); @@ -187,7 +187,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_set_events__doc__, +TyDoc_STRVAR(monitoring_set_events__doc__, "set_events($module, tool_id, event_set, /)\n" "--\n" "\n"); @@ -222,7 +222,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_get_local_events__doc__, +TyDoc_STRVAR(monitoring_get_local_events__doc__, "get_local_events($module, tool_id, code, /)\n" "--\n" "\n"); @@ -260,7 +260,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_set_local_events__doc__, +TyDoc_STRVAR(monitoring_set_local_events__doc__, "set_local_events($module, tool_id, code, event_set, /)\n" "--\n" "\n"); @@ -298,7 +298,7 @@ exit: return return_value; } -PyDoc_STRVAR(monitoring_restart_events__doc__, +TyDoc_STRVAR(monitoring_restart_events__doc__, "restart_events($module, /)\n" "--\n" "\n"); @@ -315,7 +315,7 @@ monitoring_restart_events(TyObject *module, TyObject *Py_UNUSED(ignored)) return monitoring_restart_events_impl(module); } -PyDoc_STRVAR(monitoring__all_events__doc__, +TyDoc_STRVAR(monitoring__all_events__doc__, "_all_events($module, /)\n" "--\n" "\n"); diff --git a/Python/clinic/marshal.c.h b/Python/clinic/marshal.c.h index ef3427a..d4ef7d9 100644 --- a/Python/clinic/marshal.c.h +++ b/Python/clinic/marshal.c.h @@ -8,7 +8,7 @@ preserve #endif #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(marshal_dump__doc__, +TyDoc_STRVAR(marshal_dump__doc__, "dump($module, value, file, version=version, /, *, allow_code=True)\n" "--\n" "\n" @@ -47,7 +47,7 @@ marshal_dump(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(allow_code), }, }; @@ -102,7 +102,7 @@ exit: return return_value; } -PyDoc_STRVAR(marshal_load__doc__, +TyDoc_STRVAR(marshal_load__doc__, "load($module, file, /, *, allow_code=True)\n" "--\n" "\n" @@ -139,7 +139,7 @@ marshal_load(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObject Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(allow_code), }, }; @@ -182,7 +182,7 @@ exit: return return_value; } -PyDoc_STRVAR(marshal_dumps__doc__, +TyDoc_STRVAR(marshal_dumps__doc__, "dumps($module, value, version=version, /, *, allow_code=True)\n" "--\n" "\n" @@ -218,7 +218,7 @@ marshal_dumps(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(allow_code), }, }; @@ -271,7 +271,7 @@ exit: return return_value; } -PyDoc_STRVAR(marshal_loads__doc__, +TyDoc_STRVAR(marshal_loads__doc__, "loads($module, bytes, /, *, allow_code=True)\n" "--\n" "\n" @@ -302,7 +302,7 @@ marshal_loads(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObjec Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(allow_code), }, }; diff --git a/Python/clinic/sysmodule.c.h b/Python/clinic/sysmodule.c.h index b8b7b05..be4eef6 100644 --- a/Python/clinic/sysmodule.c.h +++ b/Python/clinic/sysmodule.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() #include "pycore_tuple.h" // _TyTuple_FromArray() -PyDoc_STRVAR(sys_addaudithook__doc__, +TyDoc_STRVAR(sys_addaudithook__doc__, "addaudithook($module, /, hook)\n" "--\n" "\n" @@ -34,7 +34,7 @@ sys_addaudithook(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyOb Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(hook), }, }; @@ -67,7 +67,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_audit__doc__, +TyDoc_STRVAR(sys_audit__doc__, "audit($module, event, /, *args)\n" "--\n" "\n" @@ -115,7 +115,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_displayhook__doc__, +TyDoc_STRVAR(sys_displayhook__doc__, "displayhook($module, object, /)\n" "--\n" "\n" @@ -124,7 +124,7 @@ PyDoc_STRVAR(sys_displayhook__doc__, #define SYS_DISPLAYHOOK_METHODDEF \ {"displayhook", (PyCFunction)sys_displayhook, METH_O, sys_displayhook__doc__}, -PyDoc_STRVAR(sys_excepthook__doc__, +TyDoc_STRVAR(sys_excepthook__doc__, "excepthook($module, exctype, value, traceback, /)\n" "--\n" "\n" @@ -157,7 +157,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_exception__doc__, +TyDoc_STRVAR(sys_exception__doc__, "exception($module, /)\n" "--\n" "\n" @@ -179,7 +179,7 @@ sys_exception(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_exception_impl(module); } -PyDoc_STRVAR(sys_exc_info__doc__, +TyDoc_STRVAR(sys_exc_info__doc__, "exc_info($module, /)\n" "--\n" "\n" @@ -200,7 +200,7 @@ sys_exc_info(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_exc_info_impl(module); } -PyDoc_STRVAR(sys_unraisablehook__doc__, +TyDoc_STRVAR(sys_unraisablehook__doc__, "unraisablehook($module, unraisable, /)\n" "--\n" "\n" @@ -217,7 +217,7 @@ PyDoc_STRVAR(sys_unraisablehook__doc__, #define SYS_UNRAISABLEHOOK_METHODDEF \ {"unraisablehook", (PyCFunction)sys_unraisablehook, METH_O, sys_unraisablehook__doc__}, -PyDoc_STRVAR(sys_exit__doc__, +TyDoc_STRVAR(sys_exit__doc__, "exit($module, status=None, /)\n" "--\n" "\n" @@ -254,7 +254,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_getdefaultencoding__doc__, +TyDoc_STRVAR(sys_getdefaultencoding__doc__, "getdefaultencoding($module, /)\n" "--\n" "\n" @@ -272,7 +272,7 @@ sys_getdefaultencoding(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_getdefaultencoding_impl(module); } -PyDoc_STRVAR(sys_getfilesystemencoding__doc__, +TyDoc_STRVAR(sys_getfilesystemencoding__doc__, "getfilesystemencoding($module, /)\n" "--\n" "\n" @@ -290,7 +290,7 @@ sys_getfilesystemencoding(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_getfilesystemencoding_impl(module); } -PyDoc_STRVAR(sys_getfilesystemencodeerrors__doc__, +TyDoc_STRVAR(sys_getfilesystemencodeerrors__doc__, "getfilesystemencodeerrors($module, /)\n" "--\n" "\n" @@ -308,7 +308,7 @@ sys_getfilesystemencodeerrors(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_getfilesystemencodeerrors_impl(module); } -PyDoc_STRVAR(sys_intern__doc__, +TyDoc_STRVAR(sys_intern__doc__, "intern($module, string, /)\n" "--\n" "\n" @@ -341,7 +341,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__is_interned__doc__, +TyDoc_STRVAR(sys__is_interned__doc__, "_is_interned($module, string, /)\n" "--\n" "\n" @@ -375,7 +375,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__is_immortal__doc__, +TyDoc_STRVAR(sys__is_immortal__doc__, "_is_immortal($module, op, /)\n" "--\n" "\n" @@ -405,7 +405,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_settrace__doc__, +TyDoc_STRVAR(sys_settrace__doc__, "settrace($module, function, /)\n" "--\n" "\n" @@ -417,7 +417,7 @@ PyDoc_STRVAR(sys_settrace__doc__, #define SYS_SETTRACE_METHODDEF \ {"settrace", (PyCFunction)sys_settrace, METH_O, sys_settrace__doc__}, -PyDoc_STRVAR(sys__settraceallthreads__doc__, +TyDoc_STRVAR(sys__settraceallthreads__doc__, "_settraceallthreads($module, function, /)\n" "--\n" "\n" @@ -429,7 +429,7 @@ PyDoc_STRVAR(sys__settraceallthreads__doc__, #define SYS__SETTRACEALLTHREADS_METHODDEF \ {"_settraceallthreads", (PyCFunction)sys__settraceallthreads, METH_O, sys__settraceallthreads__doc__}, -PyDoc_STRVAR(sys_gettrace__doc__, +TyDoc_STRVAR(sys_gettrace__doc__, "gettrace($module, /)\n" "--\n" "\n" @@ -449,7 +449,7 @@ sys_gettrace(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_gettrace_impl(module); } -PyDoc_STRVAR(sys_setprofile__doc__, +TyDoc_STRVAR(sys_setprofile__doc__, "setprofile($module, function, /)\n" "--\n" "\n" @@ -461,7 +461,7 @@ PyDoc_STRVAR(sys_setprofile__doc__, #define SYS_SETPROFILE_METHODDEF \ {"setprofile", (PyCFunction)sys_setprofile, METH_O, sys_setprofile__doc__}, -PyDoc_STRVAR(sys__setprofileallthreads__doc__, +TyDoc_STRVAR(sys__setprofileallthreads__doc__, "_setprofileallthreads($module, function, /)\n" "--\n" "\n" @@ -473,7 +473,7 @@ PyDoc_STRVAR(sys__setprofileallthreads__doc__, #define SYS__SETPROFILEALLTHREADS_METHODDEF \ {"_setprofileallthreads", (PyCFunction)sys__setprofileallthreads, METH_O, sys__setprofileallthreads__doc__}, -PyDoc_STRVAR(sys_getprofile__doc__, +TyDoc_STRVAR(sys_getprofile__doc__, "getprofile($module, /)\n" "--\n" "\n" @@ -493,7 +493,7 @@ sys_getprofile(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_getprofile_impl(module); } -PyDoc_STRVAR(sys_setswitchinterval__doc__, +TyDoc_STRVAR(sys_setswitchinterval__doc__, "setswitchinterval($module, interval, /)\n" "--\n" "\n" @@ -534,7 +534,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_getswitchinterval__doc__, +TyDoc_STRVAR(sys_getswitchinterval__doc__, "getswitchinterval($module, /)\n" "--\n" "\n" @@ -562,7 +562,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_setrecursionlimit__doc__, +TyDoc_STRVAR(sys_setrecursionlimit__doc__, "setrecursionlimit($module, limit, /)\n" "--\n" "\n" @@ -594,7 +594,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_set_coroutine_origin_tracking_depth__doc__, +TyDoc_STRVAR(sys_set_coroutine_origin_tracking_depth__doc__, "set_coroutine_origin_tracking_depth($module, /, depth)\n" "--\n" "\n" @@ -624,7 +624,7 @@ sys_set_coroutine_origin_tracking_depth(TyObject *module, TyObject *const *args, Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(depth), }, }; @@ -660,7 +660,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_get_coroutine_origin_tracking_depth__doc__, +TyDoc_STRVAR(sys_get_coroutine_origin_tracking_depth__doc__, "get_coroutine_origin_tracking_depth($module, /)\n" "--\n" "\n" @@ -688,7 +688,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_get_asyncgen_hooks__doc__, +TyDoc_STRVAR(sys_get_asyncgen_hooks__doc__, "get_asyncgen_hooks($module, /)\n" "--\n" "\n" @@ -708,7 +708,7 @@ sys_get_asyncgen_hooks(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_get_asyncgen_hooks_impl(module); } -PyDoc_STRVAR(sys_getrecursionlimit__doc__, +TyDoc_STRVAR(sys_getrecursionlimit__doc__, "getrecursionlimit($module, /)\n" "--\n" "\n" @@ -732,7 +732,7 @@ sys_getrecursionlimit(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(MS_WINDOWS) -PyDoc_STRVAR(sys_getwindowsversion__doc__, +TyDoc_STRVAR(sys_getwindowsversion__doc__, "getwindowsversion($module, /)\n" "--\n" "\n" @@ -764,7 +764,7 @@ sys_getwindowsversion(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(MS_WINDOWS) -PyDoc_STRVAR(sys__enablelegacywindowsfsencoding__doc__, +TyDoc_STRVAR(sys__enablelegacywindowsfsencoding__doc__, "_enablelegacywindowsfsencoding($module, /)\n" "--\n" "\n" @@ -792,7 +792,7 @@ sys__enablelegacywindowsfsencoding(TyObject *module, TyObject *Py_UNUSED(ignored #if defined(HAVE_DLOPEN) -PyDoc_STRVAR(sys_setdlopenflags__doc__, +TyDoc_STRVAR(sys_setdlopenflags__doc__, "setdlopenflags($module, flags, /)\n" "--\n" "\n" @@ -832,7 +832,7 @@ exit: #if defined(HAVE_DLOPEN) -PyDoc_STRVAR(sys_getdlopenflags__doc__, +TyDoc_STRVAR(sys_getdlopenflags__doc__, "getdlopenflags($module, /)\n" "--\n" "\n" @@ -856,7 +856,7 @@ sys_getdlopenflags(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(USE_MALLOPT) -PyDoc_STRVAR(sys_mdebug__doc__, +TyDoc_STRVAR(sys_mdebug__doc__, "mdebug($module, flag, /)\n" "--\n" "\n"); @@ -885,7 +885,7 @@ exit: #endif /* defined(USE_MALLOPT) */ -PyDoc_STRVAR(sys_get_int_max_str_digits__doc__, +TyDoc_STRVAR(sys_get_int_max_str_digits__doc__, "get_int_max_str_digits($module, /)\n" "--\n" "\n" @@ -903,7 +903,7 @@ sys_get_int_max_str_digits(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_get_int_max_str_digits_impl(module); } -PyDoc_STRVAR(sys_set_int_max_str_digits__doc__, +TyDoc_STRVAR(sys_set_int_max_str_digits__doc__, "set_int_max_str_digits($module, /, maxdigits)\n" "--\n" "\n" @@ -928,7 +928,7 @@ sys_set_int_max_str_digits(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(maxdigits), }, }; @@ -964,7 +964,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_getrefcount__doc__, +TyDoc_STRVAR(sys_getrefcount__doc__, "getrefcount($module, object, /)\n" "--\n" "\n" @@ -998,7 +998,7 @@ exit: #if defined(Ty_REF_DEBUG) -PyDoc_STRVAR(sys_gettotalrefcount__doc__, +TyDoc_STRVAR(sys_gettotalrefcount__doc__, "gettotalrefcount($module, /)\n" "--\n" "\n"); @@ -1027,7 +1027,7 @@ exit: #endif /* defined(Ty_REF_DEBUG) */ -PyDoc_STRVAR(sys_getallocatedblocks__doc__, +TyDoc_STRVAR(sys_getallocatedblocks__doc__, "getallocatedblocks($module, /)\n" "--\n" "\n" @@ -1055,7 +1055,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_getunicodeinternedsize__doc__, +TyDoc_STRVAR(sys_getunicodeinternedsize__doc__, "getunicodeinternedsize($module, /, *, _only_immortal=False)\n" "--\n" "\n" @@ -1080,7 +1080,7 @@ sys_getunicodeinternedsize(TyObject *module, TyObject *const *args, Ty_ssize_t n Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(_only_immortal), }, }; @@ -1126,7 +1126,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__getframe__doc__, +TyDoc_STRVAR(sys__getframe__doc__, "_getframe($module, depth=0, /)\n" "--\n" "\n" @@ -1169,7 +1169,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__current_frames__doc__, +TyDoc_STRVAR(sys__current_frames__doc__, "_current_frames($module, /)\n" "--\n" "\n" @@ -1189,7 +1189,7 @@ sys__current_frames(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys__current_frames_impl(module); } -PyDoc_STRVAR(sys__current_exceptions__doc__, +TyDoc_STRVAR(sys__current_exceptions__doc__, "_current_exceptions($module, /)\n" "--\n" "\n" @@ -1209,7 +1209,7 @@ sys__current_exceptions(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys__current_exceptions_impl(module); } -PyDoc_STRVAR(sys_call_tracing__doc__, +TyDoc_STRVAR(sys_call_tracing__doc__, "call_tracing($module, func, args, /)\n" "--\n" "\n" @@ -1247,7 +1247,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__debugmallocstats__doc__, +TyDoc_STRVAR(sys__debugmallocstats__doc__, "_debugmallocstats($module, /)\n" "--\n" "\n" @@ -1268,7 +1268,7 @@ sys__debugmallocstats(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys__debugmallocstats_impl(module); } -PyDoc_STRVAR(sys__clear_type_cache__doc__, +TyDoc_STRVAR(sys__clear_type_cache__doc__, "_clear_type_cache($module, /)\n" "--\n" "\n" @@ -1286,7 +1286,7 @@ sys__clear_type_cache(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys__clear_type_cache_impl(module); } -PyDoc_STRVAR(sys__clear_internal_caches__doc__, +TyDoc_STRVAR(sys__clear_internal_caches__doc__, "_clear_internal_caches($module, /)\n" "--\n" "\n" @@ -1304,7 +1304,7 @@ sys__clear_internal_caches(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys__clear_internal_caches_impl(module); } -PyDoc_STRVAR(sys_is_finalizing__doc__, +TyDoc_STRVAR(sys_is_finalizing__doc__, "is_finalizing($module, /)\n" "--\n" "\n" @@ -1324,7 +1324,7 @@ sys_is_finalizing(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(Ty_STATS) -PyDoc_STRVAR(sys__stats_on__doc__, +TyDoc_STRVAR(sys__stats_on__doc__, "_stats_on($module, /)\n" "--\n" "\n" @@ -1346,7 +1346,7 @@ sys__stats_on(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(Ty_STATS) -PyDoc_STRVAR(sys__stats_off__doc__, +TyDoc_STRVAR(sys__stats_off__doc__, "_stats_off($module, /)\n" "--\n" "\n" @@ -1368,7 +1368,7 @@ sys__stats_off(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(Ty_STATS) -PyDoc_STRVAR(sys__stats_clear__doc__, +TyDoc_STRVAR(sys__stats_clear__doc__, "_stats_clear($module, /)\n" "--\n" "\n" @@ -1390,7 +1390,7 @@ sys__stats_clear(TyObject *module, TyObject *Py_UNUSED(ignored)) #if defined(Ty_STATS) -PyDoc_STRVAR(sys__stats_dump__doc__, +TyDoc_STRVAR(sys__stats_dump__doc__, "_stats_dump($module, /)\n" "--\n" "\n" @@ -1424,7 +1424,7 @@ exit: #if defined(ANDROID_API_LEVEL) -PyDoc_STRVAR(sys_getandroidapilevel__doc__, +TyDoc_STRVAR(sys_getandroidapilevel__doc__, "getandroidapilevel($module, /)\n" "--\n" "\n" @@ -1444,7 +1444,7 @@ sys_getandroidapilevel(TyObject *module, TyObject *Py_UNUSED(ignored)) #endif /* defined(ANDROID_API_LEVEL) */ -PyDoc_STRVAR(sys_activate_stack_trampoline__doc__, +TyDoc_STRVAR(sys_activate_stack_trampoline__doc__, "activate_stack_trampoline($module, backend, /)\n" "--\n" "\n" @@ -1481,7 +1481,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys_deactivate_stack_trampoline__doc__, +TyDoc_STRVAR(sys_deactivate_stack_trampoline__doc__, "deactivate_stack_trampoline($module, /)\n" "--\n" "\n" @@ -1501,7 +1501,7 @@ sys_deactivate_stack_trampoline(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_deactivate_stack_trampoline_impl(module); } -PyDoc_STRVAR(sys_is_stack_trampoline_active__doc__, +TyDoc_STRVAR(sys_is_stack_trampoline_active__doc__, "is_stack_trampoline_active($module, /)\n" "--\n" "\n" @@ -1519,7 +1519,7 @@ sys_is_stack_trampoline_active(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_is_stack_trampoline_active_impl(module); } -PyDoc_STRVAR(sys_is_remote_debug_enabled__doc__, +TyDoc_STRVAR(sys_is_remote_debug_enabled__doc__, "is_remote_debug_enabled($module, /)\n" "--\n" "\n" @@ -1537,7 +1537,7 @@ sys_is_remote_debug_enabled(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys_is_remote_debug_enabled_impl(module); } -PyDoc_STRVAR(sys_remote_exec__doc__, +TyDoc_STRVAR(sys_remote_exec__doc__, "remote_exec($module, /, pid, script)\n" "--\n" "\n" @@ -1579,7 +1579,7 @@ sys_remote_exec(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, TyObj Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(pid), &_Ty_ID(script), }, }; @@ -1617,7 +1617,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__dump_tracelets__doc__, +TyDoc_STRVAR(sys__dump_tracelets__doc__, "_dump_tracelets($module, /, outpath)\n" "--\n" "\n" @@ -1642,7 +1642,7 @@ sys__dump_tracelets(TyObject *module, TyObject *const *args, Ty_ssize_t nargs, T Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(outpath), }, }; @@ -1675,7 +1675,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__getframemodulename__doc__, +TyDoc_STRVAR(sys__getframemodulename__doc__, "_getframemodulename($module, /, depth=0)\n" "--\n" "\n" @@ -1706,7 +1706,7 @@ sys__getframemodulename(TyObject *module, TyObject *const *args, Ty_ssize_t narg Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(depth), }, }; @@ -1747,7 +1747,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__get_cpu_count_config__doc__, +TyDoc_STRVAR(sys__get_cpu_count_config__doc__, "_get_cpu_count_config($module, /)\n" "--\n" "\n" @@ -1775,7 +1775,7 @@ exit: return return_value; } -PyDoc_STRVAR(sys__baserepl__doc__, +TyDoc_STRVAR(sys__baserepl__doc__, "_baserepl($module, /)\n" "--\n" "\n" @@ -1793,7 +1793,7 @@ sys__baserepl(TyObject *module, TyObject *Py_UNUSED(ignored)) return sys__baserepl_impl(module); } -PyDoc_STRVAR(sys__is_gil_enabled__doc__, +TyDoc_STRVAR(sys__is_gil_enabled__doc__, "_is_gil_enabled($module, /)\n" "--\n" "\n" @@ -1821,7 +1821,7 @@ exit: return return_value; } -PyDoc_STRVAR(_jit_is_available__doc__, +TyDoc_STRVAR(_jit_is_available__doc__, "is_available($module, /)\n" "--\n" "\n" @@ -1849,7 +1849,7 @@ exit: return return_value; } -PyDoc_STRVAR(_jit_is_enabled__doc__, +TyDoc_STRVAR(_jit_is_enabled__doc__, "is_enabled($module, /)\n" "--\n" "\n" @@ -1877,7 +1877,7 @@ exit: return return_value; } -PyDoc_STRVAR(_jit_is_active__doc__, +TyDoc_STRVAR(_jit_is_active__doc__, "is_active($module, /)\n" "--\n" "\n" diff --git a/Python/clinic/traceback.c.h b/Python/clinic/traceback.c.h index 175f0fe..e247b7d 100644 --- a/Python/clinic/traceback.c.h +++ b/Python/clinic/traceback.c.h @@ -9,7 +9,7 @@ preserve #include "pycore_critical_section.h"// Ty_BEGIN_CRITICAL_SECTION() #include "pycore_modsupport.h" // _TyArg_UnpackKeywords() -PyDoc_STRVAR(tb_new__doc__, +TyDoc_STRVAR(tb_new__doc__, "traceback(tb_next, tb_frame, tb_lasti, tb_lineno)\n" "--\n" "\n" @@ -32,7 +32,7 @@ tb_new(TyTypeObject *type, TyObject *args, TyObject *kwargs) Ty_hash_t ob_hash; TyObject *ob_item[NUM_KEYWORDS]; } _kwtuple = { - .ob_base = PyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) + .ob_base = TyVarObject_HEAD_INIT(&TyTuple_Type, NUM_KEYWORDS) .ob_hash = -1, .ob_item = { &_Ty_ID(tb_next), &_Ty_ID(tb_frame), &_Ty_ID(tb_lasti), &_Ty_ID(tb_lineno), }, }; diff --git a/Python/codecs.c b/Python/codecs.c index b51a4d6..4deba59 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -10,7 +10,7 @@ Copyright (c) Corporation for National Research Initiatives. #include "Python.h" #include "pycore_call.h" // _TyObject_CallNoArgs() -#include "pycore_interp.h" // PyInterpreterState.codec_search_path +#include "pycore_interp.h" // TyInterpreterState.codec_search_path #include "pycore_pyerrors.h" // _TyErr_FormatNote() #include "pycore_pystate.h" // _TyInterpreterState_GET() #include "pycore_runtime.h" // _Ty_ID() @@ -30,7 +30,7 @@ const char *Ty_hexdigits = "0123456789abcdef"; int PyCodec_Register(TyObject *search_function) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->codecs.initialized); if (search_function == NULL) { TyErr_BadArgument(); @@ -56,7 +56,7 @@ int PyCodec_Register(TyObject *search_function) int PyCodec_Unregister(TyObject *search_function) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (interp->codecs.initialized != 1) { /* Do nothing if codecs state was cleared (only possible during interpreter shutdown). */ @@ -145,7 +145,7 @@ TyObject *_PyCodec_Lookup(const char *encoding) return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->codecs.initialized); /* Convert the encoding to a normalized Python string: all @@ -624,7 +624,7 @@ TyObject *_PyCodec_DecodeText(TyObject *object, Return 0 on success, -1 on error */ int PyCodec_RegisterError(const char *name, TyObject *error) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->codecs.initialized); if (!PyCallable_Check(error)) { TyErr_SetString(TyExc_TypeError, "handler must be callable"); @@ -643,7 +643,7 @@ int _PyCodec_UnregisterError(const char *name) return -1; } } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->codecs.initialized); return TyDict_PopString(interp->codecs.error_registry, name, NULL); } @@ -653,7 +653,7 @@ int _PyCodec_UnregisterError(const char *name) the error handling callback for strict encoding will be returned. */ TyObject *PyCodec_LookupError(const char *name) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->codecs.initialized); if (name==NULL) @@ -1568,7 +1568,7 @@ surrogateescape_errors(TyObject *Py_UNUSED(self), TyObject *exc) TyStatus -_PyCodec_InitRegistry(PyInterpreterState *interp) +_PyCodec_InitRegistry(TyInterpreterState *interp) { static struct { const char *name; @@ -1581,7 +1581,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp) "strict_errors", strict_errors, METH_O, - PyDoc_STR("Implements the 'strict' error handling, which " + TyDoc_STR("Implements the 'strict' error handling, which " "raises a UnicodeError on coding errors.") } }, @@ -1591,7 +1591,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp) "ignore_errors", ignore_errors, METH_O, - PyDoc_STR("Implements the 'ignore' error handling, which " + TyDoc_STR("Implements the 'ignore' error handling, which " "ignores malformed data and continues.") } }, @@ -1601,7 +1601,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp) "replace_errors", replace_errors, METH_O, - PyDoc_STR("Implements the 'replace' error handling, which " + TyDoc_STR("Implements the 'replace' error handling, which " "replaces malformed data with a replacement marker.") } }, @@ -1611,7 +1611,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp) "xmlcharrefreplace_errors", xmlcharrefreplace_errors, METH_O, - PyDoc_STR("Implements the 'xmlcharrefreplace' error handling, " + TyDoc_STR("Implements the 'xmlcharrefreplace' error handling, " "which replaces an unencodable character with the " "appropriate XML character reference.") } @@ -1622,7 +1622,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp) "backslashreplace_errors", backslashreplace_errors, METH_O, - PyDoc_STR("Implements the 'backslashreplace' error handling, " + TyDoc_STR("Implements the 'backslashreplace' error handling, " "which replaces malformed data with a backslashed " "escape sequence.") } @@ -1633,7 +1633,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp) "namereplace_errors", namereplace_errors, METH_O, - PyDoc_STR("Implements the 'namereplace' error handling, " + TyDoc_STR("Implements the 'namereplace' error handling, " "which replaces an unencodable character with a " "\\N{...} escape sequence.") } @@ -1699,7 +1699,7 @@ _PyCodec_InitRegistry(PyInterpreterState *interp) } void -_PyCodec_Fini(PyInterpreterState *interp) +_PyCodec_Fini(TyInterpreterState *interp) { Ty_CLEAR(interp->codecs.search_path); Ty_CLEAR(interp->codecs.search_cache); diff --git a/Python/codegen.c b/Python/codegen.c index c424a63..150ac49 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -31,7 +31,7 @@ #include "pycore_ceval.h" // SPECIAL___ENTER__ #define NEED_OPCODE_METADATA -#include "pycore_opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed +#include "pycore_opcode_metadata.h" // _TyOpcode_opcode_metadata, _TyOpcode_num_popped/pushed #undef NEED_OPCODE_METADATA #include diff --git a/Python/context.c b/Python/context.c index 2cb54a8..4d698c6 100644 --- a/Python/context.c +++ b/Python/context.c @@ -121,7 +121,7 @@ notify_context_watchers(TyThreadState *ts, PyContextEvent event, TyObject *ctx) ctx = Ty_None; } assert(Ty_REFCNT(ctx) > 0); - PyInterpreterState *interp = ts->interp; + TyInterpreterState *interp = ts->interp; assert(interp->_initialized); uint8_t bits = interp->active_context_watchers; int i = 0; @@ -145,7 +145,7 @@ notify_context_watchers(TyThreadState *ts, PyContextEvent event, TyObject *ctx) int PyContext_AddWatcher(PyContext_WatchCallback callback) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->_initialized); for (int i = 0; i < CONTEXT_MAX_WATCHERS; i++) { @@ -164,7 +164,7 @@ PyContext_AddWatcher(PyContext_WatchCallback callback) int PyContext_ClearWatcher(int watcher_id) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(interp->_initialized); if (watcher_id < 0 || watcher_id >= CONTEXT_MAX_WATCHERS) { TyErr_Format(TyExc_ValueError, "Invalid context watcher ID %d", watcher_id); @@ -757,7 +757,7 @@ static PyMappingMethods PyContext_as_mapping = { }; TyTypeObject PyContext_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "_contextvars.Context", sizeof(PyContext), .tp_methods = PyContext_methods, @@ -1102,12 +1102,12 @@ static TyMethodDef PyContextVar_methods[] = { _CONTEXTVARS_CONTEXTVAR_SET_METHODDEF _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, {NULL, NULL} }; TyTypeObject PyContextVar_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "_contextvars.ContextVar", sizeof(PyContextVar), .tp_methods = PyContextVar_methods, @@ -1268,14 +1268,14 @@ token_exit_impl(PyContextToken *self, TyObject *type, TyObject *val, static TyMethodDef PyContextTokenType_methods[] = { {"__class_getitem__", Ty_GenericAlias, - METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + METH_O|METH_CLASS, TyDoc_STR("See PEP 585")}, TOKEN_ENTER_METHODDEF TOKEN_EXIT_METHODDEF {NULL} }; TyTypeObject PyContextToken_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "_contextvars.Token", sizeof(PyContextToken), .tp_methods = PyContextTokenType_methods, @@ -1334,7 +1334,7 @@ context_token_missing_tp_dealloc(TyObject *Py_UNUSED(self)) TyTypeObject _PyContextTokenMissing_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "Token.MISSING", sizeof(_PyContextTokenMissing), .tp_dealloc = context_token_missing_tp_dealloc, @@ -1355,7 +1355,7 @@ get_token_missing(void) TyStatus -_TyContext_Init(PyInterpreterState *interp) +_TyContext_Init(TyInterpreterState *interp) { if (!_Ty_IsMainInterpreter(interp)) { return _TyStatus_OK(); diff --git a/Python/crossinterp.c b/Python/crossinterp.c index 7cac39b..fac1bcb 100644 --- a/Python/crossinterp.c +++ b/Python/crossinterp.c @@ -6,7 +6,7 @@ #include "osdefs.h" // MAXPATHLEN #include "pycore_ceval.h" // _Ty_simple_func #include "pycore_crossinterp.h" // _PyXIData_t -#include "pycore_function.h" // _PyFunction_VerifyStateless() +#include "pycore_function.h" // _TyFunction_VerifyStateless() #include "pycore_global_strings.h" // _Ty_ID() #include "pycore_import.h" // _TyImport_SetModule() #include "pycore_initconfig.h" // _TyStatus_OK() @@ -246,8 +246,8 @@ restore_main(TyThreadState *tstate, struct sync_module *main) /**************/ typedef struct xi_exceptions exceptions_t; -static int init_static_exctypes(exceptions_t *, PyInterpreterState *); -static void fini_static_exctypes(exceptions_t *, PyInterpreterState *); +static int init_static_exctypes(exceptions_t *, TyInterpreterState *); +static void fini_static_exctypes(exceptions_t *, TyInterpreterState *); static int init_heap_exctypes(exceptions_t *); static void fini_heap_exctypes(exceptions_t *); #include "crossinterp_exceptions.h" @@ -258,7 +258,7 @@ static void fini_heap_exctypes(exceptions_t *); /***************************/ int -_Ty_CallInInterpreter(PyInterpreterState *interp, +_Ty_CallInInterpreter(TyInterpreterState *interp, _Ty_simple_func func, void *arg) { if (interp == PyInterpreterState_Get()) { @@ -270,7 +270,7 @@ _Ty_CallInInterpreter(PyInterpreterState *interp, } int -_Ty_CallInInterpreterAndRawFree(PyInterpreterState *interp, +_Ty_CallInInterpreterAndRawFree(TyInterpreterState *interp, _Ty_simple_func func, void *arg) { if (interp == PyInterpreterState_Get()) { @@ -316,7 +316,7 @@ _PyXIData_New(void) void _PyXIData_Free(_PyXIData_t *xid) { - PyInterpreterState *interp = PyInterpreterState_Get(); + TyInterpreterState *interp = PyInterpreterState_Get(); _PyXIData_Clear(interp, xid); TyMem_RawFree(xid); } @@ -353,7 +353,7 @@ _xidata_clear(_PyXIData_t *xidata) void _PyXIData_Init(_PyXIData_t *xidata, - PyInterpreterState *interp, + TyInterpreterState *interp, void *shared, TyObject *obj, xid_newobjfunc new_object) { @@ -377,7 +377,7 @@ _PyXIData_Init(_PyXIData_t *xidata, int _PyXIData_InitWithSize(_PyXIData_t *xidata, - PyInterpreterState *interp, + TyInterpreterState *interp, const size_t size, TyObject *obj, xid_newobjfunc new_object) { @@ -395,7 +395,7 @@ _PyXIData_InitWithSize(_PyXIData_t *xidata, } void -_PyXIData_Clear(PyInterpreterState *interp, _PyXIData_t *xidata) +_PyXIData_Clear(TyInterpreterState *interp, _PyXIData_t *xidata) { assert(xidata != NULL); // This must be called in the owning interpreter. @@ -470,7 +470,7 @@ static int _get_xidata(TyThreadState *tstate, TyObject *obj, xidata_fallback_t fallback, _PyXIData_t *xidata) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; assert(xidata->data == NULL); assert(xidata->obj == NULL); @@ -541,7 +541,7 @@ _TyObject_GetXIData(TyThreadState *tstate, } TyObject *exc = _TyErr_GetRaisedException(tstate); if (TyFunction_Check(obj)) { - if (_PyFunction_GetXIData(tstate, obj, xidata) == 0) { + if (_TyFunction_GetXIData(tstate, obj, xidata) == 0) { Ty_DECREF(exc); return 0; } @@ -889,7 +889,7 @@ get_script_xidata(TyThreadState *tstate, TyObject *obj, int pure, assert(code != NULL); Ty_INCREF(code); if (pure) { - if (_PyFunction_VerifyStateless(tstate, obj) < 0) { + if (_TyFunction_VerifyStateless(tstate, obj) < 0) { goto error; } checked = 1; @@ -999,7 +999,7 @@ _xidata_release(_PyXIData_t *xidata, int rawfree) } // Switch to the original interpreter. - PyInterpreterState *interp = _TyInterpreterState_LookUpID( + TyInterpreterState *interp = _TyInterpreterState_LookUpID( _PyXIData_INTERPID(xidata)); if (interp == NULL) { // The interpreter was already destroyed. @@ -1686,7 +1686,7 @@ _PyXI_ExcInfoAsObject(_PyXI_excinfo *info) /* error codes */ static int -_PyXI_ApplyErrorCode(_PyXI_errcode code, PyInterpreterState *interp) +_PyXI_ApplyErrorCode(_PyXI_errcode code, TyInterpreterState *interp) { TyThreadState *tstate = _TyThreadState_GET(); @@ -1828,7 +1828,7 @@ _PyXI_InitFailure(_PyXI_failure *failure, _PyXI_errcode code, TyObject *obj) typedef struct { // The originating interpreter. - PyInterpreterState *interp; + TyInterpreterState *interp; // The error to propagate, if different from the uncaught exception. _PyXI_failure *override; _PyXI_failure _override; @@ -2422,7 +2422,7 @@ _destroy_sharedns(_PyXI_namespace *ns) _sharedns_free(ns); return; } - PyInterpreterState *interp = _TyInterpreterState_LookUpID(interpid0); + TyInterpreterState *interp = _TyInterpreterState_LookUpID(interpid0); if (interp == PyInterpreterState_Get()) { _sharedns_free(ns); return; @@ -2514,7 +2514,7 @@ _session_is_active(_PyXI_session *session) /* enter/exit a cross-interpreter session */ static void -_enter_session(_PyXI_session *session, PyInterpreterState *interp) +_enter_session(_PyXI_session *session, TyInterpreterState *interp) { // Set here and cleared in _exit_session(). assert(session->status == SESSION_UNUSED); @@ -2607,7 +2607,7 @@ static const char * capture_session_error(_PyXI_session *, _PyXI_error *, int _PyXI_Enter(_PyXI_session *session, - PyInterpreterState *interp, TyObject *nsupdates, + TyInterpreterState *interp, TyObject *nsupdates, _PyXI_session_result *result) { #ifndef NDEBUG @@ -3074,7 +3074,7 @@ _Ty_xi_global_state_fini(_PyXI_global_state_t *state) } int -_Ty_xi_state_init(_PyXI_state_t *state, PyInterpreterState *interp) +_Ty_xi_state_init(_PyXI_state_t *state, TyInterpreterState *interp) { assert(state != NULL); assert(interp == NULL || state == _PyXI_GET_STATE(interp)); @@ -3096,7 +3096,7 @@ _Ty_xi_state_init(_PyXI_state_t *state, PyInterpreterState *interp) } void -_Ty_xi_state_fini(_PyXI_state_t *state, PyInterpreterState *interp) +_Ty_xi_state_fini(_PyXI_state_t *state, TyInterpreterState *interp) { assert(state != NULL); assert(interp == NULL || state == _PyXI_GET_STATE(interp)); @@ -3111,7 +3111,7 @@ _Ty_xi_state_fini(_PyXI_state_t *state, PyInterpreterState *interp) TyStatus -_PyXI_Init(PyInterpreterState *interp) +_PyXI_Init(TyInterpreterState *interp) { if (_Ty_IsMainInterpreter(interp)) { _PyXI_global_state_t *global_state = _PyXI_GET_GLOBAL_STATE(interp); @@ -3148,7 +3148,7 @@ _PyXI_Init(PyInterpreterState *interp) // since we must clear some heap objects. void -_PyXI_Fini(PyInterpreterState *interp) +_PyXI_Fini(TyInterpreterState *interp) { _PyXI_state_t *state = _PyXI_GET_STATE(interp); #ifndef NDEBUG @@ -3168,7 +3168,7 @@ _PyXI_Fini(PyInterpreterState *interp) } TyStatus -_PyXI_InitTypes(PyInterpreterState *interp) +_PyXI_InitTypes(TyInterpreterState *interp) { if (init_static_exctypes(&_PyXI_GET_STATE(interp)->exceptions, interp) < 0) { TyErr_PrintEx(0); @@ -3181,7 +3181,7 @@ _PyXI_InitTypes(PyInterpreterState *interp) } void -_PyXI_FiniTypes(PyInterpreterState *interp) +_PyXI_FiniTypes(TyInterpreterState *interp) { // We would finalize heap types here too but that leads to ref leaks. // Instead, we finalize them in _PyXI_Fini(). @@ -3193,7 +3193,7 @@ _PyXI_FiniTypes(PyInterpreterState *interp) /* other API */ /*************/ -PyInterpreterState * +TyInterpreterState * _PyXI_NewInterpreter(PyInterpreterConfig *config, long *maybe_whence, TyThreadState **p_tstate, TyThreadState **p_save_tstate) { @@ -3215,7 +3215,7 @@ _PyXI_NewInterpreter(PyInterpreterConfig *config, long *maybe_whence, return NULL; } assert(tstate != NULL); - PyInterpreterState *interp = PyThreadState_GetInterpreter(tstate); + TyInterpreterState *interp = PyThreadState_GetInterpreter(tstate); long whence = _TyInterpreterState_WHENCE_XI; if (maybe_whence != NULL) { @@ -3241,7 +3241,7 @@ _PyXI_NewInterpreter(PyInterpreterConfig *config, long *maybe_whence, } void -_PyXI_EndInterpreter(PyInterpreterState *interp, +_PyXI_EndInterpreter(TyInterpreterState *interp, TyThreadState *tstate, TyThreadState **p_save_tstate) { #ifndef NDEBUG diff --git a/Python/crossinterp_data_lookup.h b/Python/crossinterp_data_lookup.h index ad6f787..de3f37e 100644 --- a/Python/crossinterp_data_lookup.h +++ b/Python/crossinterp_data_lookup.h @@ -713,7 +713,7 @@ _TyCode_GetXIData(TyThreadState *tstate, TyObject *obj, _PyXIData_t *xidata) // function TyObject * -_PyFunction_FromXIData(_PyXIData_t *xidata) +_TyFunction_FromXIData(_PyXIData_t *xidata) { // For now "stateless" functions are the only ones we must accommodate. @@ -753,7 +753,7 @@ _PyFunction_FromXIData(_PyXIData_t *xidata) } int -_PyFunction_GetXIData(TyThreadState *tstate, TyObject *func, +_TyFunction_GetXIData(TyThreadState *tstate, TyObject *func, _PyXIData_t *xidata) { if (!TyFunction_Check(func)) { @@ -761,7 +761,7 @@ _PyFunction_GetXIData(TyThreadState *tstate, TyObject *func, format_notshareableerror(tstate, NULL, 0, msg, func); return -1; } - if (_PyFunction_VerifyStateless(tstate, func) < 0) { + if (_TyFunction_VerifyStateless(tstate, func) < 0) { TyObject *cause = _TyErr_GetRaisedException(tstate); assert(cause != NULL); const char *msg = "only stateless functions are shareable"; @@ -777,8 +777,8 @@ _PyFunction_GetXIData(TyThreadState *tstate, TyObject *func, return -1; } // Replace _TyMarshal_ReadObjectFromXIData. - // (_PyFunction_FromXIData() will call it.) - _PyXIData_SET_NEW_OBJECT(xidata, _PyFunction_FromXIData); + // (_TyFunction_FromXIData() will call it.) + _PyXIData_SET_NEW_OBJECT(xidata, _TyFunction_FromXIData); return 0; } diff --git a/Python/crossinterp_exceptions.h b/Python/crossinterp_exceptions.h index 8570694..559af00 100644 --- a/Python/crossinterp_exceptions.h +++ b/Python/crossinterp_exceptions.h @@ -15,10 +15,10 @@ _ensure_current_cause(TyThreadState *tstate, TyObject *cause) /* InterpreterError extends Exception */ -static TyTypeObject _PyExc_InterpreterError = { - PyVarObject_HEAD_INIT(NULL, 0) +static TyTypeObject _TyExc_InterpreterError = { + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "concurrent.interpreters.InterpreterError", - .tp_doc = PyDoc_STR("A cross-interpreter operation failed"), + .tp_doc = TyDoc_STR("A cross-interpreter operation failed"), .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, //.tp_traverse = ((TyTypeObject *)TyExc_Exception)->tp_traverse, //.tp_clear = ((TyTypeObject *)TyExc_Exception)->tp_clear, @@ -28,10 +28,10 @@ TyObject *TyExc_InterpreterError = (TyObject *)&_PyExc_InterpreterError; /* InterpreterNotFoundError extends InterpreterError */ -static TyTypeObject _PyExc_InterpreterNotFoundError = { - PyVarObject_HEAD_INIT(NULL, 0) +static TyTypeObject _TyExc_InterpreterNotFoundError = { + TyVarObject_HEAD_INIT(NULL, 0) .tp_name = "concurrent.interpreters.InterpreterNotFoundError", - .tp_doc = PyDoc_STR("An interpreter was not found"), + .tp_doc = TyDoc_STR("An interpreter was not found"), .tp_flags = Ty_TPFLAGS_DEFAULT | Ty_TPFLAGS_BASETYPE | Ty_TPFLAGS_HAVE_GC, //.tp_traverse = ((TyTypeObject *)TyExc_Exception)->tp_traverse, //.tp_clear = ((TyTypeObject *)TyExc_Exception)->tp_clear, @@ -135,7 +135,7 @@ format_notshareableerror(TyThreadState *tstate, TyObject *cause, int force, /* lifecycle */ static int -init_static_exctypes(exceptions_t *state, PyInterpreterState *interp) +init_static_exctypes(exceptions_t *state, TyInterpreterState *interp) { assert(state == &_PyXI_GET_STATE(interp)->exceptions); TyTypeObject *base = (TyTypeObject *)TyExc_Exception; @@ -166,7 +166,7 @@ error: } static void -fini_static_exctypes(exceptions_t *state, PyInterpreterState *interp) +fini_static_exctypes(exceptions_t *state, TyInterpreterState *interp) { assert(state == &_PyXI_GET_STATE(interp)->exceptions); if (state->TyExc_InterpreterNotFoundError != NULL) { diff --git a/Python/dtoa.c b/Python/dtoa.c index dd3cd8e..986ed48 100644 --- a/Python/dtoa.c +++ b/Python/dtoa.c @@ -344,7 +344,7 @@ Balloc(int k) int x; Bigint *rv; unsigned int len; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (k <= Bigint_Kmax && (rv = freelist[k])) freelist[k] = rv->next; @@ -379,7 +379,7 @@ Bfree(Bigint *v) if (v->k > Bigint_Kmax) FREE((void*)v); else { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); v->next = freelist[v->k]; freelist[v->k] = v; } @@ -694,7 +694,7 @@ pow5mult(Bigint *b, int k) if (!(k >>= 2)) return b; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); p5s = interp->dtoa.p5s; for(;;) { assert(p5s != interp->dtoa.p5s + Bigint_Pow5size); @@ -2804,7 +2804,7 @@ _Ty_dg_dtoa(double dd, int mode, int ndigits, #endif // _PY_SHORT_FLOAT_REPR == 1 TyStatus -_PyDtoa_Init(PyInterpreterState *interp) +_PyDtoa_Init(TyInterpreterState *interp) { #if _PY_SHORT_FLOAT_REPR == 1 && !defined(Ty_USING_MEMORY_DEBUGGER) Bigint **p5s = interp->dtoa.p5s; @@ -2830,7 +2830,7 @@ _PyDtoa_Init(PyInterpreterState *interp) } void -_PyDtoa_Fini(PyInterpreterState *interp) +_PyDtoa_Fini(TyInterpreterState *interp) { #if _PY_SHORT_FLOAT_REPR == 1 && !defined(Ty_USING_MEMORY_DEBUGGER) Bigint **p5s = interp->dtoa.p5s; diff --git a/Python/dynload_win.c b/Python/dynload_win.c index 5d180c3..3e38c5d 100644 --- a/Python/dynload_win.c +++ b/Python/dynload_win.c @@ -187,7 +187,7 @@ _Ty_CheckPython3(void) /* For back-compat, also search {sys.prefix}\DLLs, though that has not been a normal install layout for a while */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyConfig *config = (PyConfig*)_TyInterpreterState_GetConfig(interp); assert(config->prefix); if (config->prefix) { diff --git a/Python/errors.c b/Python/errors.c index 4708b46..349a162 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -1362,14 +1362,14 @@ TyErr_NewExceptionWithDoc(const char *name, const char *doc, } -PyDoc_STRVAR(UnraisableHookArgs__doc__, +TyDoc_STRVAR(UnraisableHookArgs__doc__, "UnraisableHookArgs\n\ \n\ Type used to pass arguments to sys.unraisablehook."); static TyTypeObject UnraisableHookArgsType; -static PyStructSequence_Field UnraisableHookArgs_fields[] = { +static TyStructSequence_Field UnraisableHookArgs_fields[] = { {"exc_type", "Exception type"}, {"exc_value", "Exception value"}, {"exc_traceback", "Exception traceback"}, @@ -1378,7 +1378,7 @@ static PyStructSequence_Field UnraisableHookArgs_fields[] = { {0} }; -static PyStructSequence_Desc UnraisableHookArgs_desc = { +static TyStructSequence_Desc UnraisableHookArgs_desc = { .name = "UnraisableHookArgs", .doc = UnraisableHookArgs__doc__, .fields = UnraisableHookArgs_fields, @@ -1387,7 +1387,7 @@ static PyStructSequence_Desc UnraisableHookArgs_desc = { TyStatus -_TyErr_InitTypes(PyInterpreterState *interp) +_TyErr_InitTypes(TyInterpreterState *interp) { if (_PyStructSequence_InitBuiltin(interp, &UnraisableHookArgsType, &UnraisableHookArgs_desc) < 0) @@ -1399,7 +1399,7 @@ _TyErr_InitTypes(PyInterpreterState *interp) void -_TyErr_FiniTypes(PyInterpreterState *interp) +_TyErr_FiniTypes(TyInterpreterState *interp) { _PyStructSequence_FiniBuiltin(interp, &UnraisableHookArgsType); } @@ -1410,7 +1410,7 @@ make_unraisable_hook_args(TyThreadState *tstate, TyObject *exc_type, TyObject *exc_value, TyObject *exc_tb, TyObject *err_msg, TyObject *obj) { - TyObject *args = PyStructSequence_New(&UnraisableHookArgsType); + TyObject *args = TyStructSequence_New(&UnraisableHookArgsType); if (args == NULL) { return NULL; } @@ -1421,7 +1421,7 @@ make_unraisable_hook_args(TyThreadState *tstate, TyObject *exc_type, if (exc_type == NULL) { \ exc_type = Ty_None; \ } \ - PyStructSequence_SET_ITEM(args, pos++, Ty_NewRef(exc_type)); \ + TyStructSequence_SET_ITEM(args, pos++, Ty_NewRef(exc_type)); \ } while (0) @@ -1599,11 +1599,11 @@ _TyErr_WriteUnraisableDefaultHook(TyObject *args) } /* Borrowed references */ - TyObject *exc_type = PyStructSequence_GET_ITEM(args, 0); - TyObject *exc_value = PyStructSequence_GET_ITEM(args, 1); - TyObject *exc_tb = PyStructSequence_GET_ITEM(args, 2); - TyObject *err_msg = PyStructSequence_GET_ITEM(args, 3); - TyObject *obj = PyStructSequence_GET_ITEM(args, 4); + TyObject *exc_type = TyStructSequence_GET_ITEM(args, 0); + TyObject *exc_value = TyStructSequence_GET_ITEM(args, 1); + TyObject *exc_tb = TyStructSequence_GET_ITEM(args, 2); + TyObject *err_msg = TyStructSequence_GET_ITEM(args, 3); + TyObject *obj = TyStructSequence_GET_ITEM(args, 4); if (write_unraisable_exc(tstate, exc_type, exc_value, exc_tb, err_msg, obj) < 0) { return NULL; diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index d139fd0..9f5a8d6 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -1976,10 +1976,10 @@ #if TIER_ONE assert(frame->instr_ptr->op.code == INSTRUMENTED_LINE || frame->instr_ptr->op.code == INSTRUMENTED_INSTRUCTION || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); + _TyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); #endif stack_pointer = _TyFrame_GetStackPointer(frame); LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND); @@ -4325,7 +4325,7 @@ UOP_STAT_INC(uopcode, miss); JUMP_TO_JUMP_TARGET(); } - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; if (!_Py_IsOwnedByCurrentThread((TyObject *)it->it_seq) || !_TyObject_GC_IS_SHARED(it->it_seq)) { UOP_STAT_INC(uopcode, miss); @@ -4342,7 +4342,7 @@ iter = stack_pointer[-1]; #ifndef Ty_GIL_DISABLED TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; assert(Ty_TYPE(iter_o) == &PyListIter_Type); PyListObject *seq = it->it_seq; if (seq == NULL) { @@ -4367,7 +4367,7 @@ _PyStackRef next; iter = stack_pointer[-1]; TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; assert(Ty_TYPE(iter_o) == &PyListIter_Type); PyListObject *seq = it->it_seq; assert(seq); @@ -5817,7 +5817,7 @@ _PyStackRef callable; callable = stack_pointer[-3]; TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (callable_o != interp->callable_cache.len) { UOP_STAT_INC(uopcode, miss); JUMP_TO_JUMP_TARGET(); @@ -5884,7 +5884,7 @@ UOP_STAT_INC(uopcode, miss); JUMP_TO_JUMP_TARGET(); } - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (callable_o != interp->callable_cache.isinstance) { UOP_STAT_INC(uopcode, miss); JUMP_TO_JUMP_TARGET(); @@ -5931,7 +5931,7 @@ assert(oparg == 1); TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); TyObject *self_o = PyStackRef_AsPyObjectBorrow(self); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (callable_o != interp->callable_cache.list_append) { UOP_STAT_INC(uopcode, miss); JUMP_TO_JUMP_TARGET(); @@ -6600,7 +6600,7 @@ if (func_obj == NULL) { JUMP_TO_ERROR(); } - _PyFunction_SetVersion( + _TyFunction_SetVersion( func_obj, ((PyCodeObject *)codeobj)->co_version); func = PyStackRef_FromPyObjectSteal((TyObject *)func_obj); stack_pointer[0] = func; @@ -6966,7 +6966,7 @@ printf(", exit %lu, temp %d, target %d -> %s]\n", exit - current_executor->exits, exit->temperature.value_and_backoff, (int)(target - _TyFrame_GetBytecode(frame)), - _PyOpcode_OpName[target->op.code]); + _TyOpcode_OpName[target->op.code]); stack_pointer = _TyFrame_GetStackPointer(frame); } #endif diff --git a/Python/flowgraph.c b/Python/flowgraph.c index 1918ab7..19e0721 100644 --- a/Python/flowgraph.c +++ b/Python/flowgraph.c @@ -289,7 +289,7 @@ dump_instr(cfg_instr *i) sprintf(arg, "target: %p [%d] ", i->i_target, i->i_oparg); } fprintf(stderr, "line: %d, %s (%d) %s%s\n", - i->i_loc.lineno, _PyOpcode_OpName[i->i_opcode], i->i_opcode, arg, jump); + i->i_loc.lineno, _TyOpcode_OpName[i->i_opcode], i->i_opcode, arg, jump); } static inline int @@ -769,12 +769,12 @@ get_stack_effects(int opcode, int oparg, int jump, stack_effects *effects) if (opcode < 0) { return -1; } - if ((opcode <= MAX_REAL_OPCODE) && (_PyOpcode_Deopt[opcode] != opcode)) { + if ((opcode <= MAX_REAL_OPCODE) && (_TyOpcode_Deopt[opcode] != opcode)) { // Specialized instructions are not supported. return -1; } - int popped = _PyOpcode_num_popped(opcode, oparg); - int pushed = _PyOpcode_num_pushed(opcode, oparg); + int popped = _TyOpcode_num_popped(opcode, oparg); + int pushed = _TyOpcode_num_pushed(opcode, oparg); if (popped < 0 || pushed < 0) { return -1; } @@ -2875,8 +2875,8 @@ optimize_load_fast(cfg_builder *g) case MATCH_MAPPING: case MATCH_SEQUENCE: case WITH_EXCEPT_START: { - int num_popped = _PyOpcode_num_popped(opcode, oparg); - int num_pushed = _PyOpcode_num_pushed(opcode, oparg); + int num_popped = _TyOpcode_num_popped(opcode, oparg); + int num_pushed = _TyOpcode_num_pushed(opcode, oparg); int net_pushed = num_pushed - num_popped; assert(net_pushed >= 0); for (int i = 0; i < net_pushed; i++) { @@ -2894,8 +2894,8 @@ optimize_load_fast(cfg_builder *g) case RERAISE: case SET_ADD: case SET_UPDATE: { - int num_popped = _PyOpcode_num_popped(opcode, oparg); - int num_pushed = _PyOpcode_num_pushed(opcode, oparg); + int num_popped = _TyOpcode_num_popped(opcode, oparg); + int num_pushed = _TyOpcode_num_pushed(opcode, oparg); int net_popped = num_popped - num_pushed; assert(net_popped > 0); for (int i = 0; i < net_popped; i++) { @@ -2906,8 +2906,8 @@ optimize_load_fast(cfg_builder *g) case END_SEND: case SET_FUNCTION_ATTRIBUTE: { - assert(_PyOpcode_num_popped(opcode, oparg) == 2); - assert(_PyOpcode_num_pushed(opcode, oparg) == 1); + assert(_TyOpcode_num_popped(opcode, oparg) == 2); + assert(_TyOpcode_num_pushed(opcode, oparg) == 1); ref tos = ref_stack_pop(&refs); ref_stack_pop(&refs); PUSH_REF(tos.instr, tos.local); @@ -2960,8 +2960,8 @@ optimize_load_fast(cfg_builder *g) // Opcodes that consume all of their inputs default: { - int num_popped = _PyOpcode_num_popped(opcode, oparg); - int num_pushed = _PyOpcode_num_pushed(opcode, oparg); + int num_popped = _TyOpcode_num_popped(opcode, oparg); + int num_pushed = _TyOpcode_num_pushed(opcode, oparg); if (HAS_TARGET(instr->i_opcode)) { load_fast_push_block(&sp, instr->i_target, refs.size - num_popped + num_pushed); } diff --git a/Python/frozen_stubs.c b/Python/frozen_stubs.c index 92ec098..ccbd27f 100644 --- a/Python/frozen_stubs.c +++ b/Python/frozen_stubs.c @@ -64,7 +64,7 @@ _Ty_gitversion(void) /* DL open flags stub */ int -_TyImport_GetDLOpenFlags(PyInterpreterState *interp) +_TyImport_GetDLOpenFlags(TyInterpreterState *interp) { return 0x102; /* RTLD_NOW | RTLD_GLOBAL */ } diff --git a/Python/frozenmain.c b/Python/frozenmain.c index c8dc89c..be90b30 100644 --- a/Python/frozenmain.c +++ b/Python/frozenmain.c @@ -54,7 +54,7 @@ Ty_FrozenMain(int argc, char **argv) Ty_ExitStatusException(status); } - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); if (_TyInterpreterState_SetRunningMain(interp) < 0) { TyErr_Print(); exit(1); diff --git a/Python/gc.c b/Python/gc.c index 5a843f8..3efd153 100644 --- a/Python/gc.c +++ b/Python/gc.c @@ -6,7 +6,7 @@ #include "pycore_ceval.h" // _Ty_set_eval_breaker_bit() #include "pycore_dict.h" // _PyInlineValuesSize() #include "pycore_initconfig.h" // _TyStatus_OK() -#include "pycore_interp.h" // PyInterpreterState.gc +#include "pycore_interp.h" // TyInterpreterState.gc #include "pycore_interpframe.h" // _TyFrame_GetLocalsArray() #include "pycore_object_alloc.h" // _TyObject_MallocWithType() #include "pycore_pystate.h" // _TyThreadState_GET() @@ -146,7 +146,7 @@ GEN_HEAD(GCState *gcstate, int n) static GCState * get_gc_state(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return &interp->gc; } @@ -173,7 +173,7 @@ _TyGC_InitState(GCState *gcstate) TyStatus -_TyGC_Init(PyInterpreterState *interp) +_TyGC_Init(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; @@ -1475,7 +1475,7 @@ mark_all_reachable(TyGC_Head *reachable, TyGC_Head *visited, int visited_space) } static intptr_t -mark_stacks(PyInterpreterState *interp, TyGC_Head *visited, int visited_space, bool start) +mark_stacks(TyInterpreterState *interp, TyGC_Head *visited, int visited_space, bool start) { TyGC_Head reachable; gc_list_init(&reachable); @@ -1534,7 +1534,7 @@ mark_stacks(PyInterpreterState *interp, TyGC_Head *visited, int visited_space, b } static intptr_t -mark_global_roots(PyInterpreterState *interp, TyGC_Head *visited, int visited_space) +mark_global_roots(TyInterpreterState *interp, TyGC_Head *visited, int visited_space) { TyGC_Head reachable; gc_list_init(&reachable); @@ -1870,7 +1870,7 @@ gc_referrers_for(TyObject *objs, TyGC_Head *list, TyObject *resultlist) } TyObject * -_TyGC_GetReferrers(PyInterpreterState *interp, TyObject *objs) +_TyGC_GetReferrers(TyInterpreterState *interp, TyObject *objs) { TyObject *result = TyList_New(0); if (!result) { @@ -1888,7 +1888,7 @@ _TyGC_GetReferrers(PyInterpreterState *interp, TyObject *objs) } TyObject * -_TyGC_GetObjects(PyInterpreterState *interp, int generation) +_TyGC_GetObjects(TyInterpreterState *interp, int generation) { assert(generation >= -1 && generation < NUM_GENERATIONS); GCState *gcstate = &interp->gc; @@ -1924,7 +1924,7 @@ error: } void -_TyGC_Freeze(PyInterpreterState *interp) +_TyGC_Freeze(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; /* The permanent_generation must be visited */ @@ -1947,7 +1947,7 @@ _TyGC_Freeze(PyInterpreterState *interp) } void -_TyGC_Unfreeze(PyInterpreterState *interp) +_TyGC_Unfreeze(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; gc_list_merge(&gcstate->permanent_generation.head, @@ -1956,7 +1956,7 @@ _TyGC_Unfreeze(PyInterpreterState *interp) } Ty_ssize_t -_TyGC_GetFreezeCount(PyInterpreterState *interp) +_TyGC_GetFreezeCount(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; return gc_list_size(&gcstate->permanent_generation.head); @@ -2083,7 +2083,7 @@ _TyGC_CollectNoFail(TyThreadState *tstate) } void -_TyGC_DumpShutdownStats(PyInterpreterState *interp) +_TyGC_DumpShutdownStats(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; if (!(gcstate->debug & _TyGC_DEBUG_SAVEALL) @@ -2133,7 +2133,7 @@ finalize_unlink_gc_head(TyGC_Head *gc) { } void -_TyGC_Fini(PyInterpreterState *interp) +_TyGC_Fini(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; Ty_CLEAR(gcstate->garbage); diff --git a/Python/gc_free_threading.c b/Python/gc_free_threading.c index f7c968c..04ed8e8 100644 --- a/Python/gc_free_threading.c +++ b/Python/gc_free_threading.c @@ -7,7 +7,7 @@ #include "pycore_freelist.h" // _TyObject_ClearFreeLists() #include "pycore_genobject.h" // _TyGen_GetGeneratorFromFrame() #include "pycore_initconfig.h" // _TyStatus_NO_MEMORY() -#include "pycore_interp.h" // PyInterpreterState.gc +#include "pycore_interp.h" // TyInterpreterState.gc #include "pycore_interpframe.h" // _TyFrame_GetLocalsArray() #include "pycore_object_alloc.h" // _TyObject_MallocWithType() #include "pycore_pystate.h" // _TyThreadState_GET() @@ -91,7 +91,7 @@ struct visitor_args { // Per-collection state struct collection_state { struct visitor_args base; - PyInterpreterState *interp; + TyInterpreterState *interp; GCState *gcstate; _TyGC_Reason reason; // GH-129236: If we see an active frame without a valid stack pointer, @@ -375,7 +375,7 @@ op_from_block(void *block, void *arg, bool include_frozen) } static int -gc_visit_heaps_lock_held(PyInterpreterState *interp, mi_block_visit_fun *visitor, +gc_visit_heaps_lock_held(TyInterpreterState *interp, mi_block_visit_fun *visitor, struct visitor_args *arg) { // Offset of TyObject header from start of memory block. @@ -427,7 +427,7 @@ gc_visit_heaps_lock_held(PyInterpreterState *interp, mi_block_visit_fun *visitor // NOTE: It is not safe to allocate or free any mimalloc managed memory while // this function is running. static int -gc_visit_heaps(PyInterpreterState *interp, mi_block_visit_fun *visitor, +gc_visit_heaps(TyInterpreterState *interp, mi_block_visit_fun *visitor, struct visitor_args *arg) { // Other threads in the interpreter must be paused so that we can safely @@ -454,7 +454,7 @@ gc_visit_stackref(_PyStackRef stackref) // Add 1 to the gc_refs for every deferred reference on each thread's stack. static void -gc_visit_thread_stacks(PyInterpreterState *interp, struct collection_state *state) +gc_visit_thread_stacks(TyInterpreterState *interp, struct collection_state *state) { _Py_FOR_EACH_TSTATE_BEGIN(interp, p) { _PyCStackRef *c_ref = ((_PyThreadStateImpl *)p)->c_stack_refs; @@ -823,7 +823,7 @@ gc_mark_traverse_tuple(TyObject *self, void *args) } static void -gc_abort_mark_alive(PyInterpreterState *interp, +gc_abort_mark_alive(TyInterpreterState *interp, struct collection_state *state, gc_mark_args_t *args) { @@ -851,7 +851,7 @@ gc_visit_stackref_mark_alive(gc_mark_args_t *args, _PyStackRef stackref) } static int -gc_visit_thread_stacks_mark_alive(PyInterpreterState *interp, gc_mark_args_t *args) +gc_visit_thread_stacks_mark_alive(TyInterpreterState *interp, gc_mark_args_t *args) { int err = 0; _Py_FOR_EACH_TSTATE_BEGIN(interp, p) { @@ -929,7 +929,7 @@ queue_freed_object(TyObject *obj, void *arg) } static void -process_delayed_frees(PyInterpreterState *interp, struct collection_state *state) +process_delayed_frees(TyInterpreterState *interp, struct collection_state *state) { // While we are in a "stop the world" pause, we can observe the latest // write sequence by advancing the write sequence immediately. @@ -1355,7 +1355,7 @@ gc_propagate_alive(gc_mark_args_t *args) // // Returns -1 on failure (out of memory). static int -gc_mark_alive_from_roots(PyInterpreterState *interp, +gc_mark_alive_from_roots(TyInterpreterState *interp, struct collection_state *state) { #ifdef GC_DEBUG @@ -1419,7 +1419,7 @@ gc_mark_alive_from_roots(PyInterpreterState *interp, static int -deduce_unreachable_heap(PyInterpreterState *interp, +deduce_unreachable_heap(TyInterpreterState *interp, struct collection_state *state) { @@ -1575,7 +1575,7 @@ call_weakref_callbacks(struct collection_state *state) static GCState * get_gc_state(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return &interp->gc; } @@ -1589,7 +1589,7 @@ _TyGC_InitState(GCState *gcstate) TyStatus -_TyGC_Init(PyInterpreterState *interp) +_TyGC_Init(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; @@ -2139,7 +2139,7 @@ record_deallocation(TyThreadState *tstate) } static void -gc_collect_internal(PyInterpreterState *interp, struct collection_state *state, int generation) +gc_collect_internal(TyInterpreterState *interp, struct collection_state *state, int generation) { _TyEval_StopTheWorld(interp); @@ -2259,7 +2259,7 @@ gc_collect_main(TyThreadState *tstate, int generation, _TyGC_Reason reason) { Ty_ssize_t m = 0; /* # objects collected */ Ty_ssize_t n = 0; /* # unreachable objects that couldn't be collected */ - PyTime_t t1 = 0; /* initialize to prevent a compiler warning */ + TyTime_t t1 = 0; /* initialize to prevent a compiler warning */ GCState *gcstate = &tstate->interp->gc; // gc_collect_main() must not be called before _TyGC_Init @@ -2303,7 +2303,7 @@ gc_collect_main(TyThreadState *tstate, int generation, _TyGC_Reason reason) PyDTrace_GC_START(generation); } - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; struct collection_state state = { .interp = interp, @@ -2317,7 +2317,7 @@ gc_collect_main(TyThreadState *tstate, int generation, _TyGC_Reason reason) n = state.uncollectable; if (gcstate->debug & _TyGC_DEBUG_STATS) { - PyTime_t t2; + TyTime_t t2; (void)PyTime_PerfCounterRaw(&t2); double d = PyTime_AsSecondsDouble(t2 - t1); TySys_WriteStderr( @@ -2436,7 +2436,7 @@ visit_get_referrers(const mi_heap_t *heap, const mi_heap_area_t *area, } TyObject * -_TyGC_GetReferrers(PyInterpreterState *interp, TyObject *objs) +_TyGC_GetReferrers(TyInterpreterState *interp, TyObject *objs) { // NOTE: We can't append to the PyListObject during gc_visit_heaps() // because TyList_Append() may reclaim an abandoned mimalloc segments @@ -2481,7 +2481,7 @@ visit_get_objects(const mi_heap_t *heap, const mi_heap_area_t *area, } TyObject * -_TyGC_GetObjects(PyInterpreterState *interp, int generation) +_TyGC_GetObjects(TyInterpreterState *interp, int generation) { // NOTE: We can't append to the PyListObject during gc_visit_heaps() // because TyList_Append() may reclaim an abandoned mimalloc segments @@ -2511,7 +2511,7 @@ visit_freeze(const mi_heap_t *heap, const mi_heap_area_t *area, } void -_TyGC_Freeze(PyInterpreterState *interp) +_TyGC_Freeze(TyInterpreterState *interp) { struct visitor_args args; _TyEval_StopTheWorld(interp); @@ -2533,7 +2533,7 @@ visit_unfreeze(const mi_heap_t *heap, const mi_heap_area_t *area, } void -_TyGC_Unfreeze(PyInterpreterState *interp) +_TyGC_Unfreeze(TyInterpreterState *interp) { struct visitor_args args; _TyEval_StopTheWorld(interp); @@ -2561,7 +2561,7 @@ visit_count_frozen(const mi_heap_t *heap, const mi_heap_area_t *area, } Ty_ssize_t -_TyGC_GetFreezeCount(PyInterpreterState *interp) +_TyGC_GetFreezeCount(TyInterpreterState *interp) { struct count_frozen_args args = { .count = 0 }; _TyEval_StopTheWorld(interp); @@ -2630,7 +2630,7 @@ _TyGC_CollectNoFail(TyThreadState *tstate) } void -_TyGC_DumpShutdownStats(PyInterpreterState *interp) +_TyGC_DumpShutdownStats(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; if (!(gcstate->debug & _TyGC_DEBUG_SAVEALL) @@ -2673,7 +2673,7 @@ _TyGC_DumpShutdownStats(PyInterpreterState *interp) void -_TyGC_Fini(PyInterpreterState *interp) +_TyGC_Fini(TyInterpreterState *interp) { GCState *gcstate = &interp->gc; Ty_CLEAR(gcstate->garbage); @@ -2915,7 +2915,7 @@ custom_visitor_wrapper(const mi_heap_t *heap, const mi_heap_area_t *area, } void -_TyGC_VisitObjectsWorldStopped(PyInterpreterState *interp, +_TyGC_VisitObjectsWorldStopped(TyInterpreterState *interp, gcvisitobjects_t callback, void *arg) { struct custom_visitor_args wrapper = { @@ -2928,7 +2928,7 @@ _TyGC_VisitObjectsWorldStopped(PyInterpreterState *interp, void PyUnstable_GC_VisitObjects(gcvisitobjects_t callback, void *arg) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyEval_StopTheWorld(interp); _TyGC_VisitObjectsWorldStopped(interp, callback, arg); _TyEval_StartTheWorld(interp); @@ -2942,7 +2942,7 @@ PyUnstable_GC_VisitObjects(gcvisitobjects_t callback, void *arg) * GC should clear all freelists by traversing all threads. */ void -_TyGC_ClearAllFreeLists(PyInterpreterState *interp) +_TyGC_ClearAllFreeLists(TyInterpreterState *interp) { _Py_FOR_EACH_TSTATE_BEGIN(interp, p) { _PyThreadStateImpl *tstate = (_PyThreadStateImpl *)p; diff --git a/Python/gc_gil.c b/Python/gc_gil.c index 2938e59..9f5050a 100644 --- a/Python/gc_gil.c +++ b/Python/gc_gil.c @@ -9,7 +9,7 @@ * Clearing the free lists may give back memory to the OS earlier. */ void -_TyGC_ClearAllFreeLists(PyInterpreterState *interp) +_TyGC_ClearAllFreeLists(TyInterpreterState *interp) { _TyObject_ClearFreeLists(&interp->object_state.freelists, 0); } diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 830ded4..0bc54d6 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -102,7 +102,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyFloat_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -112,7 +112,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyFloat_CheckExact(left_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -160,7 +160,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -170,7 +170,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyLong_CheckExact(left_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -221,7 +221,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyUnicode_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -231,7 +231,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyUnicode_CheckExact(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -289,7 +289,7 @@ stack_pointer = _TyFrame_GetStackPointer(frame); if (!res) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -344,7 +344,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyUnicode_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -354,7 +354,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyUnicode_CheckExact(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -377,7 +377,7 @@ assert(TyUnicode_CheckExact(left_o)); if (PyStackRef_AsPyObjectBorrow(*target_local) != left_o) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } STAT_INC(BINARY_OP, hit); @@ -427,7 +427,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyFloat_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -437,7 +437,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyFloat_CheckExact(left_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -485,7 +485,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -495,7 +495,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyLong_CheckExact(left_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -545,7 +545,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyDict_CheckExact(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -610,7 +610,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -620,28 +620,28 @@ TyTypeObject *tp = Ty_TYPE(PyStackRef_AsPyObjectBorrow(container)); if (!TyType_HasFeature(tp, Ty_TPFLAGS_HEAPTYPE)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } PyHeapTypeObject *ht = (PyHeapTypeObject *)tp; TyObject *getitem_o = FT_ATOMIC_LOAD_PTR_ACQUIRE(ht->_spec_cache.getitem); if (getitem_o == NULL) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } assert(TyFunction_Check(getitem_o)); uint32_t cached_version = FT_ATOMIC_LOAD_UINT32_RELAXED(ht->_spec_cache.getitem_version); if (((PyFunctionObject *)getitem_o)->func_version != cached_version) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } PyCodeObject *code = (PyCodeObject *)TyFunction_GET_CODE(getitem_o); assert(code->co_argcount == 2); if (!_TyThreadState_HasStackSpace(tstate, code->co_framesize)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } getitem = PyStackRef_FromPyObjectNew(getitem_o); @@ -695,7 +695,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -705,7 +705,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyList_CheckExact(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -720,7 +720,7 @@ assert(TyList_CheckExact(list)); if (!_TyLong_IsNonNegativeCompact((PyLongObject *)sub)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } Ty_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0]; @@ -730,7 +730,7 @@ stack_pointer = _TyFrame_GetStackPointer(frame); if (res_o == NULL) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } STAT_INC(BINARY_OP, hit); @@ -738,7 +738,7 @@ #else if (index >= TyList_GET_SIZE(list)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } STAT_INC(BINARY_OP, hit); @@ -785,7 +785,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(tos); if (!TySlice_Check(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -795,7 +795,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyList_CheckExact(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -857,7 +857,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -867,7 +867,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyUnicode_CheckExact(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -882,19 +882,19 @@ assert(TyUnicode_CheckExact(str)); if (!_TyLong_IsNonNegativeCompact((PyLongObject *)sub)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } Ty_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0]; if (TyUnicode_GET_LENGTH(str) <= index) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } Ty_UCS4 c = TyUnicode_READ_CHAR(str, index); if (Ty_ARRAY_LENGTH(_Ty_SINGLETON(strings).ascii) <= c) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } STAT_INC(BINARY_OP, hit); @@ -935,7 +935,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -945,7 +945,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyTuple_CheckExact(o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -960,13 +960,13 @@ assert(TyTuple_CheckExact(tuple)); if (!_TyLong_IsNonNegativeCompact((PyLongObject *)sub)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } Ty_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0]; if (index >= TyTuple_GET_SIZE(tuple)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } STAT_INC(BINARY_OP, hit); @@ -1007,7 +1007,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyFloat_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -1017,7 +1017,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyFloat_CheckExact(left_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -1065,7 +1065,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -1075,7 +1075,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyLong_CheckExact(left_o)) { UPDATE_MISS_STATS(BINARY_OP); - assert(_PyOpcode_Deopt[opcode] == (BINARY_OP)); + assert(_TyOpcode_Deopt[opcode] == (BINARY_OP)); JUMP_TO_PREDICTED(BINARY_OP); } } @@ -1569,7 +1569,7 @@ } if (Ty_TYPE(callable_o) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall) + ((PyFunctionObject *)callable_o)->vectorcall == _TyFunction_Vectorcall) { int code_flags = ((PyCodeObject*)TyFunction_GET_CODE(callable_o))->co_flags; TyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Ty_NewRef(TyFunction_GET_GLOBALS(callable_o)); @@ -1715,7 +1715,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1727,18 +1727,18 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (!PyStackRef_IsNull(self_or_null)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (!TyType_Check(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyTypeObject *tp = (TyTypeObject *)callable_o; if (FT_ATOMIC_LOAD_UINT32_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } assert(tp->tp_new == PyBaseObject_Type.tp_new); @@ -1749,7 +1749,7 @@ PyCodeObject *code = (PyCodeObject *)init_func->func_code; if (!_TyThreadState_HasStackSpace(tstate, code->co_framesize + _Ty_InitCleanup.co_framesize)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -1834,7 +1834,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1844,12 +1844,12 @@ callable = stack_pointer[-2 - oparg]; if (!PyStackRef_IsNull(null)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (Ty_TYPE(PyStackRef_AsPyObjectBorrow(callable)) != &TyMethod_Type) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1875,13 +1875,13 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (!TyFunction_Check(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } PyFunctionObject *func = (PyFunctionObject *)callable_o; if (func->func_version != func_version) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1893,7 +1893,7 @@ PyCodeObject *code = (PyCodeObject *)func->func_code; if (code->co_argcount != oparg + (!PyStackRef_IsNull(self_or_null))) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1904,7 +1904,7 @@ PyCodeObject *code = (PyCodeObject *)func->func_code; if (!_TyThreadState_HasStackSpace(tstate, code->co_framesize)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1912,7 +1912,7 @@ { if (tstate->py_recursion_remaining <= 1) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1976,7 +1976,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -1988,23 +1988,23 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (Ty_TYPE(callable_o) != &TyMethod_Type) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyObject *func = ((PyMethodObject *)callable_o)->im_func; if (!TyFunction_Check(func)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (((PyFunctionObject *)func)->func_version != func_version) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (!PyStackRef_IsNull(null)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -2029,7 +2029,7 @@ { if (tstate->py_recursion_remaining <= 1) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -2108,7 +2108,7 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (!TyType_Check(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyTypeObject *tp = (TyTypeObject *)callable_o; @@ -2120,7 +2120,7 @@ } if (tp->tp_vectorcall == NULL) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -2227,12 +2227,12 @@ } if (!PyCFunction_CheckExact(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (PyCFunction_GET_FLAGS(callable_o) != METH_FASTCALL) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -2344,12 +2344,12 @@ } if (!PyCFunction_CheckExact(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (PyCFunction_GET_FLAGS(callable_o) != (METH_FASTCALL | METH_KEYWORDS)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -2460,22 +2460,22 @@ } if (total_args != 1) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (!PyCFunction_CheckExact(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (PyCFunction_GET_FLAGS(callable_o) != METH_O) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (_Ty_ReachedRecursionLimit(tstate)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -2621,7 +2621,7 @@ else { if (Ty_TYPE(func) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)func)->vectorcall == _PyFunction_Vectorcall) { + ((PyFunctionObject *)func)->vectorcall == _TyFunction_Vectorcall) { TyObject *callargs = PyStackRef_AsPyObjectSteal(callargs_st); assert(TyTuple_CheckExact(callargs)); TyObject *kwargs = PyStackRef_IsNull(kwargs_st) ? NULL : PyStackRef_AsPyObjectSteal(kwargs_st); @@ -2795,13 +2795,13 @@ } if (total_args != 2) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (callable_o != interp->callable_cache.isinstance) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -2902,7 +2902,7 @@ int positional_args = total_args - (int)TyTuple_GET_SIZE(kwnames_o); if (Ty_TYPE(callable_o) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall) + ((PyFunctionObject *)callable_o)->vectorcall == _TyFunction_Vectorcall) { int code_flags = ((PyCodeObject*)TyFunction_GET_CODE(callable_o))->co_flags; TyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Ty_NewRef(TyFunction_GET_GLOBALS(callable_o)); @@ -3039,7 +3039,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } } @@ -3051,23 +3051,23 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (Ty_TYPE(callable_o) != &TyMethod_Type) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } TyObject *func = ((PyMethodObject *)callable_o)->im_func; if (!TyFunction_Check(func)) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } if (((PyFunctionObject *)func)->func_version != func_version) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } if (!PyStackRef_IsNull(null)) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } } @@ -3172,12 +3172,12 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (TyFunction_Check(callable_o)) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } if (Ty_TYPE(callable_o) == &TyMethod_Type) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } } @@ -3303,7 +3303,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } } @@ -3314,13 +3314,13 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (!TyFunction_Check(callable_o)) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } PyFunctionObject *func = (PyFunctionObject *)callable_o; if (func->func_version != func_version) { UPDATE_MISS_STATS(CALL_KW); - assert(_PyOpcode_Deopt[opcode] == (CALL_KW)); + assert(_TyOpcode_Deopt[opcode] == (CALL_KW)); JUMP_TO_PREDICTED(CALL_KW); } } @@ -3406,7 +3406,7 @@ null = stack_pointer[-2]; if (!PyStackRef_IsNull(null)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -3414,10 +3414,10 @@ { callable = stack_pointer[-3]; TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (callable_o != interp->callable_cache.len) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -3478,25 +3478,25 @@ assert(oparg == 1); TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); TyObject *self_o = PyStackRef_AsPyObjectBorrow(self); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (callable_o != interp->callable_cache.list_append) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (self_o == NULL) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (!TyList_Check(self_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (!LOCK_OBJECT(self_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -3554,26 +3554,26 @@ } if (total_args == 0) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o; if (!Ty_IS_TYPE(method, &PyMethodDescr_Type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyMethodDef *meth = method->d_method; if (meth->ml_flags != METH_FASTCALL) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyObject *self = PyStackRef_AsPyObjectBorrow(arguments[0]); assert(self != NULL); if (!Ty_IS_TYPE(self, method->d_common.d_type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -3683,19 +3683,19 @@ } if (total_args == 0) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o; if (!Ty_IS_TYPE(method, &PyMethodDescr_Type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyMethodDef *meth = method->d_method; if (meth->ml_flags != (METH_FASTCALL|METH_KEYWORDS)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyTypeObject *d_type = method->d_common.d_type; @@ -3703,7 +3703,7 @@ assert(self != NULL); if (!Ty_IS_TYPE(self, d_type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -3814,13 +3814,13 @@ } if (total_args != 1) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o; if (!Ty_IS_TYPE(method, &PyMethodDescr_Type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyMethodDef *meth = method->d_method; @@ -3828,17 +3828,17 @@ TyObject *self = PyStackRef_AsPyObjectBorrow(self_stackref); if (!Ty_IS_TYPE(self, method->d_common.d_type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (meth->ml_flags != METH_NOARGS) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (_Ty_ReachedRecursionLimit(tstate)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -3916,23 +3916,23 @@ PyMethodDescrObject *method = (PyMethodDescrObject *)callable_o; if (total_args != 2) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (!Ty_IS_TYPE(method, &PyMethodDescr_Type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } TyMethodDef *meth = method->d_method; if (meth->ml_flags != METH_O) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (_Ty_ReachedRecursionLimit(tstate)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } _PyStackRef arg_stackref = arguments[1]; @@ -3940,7 +3940,7 @@ if (!Ty_IS_TYPE(PyStackRef_AsPyObjectBorrow(self_stackref), method->d_common.d_type)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } STAT_INC(CALL, hit); @@ -4022,12 +4022,12 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (TyFunction_Check(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } if (Ty_TYPE(callable_o) == &TyMethod_Type) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4141,7 +4141,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4152,13 +4152,13 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (!TyFunction_Check(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } PyFunctionObject *func = (PyFunctionObject *)callable_o; if (func->func_version != func_version) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4171,7 +4171,7 @@ PyCodeObject *code = (PyCodeObject *)func->func_code; if (code->co_argcount != oparg + (!PyStackRef_IsNull(self_or_null))) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4182,7 +4182,7 @@ PyCodeObject *code = (PyCodeObject *)func->func_code; if (!_TyThreadState_HasStackSpace(tstate, code->co_framesize)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4190,7 +4190,7 @@ { if (tstate->py_recursion_remaining <= 1) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4253,7 +4253,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4264,13 +4264,13 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (!TyFunction_Check(callable_o)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } PyFunctionObject *func = (PyFunctionObject *)callable_o; if (func->func_version != func_version) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4278,7 +4278,7 @@ { if (tstate->py_recursion_remaining <= 1) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4355,7 +4355,7 @@ null = stack_pointer[-2]; if (!PyStackRef_IsNull(null)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4365,7 +4365,7 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (callable_o != (TyObject *)&TyUnicode_Type) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4435,7 +4435,7 @@ null = stack_pointer[-2]; if (!PyStackRef_IsNull(null)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4445,7 +4445,7 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (callable_o != (TyObject *)&TyTuple_Type) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4515,7 +4515,7 @@ null = stack_pointer[-2]; if (!PyStackRef_IsNull(null)) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4525,7 +4525,7 @@ TyObject *callable_o = PyStackRef_AsPyObjectBorrow(callable); if (callable_o != (TyObject *)&TyType_Type) { UPDATE_MISS_STATS(CALL); - assert(_PyOpcode_Deopt[opcode] == (CALL)); + assert(_TyOpcode_Deopt[opcode] == (CALL)); JUMP_TO_PREDICTED(CALL); } } @@ -4809,7 +4809,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyFloat_CheckExact(value_o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } } @@ -4819,7 +4819,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyFloat_CheckExact(left_o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } } @@ -4864,7 +4864,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } } @@ -4874,7 +4874,7 @@ TyObject *left_o = PyStackRef_AsPyObjectBorrow(left); if (!TyLong_CheckExact(left_o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } } @@ -4886,12 +4886,12 @@ TyObject *right_o = PyStackRef_AsPyObjectBorrow(right); if (!_TyLong_IsCompact((PyLongObject *)left_o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } if (!_TyLong_IsCompact((PyLongObject *)right_o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } STAT_INC(COMPARE_OP, hit); @@ -4932,7 +4932,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyUnicode_CheckExact(value_o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } } @@ -4942,7 +4942,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyUnicode_CheckExact(o)) { UPDATE_MISS_STATS(COMPARE_OP); - assert(_PyOpcode_Deopt[opcode] == (COMPARE_OP)); + assert(_TyOpcode_Deopt[opcode] == (COMPARE_OP)); JUMP_TO_PREDICTED(COMPARE_OP); } } @@ -5050,7 +5050,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(tos); if (!TyDict_CheckExact(o)) { UPDATE_MISS_STATS(CONTAINS_OP); - assert(_PyOpcode_Deopt[opcode] == (CONTAINS_OP)); + assert(_TyOpcode_Deopt[opcode] == (CONTAINS_OP)); JUMP_TO_PREDICTED(CONTAINS_OP); } } @@ -5108,7 +5108,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(tos); if (!PyAnySet_CheckExact(o)) { UPDATE_MISS_STATS(CONTAINS_OP); - assert(_PyOpcode_Deopt[opcode] == (CONTAINS_OP)); + assert(_TyOpcode_Deopt[opcode] == (CONTAINS_OP)); JUMP_TO_PREDICTED(CONTAINS_OP); } } @@ -5568,7 +5568,7 @@ opcode = executor->vm_data.opcode; oparg = (oparg & ~255) | executor->vm_data.oparg; next_instr = this_instr; - if (_PyOpcode_Caches[_PyOpcode_Deopt[opcode]]) { + if (_TyOpcode_Caches[_TyOpcode_Deopt[opcode]]) { PAUSE_ADAPTIVE_COUNTER(this_instr[1].counter); } DISPATCH_GOTO(); @@ -5781,7 +5781,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } } @@ -5791,19 +5791,19 @@ PyGenObject *gen = (PyGenObject *)PyStackRef_AsPyObjectBorrow(iter); if (Ty_TYPE(gen) != &TyGen_Type) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #ifdef Ty_GIL_DISABLED if (!_TyObject_IsUniquelyReferenced((TyObject *)gen)) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #endif if (gen->gi_frame_state >= FRAME_EXECUTING) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } STAT_INC(FOR_ITER, hit); @@ -5852,20 +5852,20 @@ TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); if (Ty_TYPE(iter_o) != &PyListIter_Type) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #ifdef Ty_GIL_DISABLED if (!_TyObject_IsUniquelyReferenced(iter_o)) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; if (!_Ty_IsOwnedByCurrentThread((TyObject *)it->it_seq) || !_TyObject_GC_IS_SHARED(it->it_seq)) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #endif @@ -5878,7 +5878,7 @@ assert(_TyObject_IsUniquelyReferenced(iter_o)); (void)iter_o; #else - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; STAT_INC(FOR_ITER, hit); PyListObject *seq = it->it_seq; if (seq == NULL || (size_t)it->it_index >= (size_t)TyList_GET_SIZE(seq)) { @@ -5897,7 +5897,7 @@ // _ITER_NEXT_LIST { TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; assert(Ty_TYPE(iter_o) == &PyListIter_Type); PyListObject *seq = it->it_seq; assert(seq); @@ -5911,7 +5911,7 @@ stack_pointer = _TyFrame_GetStackPointer(frame); if (result < 0) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } if (result == 0) { @@ -5951,13 +5951,13 @@ _PyRangeIterObject *r = (_PyRangeIterObject *)PyStackRef_AsPyObjectBorrow(iter); if (Ty_TYPE(r) != &PyRangeIter_Type) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #ifdef Ty_GIL_DISABLED if (!_TyObject_IsUniquelyReferenced((TyObject *)r)) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #endif @@ -6018,13 +6018,13 @@ TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); if (Ty_TYPE(iter_o) != &PyTupleIter_Type) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #ifdef Ty_GIL_DISABLED if (!_TyObject_IsUniquelyReferenced(iter_o)) { UPDATE_MISS_STATS(FOR_ITER); - assert(_PyOpcode_Deopt[opcode] == (FOR_ITER)); + assert(_TyOpcode_Deopt[opcode] == (FOR_ITER)); JUMP_TO_PREDICTED(FOR_ITER); } #endif @@ -6437,7 +6437,7 @@ } if (Ty_TYPE(callable_o) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall) + ((PyFunctionObject *)callable_o)->vectorcall == _TyFunction_Vectorcall) { int code_flags = ((PyCodeObject*)TyFunction_GET_CODE(callable_o))->co_flags; TyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Ty_NewRef(TyFunction_GET_GLOBALS(callable_o)); @@ -6653,7 +6653,7 @@ else { if (Ty_TYPE(func) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)func)->vectorcall == _PyFunction_Vectorcall) { + ((PyFunctionObject *)func)->vectorcall == _TyFunction_Vectorcall) { TyObject *callargs = PyStackRef_AsPyObjectSteal(callargs_st); assert(TyTuple_CheckExact(callargs)); TyObject *kwargs = PyStackRef_IsNull(kwargs_st) ? NULL : PyStackRef_AsPyObjectSteal(kwargs_st); @@ -6806,7 +6806,7 @@ int positional_args = total_args - (int)TyTuple_GET_SIZE(kwnames_o); if (Ty_TYPE(callable_o) == &TyFunction_Type && tstate->interp->eval_frame == NULL && - ((PyFunctionObject *)callable_o)->vectorcall == _PyFunction_Vectorcall) + ((PyFunctionObject *)callable_o)->vectorcall == _TyFunction_Vectorcall) { int code_flags = ((PyCodeObject*)TyFunction_GET_CODE(callable_o))->co_flags; TyObject *locals = code_flags & CO_OPTIMIZED ? NULL : Ty_NewRef(TyFunction_GET_GLOBALS(callable_o)); @@ -7105,7 +7105,7 @@ JUMP_TO_LABEL(error); } next_instr = this_instr; - if (_PyOpcode_Caches[next_opcode]) { + if (_TyOpcode_Caches[next_opcode]) { PAUSE_ADAPTIVE_COUNTER(next_instr[1].counter); } assert(next_opcode > 0 && next_opcode < 256); @@ -7190,7 +7190,7 @@ DISPATCH(); } } - if (_PyOpcode_Caches[original_opcode]) { + if (_TyOpcode_Caches[original_opcode]) { _PyBinaryOpCache *cache = (_PyBinaryOpCache *)(next_instr+1); PAUSE_ADAPTIVE_COUNTER(cache->counter); } @@ -7643,10 +7643,10 @@ #if TIER_ONE assert(frame->instr_ptr->op.code == INSTRUMENTED_LINE || frame->instr_ptr->op.code == INSTRUMENTED_INSTRUCTION || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); + _TyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); #endif stack_pointer = _TyFrame_GetStackPointer(frame); LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND); @@ -8065,13 +8065,13 @@ TyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); if (!TyType_Check(owner_o)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(((TyTypeObject *)owner_o)->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8123,13 +8123,13 @@ TyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); if (!TyType_Check(owner_o)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(((TyTypeObject *)owner_o)->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8140,7 +8140,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8190,14 +8190,14 @@ assert((oparg & 1) == 0); if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } TyTypeObject *cls = Ty_TYPE(owner_o); assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(cls->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } assert(Ty_IS_TYPE(getattribute, &TyFunction_Type)); @@ -8205,14 +8205,14 @@ assert(func_version != 0); if (f->func_version != func_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } PyCodeObject *code = (PyCodeObject *)f->func_code; assert(code->co_argcount == 2); if (!_TyThreadState_HasStackSpace(tstate, code->co_framesize)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } STAT_INC(LOAD_ATTR, hit); @@ -8250,7 +8250,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8261,7 +8261,7 @@ assert(Ty_TYPE(owner_o)->tp_flags & Ty_TPFLAGS_INLINE_VALUES); if (!FT_ATOMIC_LOAD_UINT8(_TyObject_InlineValues(owner_o)->valid)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8273,7 +8273,7 @@ TyObject *attr_o = FT_ATOMIC_LOAD_PTR_ACQUIRE(*value_ptr); if (attr_o == NULL) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } #ifdef Ty_GIL_DISABLED @@ -8281,7 +8281,7 @@ if (!increfed) { if (true) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8330,7 +8330,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8341,7 +8341,7 @@ TyObject *dict = FT_ATOMIC_LOAD_PTR_ACQUIRE(*(TyObject **)ptr); if (dict != NULL) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8386,7 +8386,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8432,7 +8432,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8443,7 +8443,7 @@ PyDictValues *ivs = _TyObject_InlineValues(owner_o); if (!FT_ATOMIC_LOAD_UINT8(ivs->valid)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8455,7 +8455,7 @@ PyDictKeysObject *keys = owner_heap_type->ht_cached_keys; if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != keys_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8499,7 +8499,7 @@ TyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); if (Ty_TYPE(owner_o)->tp_getattro != TyModule_Type.tp_getattro) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } PyDictObject *dict = (PyDictObject *)((PyModuleObject *)owner_o)->md_dict; @@ -8507,7 +8507,7 @@ PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys); if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != dict_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } assert(keys->dk_kind == DICT_KEYS_UNICODE); @@ -8516,7 +8516,7 @@ TyObject *attr_o = FT_ATOMIC_LOAD_PTR_RELAXED(ep->me_value); if (attr_o == NULL) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } #ifdef Ty_GIL_DISABLED @@ -8524,7 +8524,7 @@ if (!increfed) { if (true) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8572,7 +8572,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8619,7 +8619,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8630,7 +8630,7 @@ PyDictValues *ivs = _TyObject_InlineValues(owner_o); if (!FT_ATOMIC_LOAD_UINT8(ivs->valid)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8642,7 +8642,7 @@ PyDictKeysObject *keys = owner_heap_type->ht_cached_keys; if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != keys_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8683,7 +8683,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8695,7 +8695,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8709,22 +8709,22 @@ PyCodeObject *code = (PyCodeObject *)f->func_code; if ((code->co_flags & (CO_VARKEYWORDS | CO_VARARGS | CO_OPTIMIZED)) != CO_OPTIMIZED) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } if (code->co_kwonlyargcount) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } if (code->co_argcount != 1) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } if (!_TyThreadState_HasStackSpace(tstate, code->co_framesize)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } STAT_INC(LOAD_ATTR, hit); @@ -8781,7 +8781,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8793,14 +8793,14 @@ TyObject *attr_o = FT_ATOMIC_LOAD_PTR(*addr); if (attr_o == NULL) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } #ifdef Ty_GIL_DISABLED int increfed = _Ty_TryIncrefCompareStackRef(addr, attr_o, &attr); if (!increfed) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } #else @@ -8850,7 +8850,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8862,7 +8862,7 @@ PyDictObject *dict = _TyObject_GetManagedDict(owner_o); if (dict == NULL) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } PyDictKeysObject *dk = FT_ATOMIC_LOAD_PTR(dict->ma_keys); @@ -8870,7 +8870,7 @@ #ifdef Ty_GIL_DISABLED if (!_Ty_IsOwnedByCurrentThread((TyObject *)dict) && !_TyObject_GC_IS_SHARED(dict)) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } #endif @@ -8878,7 +8878,7 @@ if (hint >= (size_t)FT_ATOMIC_LOAD_SSIZE_RELAXED(dk->dk_nentries)) { if (true) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8886,7 +8886,7 @@ if (dk->dk_kind != DICT_KEYS_UNICODE) { if (true) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8894,7 +8894,7 @@ if (FT_ATOMIC_LOAD_PTR_RELAXED(ep->me_key) != name) { if (true) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8902,7 +8902,7 @@ if (attr_o == NULL) { if (true) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -8912,7 +8912,7 @@ if (!increfed) { if (true) { UPDATE_MISS_STATS(LOAD_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_ATTR)); JUMP_TO_PREDICTED(LOAD_ATTR); } } @@ -9398,13 +9398,13 @@ PyDictObject *dict = (PyDictObject *)GLOBALS(); if (!TyDict_CheckExact(dict)) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys); if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != version) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } assert(DK_IS_UNICODE(keys)); @@ -9416,13 +9416,13 @@ PyDictObject *dict = (PyDictObject *)BUILTINS(); if (!TyDict_CheckExact(dict)) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys); if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != version) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } assert(DK_IS_UNICODE(keys)); @@ -9430,14 +9430,14 @@ TyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value); if (res_o == NULL) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } #if Ty_GIL_DISABLED int increfed = _Ty_TryIncrefCompareStackRef(&entries[index].me_value, res_o, &res); if (!increfed) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } #else @@ -9482,13 +9482,13 @@ PyDictObject *dict = (PyDictObject *)GLOBALS(); if (!TyDict_CheckExact(dict)) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } PyDictKeysObject *keys = FT_ATOMIC_LOAD_PTR_ACQUIRE(dict->ma_keys); if (FT_ATOMIC_LOAD_UINT32_RELAXED(keys->dk_version) != version) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } assert(DK_IS_UNICODE(keys)); @@ -9497,14 +9497,14 @@ TyObject *res_o = FT_ATOMIC_LOAD_PTR_RELAXED(entries[index].me_value); if (res_o == NULL) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } #if Ty_GIL_DISABLED int increfed = _Ty_TryIncrefCompareStackRef(&entries[index].me_value, res_o, &res); if (!increfed) { UPDATE_MISS_STATS(LOAD_GLOBAL); - assert(_PyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_GLOBAL)); JUMP_TO_PREDICTED(LOAD_GLOBAL); } #else @@ -9798,12 +9798,12 @@ assert(!(oparg & 1)); if (global_super != (TyObject *)&TySuper_Type) { UPDATE_MISS_STATS(LOAD_SUPER_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); JUMP_TO_PREDICTED(LOAD_SUPER_ATTR); } if (!TyType_Check(class)) { UPDATE_MISS_STATS(LOAD_SUPER_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); JUMP_TO_PREDICTED(LOAD_SUPER_ATTR); } STAT_INC(LOAD_SUPER_ATTR, hit); @@ -9861,12 +9861,12 @@ assert(oparg & 1); if (global_super != (TyObject *)&TySuper_Type) { UPDATE_MISS_STATS(LOAD_SUPER_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); JUMP_TO_PREDICTED(LOAD_SUPER_ATTR); } if (!TyType_Check(class)) { UPDATE_MISS_STATS(LOAD_SUPER_ATTR); - assert(_PyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (LOAD_SUPER_ATTR)); JUMP_TO_PREDICTED(LOAD_SUPER_ATTR); } STAT_INC(LOAD_SUPER_ATTR, hit); @@ -9958,7 +9958,7 @@ if (func_obj == NULL) { JUMP_TO_LABEL(error); } - _PyFunction_SetVersion( + _TyFunction_SetVersion( func_obj, ((PyCodeObject *)codeobj)->co_version); func = PyStackRef_FromPyObjectSteal((TyObject *)func_obj); stack_pointer[0] = func; @@ -10527,7 +10527,7 @@ #if defined(__EMSCRIPTEN__) if (_Ty_emscripten_signal_clock == 0) { UPDATE_MISS_STATS(RESUME); - assert(_PyOpcode_Deopt[opcode] == (RESUME)); + assert(_TyOpcode_Deopt[opcode] == (RESUME)); JUMP_TO_PREDICTED(RESUME); } _Ty_emscripten_signal_clock -= Ty_EMSCRIPTEN_SIGNAL_HANDLING; @@ -10537,14 +10537,14 @@ assert((version & _PY_EVAL_EVENTS_MASK) == 0); if (eval_breaker != version) { UPDATE_MISS_STATS(RESUME); - assert(_PyOpcode_Deopt[opcode] == (RESUME)); + assert(_TyOpcode_Deopt[opcode] == (RESUME)); JUMP_TO_PREDICTED(RESUME); } #ifdef Ty_GIL_DISABLED if (frame->tlbc_index != ((_PyThreadStateImpl *)tstate)->tlbc_index) { UPDATE_MISS_STATS(RESUME); - assert(_PyOpcode_Deopt[opcode] == (RESUME)); + assert(_TyOpcode_Deopt[opcode] == (RESUME)); JUMP_TO_PREDICTED(RESUME); } #endif @@ -10746,7 +10746,7 @@ { if (tstate->interp->eval_frame) { UPDATE_MISS_STATS(SEND); - assert(_PyOpcode_Deopt[opcode] == (SEND)); + assert(_TyOpcode_Deopt[opcode] == (SEND)); JUMP_TO_PREDICTED(SEND); } } @@ -10757,12 +10757,12 @@ PyGenObject *gen = (PyGenObject *)PyStackRef_AsPyObjectBorrow(receiver); if (Ty_TYPE(gen) != &TyGen_Type && Ty_TYPE(gen) != &TyCoro_Type) { UPDATE_MISS_STATS(SEND); - assert(_PyOpcode_Deopt[opcode] == (SEND)); + assert(_TyOpcode_Deopt[opcode] == (SEND)); JUMP_TO_PREDICTED(SEND); } if (gen->gi_frame_state >= FRAME_EXECUTING) { UPDATE_MISS_STATS(SEND); - assert(_PyOpcode_Deopt[opcode] == (SEND)); + assert(_TyOpcode_Deopt[opcode] == (SEND)); JUMP_TO_PREDICTED(SEND); } STAT_INC(SEND, hit); @@ -10998,7 +10998,7 @@ assert(type_version != 0); if (!LOCK_OBJECT(owner_o)) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } TyTypeObject *tp = Ty_TYPE(owner_o); @@ -11006,7 +11006,7 @@ UNLOCK_OBJECT(owner_o); if (true) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11021,7 +11021,7 @@ UNLOCK_OBJECT(owner_o); if (true) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11074,7 +11074,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11085,7 +11085,7 @@ TyObject *owner_o = PyStackRef_AsPyObjectBorrow(owner); if (!LOCK_OBJECT(owner_o)) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } char *addr = (char *)owner_o + index; @@ -11125,7 +11125,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11138,12 +11138,12 @@ PyDictObject *dict = _TyObject_GetManagedDict(owner_o); if (dict == NULL) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } if (!LOCK_OBJECT(dict)) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } #ifdef Ty_GIL_DISABLED @@ -11151,7 +11151,7 @@ UNLOCK_OBJECT(dict); if (true) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11163,7 +11163,7 @@ UNLOCK_OBJECT(dict); if (true) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11172,7 +11172,7 @@ UNLOCK_OBJECT(dict); if (true) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11181,7 +11181,7 @@ UNLOCK_OBJECT(dict); if (true) { UPDATE_MISS_STATS(STORE_ATTR); - assert(_PyOpcode_Deopt[opcode] == (STORE_ATTR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_ATTR)); JUMP_TO_PREDICTED(STORE_ATTR); } } @@ -11521,7 +11521,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyDict_CheckExact(o)) { UPDATE_MISS_STATS(STORE_SUBSCR); - assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_SUBSCR)); JUMP_TO_PREDICTED(STORE_SUBSCR); } } @@ -11572,7 +11572,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(STORE_SUBSCR); - assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_SUBSCR)); JUMP_TO_PREDICTED(STORE_SUBSCR); } } @@ -11582,7 +11582,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(nos); if (!TyList_CheckExact(o)) { UPDATE_MISS_STATS(STORE_SUBSCR); - assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_SUBSCR)); JUMP_TO_PREDICTED(STORE_SUBSCR); } } @@ -11598,20 +11598,20 @@ assert(TyList_CheckExact(list)); if (!_TyLong_IsNonNegativeCompact((PyLongObject *)sub)) { UPDATE_MISS_STATS(STORE_SUBSCR); - assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_SUBSCR)); JUMP_TO_PREDICTED(STORE_SUBSCR); } Ty_ssize_t index = ((PyLongObject*)sub)->long_value.ob_digit[0]; if (!LOCK_OBJECT(list)) { UPDATE_MISS_STATS(STORE_SUBSCR); - assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_SUBSCR)); JUMP_TO_PREDICTED(STORE_SUBSCR); } if (index >= TyList_GET_SIZE(list)) { UNLOCK_OBJECT(list); if (true) { UPDATE_MISS_STATS(STORE_SUBSCR); - assert(_PyOpcode_Deopt[opcode] == (STORE_SUBSCR)); + assert(_TyOpcode_Deopt[opcode] == (STORE_SUBSCR)); JUMP_TO_PREDICTED(STORE_SUBSCR); } } @@ -11728,7 +11728,7 @@ assert(type_version != 0); if (FT_ATOMIC_LOAD_UINT_RELAXED(tp->tp_version_tag) != type_version) { UPDATE_MISS_STATS(TO_BOOL); - assert(_PyOpcode_Deopt[opcode] == (TO_BOOL)); + assert(_TyOpcode_Deopt[opcode] == (TO_BOOL)); JUMP_TO_PREDICTED(TO_BOOL); } } @@ -11765,7 +11765,7 @@ value = stack_pointer[-1]; if (!PyStackRef_BoolCheck(value)) { UPDATE_MISS_STATS(TO_BOOL); - assert(_PyOpcode_Deopt[opcode] == (TO_BOOL)); + assert(_TyOpcode_Deopt[opcode] == (TO_BOOL)); JUMP_TO_PREDICTED(TO_BOOL); } STAT_INC(TO_BOOL, hit); @@ -11791,7 +11791,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyLong_CheckExact(value_o)) { UPDATE_MISS_STATS(TO_BOOL); - assert(_PyOpcode_Deopt[opcode] == (TO_BOOL)); + assert(_TyOpcode_Deopt[opcode] == (TO_BOOL)); JUMP_TO_PREDICTED(TO_BOOL); } STAT_INC(TO_BOOL, hit); @@ -11832,7 +11832,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(tos); if (!TyList_CheckExact(o)) { UPDATE_MISS_STATS(TO_BOOL); - assert(_PyOpcode_Deopt[opcode] == (TO_BOOL)); + assert(_TyOpcode_Deopt[opcode] == (TO_BOOL)); JUMP_TO_PREDICTED(TO_BOOL); } } @@ -11873,7 +11873,7 @@ value = stack_pointer[-1]; if (!PyStackRef_IsNone(value)) { UPDATE_MISS_STATS(TO_BOOL); - assert(_PyOpcode_Deopt[opcode] == (TO_BOOL)); + assert(_TyOpcode_Deopt[opcode] == (TO_BOOL)); JUMP_TO_PREDICTED(TO_BOOL); } STAT_INC(TO_BOOL, hit); @@ -11901,7 +11901,7 @@ TyObject *value_o = PyStackRef_AsPyObjectBorrow(value); if (!TyUnicode_CheckExact(value_o)) { UPDATE_MISS_STATS(TO_BOOL); - assert(_PyOpcode_Deopt[opcode] == (TO_BOOL)); + assert(_TyOpcode_Deopt[opcode] == (TO_BOOL)); JUMP_TO_PREDICTED(TO_BOOL); } } @@ -12104,7 +12104,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(tos); if (!TyList_CheckExact(o)) { UPDATE_MISS_STATS(UNPACK_SEQUENCE); - assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); + assert(_TyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); JUMP_TO_PREDICTED(UNPACK_SEQUENCE); } } @@ -12117,14 +12117,14 @@ assert(TyList_CheckExact(seq_o)); if (!LOCK_OBJECT(seq_o)) { UPDATE_MISS_STATS(UNPACK_SEQUENCE); - assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); + assert(_TyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); JUMP_TO_PREDICTED(UNPACK_SEQUENCE); } if (TyList_GET_SIZE(seq_o) != oparg) { UNLOCK_OBJECT(seq_o); if (true) { UPDATE_MISS_STATS(UNPACK_SEQUENCE); - assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); + assert(_TyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); JUMP_TO_PREDICTED(UNPACK_SEQUENCE); } } @@ -12163,7 +12163,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(tos); if (!TyTuple_CheckExact(o)) { UPDATE_MISS_STATS(UNPACK_SEQUENCE); - assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); + assert(_TyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); JUMP_TO_PREDICTED(UNPACK_SEQUENCE); } } @@ -12176,7 +12176,7 @@ assert(TyTuple_CheckExact(seq_o)); if (TyTuple_GET_SIZE(seq_o) != oparg) { UPDATE_MISS_STATS(UNPACK_SEQUENCE); - assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); + assert(_TyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); JUMP_TO_PREDICTED(UNPACK_SEQUENCE); } STAT_INC(UNPACK_SEQUENCE, hit); @@ -12214,7 +12214,7 @@ TyObject *o = PyStackRef_AsPyObjectBorrow(tos); if (!TyTuple_CheckExact(o)) { UPDATE_MISS_STATS(UNPACK_SEQUENCE); - assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); + assert(_TyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); JUMP_TO_PREDICTED(UNPACK_SEQUENCE); } } @@ -12227,7 +12227,7 @@ assert(TyTuple_CheckExact(seq_o)); if (TyTuple_GET_SIZE(seq_o) != 2) { UPDATE_MISS_STATS(UNPACK_SEQUENCE); - assert(_PyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); + assert(_TyOpcode_Deopt[opcode] == (UNPACK_SEQUENCE)); JUMP_TO_PREDICTED(UNPACK_SEQUENCE); } STAT_INC(UNPACK_SEQUENCE, hit); @@ -12320,10 +12320,10 @@ #if TIER_ONE assert(frame->instr_ptr->op.code == INSTRUMENTED_LINE || frame->instr_ptr->op.code == INSTRUMENTED_INSTRUCTION || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || - _PyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); + _TyOpcode_Deopt[frame->instr_ptr->op.code] == SEND || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == FOR_ITER || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == INTERPRETER_EXIT || + _TyOpcode_Deopt[frame->instr_ptr->op.code] == ENTER_EXECUTOR); #endif stack_pointer = _TyFrame_GetStackPointer(frame); LOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND); diff --git a/Python/getargs.c b/Python/getargs.c index 9e19e27..44b044c 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -2066,7 +2066,7 @@ new_kwtuple(const char * const *keywords, int total, int pos) Ty_DECREF(kwtuple); return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, &str); TyTuple_SET_ITEM(kwtuple, i, str); } diff --git a/Python/hamt.c b/Python/hamt.c index 32adb21..2d5ac94 100644 --- a/Python/hamt.c +++ b/Python/hamt.c @@ -2517,7 +2517,7 @@ hamt_baseiter_new(TyTypeObject *type, binaryfunc yield, PyHamtObject *o) TyTypeObject _PyHamtItems_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "items", ITERATOR_TYPE_SHARED_SLOTS }; @@ -2540,7 +2540,7 @@ _TyHamt_NewIterItems(PyHamtObject *o) TyTypeObject _PyHamtKeys_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "keys", ITERATOR_TYPE_SHARED_SLOTS }; @@ -2563,7 +2563,7 @@ _TyHamt_NewIterKeys(PyHamtObject *o) TyTypeObject _PyHamtValues_Type = { - PyVarObject_HEAD_INIT(NULL, 0) + TyVarObject_HEAD_INIT(NULL, 0) "values", ITERATOR_TYPE_SHARED_SLOTS }; @@ -2806,7 +2806,7 @@ static PyMappingMethods PyHamt_as_mapping = { }; TyTypeObject _TyHamt_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "hamt", sizeof(PyHamtObject), .tp_methods = PyHamt_methods, @@ -2829,7 +2829,7 @@ TyTypeObject _TyHamt_Type = { TyTypeObject _TyHamt_ArrayNode_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "hamt_array_node", sizeof(PyHamtNode_Array), 0, @@ -2842,7 +2842,7 @@ TyTypeObject _TyHamt_ArrayNode_Type = { }; TyTypeObject _TyHamt_BitmapNode_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "hamt_bitmap_node", sizeof(PyHamtNode_Bitmap) - sizeof(TyObject *), sizeof(TyObject *), @@ -2855,7 +2855,7 @@ TyTypeObject _TyHamt_BitmapNode_Type = { }; TyTypeObject _TyHamt_CollisionNode_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "hamt_collision_node", sizeof(PyHamtNode_Collision) - sizeof(TyObject *), sizeof(TyObject *), diff --git a/Python/import.c b/Python/import.c index d13892e..9901cfc 100644 --- a/Python/import.c +++ b/Python/import.c @@ -41,7 +41,7 @@ module _imp #ifndef NDEBUG static bool -is_interpreter_isolated(PyInterpreterState *interp) +is_interpreter_isolated(TyInterpreterState *interp) { return !_Ty_IsMainInterpreter(interp) && !(interp->feature_flags & Ty_RTFLAGS_USE_MAIN_OBMALLOC) @@ -122,22 +122,22 @@ static struct _inittab *inittab_copy = NULL; These calls are serialized by the global interpreter lock. */ void -_TyImport_AcquireLock(PyInterpreterState *interp) +_TyImport_AcquireLock(TyInterpreterState *interp) { _PyRecursiveMutex_Lock(&IMPORT_LOCK(interp)); } void -_TyImport_ReleaseLock(PyInterpreterState *interp) +_TyImport_ReleaseLock(TyInterpreterState *interp) { _PyRecursiveMutex_Unlock(&IMPORT_LOCK(interp)); } void -_TyImport_ReInitLock(PyInterpreterState *interp) +_TyImport_ReInitLock(TyInterpreterState *interp) { // gh-126688: Thread id may change after fork() on some operating systems. - IMPORT_LOCK(interp).thread = PyThread_get_thread_ident_ex(); + IMPORT_LOCK(interp).thread = TyThread_get_thread_ident_ex(); } @@ -146,7 +146,7 @@ _TyImport_ReInitLock(PyInterpreterState *interp) /***************/ TyObject * -_TyImport_InitModules(PyInterpreterState *interp) +_TyImport_InitModules(TyInterpreterState *interp) { assert(MODULES(interp) == NULL); MODULES(interp) = TyDict_New(); @@ -157,13 +157,13 @@ _TyImport_InitModules(PyInterpreterState *interp) } TyObject * -_TyImport_GetModules(PyInterpreterState *interp) +_TyImport_GetModules(TyInterpreterState *interp) { return MODULES(interp); } TyObject * -_TyImport_GetModulesRef(PyInterpreterState *interp) +_TyImport_GetModulesRef(TyInterpreterState *interp) { _TyImport_AcquireLock(interp); TyObject *modules = MODULES(interp); @@ -177,7 +177,7 @@ _TyImport_GetModulesRef(PyInterpreterState *interp) } void -_TyImport_ClearModules(PyInterpreterState *interp) +_TyImport_ClearModules(TyInterpreterState *interp) { Ty_SETREF(MODULES(interp), NULL); } @@ -241,7 +241,7 @@ import_get_module(TyThreadState *tstate, TyObject *name) } static int -import_ensure_initialized(PyInterpreterState *interp, TyObject *mod, TyObject *name) +import_ensure_initialized(TyInterpreterState *interp, TyObject *mod, TyObject *name) { TyObject *spec; @@ -473,7 +473,7 @@ _set_module_index(TyModuleDef *def, Ty_ssize_t index) } static const char * -_modules_by_index_check(PyInterpreterState *interp, Ty_ssize_t index) +_modules_by_index_check(TyInterpreterState *interp, Ty_ssize_t index) { if (index <= 0) { return "invalid module index"; @@ -488,7 +488,7 @@ _modules_by_index_check(PyInterpreterState *interp, Ty_ssize_t index) } static TyObject * -_modules_by_index_get(PyInterpreterState *interp, Ty_ssize_t index) +_modules_by_index_get(TyInterpreterState *interp, Ty_ssize_t index) { if (_modules_by_index_check(interp, index) != NULL) { return NULL; @@ -498,7 +498,7 @@ _modules_by_index_get(PyInterpreterState *interp, Ty_ssize_t index) } static int -_modules_by_index_set(PyInterpreterState *interp, +_modules_by_index_set(TyInterpreterState *interp, Ty_ssize_t index, TyObject *module) { assert(index > 0); @@ -520,7 +520,7 @@ _modules_by_index_set(PyInterpreterState *interp, } static int -_modules_by_index_clear_one(PyInterpreterState *interp, Ty_ssize_t index) +_modules_by_index_clear_one(TyInterpreterState *interp, Ty_ssize_t index) { const char *err = _modules_by_index_check(interp, index); if (err != NULL) { @@ -534,7 +534,7 @@ _modules_by_index_clear_one(PyInterpreterState *interp, Ty_ssize_t index) TyObject* PyState_FindModule(TyModuleDef* module) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (module->m_slots) { return NULL; } @@ -580,7 +580,7 @@ PyState_AddModule(TyObject* module, TyModuleDef* def) return -1; } - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; Ty_ssize_t index = _get_module_index_from_def(def); if (MODULES_BY_INDEX(interp) && index < TyList_GET_SIZE(MODULES_BY_INDEX(interp)) && @@ -611,7 +611,7 @@ PyState_RemoveModule(TyModuleDef* def) // Used by finalize_modules() void -_TyImport_ClearModulesByIndex(PyInterpreterState *interp) +_TyImport_ClearModulesByIndex(TyInterpreterState *interp) { if (!MODULES_BY_INDEX(interp)) { return; @@ -823,13 +823,13 @@ _TyImport_SwapPackageContext(const char *newcontext) #ifdef HAVE_DLOPEN int -_TyImport_GetDLOpenFlags(PyInterpreterState *interp) +_TyImport_GetDLOpenFlags(TyInterpreterState *interp) { return DLOPENFLAGS(interp); } void -_TyImport_SetDLOpenFlags(PyInterpreterState *interp, int new_val) +_TyImport_SetDLOpenFlags(TyInterpreterState *interp, int new_val) { DLOPENFLAGS(interp) = new_val; } @@ -861,7 +861,7 @@ exec_builtin_or_dynamic(TyObject *mod) { } -static int clear_singlephase_extension(PyInterpreterState *interp, +static int clear_singlephase_extension(TyInterpreterState *interp, TyObject *name, TyObject *filename); // Currently, this is only used for testing. @@ -871,7 +871,7 @@ static int clear_singlephase_extension(PyInterpreterState *interp, int _TyImport_ClearExtension(TyObject *name, TyObject *filename) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* Clearing a module's C globals is up to the module. */ if (clear_singlephase_extension(interp, name, filename) < 0) { @@ -1002,7 +1002,7 @@ struct extensions_cache_value { /* The module's index into its interpreter's modules_by_index cache. This is set for all extension modules but only used for legacy ones. - (See PyInterpreterState.modules_by_index for more info.) */ + (See TyInterpreterState.modules_by_index for more info.) */ Ty_ssize_t m_index; /* A copy of the module's __dict__ after the first time it was loaded. @@ -1120,7 +1120,7 @@ init_cached_m_dict(struct extensions_cache_value *value, TyObject *m_dict) assert(TyDict_Check(m_dict)); assert(value->origin != _Ty_ext_module_origin_CORE); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(!is_interpreter_isolated(interp)); /* XXX gh-88216: The copied dict is owned by the current @@ -1167,14 +1167,14 @@ del_cached_m_dict(struct extensions_cache_value *value) } static TyObject * get_core_module_dict( - PyInterpreterState *interp, TyObject *name, TyObject *path); + TyInterpreterState *interp, TyObject *name, TyObject *path); static TyObject * get_cached_m_dict(struct extensions_cache_value *value, TyObject *name, TyObject *path) { assert(value != NULL); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* It might be a core module (e.g. sys & builtins), for which we don't cache m_dict. */ if (value->origin == _Ty_ext_module_origin_CORE) { @@ -1504,7 +1504,7 @@ _extensions_cache_clear_all(void) static bool -check_multi_interp_extensions(PyInterpreterState *interp) +check_multi_interp_extensions(TyInterpreterState *interp) { int override = OVERRIDE_MULTI_INTERP_EXTENSIONS_CHECK(interp); if (override < 0) { @@ -1523,7 +1523,7 @@ check_multi_interp_extensions(PyInterpreterState *interp) int _TyImport_CheckSubinterpIncompatibleExtensionAllowed(const char *name) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (check_multi_interp_extensions(interp)) { assert(!_Ty_IsMainInterpreter(interp)); TyErr_Format(TyExc_ImportError, @@ -1625,7 +1625,7 @@ switch_back_from_main_interpreter(TyThreadState *tstate, } static TyObject * -get_core_module_dict(PyInterpreterState *interp, +get_core_module_dict(TyInterpreterState *interp, TyObject *name, TyObject *path) { /* Only builtin modules are core. */ @@ -1645,7 +1645,7 @@ get_core_module_dict(PyInterpreterState *interp, #ifndef NDEBUG static inline int -is_core_module(PyInterpreterState *interp, TyObject *name, TyObject *path) +is_core_module(TyInterpreterState *interp, TyObject *name, TyObject *path) { /* This might be called before the core dict copies are in place, so we can't rely on get_core_module_dict() here. */ @@ -2072,7 +2072,7 @@ import_run_extension(TyThreadState *tstate, PyModInitFunction p0, } // XXX There's a refleak somewhere with the filename. // Until we can track it down, we immortalize it. - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, &filename); if (TyModule_AddObjectRef(mod, "__file__", filename) < 0) { @@ -2192,7 +2192,7 @@ error: // Used in _TyImport_ClearExtension; see notes there. static int -clear_singlephase_extension(PyInterpreterState *interp, +clear_singlephase_extension(TyInterpreterState *interp, TyObject *name, TyObject *path) { struct extensions_cache_value *cached = _extensions_cache_get(path, name); @@ -2600,7 +2600,7 @@ TyImport_ExecCodeModuleWithPathnames(const char *name, TyObject *co, goto error; } else if (cpathobj != NULL) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (interp == NULL) { Ty_FatalError("no current interpreter"); @@ -2774,7 +2774,7 @@ resolve_module_alias(const char *name, const struct _module_alias *aliases, static bool use_frozen(void) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); int override = OVERRIDE_FROZEN_MODULES(interp); if (override > 0) { return true; @@ -3019,7 +3019,7 @@ find_frozen(TyObject *nameobj, struct frozen_info *info) } static TyObject * -unmarshal_frozen_code(PyInterpreterState *interp, struct frozen_info *info) +unmarshal_frozen_code(TyInterpreterState *interp, struct frozen_info *info) { TyObject *co = TyMarshal_ReadObjectFromString(info->data, info->size); if (co == NULL) { @@ -3202,7 +3202,7 @@ init_importlib(TyThreadState *tstate, TyObject *sysmod) { assert(!_TyErr_Occurred(tstate)); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; int verbose = _TyInterpreterState_GetConfig(interp)->verbose; // Import _importlib through its frozen version, _frozen_importlib. @@ -3247,7 +3247,7 @@ init_importlib(TyThreadState *tstate, TyObject *sysmod) static int -init_importlib_external(PyInterpreterState *interp) +init_importlib_external(TyInterpreterState *interp) { TyObject *value; value = PyObject_CallMethod(IMPORTLIB(interp), @@ -3260,14 +3260,14 @@ init_importlib_external(PyInterpreterState *interp) } TyObject * -_TyImport_GetImportlibLoader(PyInterpreterState *interp, +_TyImport_GetImportlibLoader(TyInterpreterState *interp, const char *loader_name) { return PyObject_GetAttrString(IMPORTLIB(interp), loader_name); } TyObject * -_TyImport_GetImportlibExternalLoader(PyInterpreterState *interp, +_TyImport_GetImportlibExternalLoader(TyInterpreterState *interp, const char *loader_name) { TyObject *bootstrap = PyObject_GetAttrString(IMPORTLIB(interp), @@ -3282,7 +3282,7 @@ _TyImport_GetImportlibExternalLoader(PyInterpreterState *interp, } TyObject * -_TyImport_BlessMyLoader(PyInterpreterState *interp, TyObject *module_globals) +_TyImport_BlessMyLoader(TyInterpreterState *interp, TyObject *module_globals) { TyObject *external = PyObject_GetAttrString(IMPORTLIB(interp), "_bootstrap_external"); @@ -3297,7 +3297,7 @@ _TyImport_BlessMyLoader(PyInterpreterState *interp, TyObject *module_globals) } TyObject * -_TyImport_ImportlibModuleRepr(PyInterpreterState *interp, TyObject *m) +_TyImport_ImportlibModuleRepr(TyInterpreterState *interp, TyObject *m) { return PyObject_CallMethod(IMPORTLIB(interp), "_module_repr", "O", m); } @@ -3390,7 +3390,7 @@ TyImport_GetImporter(TyObject *path) /*********************/ int -_TyImport_InitDefaultImportFunc(PyInterpreterState *interp) +_TyImport_InitDefaultImportFunc(TyInterpreterState *interp) { // Get the __import__ function TyObject *import_func; @@ -3402,7 +3402,7 @@ _TyImport_InitDefaultImportFunc(PyInterpreterState *interp) } int -_TyImport_IsDefaultImportFunc(PyInterpreterState *interp, TyObject *func) +_TyImport_IsDefaultImportFunc(TyInterpreterState *interp, TyObject *func) { return func == IMPORT_FUNC(interp); } @@ -3672,12 +3672,12 @@ static TyObject * import_find_and_load(TyThreadState *tstate, TyObject *abs_name) { TyObject *mod = NULL; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; int import_time = _TyInterpreterState_GetConfig(interp)->import_time; #define import_level FIND_AND_LOAD(interp).import_level #define accumulated FIND_AND_LOAD(interp).accumulated - PyTime_t t1 = 0, accumulated_copy = accumulated; + TyTime_t t1 = 0, accumulated_copy = accumulated; TyObject *sys_path, *sys_meta_path, *sys_path_hooks; if (_TySys_GetOptionalAttrString("path", &sys_path) < 0) { @@ -3731,9 +3731,9 @@ import_find_and_load(TyThreadState *tstate, TyObject *abs_name) mod != NULL); if (import_time) { - PyTime_t t2; + TyTime_t t2; (void)PyTime_PerfCounterRaw(&t2); - PyTime_t cum = t2 - t1; + TyTime_t cum = t2 - t1; import_level--; fprintf(stderr, "import time: %9ld | %10ld | %*s%s\n", @@ -3759,7 +3759,7 @@ TyImport_ImportModuleLevelObject(TyObject *name, TyObject *globals, TyObject *final_mod = NULL; TyObject *mod = NULL; TyObject *package = NULL; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; int has_from; if (name == NULL) { @@ -4083,7 +4083,7 @@ _TyImport_InitCore(TyThreadState *tstate, TyObject *sysmod, int importlib) example, see issue #4236 and TyModule_Create2(). */ int -_TyImport_IsInitialized(PyInterpreterState *interp) +_TyImport_IsInitialized(TyInterpreterState *interp) { if (MODULES(interp) == NULL) return 0; @@ -4092,7 +4092,7 @@ _TyImport_IsInitialized(PyInterpreterState *interp) /* Clear the direct per-interpreter import state, if not cleared already. */ void -_TyImport_ClearCore(PyInterpreterState *interp) +_TyImport_ClearCore(TyInterpreterState *interp) { /* interp->modules should have been cleaned up and cleared already by _TyImport_FiniCore(). */ @@ -4103,7 +4103,7 @@ _TyImport_ClearCore(PyInterpreterState *interp) } void -_TyImport_FiniCore(PyInterpreterState *interp) +_TyImport_FiniCore(TyInterpreterState *interp) { int verbose = _TyInterpreterState_GetConfig(interp)->verbose; @@ -4184,7 +4184,7 @@ _TyImport_InitExternal(TyThreadState *tstate) } void -_TyImport_FiniExternal(PyInterpreterState *interp) +_TyImport_FiniExternal(TyInterpreterState *interp) { int verbose = _TyInterpreterState_GetConfig(interp)->verbose; @@ -4252,7 +4252,7 @@ static TyObject * _imp_lock_held_impl(TyObject *module) /*[clinic end generated code: output=8b89384b5e1963fc input=9b088f9b217d9bdf]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return TyBool_FromLong(PyMutex_IsLocked(&IMPORT_LOCK(interp).mutex)); } @@ -4269,7 +4269,7 @@ static TyObject * _imp_acquire_lock_impl(TyObject *module) /*[clinic end generated code: output=1aff58cb0ee1b026 input=4a2d4381866d5fdc]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyImport_AcquireLock(interp); Py_RETURN_NONE; } @@ -4286,7 +4286,7 @@ static TyObject * _imp_release_lock_impl(TyObject *module) /*[clinic end generated code: output=7faab6d0be178b0a input=934fb11516dd778b]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (!_PyRecursiveMutex_IsLockedByCurrentThread(&IMPORT_LOCK(interp))) { TyErr_SetString(TyExc_RuntimeError, "not holding the import lock"); @@ -4524,7 +4524,7 @@ _imp_get_frozen_object_impl(TyObject *module, TyObject *name, return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *codeobj = unmarshal_frozen_code(interp, &info); if (dataobj != Ty_None) { PyBuffer_Release(&buf); @@ -4620,7 +4620,7 @@ static TyObject * _imp__override_frozen_modules_for_tests_impl(TyObject *module, int override) /*[clinic end generated code: output=36d5cb1594160811 input=8f1f95a3ef21aec3]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); OVERRIDE_FROZEN_MODULES(interp) = override; Py_RETURN_NONE; } @@ -4641,7 +4641,7 @@ _imp__override_multi_interp_extensions_check_impl(TyObject *module, int override) /*[clinic end generated code: output=3ff043af52bbf280 input=e086a2ea181f92ae]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_Ty_IsMainInterpreter(interp)) { TyErr_SetString(TyExc_RuntimeError, "_imp._override_multi_interp_extensions_check() " @@ -4825,7 +4825,7 @@ _imp_source_hash_impl(TyObject *module, long key, Ty_buffer *source) } -PyDoc_STRVAR(doc_imp, +TyDoc_STRVAR(doc_imp, "(Extremely) low-level import machinery bits as used by importlib."); static TyMethodDef imp_methods[] = { diff --git a/Python/initconfig.c b/Python/initconfig.c index 778492f..17cadfa 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -3552,7 +3552,7 @@ _Ty_GetConfigsAsDict(void) Ty_CLEAR(dict); /* pre config */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); const PyPreConfig *pre_config = &interp->runtime->preconfig; dict = _TyPreConfig_AsDict(pre_config); if (dict == NULL) { @@ -4327,7 +4327,7 @@ config_get(const PyConfig *config, const PyConfigSpec *spec, } if (strcmp(spec->name, "int_max_str_digits") == 0) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return TyLong_FromLong(interp->long_state.max_str_digits); } } @@ -4508,7 +4508,7 @@ error: static int config_set_sys_flag(const PyConfigSpec *spec, int int_value) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyConfig *config = &interp->config; if (spec->type == PyConfig_MEMBER_BOOL) { @@ -4562,7 +4562,7 @@ error: static int config_set_int_attr(const PyConfigSpec *spec, int value) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); PyConfig *config = &interp->config; int *member = config_get_spec_member(config, spec); *member = value; @@ -4683,7 +4683,7 @@ PyConfig_Set(const char *name, TyObject *value) } if (spec->sys.attr != NULL) { - // Set the sys attribute, but don't set PyInterpreterState.config + // Set the sys attribute, but don't set TyInterpreterState.config // to keep the code simple. return TySys_SetObject(spec->sys.attr, value); } diff --git a/Python/instruction_sequence.c b/Python/instruction_sequence.c index 4d79872..ba6c172 100644 --- a/Python/instruction_sequence.c +++ b/Python/instruction_sequence.c @@ -442,7 +442,7 @@ inst_seq_clear(TyObject *op) } TyTypeObject _PyInstructionSequence_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "InstructionSequence", sizeof(_PyInstructionSequence), 0, diff --git a/Python/instrumentation.c b/Python/instrumentation.c index 3b46173..7cca027 100644 --- a/Python/instrumentation.c +++ b/Python/instrumentation.c @@ -327,7 +327,7 @@ _PyInstruction_GetLength(PyCodeObject *code, int offset) ASSERT_WORLD_STOPPED_OR_LOCKED(code); _Ty_CODEUNIT inst = _Ty_GetBaseCodeUnit(code, offset); - return 1 + _PyOpcode_Caches[inst.op.code]; + return 1 + _TyOpcode_Caches[inst.op.code]; } static inline uint8_t @@ -407,7 +407,7 @@ dump_instrumentation_data_lines(PyCodeObject *code, _PyCoLineInstrumentationData fprintf(out, ", lines = {original_opcode = No LINE (0), line_delta = %d)", line_delta); } else { - fprintf(out, ", lines = {original_opcode = %s, line_delta = %d)", _PyOpcode_OpName[opcode], line_delta); + fprintf(out, ", lines = {original_opcode = %s, line_delta = %d)", _TyOpcode_OpName[opcode], line_delta); } } } @@ -430,7 +430,7 @@ dump_instrumentation_data_per_instruction(PyCodeObject *code, _PyCoMonitoringDat fprintf(out, ", per-inst opcode = NULL"); } else { - fprintf(out, ", per-inst opcode = %s", _PyOpcode_OpName[data->per_instruction_opcodes[i]]); + fprintf(out, ", per-inst opcode = %s", _TyOpcode_OpName[data->per_instruction_opcodes[i]]); } if (data->per_instruction_tools == NULL) { fprintf(out, ", per-inst tools = NULL"); @@ -490,7 +490,7 @@ dump_instrumentation_data(PyCodeObject *code, int star, FILE*out) fprintf(out, "** "); starred = true; } - fprintf(out, "Offset: %d, line: %d %s: ", i, _TyCode_CheckLineNumber(i*2, &range), _PyOpcode_OpName[opcode]); + fprintf(out, "Offset: %d, line: %d %s: ", i, _TyCode_CheckLineNumber(i*2, &range), _TyOpcode_OpName[opcode]); dump_instrumentation_data_tools(code, data->tools, i, out); dump_instrumentation_data_lines(code, data->lines, i, out); dump_instrumentation_data_line_tools(code, data->line_tools, i, out); @@ -566,7 +566,7 @@ sanity_check_instrumentation(PyCodeObject *code) if (opcode == INSTRUMENTED_INSTRUCTION) { opcode = data->per_instruction_opcodes[i]; if (!is_instrumented(opcode)) { - CHECK(_PyOpcode_Deopt[opcode] == opcode); + CHECK(_TyOpcode_Deopt[opcode] == opcode); } } if (opcode == INSTRUMENTED_LINE) { @@ -578,7 +578,7 @@ sanity_check_instrumentation(PyCodeObject *code) CHECK(opcode != RESUME_CHECK); CHECK(opcode != INSTRUMENTED_RESUME); if (!is_instrumented(opcode)) { - CHECK(_PyOpcode_Deopt[opcode] == opcode); + CHECK(_TyOpcode_Deopt[opcode] == opcode); } CHECK(opcode != INSTRUMENTED_LINE); } @@ -641,13 +641,13 @@ _Ty_GetBaseCodeUnit(PyCodeObject *code, int i) .cache = FT_ATOMIC_LOAD_UINT16_RELAXED(*(uint16_t *)src_instr)}; int opcode = inst.op.code; if (opcode < MIN_INSTRUMENTED_OPCODE) { - inst.op.code = _PyOpcode_Deopt[opcode]; + inst.op.code = _TyOpcode_Deopt[opcode]; assert(inst.op.code < MIN_SPECIALIZED_OPCODE); return inst; } if (opcode == ENTER_EXECUTOR) { _PyExecutorObject *exec = code->co_executors->executors[inst.op.arg]; - opcode = _PyOpcode_Deopt[exec->vm_data.opcode]; + opcode = _TyOpcode_Deopt[exec->vm_data.opcode]; inst.op.code = opcode; inst.op.arg = exec->vm_data.oparg; assert(inst.op.code < MIN_SPECIALIZED_OPCODE); @@ -666,7 +666,7 @@ _Ty_GetBaseCodeUnit(PyCodeObject *code, int i) inst.op.code = deinstrumented; } else { - inst.op.code = _PyOpcode_Deopt[opcode]; + inst.op.code = _TyOpcode_Deopt[opcode]; } assert(inst.op.code < MIN_SPECIALIZED_OPCODE); return inst; @@ -695,9 +695,9 @@ de_instrument(PyCodeObject *code, _Ty_CODEUNIT *bytecode, _PyCoMonitoringData *m if (deinstrumented == 0) { return; } - CHECK(_PyOpcode_Deopt[deinstrumented] == deinstrumented); + CHECK(_TyOpcode_Deopt[deinstrumented] == deinstrumented); FT_ATOMIC_STORE_UINT8_RELAXED(*opcode_ptr, deinstrumented); - if (_PyOpcode_Caches[deinstrumented]) { + if (_TyOpcode_Caches[deinstrumented]) { FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.value_and_backoff, adaptive_counter_warmup().value_and_backoff); } @@ -718,9 +718,9 @@ de_instrument_line(PyCodeObject *code, _Ty_CODEUNIT *bytecode, _PyCoMonitoringDa set_original_opcode(lines, i, monitoring->per_instruction_opcodes[i]); } CHECK(original_opcode != 0); - CHECK(original_opcode == _PyOpcode_Deopt[original_opcode]); + CHECK(original_opcode == _TyOpcode_Deopt[original_opcode]); FT_ATOMIC_STORE_UINT8(instr->op.code, original_opcode); - if (_PyOpcode_Caches[original_opcode]) { + if (_TyOpcode_Caches[original_opcode]) { FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.value_and_backoff, adaptive_counter_warmup().value_and_backoff); } @@ -743,9 +743,9 @@ de_instrument_per_instruction(PyCodeObject *code, _Ty_CODEUNIT *bytecode, } int original_opcode = monitoring->per_instruction_opcodes[i]; CHECK(original_opcode != 0); - CHECK(original_opcode == _PyOpcode_Deopt[original_opcode]); + CHECK(original_opcode == _TyOpcode_Deopt[original_opcode]); FT_ATOMIC_STORE_UINT8_RELAXED(*opcode_ptr, original_opcode); - if (_PyOpcode_Caches[original_opcode]) { + if (_TyOpcode_Caches[original_opcode]) { FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.value_and_backoff, adaptive_counter_warmup().value_and_backoff); } @@ -767,15 +767,15 @@ instrument(PyCodeObject *code, _Ty_CODEUNIT *bytecode, _PyCoMonitoringData *moni opcode_ptr = &monitoring->per_instruction_opcodes[i]; opcode = *opcode_ptr; CHECK(opcode != INSTRUMENTED_INSTRUCTION && opcode != INSTRUMENTED_LINE); - CHECK(opcode == _PyOpcode_Deopt[opcode]); + CHECK(opcode == _TyOpcode_Deopt[opcode]); } CHECK(opcode != 0); if (!is_instrumented(opcode)) { - int deopt = _PyOpcode_Deopt[opcode]; + int deopt = _TyOpcode_Deopt[opcode]; int instrumented = INSTRUMENTED_OPCODES[deopt]; assert(instrumented); FT_ATOMIC_STORE_UINT8_RELAXED(*opcode_ptr, instrumented); - if (_PyOpcode_Caches[deopt]) { + if (_TyOpcode_Caches[deopt]) { FT_ATOMIC_STORE_UINT16_RELAXED(instr[1].counter.value_and_backoff, adaptive_counter_warmup().value_and_backoff); } @@ -790,7 +790,7 @@ instrument_line(PyCodeObject *code, _Ty_CODEUNIT *bytecode, _PyCoMonitoringData if (opcode == INSTRUMENTED_LINE) { return; } - set_original_opcode(monitoring->lines, i, _PyOpcode_Deopt[opcode]); + set_original_opcode(monitoring->lines, i, _TyOpcode_Deopt[opcode]); CHECK(get_line_delta(monitoring->lines, i) > NO_LINE); FT_ATOMIC_STORE_UINT8_RELAXED(*opcode_ptr, INSTRUMENTED_LINE); } @@ -816,9 +816,9 @@ instrument_per_instruction(PyCodeObject *code, _Ty_CODEUNIT *bytecode, } else { assert(opcode != 0); - assert(_PyOpcode_Deopt[opcode] != 0); - assert(_PyOpcode_Deopt[opcode] != RESUME); - monitoring->per_instruction_opcodes[i] = _PyOpcode_Deopt[opcode]; + assert(_TyOpcode_Deopt[opcode] != 0); + assert(_TyOpcode_Deopt[opcode] != RESUME); + monitoring->per_instruction_opcodes[i] = _TyOpcode_Deopt[opcode]; } assert(monitoring->per_instruction_opcodes[i] > 0); FT_ATOMIC_STORE_UINT8_RELAXED(*opcode_ptr, INSTRUMENTED_INSTRUCTION); @@ -970,7 +970,7 @@ remove_per_instruction_tools(PyCodeObject * code, int offset, int tools) /* Return 1 if DISABLE returned, -1 if error, 0 otherwise */ static int call_one_instrument( - PyInterpreterState *interp, TyThreadState *tstate, TyObject **args, + TyInterpreterState *interp, TyThreadState *tstate, TyObject **args, size_t nargsf, int8_t tool, int event) { assert(0 <= tool && tool < 8); @@ -1011,7 +1011,7 @@ static inline int most_significant_bit(uint8_t bits) { } static uint32_t -global_version(PyInterpreterState *interp) +global_version(TyInterpreterState *interp) { uint32_t version = (uint32_t)_Ty_atomic_load_uintptr_relaxed( &interp->ceval.instrumentation_version); @@ -1041,7 +1041,7 @@ static void set_global_version(TyThreadState *tstate, uint32_t version) { assert((version & _PY_EVAL_EVENTS_MASK) == 0); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; set_version_raw(&interp->ceval.instrumentation_version, version); #ifdef Ty_GIL_DISABLED @@ -1058,7 +1058,7 @@ set_global_version(TyThreadState *tstate, uint32_t version) } static bool -is_version_up_to_date(PyCodeObject *code, PyInterpreterState *interp) +is_version_up_to_date(PyCodeObject *code, TyInterpreterState *interp) { ASSERT_WORLD_STOPPED_OR_LOCKED(code); return global_version(interp) == code->_co_instrumentation_version; @@ -1066,7 +1066,7 @@ is_version_up_to_date(PyCodeObject *code, PyInterpreterState *interp) #ifndef NDEBUG static bool -instrumentation_cross_checks(PyInterpreterState *interp, PyCodeObject *code) +instrumentation_cross_checks(TyInterpreterState *interp, PyCodeObject *code) { ASSERT_WORLD_STOPPED_OR_LOCKED(code); _Ty_LocalMonitors expected = local_union( @@ -1076,7 +1076,7 @@ instrumentation_cross_checks(PyInterpreterState *interp, PyCodeObject *code) } static int -debug_check_sanity(PyInterpreterState *interp, PyCodeObject *code) +debug_check_sanity(TyInterpreterState *interp, PyCodeObject *code) { int res; LOCK_CODE(code); @@ -1089,7 +1089,7 @@ debug_check_sanity(PyInterpreterState *interp, PyCodeObject *code) #endif static inline uint8_t -get_tools_for_instruction(PyCodeObject *code, PyInterpreterState *interp, int i, int event) +get_tools_for_instruction(PyCodeObject *code, TyInterpreterState *interp, int i, int event) { uint8_t tools; assert(event != PY_MONITORING_EVENT_LINE); @@ -1159,7 +1159,7 @@ call_instrumentation_vector( } assert(args[2] == NULL); args[2] = arg2_obj; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; uint8_t tools = get_tools_for_instruction(code, interp, offset, event); size_t nargsf = (size_t) nargs | PY_VECTORCALL_ARGUMENTS_OFFSET; TyObject **callargs = &args[1]; @@ -1305,7 +1305,7 @@ _Ty_call_instrumentation_line(TyThreadState *tstate, _PyInterpreterFrame* frame, _PyCoMonitoringData *monitoring = code->_co_monitoring; _PyCoLineInstrumentationData *line_data = monitoring->lines; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; int line = _Ty_Instrumentation_GetLine(code, i); assert(line >= 0); assert(prev != NULL); @@ -1392,7 +1392,7 @@ done: original_opcode = get_original_opcode(line_data, i); assert(original_opcode != 0); assert(original_opcode != INSTRUMENTED_LINE); - assert(_PyOpcode_Deopt[original_opcode] == original_opcode); + assert(_TyOpcode_Deopt[original_opcode] == original_opcode); return original_opcode; } @@ -1408,7 +1408,7 @@ _Ty_call_instrumentation_instruction(TyThreadState *tstate, _PyInterpreterFrame* return next_opcode; } assert(debug_check_sanity(tstate->interp, code)); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; uint8_t tools = instrumentation_data->per_instruction_tools != NULL ? instrumentation_data->per_instruction_tools[offset] : (interp->monitors.tools[PY_MONITORING_EVENT_INSTRUCTION] | @@ -1471,7 +1471,7 @@ initialize_tools(PyCodeObject *code) opcode = DE_INSTRUMENT[opcode]; assert(opcode != 0); } - opcode = _PyOpcode_Deopt[opcode]; + opcode = _TyOpcode_Deopt[opcode]; if (opcode_has_event(opcode)) { if (instrumented) { int8_t event; @@ -1496,11 +1496,11 @@ initialize_tools(PyCodeObject *code) else { tools[i] = 0xff; } - for (int j = 1; j <= _PyOpcode_Caches[opcode]; j++) { + for (int j = 1; j <= _TyOpcode_Caches[opcode]; j++) { tools[i+j] = 0xff; } #endif - i += _PyOpcode_Caches[opcode]; + i += _TyOpcode_Caches[opcode]; } } @@ -1667,7 +1667,7 @@ allocate_instrumentation_data(PyCodeObject *code) } static int -update_instrumentation_data(PyCodeObject *code, PyInterpreterState *interp) +update_instrumentation_data(PyCodeObject *code, TyInterpreterState *interp) { ASSERT_WORLD_STOPPED_OR_LOCKED(code); @@ -1753,7 +1753,7 @@ update_instrumentation_data(PyCodeObject *code, PyInterpreterState *interp) // we know what the original opcode was. for (int i = 0; i < code_len; i++) { int opcode = _TyCode_CODE(code)[i].op.code; - code->_co_monitoring->per_instruction_opcodes[i] = _PyOpcode_Deopt[opcode]; + code->_co_monitoring->per_instruction_opcodes[i] = _TyOpcode_Deopt[opcode]; } } if (multitools && code->_co_monitoring->per_instruction_tools == NULL) { @@ -1771,7 +1771,7 @@ update_instrumentation_data(PyCodeObject *code, PyInterpreterState *interp) } static int -force_instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp) +force_instrument_lock_held(PyCodeObject *code, TyInterpreterState *interp) { ASSERT_WORLD_STOPPED_OR_LOCKED(code); @@ -1902,7 +1902,7 @@ done: } static int -instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp) +instrument_lock_held(PyCodeObject *code, TyInterpreterState *interp) { ASSERT_WORLD_STOPPED_OR_LOCKED(code); @@ -1918,7 +1918,7 @@ instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp) } int -_Ty_Instrument(PyCodeObject *code, PyInterpreterState *interp) +_Ty_Instrument(PyCodeObject *code, TyInterpreterState *interp) { int res; LOCK_CODE(code); @@ -1936,7 +1936,7 @@ _Ty_Instrument(PyCodeObject *code, PyInterpreterState *interp) static int -instrument_all_executing_code_objects(PyInterpreterState *interp) { +instrument_all_executing_code_objects(TyInterpreterState *interp) { ASSERT_WORLD_STOPPED(); _PyRuntimeState *runtime = &_PyRuntime; @@ -1985,7 +1985,7 @@ set_local_events(_Ty_LocalMonitors *m, int tool_id, _PyMonitoringEventSet events } static int -check_tool(PyInterpreterState *interp, int tool_id) +check_tool(TyInterpreterState *interp, int tool_id) { if (tool_id < PY_MONITORING_SYS_PROFILE_ID && interp->monitoring_tool_names[tool_id] == NULL) @@ -2005,7 +2005,7 @@ _PyMonitoring_SetEvents(int tool_id, _PyMonitoringEventSet events) { assert(0 <= tool_id && tool_id < PY_MONITORING_TOOL_IDS); TyThreadState *tstate = _TyThreadState_GET(); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; assert(events < (1 << _PY_MONITORING_UNGROUPED_EVENTS)); if (check_tool(interp, tool_id)) { return -1; @@ -2039,7 +2039,7 @@ int _PyMonitoring_SetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEventSet events) { assert(0 <= tool_id && tool_id < PY_MONITORING_TOOL_IDS); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); assert(events < (1 << _PY_MONITORING_LOCAL_EVENTS)); if (code->_co_firsttraceable >= Ty_SIZE(code)) { TyErr_Format(TyExc_SystemError, "cannot instrument shim code object '%U'", code->co_name); @@ -2077,7 +2077,7 @@ int _PyMonitoring_GetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEventSet *events) { assert(0 <= tool_id && tool_id < PY_MONITORING_TOOL_IDS); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (check_tool(interp, tool_id)) { return -1; } @@ -2093,7 +2093,7 @@ _PyMonitoring_GetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEvent int _PyMonitoring_ClearToolId(int tool_id) { assert(0 <= tool_id && tool_id < PY_MONITORING_TOOL_IDS); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); for (int i = 0; i < _PY_MONITORING_EVENTS; i++) { TyObject *func = _PyMonitoring_RegisterCallback(tool_id, i, NULL); @@ -2165,7 +2165,7 @@ monitoring_use_tool_id_impl(TyObject *module, int tool_id, TyObject *name) TyErr_SetString(TyExc_ValueError, "tool name must be a str"); return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (interp->monitoring_tool_names[tool_id] != NULL) { TyErr_Format(TyExc_ValueError, "tool %d is already in use", tool_id); return NULL; @@ -2190,7 +2190,7 @@ monitoring_clear_tool_id_impl(TyObject *module, int tool_id) return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (interp->monitoring_tool_names[tool_id] != NULL) { if (_PyMonitoring_ClearToolId(tool_id) < 0) { @@ -2216,7 +2216,7 @@ monitoring_free_tool_id_impl(TyObject *module, int tool_id) if (check_valid_tool(tool_id)) { return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (interp->monitoring_tool_names[tool_id] != NULL) { if (_PyMonitoring_ClearToolId(tool_id) < 0) { @@ -2245,7 +2245,7 @@ monitoring_get_tool_impl(TyObject *module, int tool_id) if (check_valid_tool(tool_id)) { return NULL; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *name = interp->monitoring_tool_names[tool_id]; if (name == NULL) { Py_RETURN_NONE; @@ -2444,7 +2444,7 @@ monitoring_restart_events_impl(TyObject *module) * last restart version < current version */ TyThreadState *tstate = _TyThreadState_GET(); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; _TyEval_StopTheWorld(interp); uint32_t restart_version = global_version(interp) + MONITORING_VERSION_INCREMENT; @@ -2485,7 +2485,7 @@ static TyObject * monitoring__all_events_impl(TyObject *module) /*[clinic end generated code: output=6b7581e2dbb690f6 input=62ee9672c17b7f0e]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *res = TyDict_New(); if (res == NULL) { return NULL; @@ -2589,7 +2589,7 @@ capi_call_instrumentation(PyMonitoringState *state, TyObject *codelike, int32_t TyObject **args, Ty_ssize_t nargs, int event) { TyThreadState *tstate = _TyThreadState_GET(); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; uint8_t tools = state->active; assert(args[1] == NULL); @@ -2647,7 +2647,7 @@ int PyMonitoring_EnterScope(PyMonitoringState *state_array, uint64_t *version, const uint8_t *event_types, Ty_ssize_t length) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (global_version(interp) == *version) { return 0; } @@ -2932,7 +2932,7 @@ dealloc_branch_handler(TyObject *op) } static TyTypeObject _PyLegacyBranchEventHandler_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "sys.monitoring.branch_event_handler", sizeof(_PyLegacyBranchEventHandler), .tp_dealloc = dealloc_branch_handler, @@ -3039,7 +3039,7 @@ _PyMonitoring_RegisterCallback(int tool_id, int event_id, TyObject *obj) return NULL; } } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyEval_StopTheWorld(interp); TyObject *old_right = interp->monitoring_callables[tool_id][PY_MONITORING_EVENT_BRANCH_RIGHT]; interp->monitoring_callables[tool_id][PY_MONITORING_EVENT_BRANCH_RIGHT] = right; @@ -3049,7 +3049,7 @@ _PyMonitoring_RegisterCallback(int tool_id, int event_id, TyObject *obj) Ty_XDECREF(old_right); } else { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyEval_StopTheWorld(interp); res = interp->monitoring_callables[tool_id][event_id]; interp->monitoring_callables[tool_id][event_id] = Ty_XNewRef(obj); @@ -3106,7 +3106,7 @@ branchesiter_next(TyObject *op) int oparg = 0; while (offset < Ty_SIZE(bi->bi_code)) { _Ty_CODEUNIT inst = _Ty_GetBaseCodeUnit(bi->bi_code, offset); - int next_offset = offset + 1 + _PyOpcode_Caches[inst.op.code]; + int next_offset = offset + 1 + _TyOpcode_Caches[inst.op.code]; switch(inst.op.code) { case EXTENDED_ARG: oparg = (oparg << 8) | inst.op.arg; @@ -3150,7 +3150,7 @@ branchesiter_dealloc(TyObject *op) } static TyTypeObject _PyBranchesIterator = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "line_iterator", /* tp_name */ sizeof(branchesiterator), /* tp_basicsize */ 0, /* tp_itemsize */ diff --git a/Python/interpconfig.c b/Python/interpconfig.c index b2fc30d..afa2889 100644 --- a/Python/interpconfig.c +++ b/Python/interpconfig.c @@ -248,7 +248,7 @@ _PyInterpreterConfig_UpdateFromDict(PyInterpreterConfig *config, TyObject *dict) int _PyInterpreterConfig_InitFromState(PyInterpreterConfig *config, - PyInterpreterState *interp) + TyInterpreterState *interp) { // Populate the config by re-constructing the values from the interpreter. *config = (PyInterpreterConfig){ diff --git a/Python/legacy_tracing.c b/Python/legacy_tracing.c index 413aac1..bd64f58 100644 --- a/Python/legacy_tracing.c +++ b/Python/legacy_tracing.c @@ -397,7 +397,7 @@ sys_trace_jump_func( } TyTypeObject _PyLegacyEventHandler_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "sys.legacy_event_handler", sizeof(_PyLegacyEventHandler), .tp_vectorcall_offset = offsetof(_PyLegacyEventHandler, vectorcall), diff --git a/Python/lock.c b/Python/lock.c index 31199f4..7e5ab5d 100644 --- a/Python/lock.c +++ b/Python/lock.c @@ -19,7 +19,7 @@ // If a thread waits on a lock for longer than TIME_TO_BE_FAIR_NS (1 ms), then // the unlocking thread directly hands off ownership of the lock. This avoids // starvation. -static const PyTime_t TIME_TO_BE_FAIR_NS = 1000*1000; +static const TyTime_t TIME_TO_BE_FAIR_NS = 1000*1000; // Spin for a bit before parking the thread. This is only enabled for // `--disable-gil` builds because it is unlikely to be helpful if the GIL is @@ -33,7 +33,7 @@ static const int MAX_SPIN_COUNT = 0; struct mutex_entry { // The time after which the unlocking thread should hand off lock ownership // directly to the waiting thread. Written by the waiting thread. - PyTime_t time_to_be_fair; + TyTime_t time_to_be_fair; // Set to 1 if the lock was handed off. Written by the unlocking thread. int handed_off; @@ -49,8 +49,8 @@ _Ty_yield(void) #endif } -PyLockStatus -_PyMutex_LockTimed(PyMutex *m, PyTime_t timeout, _PyLockFlags flags) +TyLockStatus +_PyMutex_LockTimed(PyMutex *m, TyTime_t timeout, _PyLockFlags flags) { uint8_t v = _Ty_atomic_load_uint8_relaxed(&m->_bits); if ((v & _Ty_LOCKED) == 0) { @@ -62,10 +62,10 @@ _PyMutex_LockTimed(PyMutex *m, PyTime_t timeout, _PyLockFlags flags) return PY_LOCK_FAILURE; } - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_MonotonicRaw(&now); - PyTime_t endtime = 0; + TyTime_t endtime = 0; if (timeout > 0) { endtime = _TyTime_Add(now, timeout); } @@ -143,7 +143,7 @@ mutex_unpark(void *arg, void *park_arg, int has_more_waiters) struct mutex_entry *entry = (struct mutex_entry*)park_arg; uint8_t v = 0; if (entry) { - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_MonotonicRaw(&now); int should_be_fair = now > entry->time_to_be_fair; @@ -276,7 +276,7 @@ PyEvent_Wait(PyEvent *evt) } int -PyEvent_WaitTimed(PyEvent *evt, PyTime_t timeout_ns, int detach) +PyEvent_WaitTimed(PyEvent *evt, TyTime_t timeout_ns, int detach) { for (;;) { uint8_t v = _Ty_atomic_load_uint8(&evt->v); @@ -357,7 +357,7 @@ _PyOnceFlag_CallOnceSlow(_PyOnceFlag *flag, _Ty_once_fn_t *fn, void *arg) } static int -recursive_mutex_is_owned_by(_PyRecursiveMutex *m, PyThread_ident_t tid) +recursive_mutex_is_owned_by(_PyRecursiveMutex *m, TyThread_ident_t tid) { return _Ty_atomic_load_ullong_relaxed(&m->thread) == tid; } @@ -365,13 +365,13 @@ recursive_mutex_is_owned_by(_PyRecursiveMutex *m, PyThread_ident_t tid) int _PyRecursiveMutex_IsLockedByCurrentThread(_PyRecursiveMutex *m) { - return recursive_mutex_is_owned_by(m, PyThread_get_thread_ident_ex()); + return recursive_mutex_is_owned_by(m, TyThread_get_thread_ident_ex()); } void _PyRecursiveMutex_Lock(_PyRecursiveMutex *m) { - PyThread_ident_t thread = PyThread_get_thread_ident_ex(); + TyThread_ident_t thread = TyThread_get_thread_ident_ex(); if (recursive_mutex_is_owned_by(m, thread)) { m->level++; return; @@ -381,15 +381,15 @@ _PyRecursiveMutex_Lock(_PyRecursiveMutex *m) assert(m->level == 0); } -PyLockStatus -_PyRecursiveMutex_LockTimed(_PyRecursiveMutex *m, PyTime_t timeout, _PyLockFlags flags) +TyLockStatus +_PyRecursiveMutex_LockTimed(_PyRecursiveMutex *m, TyTime_t timeout, _PyLockFlags flags) { - PyThread_ident_t thread = PyThread_get_thread_ident_ex(); + TyThread_ident_t thread = TyThread_get_thread_ident_ex(); if (recursive_mutex_is_owned_by(m, thread)) { m->level++; return PY_LOCK_ACQUIRED; } - PyLockStatus s = _PyMutex_LockTimed(&m->mutex, timeout, flags); + TyLockStatus s = _PyMutex_LockTimed(&m->mutex, timeout, flags); if (s == PY_LOCK_ACQUIRED) { _Ty_atomic_store_ullong_relaxed(&m->thread, thread); assert(m->level == 0); @@ -409,7 +409,7 @@ _PyRecursiveMutex_Unlock(_PyRecursiveMutex *m) int _PyRecursiveMutex_TryUnlock(_PyRecursiveMutex *m) { - PyThread_ident_t thread = PyThread_get_thread_ident_ex(); + TyThread_ident_t thread = TyThread_get_thread_ident_ex(); if (!recursive_mutex_is_owned_by(m, thread)) { return -1; } diff --git a/Python/marshal.c b/Python/marshal.c index b88f7f8..63d6467 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -1307,7 +1307,7 @@ r_object(RFILE *p) if (is_interned) { // marshal is meant to serialize .pyc files with code // objects, and code-related strings are currently immortal. - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, &v); } retval = v; @@ -1344,7 +1344,7 @@ r_object(RFILE *p) if (is_interned) { // marshal is meant to serialize .pyc files with code // objects, and code-related strings are currently immortal. - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyUnicode_InternImmortal(interp, &v); } retval = v; @@ -2067,7 +2067,7 @@ static TyMethodDef marshal_methods[] = { }; -PyDoc_STRVAR(module_doc, +TyDoc_STRVAR(module_doc, "This module contains functions that can read and write Python values in\n\ a binary format. The format is specific to Python, but independent of\n\ machine architecture issues.\n\ diff --git a/Python/optimizer.c b/Python/optimizer.c index c53c0c3..4ff7537 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -7,10 +7,10 @@ #include "pycore_backoff.h" #include "pycore_bitutils.h" // _Ty_popcount32() #include "pycore_code.h" // _Ty_GetBaseCodeUnit -#include "pycore_function.h" // _PyFunction_LookupByVersion() +#include "pycore_function.h" // _TyFunction_LookupByVersion() #include "pycore_interpframe.h" #include "pycore_object.h" // _TyObject_GC_UNTRACK() -#include "pycore_opcode_metadata.h" // _PyOpcode_OpName[] +#include "pycore_opcode_metadata.h" // _TyOpcode_OpName[] #include "pycore_opcode_utils.h" // MAX_REAL_OPCODE #include "pycore_optimizer.h" // _Ty_uop_analyze_and_optimize() #include "pycore_pystate.h" // _TyInterpreterState_GET() @@ -215,7 +215,7 @@ free_executor(_PyExecutorObject *self) } void -_Ty_ClearExecutorDeletionList(PyInterpreterState *interp) +_Ty_ClearExecutorDeletionList(TyInterpreterState *interp) { _PyRuntimeState *runtime = &_PyRuntime; HEAD_LOCK(runtime); @@ -252,7 +252,7 @@ _Ty_ClearExecutorDeletionList(PyInterpreterState *interp) static void add_to_pending_deletion_list(_PyExecutorObject *self) { - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); self->vm_data.links.next = interp->executor_deletion_list_head; interp->executor_deletion_list_head = self; if (interp->executor_deletion_list_remaining_capacity > 0) { @@ -275,19 +275,19 @@ uop_dealloc(TyObject *op) { } const char * -_PyUOpName(int index) +_TyUOpName(int index) { if (index < 0 || index > MAX_UOP_ID) { return NULL; } - return _PyOpcode_uop_name[index]; + return _TyOpcode_uop_name[index]; } #ifdef Ty_DEBUG void _PyUOpPrint(const _PyUOpInstruction *uop) { - const char *name = _PyUOpName(uop->opcode); + const char *name = _TyUOpName(uop->opcode); if (name == NULL) { printf("", uop->opcode); } @@ -336,7 +336,7 @@ uop_item(TyObject *op, Ty_ssize_t index) TyErr_SetNone(TyExc_IndexError); return NULL; } - const char *name = _PyUOpName(self->trace[index].opcode); + const char *name = _TyUOpName(self->trace[index].opcode); if (name == NULL) { name = ""; } @@ -411,7 +411,7 @@ executor_is_gc(TyObject *o) } TyTypeObject _PyUOpExecutor_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) .tp_name = "uop_executor", .tp_basicsize = offsetof(_PyExecutorObject, exits), .tp_itemsize = 1, @@ -514,7 +514,7 @@ add_to_trace( } // Reserve space for N uops, plus 3 for _SET_IP, _CHECK_VALIDITY and _EXIT_TRACE -#define RESERVE(needed) RESERVE_RAW((needed) + 3, _PyUOpName(opcode)) +#define RESERVE(needed) RESERVE_RAW((needed) + 3, _TyUOpName(opcode)) // Trace stack operations (used by _PUSH_FRAME, _RETURN_VALUE) #define TRACE_STACK_PUSH() \ @@ -602,7 +602,7 @@ translate_bytecode_to_trace( goto done; } - DPRINTF(2, "%d: %s(%d)\n", target, _PyOpcode_OpName[opcode], oparg); + DPRINTF(2, "%d: %s(%d)\n", target, _TyOpcode_OpName[opcode], oparg); if (opcode == EXTENDED_ARG) { instr++; @@ -639,7 +639,7 @@ translate_bytecode_to_trace( if (first && progress_needed) { assert(first); if (OPCODE_HAS_EXIT(opcode) || OPCODE_HAS_DEOPT(opcode)) { - opcode = _PyOpcode_Deopt[opcode]; + opcode = _TyOpcode_Deopt[opcode]; } assert(!OPCODE_HAS_EXIT(opcode)); assert(!OPCODE_HAS_DEOPT(opcode)); @@ -675,14 +675,14 @@ translate_bytecode_to_trace( } uint32_t uopcode = BRANCH_TO_GUARD[opcode - POP_JUMP_IF_FALSE][jump_likely]; DPRINTF(2, "%d: %s(%d): counter=%04x, bitcount=%d, likely=%d, confidence=%d, uopcode=%s\n", - target, _PyOpcode_OpName[opcode], oparg, - counter, bitcount, jump_likely, confidence, _PyUOpName(uopcode)); + target, _TyOpcode_OpName[opcode], oparg, + counter, bitcount, jump_likely, confidence, _TyUOpName(uopcode)); if (confidence < CONFIDENCE_CUTOFF) { DPRINTF(2, "Confidence too low (%d < %d)\n", confidence, CONFIDENCE_CUTOFF); OPT_STAT_INC(low_confidence); goto done; } - _Ty_CODEUNIT *next_instr = instr + 1 + _PyOpcode_Caches[_PyOpcode_Deopt[opcode]]; + _Ty_CODEUNIT *next_instr = instr + 1 + _TyOpcode_Caches[_TyOpcode_Deopt[opcode]]; _Ty_CODEUNIT *target_instr = next_instr + oparg; if (jump_likely) { DPRINTF(2, "Jump likely (%04x = %d bits), continue at byte offset %d\n", @@ -701,7 +701,7 @@ translate_bytecode_to_trace( _Ty_FALLTHROUGH; case JUMP_BACKWARD_NO_INTERRUPT: { - instr += 1 + _PyOpcode_Caches[_PyOpcode_Deopt[opcode]] - (int)oparg; + instr += 1 + _TyOpcode_Caches[_TyOpcode_Deopt[opcode]] - (int)oparg; if (jump_seen) { OPT_STAT_INC(inner_loop); DPRINTF(2, "JUMP_BACKWARD not to top ends trace\n"); @@ -727,7 +727,7 @@ translate_bytecode_to_trace( default: { - const struct opcode_macro_expansion *expansion = &_PyOpcode_macro_expansion[opcode]; + const struct opcode_macro_expansion *expansion = &_TyOpcode_macro_expansion[opcode]; if (expansion->nuops > 0) { // Reserve space for nuops (+ _SET_IP + _EXIT_TRACE) int nuops = expansion->nuops; @@ -844,7 +844,7 @@ translate_bytecode_to_trace( OPT_STAT_INC(unknown_callee); return 0; } - assert(_PyOpcode_Deopt[opcode] == CALL || _PyOpcode_Deopt[opcode] == CALL_KW); + assert(_TyOpcode_Deopt[opcode] == CALL || _TyOpcode_Deopt[opcode] == CALL_KW); int func_version_offset = offsetof(_PyCallCache, func_version)/sizeof(_Ty_CODEUNIT) // Add one to account for the actual opcode/oparg pair: @@ -852,7 +852,7 @@ translate_bytecode_to_trace( uint32_t func_version = read_u32(&instr[func_version_offset].cache); PyCodeObject *new_code = NULL; PyFunctionObject *new_func = - _PyFunction_LookupByVersion(func_version, (TyObject **) &new_code); + _TyFunction_LookupByVersion(func_version, (TyObject **) &new_code); DPRINTF(2, "Function: version=%#x; new_func=%p, new_code=%p\n", (int)func_version, new_func, new_code); if (new_code != NULL) { @@ -877,7 +877,7 @@ translate_bytecode_to_trace( goto done; } // Increment IP to the return address - instr += _PyOpcode_Caches[_PyOpcode_Deopt[opcode]] + 1; + instr += _TyOpcode_Caches[_TyOpcode_Deopt[opcode]] + 1; TRACE_STACK_PUSH(); _Ty_BloomFilter_Add(dependencies, new_code); /* Set the operand to the callee's function or code object, @@ -914,7 +914,7 @@ translate_bytecode_to_trace( if (uop == _BINARY_OP_INPLACE_ADD_UNICODE) { assert(i + 1 == nuops); - _Ty_CODEUNIT *next_instr = instr + 1 + _PyOpcode_Caches[_PyOpcode_Deopt[opcode]]; + _Ty_CODEUNIT *next_instr = instr + 1 + _TyOpcode_Caches[_TyOpcode_Deopt[opcode]]; assert(next_instr->op.code == STORE_FAST); operand = next_instr->op.arg; // Skip the STORE_FAST: @@ -926,7 +926,7 @@ translate_bytecode_to_trace( } break; } - DPRINTF(2, "Unsupported opcode %s\n", _PyOpcode_OpName[opcode]); + DPRINTF(2, "Unsupported opcode %s\n", _TyOpcode_OpName[opcode]); OPT_UNSUPPORTED_OPCODE(opcode); goto done; // Break out of loop } // End default @@ -935,7 +935,7 @@ translate_bytecode_to_trace( instr++; // Add cache size for opcode - instr += _PyOpcode_Caches[_PyOpcode_Deopt[opcode]]; + instr += _TyOpcode_Caches[_TyOpcode_Deopt[opcode]]; if (opcode == CALL_LIST_APPEND) { assert(instr->op.code == POP_TOP); @@ -1134,7 +1134,7 @@ sanity_check(_PyExecutorObject *executor) const _PyUOpInstruction *inst = &executor->trace[i]; uint16_t opcode = inst->opcode; CHECK(opcode <= MAX_UOP_ID); - CHECK(_PyOpcode_uop_name[opcode] != NULL); + CHECK(_TyOpcode_uop_name[opcode] != NULL); switch(inst->format) { case UOP_FORMAT_TARGET: CHECK(target_unused(opcode)); @@ -1294,12 +1294,12 @@ uop_optimize( int oparg = buffer[pc].oparg; if (oparg < _PyUop_Replication[opcode]) { buffer[pc].opcode = opcode + oparg + 1; - assert(strncmp(_PyOpcode_uop_name[buffer[pc].opcode], _PyOpcode_uop_name[opcode], strlen(_PyOpcode_uop_name[opcode])) == 0); + assert(strncmp(_TyOpcode_uop_name[buffer[pc].opcode], _TyOpcode_uop_name[opcode], strlen(_TyOpcode_uop_name[opcode])) == 0); } else if (is_terminator(&buffer[pc])) { break; } - assert(_PyOpcode_uop_name[buffer[pc].opcode]); + assert(_TyOpcode_uop_name[buffer[pc].opcode]); } OPT_HIST(effective_trace_length(buffer, length), optimized_trace_length_hist); length = prepare_for_execution(buffer, length); @@ -1406,7 +1406,7 @@ bloom_filter_may_contain(_PyBloomFilter *bloom, _PyBloomFilter *hashes) static void link_executor(_PyExecutorObject *executor) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _PyExecutorLinkListNode *links = &executor->vm_data.links; _PyExecutorObject *head = interp->executor_list_head; if (head == NULL) { @@ -1444,7 +1444,7 @@ unlink_executor(_PyExecutorObject *executor) } else { // prev == NULL implies that executor is the list head - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); assert(interp->executor_list_head == executor); interp->executor_list_head = next; } @@ -1517,7 +1517,7 @@ _Ty_Executor_DependsOn(_PyExecutorObject *executor, void *obj) * May cause other executors to be invalidated as well */ void -_Ty_Executors_InvalidateDependency(PyInterpreterState *interp, void *obj, int is_invalidation) +_Ty_Executors_InvalidateDependency(TyInterpreterState *interp, void *obj, int is_invalidation) { _PyBloomFilter obj_filter; _Ty_BloomFilter_Init(&obj_filter); @@ -1558,7 +1558,7 @@ error: /* Invalidate all executors */ void -_Ty_Executors_InvalidateAll(PyInterpreterState *interp, int is_invalidation) +_Ty_Executors_InvalidateAll(TyInterpreterState *interp, int is_invalidation) { while (interp->executor_list_head) { _PyExecutorObject *executor = interp->executor_list_head; @@ -1577,7 +1577,7 @@ _Ty_Executors_InvalidateAll(PyInterpreterState *interp, int is_invalidation) } void -_Ty_Executors_InvalidateCold(PyInterpreterState *interp) +_Ty_Executors_InvalidateCold(TyInterpreterState *interp) { /* Walk the list of executors */ /* TO DO -- Use a tree to avoid traversing as many objects */ @@ -1642,7 +1642,7 @@ find_line_number(PyCodeObject *code, _PyExecutorObject *executor) return TyCode_Addr2Line(code, i*2); } } - i += _PyOpcode_Caches[_Ty_GetBaseCodeUnit(code, i).op.code]; + i += _TyOpcode_Caches[_Ty_GetBaseCodeUnit(code, i).op.code]; } return -1; } @@ -1681,7 +1681,7 @@ executor_to_gv(_PyExecutorObject *executor, FILE *out) * https://graphviz.readthedocs.io/en/stable/manual.html#node-ports-compass */ _PyUOpInstruction const *inst = &executor->trace[i]; - const char *opname = _PyOpcode_uop_name[inst->opcode]; + const char *opname = _TyOpcode_uop_name[inst->opcode]; #ifdef Ty_STATS fprintf(out, " %s -- %" PRIu64 "\n", i, opname, inst->execution_count); #else @@ -1723,7 +1723,7 @@ _PyDumpExecutors(FILE *out) { fprintf(out, "digraph ideal {\n\n"); fprintf(out, " rankdir = \"LR\"\n\n"); - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); for (_PyExecutorObject *exec = interp->executor_list_head; exec != NULL;) { executor_to_gv(exec, out); exec = exec->vm_data.links.next; diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c index dcb4768..c96389a 100644 --- a/Python/optimizer_analysis.c +++ b/Python/optimizer_analysis.c @@ -33,7 +33,7 @@ #include #ifdef Ty_DEBUG - extern const char *_PyUOpName(int index); + extern const char *_TyUOpName(int index); extern void _PyUOpPrint(const _PyUOpInstruction *uop); static const char *const DEBUG_ENV = "PYTHON_OPT_DEBUG"; static inline int get_lltrace(void) { @@ -145,7 +145,7 @@ static int remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer, int buffer_size, _PyBloomFilter *dependencies) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *builtins = frame->f_builtins; if (builtins != interp->builtins) { OPT_STAT_INC(remove_globals_builtins_changed); @@ -156,7 +156,7 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer, assert(TyFunction_Check(function)); assert(function->func_builtins == builtins); assert(function->func_globals == globals); - uint32_t function_version = _PyFunction_GetVersionForCurrentState(function); + uint32_t function_version = _TyFunction_GetVersionForCurrentState(function); /* In order to treat globals as constants, we need to * know that the globals dict is the one we expected, and * that it hasn't changed diff --git a/Python/parking_lot.c b/Python/parking_lot.c index 951ebd0..38150ba 100644 --- a/Python/parking_lot.c +++ b/Python/parking_lot.c @@ -92,7 +92,7 @@ _PySemaphore_Destroy(_PySemaphore *sema) } static int -_PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout) +_PySemaphore_PlatformWait(_PySemaphore *sema, TyTime_t timeout) { int res; #if defined(MS_WINDOWS) @@ -102,9 +102,9 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout) millis = INFINITE; } else { - PyTime_t div = _TyTime_AsMilliseconds(timeout, _TyTime_ROUND_TIMEOUT); + TyTime_t div = _TyTime_AsMilliseconds(timeout, _TyTime_ROUND_TIMEOUT); // Prevent overflow with clamping the result - if ((PyTime_t)PY_DWORD_MAX < div) { + if ((TyTime_t)PY_DWORD_MAX < div) { millis = PY_DWORD_MAX; } else { @@ -150,18 +150,18 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout) struct timespec ts; #if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT) && !defined(_Ty_THREAD_SANITIZER) - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_MonotonicRaw(&now); - PyTime_t deadline = _TyTime_Add(now, timeout); + TyTime_t deadline = _TyTime_Add(now, timeout); _TyTime_AsTimespec_clamp(deadline, &ts); err = sem_clockwait(&sema->platform_sem, CLOCK_MONOTONIC, &ts); #else - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_TimeRaw(&now); - PyTime_t deadline = _TyTime_Add(now, timeout); + TyTime_t deadline = _TyTime_Add(now, timeout); _TyTime_AsTimespec_clamp(deadline, &ts); @@ -198,9 +198,9 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout) _TyTime_AsTimespec_clamp(timeout, &ts); err = pthread_cond_timedwait_relative_np(&sema->cond, &sema->mutex, &ts); #else - PyTime_t now; + TyTime_t now; (void)PyTime_TimeRaw(&now); - PyTime_t deadline = _TyTime_Add(now, timeout); + TyTime_t deadline = _TyTime_Add(now, timeout); _TyTime_AsTimespec_clamp(deadline, &ts); err = pthread_cond_timedwait(&sema->cond, &sema->mutex, &ts); @@ -226,7 +226,7 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout) } int -_PySemaphore_Wait(_PySemaphore *sema, PyTime_t timeout, int detach) +_PySemaphore_Wait(_PySemaphore *sema, TyTime_t timeout, int detach) { TyThreadState *tstate = NULL; if (detach) { @@ -323,7 +323,7 @@ atomic_memcmp(const void *addr, const void *expected, size_t addr_size) int _PyParkingLot_Park(const void *addr, const void *expected, size_t size, - PyTime_t timeout_ns, void *park_arg, int detach) + TyTime_t timeout_ns, void *park_arg, int detach) { struct wait_entry wait = { .park_arg = park_arg, diff --git a/Python/perf_jit_trampoline.c b/Python/perf_jit_trampoline.c index 51ce89d..4e6ea92 100644 --- a/Python/perf_jit_trampoline.c +++ b/Python/perf_jit_trampoline.c @@ -234,7 +234,7 @@ typedef struct { */ typedef struct { FILE* perf_map; // File handle for the jitdump file - PyThread_type_lock map_lock; // Thread synchronization lock + TyThread_type_lock map_lock; // Thread synchronization lock void* mapped_buffer; // Memory-mapped region (signals perf we're active) size_t mapped_size; // Size of the mapped region int code_id; // Counter for unique code region identifiers @@ -1086,7 +1086,7 @@ static void* perf_map_jit_init(void) { * simultaneously. This lock ensures thread-safe access to the * global jitdump state. */ - perf_jit_map_state.map_lock = PyThread_allocate_lock(); + perf_jit_map_state.map_lock = TyThread_allocate_lock(); if (perf_jit_map_state.map_lock == NULL) { fclose(perf_jit_map_state.perf_map); return NULL; // Failed to create lock @@ -1308,12 +1308,12 @@ static int perf_map_jit_fini(void* state) { * and ensures all data is properly flushed. */ if (perf_jit_map_state.perf_map != NULL) { - PyThread_acquire_lock(perf_jit_map_state.map_lock, 1); + TyThread_acquire_lock(perf_jit_map_state.map_lock, 1); fclose(perf_jit_map_state.perf_map); // This also flushes buffers - PyThread_release_lock(perf_jit_map_state.map_lock); + TyThread_release_lock(perf_jit_map_state.map_lock); /* Clean up synchronization primitive */ - PyThread_free_lock(perf_jit_map_state.map_lock); + TyThread_free_lock(perf_jit_map_state.map_lock); perf_jit_map_state.perf_map = NULL; } diff --git a/Python/perf_trampoline.c b/Python/perf_trampoline.c index 3df14a0..a1475bc 100644 --- a/Python/perf_trampoline.c +++ b/Python/perf_trampoline.c @@ -28,21 +28,21 @@ produce the following backtrace when sampling from foo(): _TyEval_EvalFrameDefault -----> Evaluation frame of foo() _TyEval_Vector - _PyFunction_Vectorcall + _TyFunction_Vectorcall PyObject_Vectorcall call_function _TyEval_EvalFrameDefault ------> Evaluation frame of bar() _TyEval_EvalFrame _TyEval_Vector - _PyFunction_Vectorcall + _TyFunction_Vectorcall PyObject_Vectorcall call_function _TyEval_EvalFrameDefault -------> Evaluation frame of baz() _TyEval_EvalFrame _TyEval_Vector - _PyFunction_Vectorcall + _TyFunction_Vectorcall PyObject_Vectorcall call_function @@ -66,7 +66,7 @@ frames from the previous example it will see; _TyEval_EvalFrameDefault -----> Evaluation frame of foo() [Jit compiled code 3] _TyEval_Vector - _PyFunction_Vectorcall + _TyFunction_Vectorcall PyObject_Vectorcall call_function @@ -74,7 +74,7 @@ frames from the previous example it will see; [Jit compiled code 2] _TyEval_EvalFrame _TyEval_Vector - _PyFunction_Vectorcall + _TyFunction_Vectorcall PyObject_Vectorcall call_function @@ -82,7 +82,7 @@ frames from the previous example it will see; [Jit compiled code 1] _TyEval_EvalFrame _TyEval_Vector - _PyFunction_Vectorcall + _TyFunction_Vectorcall PyObject_Vectorcall call_function diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index b57e088..1c57c78 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -86,7 +86,7 @@ /* Forward declarations */ -static TyStatus add_main_module(PyInterpreterState *interp); +static TyStatus add_main_module(TyInterpreterState *interp); static TyStatus init_import_site(void); static TyStatus init_set_builtins_open(void); static TyStatus init_sys_streams(TyThreadState *tstate); @@ -451,7 +451,7 @@ pyinit_core_reconfigure(_PyRuntimeState *runtime, } *tstate_p = tstate; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (interp == NULL) { return _TyStatus_ERR("can't make main interpreter"); } @@ -523,7 +523,7 @@ pycore_init_runtime(_PyRuntimeState *runtime, static TyStatus -init_interp_settings(PyInterpreterState *interp, +init_interp_settings(TyInterpreterState *interp, const PyInterpreterConfig *config) { assert(interp->feature_flags == 0); @@ -598,7 +598,7 @@ init_interp_create_gil(TyThreadState *tstate, int gil) static int builtins_dict_watcher(TyDict_WatchEvent event, TyObject *dict, TyObject *key, TyObject *new_value) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); #ifdef _Ty_TIER2 if (interp->rare_events.builtin_dict < _Ty_MAX_ALLOWED_BUILTINS_MODIFICATIONS) { _Ty_Executors_InvalidateAll(interp, 1); @@ -614,7 +614,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime, TyThreadState **tstate_p) { TyStatus status; - PyInterpreterState *interp; + TyInterpreterState *interp; status = _TyInterpreterState_New(NULL, &interp); if (_TyStatus_EXCEPTION(status)) { return status; @@ -680,7 +680,7 @@ pycore_create_interpreter(_PyRuntimeState *runtime, static TyStatus -pycore_init_global_objects(PyInterpreterState *interp) +pycore_init_global_objects(TyInterpreterState *interp) { TyStatus status; @@ -702,7 +702,7 @@ pycore_init_global_objects(PyInterpreterState *interp) static TyStatus -pycore_init_types(PyInterpreterState *interp) +pycore_init_types(TyInterpreterState *interp) { TyStatus status; @@ -771,7 +771,7 @@ pycore_init_types(PyInterpreterState *interp) static TyStatus pycore_init_builtins(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; TyObject *bimod = _PyBuiltin_Init(interp); if (bimod == NULL) { @@ -863,7 +863,7 @@ pycore_interp_init(TyThreadState *tstate) if (_tstate->c_stack_hard_limit == 0) { _Ty_InitializeRecursionLimits(tstate); } - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; TyStatus status; TyObject *sysmod = NULL; @@ -1146,7 +1146,7 @@ pyinit_main_reconfigure(TyThreadState *tstate) static void run_presite(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; const PyConfig *config = _TyInterpreterState_GetConfig(interp); if (!config->run_presite) { @@ -1180,7 +1180,7 @@ init_interp_main(TyThreadState *tstate) TyStatus status; int is_main_interp = _Ty_IsMainInterpreter(tstate->interp); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; const PyConfig *config = _TyInterpreterState_GetConfig(interp); if (!config->_install_importlib) { @@ -1401,7 +1401,7 @@ init_interp_main(TyThreadState *tstate) static TyStatus pyinit_main(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (!interp->runtime->core_initialized) { return _TyStatus_ERR("runtime core not initialized"); } @@ -1508,7 +1508,7 @@ finalize_modules_delete_special(TyThreadState *tstate, int verbose) NULL }; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (verbose) { TySys_WriteStderr("# clear builtins._\n"); } @@ -1636,7 +1636,7 @@ finalize_clear_modules_dict(TyObject *modules) static void finalize_restore_builtins(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; TyObject *dict = TyDict_Copy(interp->builtins); if (dict == NULL) { TyErr_FormatUnraisable("Exception ignored while restoring builtins"); @@ -1650,7 +1650,7 @@ finalize_restore_builtins(TyThreadState *tstate) static void -finalize_modules_clear_weaklist(PyInterpreterState *interp, +finalize_modules_clear_weaklist(TyInterpreterState *interp, TyObject *weaklist, int verbose) { // First clear modules imported later @@ -1677,7 +1677,7 @@ finalize_modules_clear_weaklist(PyInterpreterState *interp, static void -finalize_clear_sys_builtins_dict(PyInterpreterState *interp, int verbose) +finalize_clear_sys_builtins_dict(TyInterpreterState *interp, int verbose) { // Clear sys dict if (verbose) { @@ -1698,7 +1698,7 @@ finalize_clear_sys_builtins_dict(PyInterpreterState *interp, int verbose) static void finalize_modules(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; // Invalidate all executors and turn off JIT: interp->jit = false; @@ -1773,7 +1773,7 @@ finalize_modules(TyThreadState *tstate) finalize_clear_sys_builtins_dict(interp, verbose); // Clear module dict copies stored in the interpreter state: - // clear PyInterpreterState.modules_by_index and + // clear TyInterpreterState.modules_by_index and // clear TyModuleDef.m_base.m_copy (of extensions not using the multi-phase // initialization API) _TyImport_ClearModulesByIndex(interp); @@ -1857,7 +1857,7 @@ flush_std_files(void) static void -finalize_interp_types(PyInterpreterState *interp) +finalize_interp_types(TyInterpreterState *interp) { _PyTypes_FiniExtTypes(interp); _TyUnicode_FiniTypes(interp); @@ -1940,7 +1940,7 @@ finalize_interp_clear(TyThreadState *tstate) static void -finalize_interp_delete(PyInterpreterState *interp) +finalize_interp_delete(TyInterpreterState *interp) { /* Cleanup auto-thread-state */ _TyGILState_Fini(interp); @@ -1969,7 +1969,7 @@ resolve_final_tstate(_PyRuntimeState *runtime) TyThreadState *main_tstate = runtime->main_tstate; assert(main_tstate != NULL); assert(main_tstate->thread_id == runtime->main_thread); - PyInterpreterState *main_interp = _TyInterpreterState_Main(); + TyInterpreterState *main_interp = _TyInterpreterState_Main(); assert(main_tstate->interp == main_interp); TyThreadState *tstate = _TyThreadState_GET(); @@ -2062,7 +2062,7 @@ _Ty_Finalize(_PyRuntimeState *runtime) /* Ensure that remaining threads are detached */ _TyEval_StopTheWorldAll(runtime); - /* Remaining daemon threads will be trapped in PyThread_hang_thread + /* Remaining daemon threads will be trapped in TyThread_hang_thread when they attempt to take the GIL (ex: TyEval_RestoreThread()). */ _TyInterpreterState_SetFinalizing(tstate->interp, tstate); _PyRuntimeState_SetFinalizing(runtime, tstate); @@ -2298,7 +2298,7 @@ new_interpreter(TyThreadState **tstate_p, interpreters: disable TyGILState_Check(). */ runtime->gilstate.check_enabled = 0; - PyInterpreterState *interp = TyInterpreterState_New(); + TyInterpreterState *interp = TyInterpreterState_New(); if (interp == NULL) { *tstate_p = NULL; return _TyStatus_OK(); @@ -2326,7 +2326,7 @@ new_interpreter(TyThreadState **tstate_p, else { /* No current thread state, copy from the main interpreter */ - PyInterpreterState *main_interp = _TyInterpreterState_Main(); + TyInterpreterState *main_interp = _TyInterpreterState_Main(); src_config = _TyInterpreterState_GetConfig(main_interp); } @@ -2430,7 +2430,7 @@ Ty_NewInterpreter(void) void Ty_EndInterpreter(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (tstate != _TyThreadState_GET()) { Ty_FatalError("thread is not current"); @@ -2467,7 +2467,7 @@ Ty_EndInterpreter(TyThreadState *tstate) } int -_Ty_IsInterpreterFinalizing(PyInterpreterState *interp) +_Ty_IsInterpreterFinalizing(TyInterpreterState *interp) { /* We check the runtime first since, in a daemon thread, interp might be dangling pointer. */ @@ -2482,14 +2482,14 @@ static void finalize_subinterpreters(void) { TyThreadState *final_tstate = _TyThreadState_GET(); - PyInterpreterState *main_interp = _TyInterpreterState_Main(); + TyInterpreterState *main_interp = _TyInterpreterState_Main(); assert(final_tstate->interp == main_interp); _PyRuntimeState *runtime = main_interp->runtime; struct pyinterpreters *interpreters = &runtime->interpreters; /* Get the first interpreter in the list. */ HEAD_LOCK(runtime); - PyInterpreterState *interp = interpreters->head; + TyInterpreterState *interp = interpreters->head; if (interp == main_interp) { interp = interp->next; } @@ -2554,7 +2554,7 @@ finalize_subinterpreters(void) /* Add the __main__ module */ static TyStatus -add_main_module(PyInterpreterState *interp) +add_main_module(TyInterpreterState *interp) { TyObject *m, *d; m = TyImport_AddModuleObject(&_Ty_ID(__main__)); @@ -3020,7 +3020,7 @@ done: static void -_Ty_FatalError_DumpTracebacks(int fd, PyInterpreterState *interp, +_Ty_FatalError_DumpTracebacks(int fd, TyInterpreterState *interp, TyThreadState *tstate) { PUTS(fd, "\n"); @@ -3191,7 +3191,7 @@ release_dict_lock_for_dump(TyObject *obj) // allocations and keep the implementation simple. For example, the list is not // sorted on purpose. void -_Ty_DumpExtensionModules(int fd, PyInterpreterState *interp) +_Ty_DumpExtensionModules(int fd, TyInterpreterState *interp) { if (interp == NULL) { return; @@ -3329,7 +3329,7 @@ fatal_error(int fd, int header, const char *prefix, const char *msg, tss_tstate != tstate if the current Python thread does not hold the GIL. */ TyThreadState *tstate = _TyThreadState_GET(); - PyInterpreterState *interp = NULL; + TyInterpreterState *interp = NULL; TyThreadState *tss_tstate = TyGILState_GetThisThreadState(); if (tstate != NULL) { interp = tstate->interp; diff --git a/Python/pystate.c b/Python/pystate.c index 370a525..434699c 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -78,7 +78,7 @@ current_fast_get(void) #ifdef HAVE_THREAD_LOCAL return _Ty_tss_tstate; #else - // XXX Fall back to the PyThread_tss_*() API. + // XXX Fall back to the TyThread_tss_*() API. # error "no supported thread-local variable storage classifier" #endif } @@ -90,7 +90,7 @@ current_fast_set(_PyRuntimeState *Py_UNUSED(runtime), TyThreadState *tstate) #ifdef HAVE_THREAD_LOCAL _Ty_tss_tstate = tstate; #else - // XXX Fall back to the PyThread_tss_*() API. + // XXX Fall back to the TyThread_tss_*() API. # error "no supported thread-local variable storage classifier" #endif } @@ -101,7 +101,7 @@ current_fast_clear(_PyRuntimeState *Py_UNUSED(runtime)) #ifdef HAVE_THREAD_LOCAL _Ty_tss_tstate = NULL; #else - // XXX Fall back to the PyThread_tss_*() API. + // XXX Fall back to the TyThread_tss_*() API. # error "no supported thread-local variable storage classifier" #endif } @@ -125,28 +125,28 @@ _TyThreadState_GetCurrent(void) static inline int tstate_tss_initialized(Ty_tss_t *key) { - return PyThread_tss_is_created(key); + return TyThread_tss_is_created(key); } static inline int tstate_tss_init(Ty_tss_t *key) { assert(!tstate_tss_initialized(key)); - return PyThread_tss_create(key); + return TyThread_tss_create(key); } static inline void tstate_tss_fini(Ty_tss_t *key) { assert(tstate_tss_initialized(key)); - PyThread_tss_delete(key); + TyThread_tss_delete(key); } static inline TyThreadState * tstate_tss_get(Ty_tss_t *key) { assert(tstate_tss_initialized(key)); - return (TyThreadState *)PyThread_tss_get(key); + return (TyThreadState *)TyThread_tss_get(key); } static inline int @@ -154,14 +154,14 @@ tstate_tss_set(Ty_tss_t *key, TyThreadState *tstate) { assert(tstate != NULL); assert(tstate_tss_initialized(key)); - return PyThread_tss_set(key, (void *)tstate); + return TyThread_tss_set(key, (void *)tstate); } static inline int tstate_tss_clear(Ty_tss_t *key) { assert(tstate_tss_initialized(key)); - return PyThread_tss_set(key, (void *)NULL); + return TyThread_tss_set(key, (void *)NULL); } #ifdef HAVE_FORK @@ -261,9 +261,9 @@ bind_tstate(TyThreadState *tstate) // Currently we don't necessarily store the thread state // in thread-local storage (e.g. per-interpreter). - tstate->thread_id = PyThread_get_thread_ident(); + tstate->thread_id = TyThread_get_thread_ident(); #ifdef PY_HAVE_THREAD_NATIVE_ID - tstate->native_thread_id = PyThread_get_thread_native_id(); + tstate->native_thread_id = TyThread_get_thread_native_id(); #endif #ifdef Ty_GIL_DISABLED @@ -431,7 +431,7 @@ init_runtime(_PyRuntimeState *runtime, TyPreConfig_InitPythonConfig(&runtime->preconfig); // Set it to the ID of the main thread of the main interpreter. - runtime->main_thread = PyThread_get_thread_ident(); + runtime->main_thread = TyThread_get_thread_ident(); runtime->unicode_state.ids.next_index = unicode_next_index; @@ -474,7 +474,7 @@ _PyRuntimeState_Init(_PyRuntimeState *runtime) return _TyStatus_NO_MEMORY(); } - if (PyThread_tss_create(&runtime->trashTSSkey) != 0) { + if (TyThread_tss_create(&runtime->trashTSSkey) != 0) { _PyRuntimeState_Fini(runtime); return _TyStatus_NO_MEMORY(); } @@ -497,8 +497,8 @@ _PyRuntimeState_Fini(_PyRuntimeState *runtime) gilstate_tss_fini(runtime); } - if (PyThread_tss_is_created(&runtime->trashTSSkey)) { - PyThread_tss_delete(&runtime->trashTSSkey); + if (TyThread_tss_is_created(&runtime->trashTSSkey)) { + TyThread_tss_delete(&runtime->trashTSSkey); } } @@ -509,7 +509,7 @@ TyStatus _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime) { // This was initially set in _PyRuntimeState_Init(). - runtime->main_thread = PyThread_get_thread_ident(); + runtime->main_thread = TyThread_get_thread_ident(); // Clears the parking lot. Any waiting threads are dead. This must be // called before releasing any locks that use the parking lot. @@ -521,7 +521,7 @@ _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime) _PyMutex_at_fork_reinit(locks[i]); } #ifdef Ty_GIL_DISABLED - for (PyInterpreterState *interp = runtime->interpreters.head; + for (TyInterpreterState *interp = runtime->interpreters.head; interp != NULL; interp = interp->next) { for (int i = 0; i < NUM_WEAKREF_LIST_LOCKS; i++) { @@ -537,10 +537,10 @@ _PyRuntimeState_ReInitThreads(_PyRuntimeState *runtime) return status; } - if (PyThread_tss_is_created(&runtime->trashTSSkey)) { - PyThread_tss_delete(&runtime->trashTSSkey); + if (TyThread_tss_is_created(&runtime->trashTSSkey)) { + TyThread_tss_delete(&runtime->trashTSSkey); } - if (PyThread_tss_create(&runtime->trashTSSkey) != 0) { + if (TyThread_tss_create(&runtime->trashTSSkey) != 0) { return _TyStatus_NO_MEMORY(); } @@ -569,23 +569,23 @@ _TyInterpreterState_Enable(_PyRuntimeState *runtime) return _TyStatus_OK(); } -static PyInterpreterState * +static TyInterpreterState * alloc_interpreter(void) { - size_t alignment = _Alignof(PyInterpreterState); - size_t allocsize = sizeof(PyInterpreterState) + alignment - 1; + size_t alignment = _Alignof(TyInterpreterState); + size_t allocsize = sizeof(TyInterpreterState) + alignment - 1; void *mem = TyMem_RawCalloc(1, allocsize); if (mem == NULL) { return NULL; } - PyInterpreterState *interp = _Ty_ALIGN_UP(mem, alignment); + TyInterpreterState *interp = _Ty_ALIGN_UP(mem, alignment); assert(_Ty_IS_ALIGNED(interp, alignment)); interp->_malloced = mem; return interp; } static void -free_interpreter(PyInterpreterState *interp) +free_interpreter(TyInterpreterState *interp) { // The main interpreter is statically allocated so // should not be freed. @@ -595,7 +595,7 @@ free_interpreter(PyInterpreterState *interp) TyMem_RawFree(interp->obmalloc); interp->obmalloc = NULL; } - assert(_Ty_IS_ALIGNED(interp, _Alignof(PyInterpreterState))); + assert(_Ty_IS_ALIGNED(interp, _Alignof(TyInterpreterState))); TyMem_RawFree(interp->_malloced); } } @@ -624,9 +624,9 @@ static inline int check_interpreter_whence(long); to the other dynamically initialized fields. */ static TyStatus -init_interpreter(PyInterpreterState *interp, +init_interpreter(TyInterpreterState *interp, _PyRuntimeState *runtime, int64_t id, - PyInterpreterState *next, + TyInterpreterState *next, long whence) { if (interp->_initialized) { @@ -719,7 +719,7 @@ init_interpreter(PyInterpreterState *interp, TyStatus -_TyInterpreterState_New(TyThreadState *tstate, PyInterpreterState **pinterp) +_TyInterpreterState_New(TyThreadState *tstate, TyInterpreterState **pinterp) { *pinterp = NULL; @@ -745,9 +745,9 @@ _TyInterpreterState_New(TyThreadState *tstate, PyInterpreterState **pinterp) interpreters->next_id += 1; // Allocate the interpreter and add it to the runtime state. - PyInterpreterState *interp; + TyInterpreterState *interp; TyStatus status; - PyInterpreterState *old_head = interpreters->head; + TyInterpreterState *old_head = interpreters->head; if (old_head == NULL) { // We are creating the main interpreter. assert(interpreters->main == NULL); @@ -802,13 +802,13 @@ error: } -PyInterpreterState * +TyInterpreterState * TyInterpreterState_New(void) { // tstate can be NULL TyThreadState *tstate = current_fast_get(); - PyInterpreterState *interp; + TyInterpreterState *interp; TyStatus status = _TyInterpreterState_New(tstate, &interp); if (_TyStatus_EXCEPTION(status)) { Ty_ExitStatusException(status); @@ -819,11 +819,11 @@ TyInterpreterState_New(void) #if !defined(Ty_GIL_DISABLED) && defined(Ty_STACKREF_DEBUG) extern void -_Ty_stackref_report_leaks(PyInterpreterState *interp); +_Ty_stackref_report_leaks(TyInterpreterState *interp); #endif static void -interpreter_clear(PyInterpreterState *interp, TyThreadState *tstate) +interpreter_clear(TyInterpreterState *interp, TyThreadState *tstate) { assert(interp != NULL); assert(tstate != NULL); @@ -981,7 +981,7 @@ interpreter_clear(PyInterpreterState *interp, TyThreadState *tstate) void -TyInterpreterState_Clear(PyInterpreterState *interp) +TyInterpreterState_Clear(TyInterpreterState *interp) { // Use the current Python thread state to call audit hooks and to collect // garbage. It can be different than the current Python thread state @@ -1002,10 +1002,10 @@ _TyInterpreterState_Clear(TyThreadState *tstate) static inline void tstate_deactivate(TyThreadState *tstate); static void tstate_set_detached(TyThreadState *tstate, int detached_state); -static void zapthreads(PyInterpreterState *interp); +static void zapthreads(TyInterpreterState *interp); void -TyInterpreterState_Delete(PyInterpreterState *interp) +TyInterpreterState_Delete(TyInterpreterState *interp) { _PyRuntimeState *runtime = interp->runtime; struct pyinterpreters *interpreters = &runtime->interpreters; @@ -1028,7 +1028,7 @@ TyInterpreterState_Delete(PyInterpreterState *interp) _TyInterpreterState_FinalizeAllocatedBlocks(interp); HEAD_LOCK(runtime); - PyInterpreterState **p; + TyInterpreterState **p; for (p = &interpreters->head; ; p = &(*p)->next) { if (*p == NULL) { Ty_FatalError("NULL interpreter"); @@ -1074,7 +1074,7 @@ _TyInterpreterState_DeleteExceptMain(_PyRuntimeState *runtime) } HEAD_LOCK(runtime); - PyInterpreterState *interp = interpreters->head; + TyInterpreterState *interp = interpreters->head; interpreters->head = NULL; while (interp != NULL) { if (interp == interpreters->main) { @@ -1088,7 +1088,7 @@ _TyInterpreterState_DeleteExceptMain(_PyRuntimeState *runtime) // the "current" tstate to be set? TyInterpreterState_Clear(interp); // XXX must activate? zapthreads(interp); - PyInterpreterState *prev_interp = interp; + TyInterpreterState *prev_interp = interp; interp = interp->next; free_interpreter(prev_interp); } @@ -1103,13 +1103,13 @@ _TyInterpreterState_DeleteExceptMain(_PyRuntimeState *runtime) #endif static inline void -set_main_thread(PyInterpreterState *interp, TyThreadState *tstate) +set_main_thread(TyInterpreterState *interp, TyThreadState *tstate) { _Ty_atomic_store_ptr_relaxed(&interp->threads.main, tstate); } static inline TyThreadState * -get_main_thread(PyInterpreterState *interp) +get_main_thread(TyInterpreterState *interp) { return _Ty_atomic_load_ptr_relaxed(&interp->threads.main); } @@ -1121,7 +1121,7 @@ _TyErr_SetInterpreterAlreadyRunning(void) } int -_TyInterpreterState_SetRunningMain(PyInterpreterState *interp) +_TyInterpreterState_SetRunningMain(TyInterpreterState *interp) { if (get_main_thread(interp) != NULL) { _TyErr_SetInterpreterAlreadyRunning(); @@ -1140,14 +1140,14 @@ _TyInterpreterState_SetRunningMain(PyInterpreterState *interp) } void -_TyInterpreterState_SetNotRunningMain(PyInterpreterState *interp) +_TyInterpreterState_SetNotRunningMain(TyInterpreterState *interp) { assert(get_main_thread(interp) == current_fast_get()); set_main_thread(interp, NULL); } int -_TyInterpreterState_IsRunningMain(PyInterpreterState *interp) +_TyInterpreterState_IsRunningMain(TyInterpreterState *interp) { if (get_main_thread(interp) != NULL) { return 1; @@ -1164,7 +1164,7 @@ _TyInterpreterState_IsRunningMain(PyInterpreterState *interp) int _TyThreadState_IsRunningMain(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; // See the note in _TyInterpreterState_IsRunningMain() about // possible false negatives here for embedders. return get_main_thread(interp) == tstate; @@ -1173,7 +1173,7 @@ _TyThreadState_IsRunningMain(TyThreadState *tstate) void _TyInterpreterState_ReinitRunningMain(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (get_main_thread(interp) != tstate) { set_main_thread(interp, NULL); } @@ -1185,7 +1185,7 @@ _TyInterpreterState_ReinitRunningMain(TyThreadState *tstate) //---------- int -_TyInterpreterState_IsReady(PyInterpreterState *interp) +_TyInterpreterState_IsReady(TyInterpreterState *interp) { return interp->_ready; } @@ -1205,14 +1205,14 @@ check_interpreter_whence(long whence) #endif long -_TyInterpreterState_GetWhence(PyInterpreterState *interp) +_TyInterpreterState_GetWhence(TyInterpreterState *interp) { assert(check_interpreter_whence(interp->_whence) == 0); return interp->_whence; } void -_TyInterpreterState_SetWhence(PyInterpreterState *interp, long whence) +_TyInterpreterState_SetWhence(TyInterpreterState *interp, long whence) { assert(interp->_whence != _TyInterpreterState_WHENCE_NOTSET); assert(check_interpreter_whence(whence) == 0); @@ -1260,7 +1260,7 @@ _Ty_CheckMainModule(TyObject *module) TyObject * -TyInterpreterState_GetDict(PyInterpreterState *interp) +TyInterpreterState_GetDict(TyInterpreterState *interp) { if (interp->dict == NULL) { interp->dict = TyDict_New(); @@ -1312,7 +1312,7 @@ _TyInterpreterState_ObjectToID(TyObject *idobj) } int64_t -TyInterpreterState_GetID(PyInterpreterState *interp) +TyInterpreterState_GetID(TyInterpreterState *interp) { if (interp == NULL) { TyErr_SetString(TyExc_RuntimeError, "no interpreter provided"); @@ -1322,7 +1322,7 @@ TyInterpreterState_GetID(PyInterpreterState *interp) } TyObject * -_TyInterpreterState_GetIDObject(PyInterpreterState *interp) +_TyInterpreterState_GetIDObject(TyInterpreterState *interp) { int64_t interpid = interp->id; if (interpid < 0) { @@ -1335,14 +1335,14 @@ _TyInterpreterState_GetIDObject(PyInterpreterState *interp) void -_TyInterpreterState_IDIncref(PyInterpreterState *interp) +_TyInterpreterState_IDIncref(TyInterpreterState *interp) { _Ty_atomic_add_ssize(&interp->id_refcount, 1); } void -_TyInterpreterState_IDDecref(PyInterpreterState *interp) +_TyInterpreterState_IDDecref(TyInterpreterState *interp) { _PyRuntimeState *runtime = interp->runtime; @@ -1360,13 +1360,13 @@ _TyInterpreterState_IDDecref(PyInterpreterState *interp) } int -_TyInterpreterState_RequiresIDRef(PyInterpreterState *interp) +_TyInterpreterState_RequiresIDRef(TyInterpreterState *interp) { return interp->requires_idref; } void -_TyInterpreterState_RequireIDRef(PyInterpreterState *interp, int required) +_TyInterpreterState_RequireIDRef(TyInterpreterState *interp, int required) { interp->requires_idref = required ? 1 : 0; } @@ -1381,12 +1381,12 @@ _TyInterpreterState_RequireIDRef(PyInterpreterState *interp, int required) The GIL must be held. */ -PyInterpreterState* +TyInterpreterState* TyInterpreterState_Get(void) { TyThreadState *tstate = current_fast_get(); _Ty_EnsureTstateNotNULL(tstate); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (interp == NULL) { Ty_FatalError("no current interpreter"); } @@ -1394,10 +1394,10 @@ TyInterpreterState_Get(void) } -static PyInterpreterState * +static TyInterpreterState * interp_look_up_id(_PyRuntimeState *runtime, int64_t requested_id) { - PyInterpreterState *interp = runtime->interpreters.head; + TyInterpreterState *interp = runtime->interpreters.head; while (interp != NULL) { int64_t id = TyInterpreterState_GetID(interp); if (id < 0) { @@ -1415,10 +1415,10 @@ interp_look_up_id(_PyRuntimeState *runtime, int64_t requested_id) Fail with RuntimeError if the interpreter is not found. */ -PyInterpreterState * +TyInterpreterState * _TyInterpreterState_LookUpID(int64_t requested_id) { - PyInterpreterState *interp = NULL; + TyInterpreterState *interp = NULL; if (requested_id >= 0) { _PyRuntimeState *runtime = &_PyRuntime; HEAD_LOCK(runtime); @@ -1432,7 +1432,7 @@ _TyInterpreterState_LookUpID(int64_t requested_id) return interp; } -PyInterpreterState * +TyInterpreterState * _TyInterpreterState_LookUpIDObject(TyObject *requested_id) { int64_t id = _TyInterpreterState_ObjectToID(requested_id); @@ -1487,7 +1487,7 @@ reset_threadstate(_PyThreadStateImpl *tstate) } static _PyThreadStateImpl * -alloc_threadstate(PyInterpreterState *interp) +alloc_threadstate(TyInterpreterState *interp) { _PyThreadStateImpl *tstate; @@ -1508,7 +1508,7 @@ alloc_threadstate(PyInterpreterState *interp) static void free_threadstate(_PyThreadStateImpl *tstate) { - PyInterpreterState *interp = tstate->base.interp; + TyInterpreterState *interp = tstate->base.interp; // The initial thread state of the interpreter is allocated // as part of the interpreter state so should not be freed. if (tstate == &interp->_initial_thread) { @@ -1541,7 +1541,7 @@ decref_threadstate(_PyThreadStateImpl *tstate) static void init_threadstate(_PyThreadStateImpl *_tstate, - PyInterpreterState *interp, uint64_t id, int whence) + TyInterpreterState *interp, uint64_t id, int whence) { TyThreadState *tstate = (TyThreadState *)_tstate; if (tstate->_status.initialized) { @@ -1602,7 +1602,7 @@ init_threadstate(_PyThreadStateImpl *_tstate, } static void -add_threadstate(PyInterpreterState *interp, TyThreadState *tstate, +add_threadstate(TyInterpreterState *interp, TyThreadState *tstate, TyThreadState *next) { assert(interp->threads.head != tstate); @@ -1616,7 +1616,7 @@ add_threadstate(PyInterpreterState *interp, TyThreadState *tstate, } static TyThreadState * -new_threadstate(PyInterpreterState *interp, int whence) +new_threadstate(TyInterpreterState *interp, int whence) { // Allocate the thread state. _PyThreadStateImpl *tstate = alloc_threadstate(interp); @@ -1661,13 +1661,13 @@ new_threadstate(PyInterpreterState *interp, int whence) } TyThreadState * -TyThreadState_New(PyInterpreterState *interp) +TyThreadState_New(TyInterpreterState *interp) { return _TyThreadState_NewBound(interp, _TyThreadState_WHENCE_UNKNOWN); } TyThreadState * -_TyThreadState_NewBound(PyInterpreterState *interp, int whence) +_TyThreadState_NewBound(TyInterpreterState *interp, int whence) { TyThreadState *tstate = new_threadstate(interp, whence); if (tstate) { @@ -1683,14 +1683,14 @@ _TyThreadState_NewBound(PyInterpreterState *interp, int whence) // This must be followed by a call to _TyThreadState_Bind(); TyThreadState * -_TyThreadState_New(PyInterpreterState *interp, int whence) +_TyThreadState_New(TyInterpreterState *interp, int whence) { return new_threadstate(interp, whence); } // We keep this for stable ABI compabibility. PyAPI_FUNC(TyThreadState*) -_TyThreadState_Prealloc(PyInterpreterState *interp) +_TyThreadState_Prealloc(TyInterpreterState *interp) { return _TyThreadState_New(interp, _TyThreadState_WHENCE_UNKNOWN); } @@ -1857,7 +1857,7 @@ tstate_delete_common(TyThreadState *tstate, int release_gil) tstate_verify_not_active(tstate); assert(!_TyThreadState_IsRunningMain(tstate)); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (interp == NULL) { Ty_FatalError("NULL interpreter"); } @@ -1918,7 +1918,7 @@ tstate_delete_common(TyThreadState *tstate, int release_gil) } static void -zapthreads(PyInterpreterState *interp) +zapthreads(TyInterpreterState *interp) { TyThreadState *tstate; /* No need to lock the mutex here because this should only happen @@ -1978,7 +1978,7 @@ TyThreadState * _TyThreadState_RemoveExcept(TyThreadState *tstate) { assert(tstate != NULL); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; _PyRuntimeState *runtime = interp->runtime; #ifdef Ty_GIL_DISABLED @@ -2068,7 +2068,7 @@ TyThreadState_GetDict(void) } -PyInterpreterState * +TyInterpreterState * TyThreadState_GetInterpreter(TyThreadState *tstate) { assert(tstate != NULL); @@ -2315,19 +2315,19 @@ decrement_stoptheworld_countdown(struct _stoptheworld_state *stw) // we start with the first interpreter and then iterate over all interpreters. // For per-interpreter stop-the-world events, we only operate on the one // interpreter. -static PyInterpreterState * +static TyInterpreterState * interp_for_stop_the_world(struct _stoptheworld_state *stw) { return (stw->is_global ? TyInterpreterState_Head() - : _Ty_CONTAINER_OF(stw, PyInterpreterState, stoptheworld)); + : _Ty_CONTAINER_OF(stw, TyInterpreterState, stoptheworld)); } // Loops over threads for a stop-the-world event. // For global: all threads in all interpreters // For per-interpreter: all threads in the interpreter #define _Ty_FOR_EACH_STW_INTERP(stw, i) \ - for (PyInterpreterState *i = interp_for_stop_the_world((stw)); \ + for (TyInterpreterState *i = interp_for_stop_the_world((stw)); \ i != NULL; i = ((stw->is_global) ? i->next : NULL)) @@ -2400,7 +2400,7 @@ stop_the_world(struct _stoptheworld_state *stw) break; } - PyTime_t wait_ns = 1000*1000; // 1ms (arbitrary, may need tuning) + TyTime_t wait_ns = 1000*1000; // 1ms (arbitrary, may need tuning) int detach = 0; if (PyEvent_WaitTimed(&stw->stop_event, wait_ns, detach)) { assert(stw->thread_countdown == 0); @@ -2461,7 +2461,7 @@ _TyEval_StartTheWorldAll(_PyRuntimeState *runtime) } void -_TyEval_StopTheWorld(PyInterpreterState *interp) +_TyEval_StopTheWorld(TyInterpreterState *interp) { #ifdef Ty_GIL_DISABLED stop_the_world(&interp->stoptheworld); @@ -2469,7 +2469,7 @@ _TyEval_StopTheWorld(PyInterpreterState *interp) } void -_TyEval_StartTheWorld(PyInterpreterState *interp) +_TyEval_StartTheWorld(TyInterpreterState *interp) { #ifdef Ty_GIL_DISABLED start_the_world(&interp->stoptheworld); @@ -2493,7 +2493,7 @@ _TyEval_StartTheWorld(PyInterpreterState *interp) int TyThreadState_SetAsyncExc(unsigned long id, TyObject *exc) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); /* Although the GIL is held, a few C API functions can be called * without the GIL held, and in particular some that create and @@ -2604,25 +2604,25 @@ _Ty_GetThreadLocal_Addr(void) // (requested by David Beazley) // Don't use unless you know what you are doing! -PyInterpreterState * +TyInterpreterState * TyInterpreterState_Head(void) { return _PyRuntime.interpreters.head; } -PyInterpreterState * +TyInterpreterState * TyInterpreterState_Main(void) { return _TyInterpreterState_Main(); } -PyInterpreterState * -TyInterpreterState_Next(PyInterpreterState *interp) { +TyInterpreterState * +TyInterpreterState_Next(TyInterpreterState *interp) { return interp->next; } TyThreadState * -TyInterpreterState_ThreadHead(PyInterpreterState *interp) { +TyInterpreterState_ThreadHead(TyInterpreterState *interp) { return interp->threads.head; } @@ -2663,7 +2663,7 @@ _PyThread_CurrentFrames(void) */ _TyEval_StopTheWorldAll(runtime); HEAD_LOCK(runtime); - PyInterpreterState *i; + TyInterpreterState *i; for (i = runtime->interpreters.head; i != NULL; i = i->next) { _Ty_FOR_EACH_TSTATE_UNLOCKED(i, t) { _PyInterpreterFrame *frame = t->current_frame; @@ -2728,7 +2728,7 @@ _PyThread_CurrentExceptions(void) */ _TyEval_StopTheWorldAll(runtime); HEAD_LOCK(runtime); - PyInterpreterState *i; + TyInterpreterState *i; for (i = runtime->interpreters.head; i != NULL; i = i->next) { _Ty_FOR_EACH_TSTATE_UNLOCKED(i, t) { _TyErr_StackItem *err_info = _TyErr_GetTopmostException(t); @@ -2771,7 +2771,7 @@ done: Ty_Initialize/Ty_FinalizeEx */ TyStatus -_TyGILState_Init(PyInterpreterState *interp) +_TyGILState_Init(TyInterpreterState *interp) { if (!_Ty_IsMainInterpreter(interp)) { /* Currently, PyGILState is shared by all interpreters. The main @@ -2786,7 +2786,7 @@ _TyGILState_Init(PyInterpreterState *interp) } void -_TyGILState_Fini(PyInterpreterState *interp) +_TyGILState_Fini(TyInterpreterState *interp) { if (!_Ty_IsMainInterpreter(interp)) { /* Currently, PyGILState is shared by all interpreters. The main @@ -2820,7 +2820,7 @@ _TyGILState_SetTstate(TyThreadState *tstate) #endif } -PyInterpreterState * +TyInterpreterState * _TyGILState_GetInterpreterStateUnsafe(void) { return _PyRuntime.gilstate.autoInterpreterState; @@ -2965,7 +2965,7 @@ TyGILState_Release(TyGILState_STATE oldstate) /*************/ _PyFrameEvalFunction -_TyInterpreterState_GetEvalFrameFunc(PyInterpreterState *interp) +_TyInterpreterState_GetEvalFrameFunc(TyInterpreterState *interp) { if (interp->eval_frame == NULL) { return _TyEval_EvalFrameDefault; @@ -2975,7 +2975,7 @@ _TyInterpreterState_GetEvalFrameFunc(PyInterpreterState *interp) void -_TyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, +_TyInterpreterState_SetEvalFrameFunc(TyInterpreterState *interp, _PyFrameEvalFunction eval_frame) { if (eval_frame == _TyEval_EvalFrameDefault) { @@ -2997,7 +2997,7 @@ _TyInterpreterState_SetEvalFrameFunc(PyInterpreterState *interp, const PyConfig* -_TyInterpreterState_GetConfig(PyInterpreterState *interp) +_TyInterpreterState_GetConfig(TyInterpreterState *interp) { return &interp->config; } @@ -3013,7 +3013,7 @@ _Ty_GetConfig(void) int -_TyInterpreterState_HasFeature(PyInterpreterState *interp, unsigned long feature) +_TyInterpreterState_HasFeature(TyInterpreterState *interp, unsigned long feature) { return ((interp->feature_flags & feature) != 0); } @@ -3119,7 +3119,7 @@ _TyThreadState_HangThread(TyThreadState *tstate) { _PyThreadStateImpl *tstate_impl = (_PyThreadStateImpl *)tstate; decref_threadstate(tstate_impl); - PyThread_hang_thread(); + TyThread_hang_thread(); } /********************/ @@ -3203,12 +3203,12 @@ _TyThreadState_ClearMimallocHeaps(TyThreadState *tstate) int _Ty_IsMainThread(void) { - unsigned long thread = PyThread_get_thread_ident(); + unsigned long thread = TyThread_get_thread_ident(); return (thread == _PyRuntime.main_thread); } -PyInterpreterState * +TyInterpreterState * _TyInterpreterState_Main(void) { return _PyRuntime.interpreters.main; @@ -3216,7 +3216,7 @@ _TyInterpreterState_Main(void) int -_Ty_IsMainInterpreterFinalizing(PyInterpreterState *interp) +_Ty_IsMainInterpreterFinalizing(TyInterpreterState *interp) { /* bpo-39877: Access _PyRuntime directly rather than using tstate->interp->runtime to support calls from Python daemon threads. @@ -3230,7 +3230,7 @@ _Ty_IsMainInterpreterFinalizing(PyInterpreterState *interp) const PyConfig * _Ty_GetMainConfig(void) { - PyInterpreterState *interp = _TyInterpreterState_Main(); + TyInterpreterState *interp = _TyInterpreterState_Main(); if (interp == NULL) { return NULL; } diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 945a4b5..85b9461 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -16,7 +16,7 @@ #include "pycore_compile.h" // _TyAST_Compile() #include "pycore_fileutils.h" // _PyFile_Flush #include "pycore_import.h" // _TyImport_GetImportlibExternalLoader() -#include "pycore_interp.h" // PyInterpreterState.importlib +#include "pycore_interp.h" // TyInterpreterState.importlib #include "pycore_object.h" // _PyDebug_PrintTotalRefs() #include "pycore_parser.h" // _TyParser_ASTFromString() #include "pycore_pyerrors.h" // _TyErr_GetRaisedException() @@ -435,7 +435,7 @@ maybe_pyc_file(FILE *fp, TyObject *filename, int closeit) static int set_main_loader(TyObject *d, TyObject *filename, const char *loader_name) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *loader_type = _TyImport_GetImportlibExternalLoader(interp, loader_name); if (loader_type == NULL) { @@ -1089,7 +1089,7 @@ print_exception_cause_and_context(struct exception_print_context *ctx, Ty_DECREF(cause); return err; } - if (((PyBaseExceptionObject *)value)->suppress_context) { + if (((TyBaseExceptionObject *)value)->suppress_context) { return 0; } TyObject *context = PyException_GetContext(value); @@ -1373,7 +1373,7 @@ run_mod(mod_ty mod, TyObject *filename, TyObject *globals, TyObject *locals, TyThreadState *tstate = _TyThreadState_GET(); TyObject* interactive_filename = filename; if (interactive_src) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (generate_new_source) { interactive_filename = TyUnicode_FromFormat( "%U-%d", filename, interp->_interactive_src_count++); diff --git a/Python/pytime.c b/Python/pytime.c index b2d6cfc..340981b 100644 --- a/Python/pytime.c +++ b/Python/pytime.c @@ -2,7 +2,7 @@ #include "pycore_initconfig.h" // _TyStatus_ERR #include "pycore_pystate.h" // _Ty_AssertHoldsTstate() #include "pycore_runtime.h" // _PyRuntime -#include "pycore_time.h" // PyTime_t +#include "pycore_time.h" // TyTime_t #include // gmtime_r() #ifdef HAVE_SYS_TIME_H @@ -54,18 +54,18 @@ #endif #if PyTime_MIN + PyTime_MAX != -1 -# error "PyTime_t is not a two's complement integer type" +# error "TyTime_t is not a two's complement integer type" #endif -static PyTime_t -_TyTime_GCD(PyTime_t x, PyTime_t y) +static TyTime_t +_TyTime_GCD(TyTime_t x, TyTime_t y) { // Euclidean algorithm assert(x >= 1); assert(y >= 1); while (y != 0) { - PyTime_t tmp = y; + TyTime_t tmp = y; y = x % y; x = tmp; } @@ -75,13 +75,13 @@ _TyTime_GCD(PyTime_t x, PyTime_t y) int -_PyTimeFraction_Set(_PyTimeFraction *frac, PyTime_t numer, PyTime_t denom) +_PyTimeFraction_Set(_PyTimeFraction *frac, TyTime_t numer, TyTime_t denom) { if (numer < 1 || denom < 1) { return -1; } - PyTime_t gcd = _TyTime_GCD(numer, denom); + TyTime_t gcd = _TyTime_GCD(numer, denom); frac->numer = numer / gcd; frac->denom = denom / gcd; return 0; @@ -107,13 +107,13 @@ static void pytime_overflow(void) { TyErr_SetString(TyExc_OverflowError, - "timestamp too large to convert to C PyTime_t"); + "timestamp too large to convert to C TyTime_t"); } // Compute t1 + t2. Clamp to [PyTime_MIN; PyTime_MAX] on overflow. static inline int -pytime_add(PyTime_t *t1, PyTime_t t2) +pytime_add(TyTime_t *t1, TyTime_t t2) { if (t2 > 0 && *t1 > PyTime_MAX - t2) { *t1 = PyTime_MAX; @@ -130,8 +130,8 @@ pytime_add(PyTime_t *t1, PyTime_t t2) } -PyTime_t -_TyTime_Add(PyTime_t t1, PyTime_t t2) +TyTime_t +_TyTime_Add(TyTime_t t1, TyTime_t t2) { (void)pytime_add(&t1, t2); return t1; @@ -139,7 +139,7 @@ _TyTime_Add(PyTime_t t1, PyTime_t t2) static inline int -pytime_mul_check_overflow(PyTime_t a, PyTime_t b) +pytime_mul_check_overflow(TyTime_t a, TyTime_t b) { if (b != 0) { assert(b > 0); @@ -153,7 +153,7 @@ pytime_mul_check_overflow(PyTime_t a, PyTime_t b) // Compute t * k. Clamp to [PyTime_MIN; PyTime_MAX] on overflow. static inline int -pytime_mul(PyTime_t *t, PyTime_t k) +pytime_mul(TyTime_t *t, TyTime_t k) { assert(k >= 0); if (pytime_mul_check_overflow(*t, k)) { @@ -168,19 +168,19 @@ pytime_mul(PyTime_t *t, PyTime_t k) // Compute t * k. Clamp to [PyTime_MIN; PyTime_MAX] on overflow. -static inline PyTime_t -_TyTime_Mul(PyTime_t t, PyTime_t k) +static inline TyTime_t +_TyTime_Mul(TyTime_t t, TyTime_t k) { (void)pytime_mul(&t, k); return t; } -PyTime_t -_PyTimeFraction_Mul(PyTime_t ticks, const _PyTimeFraction *frac) +TyTime_t +_PyTimeFraction_Mul(TyTime_t ticks, const _PyTimeFraction *frac) { - const PyTime_t mul = frac->numer; - const PyTime_t div = frac->denom; + const TyTime_t mul = frac->numer; + const TyTime_t div = frac->denom; if (div == 1) { // Fast-path taken by mach_absolute_time() with 1/1 time base. @@ -192,7 +192,7 @@ _PyTimeFraction_Mul(PyTime_t ticks, const _PyTimeFraction *frac) (ticks * mul) / div == (ticks / div) * mul + (ticks % div) * mul / div */ - PyTime_t intpart, remaining; + TyTime_t intpart, remaining; intpart = ticks / div; ticks %= div; remaining = _TyTime_Mul(ticks, mul) / div; @@ -234,17 +234,17 @@ _TyLong_FromTime_t(time_t t) } -// Convert PyTime_t to time_t. +// Convert TyTime_t to time_t. // Return 0 on success. Return -1 and clamp the value on overflow. static int -_TyTime_AsTime_t(PyTime_t t, time_t *t2) +_TyTime_AsTime_t(TyTime_t t, time_t *t2) { #if SIZEOF_TIME_T < _SIZEOF_PYTIME_T - if ((PyTime_t)PY_TIME_T_MAX < t) { + if ((TyTime_t)PY_TIME_T_MAX < t) { *t2 = PY_TIME_T_MAX; return -1; } - if (t < (PyTime_t)PY_TIME_T_MIN) { + if (t < (TyTime_t)PY_TIME_T_MIN) { *t2 = PY_TIME_T_MIN; return -1; } @@ -255,17 +255,17 @@ _TyTime_AsTime_t(PyTime_t t, time_t *t2) #ifdef MS_WINDOWS -// Convert PyTime_t to long. +// Convert TyTime_t to long. // Return 0 on success. Return -1 and clamp the value on overflow. static int -_TyTime_AsCLong(PyTime_t t, long *t2) +_TyTime_AsCLong(TyTime_t t, long *t2) { #if SIZEOF_LONG < _SIZEOF_PYTIME_T - if ((PyTime_t)LONG_MAX < t) { + if ((TyTime_t)LONG_MAX < t) { *t2 = LONG_MAX; return -1; } - if (t < (PyTime_t)LONG_MIN) { + if (t < (TyTime_t)LONG_MIN) { *t2 = LONG_MIN; return -1; } @@ -444,16 +444,16 @@ _TyTime_ObjectToTimeval(TyObject *obj, time_t *sec, long *usec, } -PyTime_t +TyTime_t _TyTime_FromSeconds(int seconds) { /* ensure that integer overflow cannot happen, int type should have 32 - bits, whereas PyTime_t type has at least 64 bits (SEC_TO_NS takes 30 + bits, whereas TyTime_t type has at least 64 bits (SEC_TO_NS takes 30 bits). */ - static_assert(INT_MAX <= PyTime_MAX / SEC_TO_NS, "PyTime_t overflow"); - static_assert(INT_MIN >= PyTime_MIN / SEC_TO_NS, "PyTime_t underflow"); + static_assert(INT_MAX <= PyTime_MAX / SEC_TO_NS, "TyTime_t overflow"); + static_assert(INT_MIN >= PyTime_MIN / SEC_TO_NS, "TyTime_t underflow"); - PyTime_t t = (PyTime_t)seconds; + TyTime_t t = (TyTime_t)seconds; assert((t >= 0 && t <= PyTime_MAX / SEC_TO_NS) || (t < 0 && t >= PyTime_MIN / SEC_TO_NS)); t *= SEC_TO_NS; @@ -461,16 +461,16 @@ _TyTime_FromSeconds(int seconds) } -PyTime_t -_TyTime_FromMicrosecondsClamp(PyTime_t us) +TyTime_t +_TyTime_FromMicrosecondsClamp(TyTime_t us) { - PyTime_t ns = _TyTime_Mul(us, US_TO_NS); + TyTime_t ns = _TyTime_Mul(us, US_TO_NS); return ns; } int -_TyTime_FromLong(PyTime_t *tp, TyObject *obj) +_TyTime_FromLong(TyTime_t *tp, TyObject *obj) { if (!TyLong_Check(obj)) { TyErr_Format(TyExc_TypeError, "expect int, got %s", @@ -478,8 +478,8 @@ _TyTime_FromLong(PyTime_t *tp, TyObject *obj) return -1; } - static_assert(sizeof(long long) == sizeof(PyTime_t), - "PyTime_t is not long long"); + static_assert(sizeof(long long) == sizeof(TyTime_t), + "TyTime_t is not long long"); long long nsec = TyLong_AsLongLong(obj); if (nsec == -1 && TyErr_Occurred()) { if (TyErr_ExceptionMatches(TyExc_OverflowError)) { @@ -488,7 +488,7 @@ _TyTime_FromLong(PyTime_t *tp, TyObject *obj) return -1; } - PyTime_t t = (PyTime_t)nsec; + TyTime_t t = (TyTime_t)nsec; *tp = t; return 0; } @@ -496,13 +496,13 @@ _TyTime_FromLong(PyTime_t *tp, TyObject *obj) #ifdef HAVE_CLOCK_GETTIME static int -pytime_fromtimespec(PyTime_t *tp, const struct timespec *ts, int raise_exc) +pytime_fromtimespec(TyTime_t *tp, const struct timespec *ts, int raise_exc) { - PyTime_t t, tv_nsec; + TyTime_t t, tv_nsec; - static_assert(sizeof(ts->tv_sec) <= sizeof(PyTime_t), - "timespec.tv_sec is larger than PyTime_t"); - t = (PyTime_t)ts->tv_sec; + static_assert(sizeof(ts->tv_sec) <= sizeof(TyTime_t), + "timespec.tv_sec is larger than TyTime_t"); + t = (TyTime_t)ts->tv_sec; int res1 = pytime_mul(&t, SEC_TO_NS); @@ -519,7 +519,7 @@ pytime_fromtimespec(PyTime_t *tp, const struct timespec *ts, int raise_exc) } int -_TyTime_FromTimespec(PyTime_t *tp, const struct timespec *ts) +_TyTime_FromTimespec(TyTime_t *tp, const struct timespec *ts) { return pytime_fromtimespec(tp, ts, 1); } @@ -528,15 +528,15 @@ _TyTime_FromTimespec(PyTime_t *tp, const struct timespec *ts) #ifndef MS_WINDOWS static int -pytime_fromtimeval(PyTime_t *tp, struct timeval *tv, int raise_exc) +pytime_fromtimeval(TyTime_t *tp, struct timeval *tv, int raise_exc) { - static_assert(sizeof(tv->tv_sec) <= sizeof(PyTime_t), - "timeval.tv_sec is larger than PyTime_t"); - PyTime_t t = (PyTime_t)tv->tv_sec; + static_assert(sizeof(tv->tv_sec) <= sizeof(TyTime_t), + "timeval.tv_sec is larger than TyTime_t"); + TyTime_t t = (TyTime_t)tv->tv_sec; int res1 = pytime_mul(&t, SEC_TO_NS); - PyTime_t usec = (PyTime_t)tv->tv_usec * US_TO_NS; + TyTime_t usec = (TyTime_t)tv->tv_usec * US_TO_NS; int res2 = pytime_add(&t, usec); *tp = t; @@ -550,7 +550,7 @@ pytime_fromtimeval(PyTime_t *tp, struct timeval *tv, int raise_exc) int -_TyTime_FromTimeval(PyTime_t *tp, struct timeval *tv) +_TyTime_FromTimeval(TyTime_t *tp, struct timeval *tv) { return pytime_fromtimeval(tp, tv, 1); } @@ -558,7 +558,7 @@ _TyTime_FromTimeval(PyTime_t *tp, struct timeval *tv) static int -pytime_from_double(PyTime_t *tp, double value, _TyTime_round_t round, +pytime_from_double(TyTime_t *tp, double value, _TyTime_round_t round, long unit_to_ns) { /* volatile avoids optimization changing how numbers are rounded */ @@ -575,7 +575,7 @@ pytime_from_double(PyTime_t *tp, double value, _TyTime_round_t round, *tp = 0; return -1; } - PyTime_t ns = (PyTime_t)d; + TyTime_t ns = (TyTime_t)d; *tp = ns; return 0; @@ -583,7 +583,7 @@ pytime_from_double(PyTime_t *tp, double value, _TyTime_round_t round, static int -pytime_from_object(PyTime_t *tp, TyObject *obj, _TyTime_round_t round, +pytime_from_object(TyTime_t *tp, TyObject *obj, _TyTime_round_t round, long unit_to_ns) { if (TyFloat_Check(obj)) { @@ -609,9 +609,9 @@ pytime_from_object(PyTime_t *tp, TyObject *obj, _TyTime_round_t round, return -1; } - static_assert(sizeof(long long) <= sizeof(PyTime_t), - "PyTime_t is smaller than long long"); - PyTime_t ns = (PyTime_t)sec; + static_assert(sizeof(long long) <= sizeof(TyTime_t), + "TyTime_t is smaller than long long"); + TyTime_t ns = (TyTime_t)sec; if (pytime_mul(&ns, unit_to_ns) < 0) { pytime_overflow(); return -1; @@ -623,21 +623,21 @@ pytime_from_object(PyTime_t *tp, TyObject *obj, _TyTime_round_t round, int -_TyTime_FromSecondsObject(PyTime_t *tp, TyObject *obj, _TyTime_round_t round) +_TyTime_FromSecondsObject(TyTime_t *tp, TyObject *obj, _TyTime_round_t round) { return pytime_from_object(tp, obj, round, SEC_TO_NS); } int -_TyTime_FromMillisecondsObject(PyTime_t *tp, TyObject *obj, _TyTime_round_t round) +_TyTime_FromMillisecondsObject(TyTime_t *tp, TyObject *obj, _TyTime_round_t round) { return pytime_from_object(tp, obj, round, MS_TO_NS); } double -PyTime_AsSecondsDouble(PyTime_t ns) +PyTime_AsSecondsDouble(TyTime_t ns) { /* volatile avoids optimization changing how numbers are rounded */ volatile double d; @@ -645,7 +645,7 @@ PyTime_AsSecondsDouble(PyTime_t ns) if (ns % SEC_TO_NS == 0) { /* Divide using integers to avoid rounding issues on the integer part. 1e-9 cannot be stored exactly in IEEE 64-bit. */ - PyTime_t secs = ns / SEC_TO_NS; + TyTime_t secs = ns / SEC_TO_NS; d = (double)secs; } else { @@ -657,28 +657,28 @@ PyTime_AsSecondsDouble(PyTime_t ns) TyObject * -_TyTime_AsLong(PyTime_t ns) +_TyTime_AsLong(TyTime_t ns) { - static_assert(sizeof(long long) >= sizeof(PyTime_t), - "PyTime_t is larger than long long"); + static_assert(sizeof(long long) >= sizeof(TyTime_t), + "TyTime_t is larger than long long"); return TyLong_FromLongLong((long long)ns); } int -_TyTime_FromSecondsDouble(double seconds, _TyTime_round_t round, PyTime_t *result) +_TyTime_FromSecondsDouble(double seconds, _TyTime_round_t round, TyTime_t *result) { return pytime_from_double(result, seconds, round, SEC_TO_NS); } -static PyTime_t -pytime_divide_round_up(const PyTime_t t, const PyTime_t k) +static TyTime_t +pytime_divide_round_up(const TyTime_t t, const TyTime_t k) { assert(k > 1); if (t >= 0) { // Don't use (t + k - 1) / k to avoid integer overflow // if t is equal to PyTime_MAX - PyTime_t q = t / k; + TyTime_t q = t / k; if (t % k) { q += 1; } @@ -687,7 +687,7 @@ pytime_divide_round_up(const PyTime_t t, const PyTime_t k) else { // Don't use (t - (k - 1)) / k to avoid integer overflow // if t is equals to PyTime_MIN. - PyTime_t q = t / k; + TyTime_t q = t / k; if (t % k) { q -= 1; } @@ -696,15 +696,15 @@ pytime_divide_round_up(const PyTime_t t, const PyTime_t k) } -static PyTime_t -pytime_divide(const PyTime_t t, const PyTime_t k, +static TyTime_t +pytime_divide(const TyTime_t t, const TyTime_t k, const _TyTime_round_t round) { assert(k > 1); if (round == _TyTime_ROUND_HALF_EVEN) { - PyTime_t x = t / k; - PyTime_t r = t % k; - PyTime_t abs_r = Ty_ABS(r); + TyTime_t x = t / k; + TyTime_t r = t % k; + TyTime_t abs_r = Ty_ABS(r); if (abs_r > k / 2 || (abs_r == k / 2 && (Ty_ABS(x) & 1))) { if (t >= 0) { x++; @@ -743,12 +743,12 @@ pytime_divide(const PyTime_t t, const PyTime_t k, // Return 0 on success. // Return -1 on underflow and store (PyTime_MIN, 0) in (pq, pr). static int -pytime_divmod(const PyTime_t t, const PyTime_t k, - PyTime_t *pq, PyTime_t *pr) +pytime_divmod(const TyTime_t t, const TyTime_t k, + TyTime_t *pq, TyTime_t *pr) { assert(k > 1); - PyTime_t q = t / k; - PyTime_t r = t % k; + TyTime_t q = t / k; + TyTime_t r = t % k; if (r < 0) { if (q == PyTime_MIN) { *pq = PyTime_MIN; @@ -767,35 +767,35 @@ pytime_divmod(const PyTime_t t, const PyTime_t k, #ifdef MS_WINDOWS -PyTime_t -_TyTime_As100Nanoseconds(PyTime_t ns, _TyTime_round_t round) +TyTime_t +_TyTime_As100Nanoseconds(TyTime_t ns, _TyTime_round_t round) { return pytime_divide(ns, NS_TO_100NS, round); } #endif -PyTime_t -_TyTime_AsMicroseconds(PyTime_t ns, _TyTime_round_t round) +TyTime_t +_TyTime_AsMicroseconds(TyTime_t ns, _TyTime_round_t round) { return pytime_divide(ns, NS_TO_US, round); } -PyTime_t -_TyTime_AsMilliseconds(PyTime_t ns, _TyTime_round_t round) +TyTime_t +_TyTime_AsMilliseconds(TyTime_t ns, _TyTime_round_t round) { return pytime_divide(ns, NS_TO_MS, round); } static int -pytime_as_timeval(PyTime_t ns, PyTime_t *ptv_sec, int *ptv_usec, +pytime_as_timeval(TyTime_t ns, TyTime_t *ptv_sec, int *ptv_usec, _TyTime_round_t round) { - PyTime_t us = pytime_divide(ns, US_TO_NS, round); + TyTime_t us = pytime_divide(ns, US_TO_NS, round); - PyTime_t tv_sec, tv_usec; + TyTime_t tv_sec, tv_usec; int res = pytime_divmod(us, SEC_TO_US, &tv_sec, &tv_usec); *ptv_sec = tv_sec; *ptv_usec = (int)tv_usec; @@ -804,10 +804,10 @@ pytime_as_timeval(PyTime_t ns, PyTime_t *ptv_sec, int *ptv_usec, static int -pytime_as_timeval_struct(PyTime_t t, struct timeval *tv, +pytime_as_timeval_struct(TyTime_t t, struct timeval *tv, _TyTime_round_t round, int raise_exc) { - PyTime_t tv_sec; + TyTime_t tv_sec; int tv_usec; int res = pytime_as_timeval(t, &tv_sec, &tv_usec, round); int res2; @@ -831,24 +831,24 @@ pytime_as_timeval_struct(PyTime_t t, struct timeval *tv, int -_TyTime_AsTimeval(PyTime_t t, struct timeval *tv, _TyTime_round_t round) +_TyTime_AsTimeval(TyTime_t t, struct timeval *tv, _TyTime_round_t round) { return pytime_as_timeval_struct(t, tv, round, 1); } void -_TyTime_AsTimeval_clamp(PyTime_t t, struct timeval *tv, _TyTime_round_t round) +_TyTime_AsTimeval_clamp(TyTime_t t, struct timeval *tv, _TyTime_round_t round) { (void)pytime_as_timeval_struct(t, tv, round, 0); } int -_TyTime_AsTimevalTime_t(PyTime_t t, time_t *p_secs, int *us, +_TyTime_AsTimevalTime_t(TyTime_t t, time_t *p_secs, int *us, _TyTime_round_t round) { - PyTime_t secs; + TyTime_t secs; if (pytime_as_timeval(t, &secs, us, round) < 0) { pytime_time_t_overflow(); return -1; @@ -864,9 +864,9 @@ _TyTime_AsTimevalTime_t(PyTime_t t, time_t *p_secs, int *us, #if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_KQUEUE) static int -pytime_as_timespec(PyTime_t ns, struct timespec *ts, int raise_exc) +pytime_as_timespec(TyTime_t ns, struct timespec *ts, int raise_exc) { - PyTime_t tv_sec, tv_nsec; + TyTime_t tv_sec, tv_nsec; int res = pytime_divmod(ns, SEC_TO_NS, &tv_sec, &tv_nsec); int res2 = _TyTime_AsTime_t(tv_sec, &ts->tv_sec); @@ -883,13 +883,13 @@ pytime_as_timespec(PyTime_t ns, struct timespec *ts, int raise_exc) } void -_TyTime_AsTimespec_clamp(PyTime_t t, struct timespec *ts) +_TyTime_AsTimespec_clamp(TyTime_t t, struct timespec *ts) { (void)pytime_as_timespec(t, ts, 0); } int -_TyTime_AsTimespec(PyTime_t t, struct timespec *ts) +_TyTime_AsTimespec(TyTime_t t, struct timespec *ts) { return pytime_as_timespec(t, ts, 1); } @@ -898,7 +898,7 @@ _TyTime_AsTimespec(PyTime_t t, struct timespec *ts) // N.B. If raise_exc=0, this may be called without a thread state. static int -py_get_system_clock(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) +py_get_system_clock(TyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) { assert(info == NULL || raise_exc); if (raise_exc) { @@ -916,7 +916,7 @@ py_get_system_clock(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) /* 11,644,473,600,000,000,000: number of nanoseconds between the 1st january 1601 and the 1st january 1970 (369 years + 89 leap days). */ - PyTime_t ns = (large.QuadPart - 116444736000000000) * 100; + TyTime_t ns = (large.QuadPart - 116444736000000000) * 100; *tp = ns; if (info) { // GetSystemTimePreciseAsFileTime() is implemented using @@ -1006,7 +1006,7 @@ py_get_system_clock(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) int -PyTime_Time(PyTime_t *result) +PyTime_Time(TyTime_t *result) { if (py_get_system_clock(result, NULL, 1) < 0) { *result = 0; @@ -1017,7 +1017,7 @@ PyTime_Time(PyTime_t *result) int -PyTime_TimeRaw(PyTime_t *result) +PyTime_TimeRaw(TyTime_t *result) { if (py_get_system_clock(result, NULL, 0) < 0) { *result = 0; @@ -1028,7 +1028,7 @@ PyTime_TimeRaw(PyTime_t *result) int -_TyTime_TimeWithInfo(PyTime_t *t, _Ty_clock_info_t *info) +_TyTime_TimeWithInfo(TyTime_t *t, _Ty_clock_info_t *info) { return py_get_system_clock(t, info, 1); } @@ -1046,8 +1046,8 @@ py_win_perf_counter_frequency(_PyTimeFraction *base) // Since Windows XP, frequency cannot be zero. assert(frequency >= 1); - Ty_BUILD_ASSERT(sizeof(PyTime_t) == sizeof(frequency)); - PyTime_t denom = (PyTime_t)frequency; + Ty_BUILD_ASSERT(sizeof(TyTime_t) == sizeof(frequency)); + TyTime_t denom = (TyTime_t)frequency; // Known QueryPerformanceFrequency() values: // @@ -1062,7 +1062,7 @@ py_win_perf_counter_frequency(_PyTimeFraction *base) // N.B. If raise_exc=0, this may be called without the GIL. static int -py_get_win_perf_counter(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) +py_get_win_perf_counter(TyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) { assert(info == NULL || raise_exc); @@ -1077,12 +1077,12 @@ py_get_win_perf_counter(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) QueryPerformanceCounter(&now); LONGLONG ticksll = now.QuadPart; - /* Make sure that casting LONGLONG to PyTime_t cannot overflow, + /* Make sure that casting LONGLONG to TyTime_t cannot overflow, both types are signed */ - PyTime_t ticks; + TyTime_t ticks; static_assert(sizeof(ticksll) <= sizeof(ticks), - "LONGLONG is larger than PyTime_t"); - ticks = (PyTime_t)ticksll; + "LONGLONG is larger than TyTime_t"); + ticks = (TyTime_t)ticksll; *tp = _PyTimeFraction_Mul(ticks, &_PyRuntime.time.base); return 0; @@ -1100,13 +1100,13 @@ py_mach_timebase_info(_PyTimeFraction *base) (void)mach_timebase_info(&timebase); // Check that timebase.numer and timebase.denom can be casted to - // PyTime_t. In practice, timebase uses uint32_t, so casting cannot + // TyTime_t. In practice, timebase uses uint32_t, so casting cannot // overflow. At the end, only make sure that the type is uint32_t - // (PyTime_t is 64-bit long). - Ty_BUILD_ASSERT(sizeof(timebase.numer) <= sizeof(PyTime_t)); - Ty_BUILD_ASSERT(sizeof(timebase.denom) <= sizeof(PyTime_t)); - PyTime_t numer = (PyTime_t)timebase.numer; - PyTime_t denom = (PyTime_t)timebase.denom; + // (TyTime_t is 64-bit long). + Ty_BUILD_ASSERT(sizeof(timebase.numer) <= sizeof(TyTime_t)); + Ty_BUILD_ASSERT(sizeof(timebase.denom) <= sizeof(TyTime_t)); + TyTime_t numer = (TyTime_t)timebase.numer; + TyTime_t denom = (TyTime_t)timebase.denom; // Known time bases: // @@ -1134,7 +1134,7 @@ _TyTime_Init(struct _Ty_time_runtime_state *state) // N.B. If raise_exc=0, this may be called without a thread state. static int -py_get_monotonic_clock(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) +py_get_monotonic_clock(TyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) { assert(info == NULL || raise_exc); if (raise_exc) { @@ -1157,9 +1157,9 @@ py_get_monotonic_clock(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) uint64_t uticks = mach_absolute_time(); // unsigned => signed assert(uticks <= (uint64_t)PyTime_MAX); - PyTime_t ticks = (PyTime_t)uticks; + TyTime_t ticks = (TyTime_t)uticks; - PyTime_t ns = _PyTimeFraction_Mul(ticks, &_PyRuntime.time.base); + TyTime_t ns = _PyTimeFraction_Mul(ticks, &_PyRuntime.time.base); *tp = ns; #elif defined(__hpux) @@ -1220,7 +1220,7 @@ py_get_monotonic_clock(PyTime_t *tp, _Ty_clock_info_t *info, int raise_exc) int -PyTime_Monotonic(PyTime_t *result) +PyTime_Monotonic(TyTime_t *result) { if (py_get_monotonic_clock(result, NULL, 1) < 0) { *result = 0; @@ -1231,7 +1231,7 @@ PyTime_Monotonic(PyTime_t *result) int -PyTime_MonotonicRaw(PyTime_t *result) +PyTime_MonotonicRaw(TyTime_t *result) { if (py_get_monotonic_clock(result, NULL, 0) < 0) { *result = 0; @@ -1242,28 +1242,28 @@ PyTime_MonotonicRaw(PyTime_t *result) int -_TyTime_MonotonicWithInfo(PyTime_t *tp, _Ty_clock_info_t *info) +_TyTime_MonotonicWithInfo(TyTime_t *tp, _Ty_clock_info_t *info) { return py_get_monotonic_clock(tp, info, 1); } int -_TyTime_PerfCounterWithInfo(PyTime_t *t, _Ty_clock_info_t *info) +_TyTime_PerfCounterWithInfo(TyTime_t *t, _Ty_clock_info_t *info) { return _TyTime_MonotonicWithInfo(t, info); } int -PyTime_PerfCounter(PyTime_t *result) +PyTime_PerfCounter(TyTime_t *result) { return PyTime_Monotonic(result); } int -PyTime_PerfCounterRaw(PyTime_t *result) +PyTime_PerfCounterRaw(TyTime_t *result) { return PyTime_MonotonicRaw(result); } @@ -1336,20 +1336,20 @@ _TyTime_gmtime(time_t t, struct tm *tm) } -PyTime_t -_PyDeadline_Init(PyTime_t timeout) +TyTime_t +_PyDeadline_Init(TyTime_t timeout) { - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_MonotonicRaw(&now); return _TyTime_Add(now, timeout); } -PyTime_t -_PyDeadline_Get(PyTime_t deadline) +TyTime_t +_PyDeadline_Get(TyTime_t deadline) { - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_MonotonicRaw(&now); return deadline - now; diff --git a/Python/qsbr.c b/Python/qsbr.c index 772834e..29d6983 100644 --- a/Python/qsbr.c +++ b/Python/qsbr.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "Python.h" -#include "pycore_interp.h" // PyInterpreterState +#include "pycore_interp.h" // TyInterpreterState #include "pycore_pystate.h" // _TyThreadState_GET() #include "pycore_qsbr.h" #include "pycore_tstate.h" // _PyThreadStateImpl @@ -181,7 +181,7 @@ _Ty_qsbr_detach(struct _qsbr_thread_state *qsbr) } Ty_ssize_t -_Ty_qsbr_reserve(PyInterpreterState *interp) +_Ty_qsbr_reserve(TyInterpreterState *interp) { struct _qsbr_shared *shared = &interp->qsbr; @@ -210,7 +210,7 @@ _Ty_qsbr_reserve(PyInterpreterState *interp) } void -_Ty_qsbr_register(_PyThreadStateImpl *tstate, PyInterpreterState *interp, +_Ty_qsbr_register(_PyThreadStateImpl *tstate, TyInterpreterState *interp, Ty_ssize_t index) { // Associate the QSBR state with the thread state @@ -253,7 +253,7 @@ _Ty_qsbr_unregister(TyThreadState *tstate) } void -_Ty_qsbr_fini(PyInterpreterState *interp) +_Ty_qsbr_fini(TyInterpreterState *interp) { struct _qsbr_shared *shared = &interp->qsbr; TyMem_RawFree(shared->array); diff --git a/Python/specialize.c b/Python/specialize.c index a04cb97..bd4386f 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -6,14 +6,14 @@ #include "pycore_critical_section.h" #include "pycore_descrobject.h" // _PyMethodWrapper_Type #include "pycore_dict.h" // DICT_KEYS_UNICODE -#include "pycore_function.h" // _PyFunction_GetVersionForCurrentState() +#include "pycore_function.h" // _TyFunction_GetVersionForCurrentState() #include "pycore_interpframe.h" // FRAME_SPECIALS_SIZE -#include "pycore_list.h" // _PyListIterObject +#include "pycore_list.h" // _TyListIterObject #include "pycore_long.h" // _TyLong_IsNonNegativeCompact() #include "pycore_moduleobject.h" #include "pycore_object.h" -#include "pycore_opcode_metadata.h" // _PyOpcode_Caches -#include "pycore_uop_metadata.h" // _PyOpcode_uop_name +#include "pycore_opcode_metadata.h" // _TyOpcode_Caches +#include "pycore_uop_metadata.h" // _TyOpcode_uop_name #include "pycore_uop_ids.h" // MAX_UOP_ID #include "pycore_opcode_utils.h" // RESUME_AT_FUNC_START #include "pycore_pylifecycle.h" // _TyOS_URandomNonblock() @@ -22,7 +22,7 @@ #include // rand() -extern const char *_PyUOpName(int index); +extern const char *_TyUOpName(int index); /* For guidance on adding or extending families of instructions see * InternalDocs/interpreter.md `Specialization` section. @@ -137,7 +137,7 @@ _Py_GetSpecializationStats(void) { #define PRINT_STAT(i, field) \ if (stats[i].field) { \ - fprintf(out, " opcode[%s]." #field " : %" PRIu64 "\n", _PyOpcode_OpName[i], stats[i].field); \ + fprintf(out, " opcode[%s]." #field " : %" PRIu64 "\n", _TyOpcode_OpName[i], stats[i].field); \ } static void @@ -149,7 +149,7 @@ print_spec_stats(FILE *out, OpcodeStats *stats) fprintf(out, "opcode[STORE_SLICE].specializable : 1\n"); fprintf(out, "opcode[GET_ITER].specializable : 1\n"); for (int i = 0; i < 256; i++) { - if (_PyOpcode_Caches[i]) { + if (_TyOpcode_Caches[i]) { /* Ignore jumps as they cannot be specialized */ switch (i) { case POP_JUMP_IF_FALSE: @@ -159,7 +159,7 @@ print_spec_stats(FILE *out, OpcodeStats *stats) case JUMP_BACKWARD: break; default: - fprintf(out, "opcode[%s].specializable : 1\n", _PyOpcode_OpName[i]); + fprintf(out, "opcode[%s].specializable : 1\n", _TyOpcode_OpName[i]); } } PRINT_STAT(i, specialization.success); @@ -173,13 +173,13 @@ print_spec_stats(FILE *out, OpcodeStats *stats) uint64_t val = stats[i].specialization.failure_kinds[j]; if (val) { fprintf(out, " opcode[%s].specialization.failure_kinds[%d] : %" - PRIu64 "\n", _PyOpcode_OpName[i], j, val); + PRIu64 "\n", _TyOpcode_OpName[i], j, val); } } for (int j = 0; j < 256; j++) { if (stats[i].pair_count[j]) { fprintf(out, "opcode[%s].pair_count[%s] : %" PRIu64 "\n", - _PyOpcode_OpName[i], _PyOpcode_OpName[j], stats[i].pair_count[j]); + _TyOpcode_OpName[i], _TyOpcode_OpName[j], stats[i].pair_count[j]); } } } @@ -279,10 +279,10 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) fprintf(out, "Optimizer remove globals incorrect keys: %" PRIu64 "\n", stats->remove_globals_incorrect_keys); for (int i = 0; i <= MAX_UOP_ID; i++) { if (stats->opcode[i].execution_count) { - fprintf(out, "uops[%s].execution_count : %" PRIu64 "\n", _PyUOpName(i), stats->opcode[i].execution_count); + fprintf(out, "uops[%s].execution_count : %" PRIu64 "\n", _TyUOpName(i), stats->opcode[i].execution_count); } if (stats->opcode[i].miss) { - fprintf(out, "uops[%s].specialization.miss : %" PRIu64 "\n", _PyUOpName(i), stats->opcode[i].miss); + fprintf(out, "uops[%s].specialization.miss : %" PRIu64 "\n", _TyUOpName(i), stats->opcode[i].miss); } } for (int i = 0; i < 256; i++) { @@ -290,7 +290,7 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) fprintf( out, "unsupported_opcode[%s].count : %" PRIu64 "\n", - _PyOpcode_OpName[i], + _TyOpcode_OpName[i], stats->unsupported_opcode[i] ); } @@ -300,7 +300,7 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) for (int j = 1; j <= MAX_UOP_ID; j++) { if (stats->opcode[i].pair_count[j]) { fprintf(out, "uop[%s].pair_count[%s] : %" PRIu64 "\n", - _PyOpcode_uop_name[i], _PyOpcode_uop_name[j], stats->opcode[i].pair_count[j]); + _TyOpcode_uop_name[i], _TyOpcode_uop_name[j], stats->opcode[i].pair_count[j]); } } } @@ -309,7 +309,7 @@ print_optimization_stats(FILE *out, OptimizationStats *stats) fprintf( out, "error_in_opcode[%s].count : %" PRIu64 "\n", - _PyUOpName(i), + _TyUOpName(i), stats->error_in_opcode[i] ); } @@ -473,7 +473,7 @@ _TyCode_Quicken(_Ty_CODEUNIT *instructions, Ty_ssize_t size, int enable_counters /* The last code unit cannot have a cache, so we don't need to check it */ for (Ty_ssize_t i = 0; i < size-1; i++) { opcode = instructions[i].op.code; - int caches = _PyOpcode_Caches[opcode]; + int caches = _TyOpcode_Caches[opcode]; oparg = (oparg << 8) | instructions[i].op.arg; if (caches) { // The initial value depends on the opcode @@ -739,12 +739,12 @@ specialize(_Ty_CODEUNIT *instr, uint8_t specialized_opcode) { assert(!TyErr_Occurred()); if (!set_opcode(instr, specialized_opcode)) { - STAT_INC(_PyOpcode_Deopt[specialized_opcode], failure); - SPECIALIZATION_FAIL(_PyOpcode_Deopt[specialized_opcode], + STAT_INC(_TyOpcode_Deopt[specialized_opcode], failure); + SPECIALIZATION_FAIL(_TyOpcode_Deopt[specialized_opcode], SPEC_FAIL_OTHER); return; } - STAT_INC(_PyOpcode_Deopt[specialized_opcode], success); + STAT_INC(_TyOpcode_Deopt[specialized_opcode], success); set_counter((_Ty_BackoffCounter *)instr + 1, adaptive_counter_cooldown()); } @@ -753,7 +753,7 @@ unspecialize(_Ty_CODEUNIT *instr) { assert(!TyErr_Occurred()); uint8_t opcode = FT_ATOMIC_LOAD_UINT8_RELAXED(instr->op.code); - uint8_t generic_opcode = _PyOpcode_Deopt[opcode]; + uint8_t generic_opcode = _TyOpcode_Deopt[opcode]; STAT_INC(generic_opcode, failure); if (!set_opcode(instr, generic_opcode)) { SPECIALIZATION_FAIL(generic_opcode, SPEC_FAIL_OTHER); @@ -829,7 +829,7 @@ _Py_Specialize_LoadSuperAttr(_PyStackRef global_super_st, _PyStackRef cls_st, _T TyObject *cls = PyStackRef_AsPyObjectBorrow(cls_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[LOAD_SUPER_ATTR] == INLINE_CACHE_ENTRIES_LOAD_SUPER_ATTR); + assert(_TyOpcode_Caches[LOAD_SUPER_ATTR] == INLINE_CACHE_ENTRIES_LOAD_SUPER_ATTR); if (global_super != (TyObject *)&TySuper_Type) { SPECIALIZATION_FAIL(LOAD_SUPER_ATTR, SPEC_FAIL_SUPER_SHADOWED); goto fail; @@ -877,7 +877,7 @@ classify_descriptor(TyObject *descriptor, bool has_getattr) if (desc_cls == &PyMemberDescr_Type) { PyMemberDescrObject *member = (PyMemberDescrObject *)descriptor; struct TyMemberDef *dmem = member->d_member; - if (dmem->type == Ty_T_OBJECT_EX || dmem->type == _Py_T_OBJECT) { + if (dmem->type == Ty_T_OBJECT_EX || dmem->type == _Ty_T_OBJECT) { return OBJECT_SLOT; } return OTHER_SLOT; @@ -929,7 +929,7 @@ analyze_descriptor_load(TyTypeObject *type, TyObject *name, TyObject **descr, un TyObject *getattribute = _TyType_LookupRefAndVersion(type, &_Ty_ID(__getattribute__), &ga_version); have_ga_version = true; - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); bool has_custom_getattribute = getattribute != NULL && getattribute != interp->callable_cache.object__getattribute__; TyObject *getattr = _TyType_Lookup(type, &_Ty_ID(__getattr__)); @@ -1232,7 +1232,7 @@ do_specialize_instance_load_attr(TyObject* owner, _Ty_CODEUNIT* instr, TyObject* SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_OUT_OF_RANGE); return -1; } - assert(dmem->type == Ty_T_OBJECT_EX || dmem->type == _Py_T_OBJECT); + assert(dmem->type == Ty_T_OBJECT_EX || dmem->type == _Ty_T_OBJECT); assert(offset > 0); cache->index = (uint16_t)offset; write_u32(cache->version, tp_version); @@ -1353,7 +1353,7 @@ _Py_Specialize_LoadAttr(_PyStackRef owner_st, _Ty_CODEUNIT *instr, TyObject *nam TyObject *owner = PyStackRef_AsPyObjectBorrow(owner_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[LOAD_ATTR] == INLINE_CACHE_ENTRIES_LOAD_ATTR); + assert(_TyOpcode_Caches[LOAD_ATTR] == INLINE_CACHE_ENTRIES_LOAD_ATTR); TyTypeObject *type = Ty_TYPE(owner); bool fail; if (!_TyType_IsReady(type)) { @@ -1384,7 +1384,7 @@ _Py_Specialize_StoreAttr(_PyStackRef owner_st, _Ty_CODEUNIT *instr, TyObject *na TyObject *owner = PyStackRef_AsPyObjectBorrow(owner_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[STORE_ATTR] == INLINE_CACHE_ENTRIES_STORE_ATTR); + assert(_TyOpcode_Caches[STORE_ATTR] == INLINE_CACHE_ENTRIES_STORE_ATTR); TyObject *descr = NULL; _PyAttrCache *cache = (_PyAttrCache *)(instr + 1); TyTypeObject *type = Ty_TYPE(owner); @@ -1432,7 +1432,7 @@ _Py_Specialize_StoreAttr(_PyStackRef owner_st, _Ty_CODEUNIT *instr, TyObject *na SPECIALIZATION_FAIL(STORE_ATTR, SPEC_FAIL_OUT_OF_RANGE); goto fail; } - assert(dmem->type == Ty_T_OBJECT_EX || dmem->type == _Py_T_OBJECT); + assert(dmem->type == Ty_T_OBJECT_EX || dmem->type == _Ty_T_OBJECT); assert(offset > 0); cache->index = (uint16_t)offset; write_u32(cache->version, tp_version); @@ -1691,7 +1691,7 @@ specialize_load_global_lock_held( _Ty_CODEUNIT *instr, TyObject *name) { assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[LOAD_GLOBAL] == INLINE_CACHE_ENTRIES_LOAD_GLOBAL); + assert(_TyOpcode_Caches[LOAD_GLOBAL] == INLINE_CACHE_ENTRIES_LOAD_GLOBAL); /* Use inline cache */ _PyLoadGlobalCache *cache = (_PyLoadGlobalCache *)(instr + 1); assert(TyUnicode_CheckExact(name)); @@ -1709,7 +1709,7 @@ specialize_load_global_lock_held( SPECIALIZATION_FAIL(LOAD_GLOBAL, SPEC_FAIL_EXPECTED_ERROR); goto fail; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (index != DKIX_EMPTY) { if (index != (uint16_t)index) { SPECIALIZATION_FAIL(LOAD_GLOBAL, SPEC_FAIL_OUT_OF_RANGE); @@ -1824,8 +1824,8 @@ function_get_version(TyObject *o, int opcode) { assert(Ty_IS_TYPE(o, &TyFunction_Type)); PyFunctionObject *func = (PyFunctionObject *)o; - uint32_t version = _PyFunction_GetVersionForCurrentState(func); - if (!_PyFunction_IsVersionValid(version)) { + uint32_t version = _TyFunction_GetVersionForCurrentState(func); + if (!_TyFunction_IsVersionValid(version)) { SPECIALIZATION_FAIL(opcode, SPEC_FAIL_OUT_OF_VERSIONS); return 0; } @@ -2041,7 +2041,7 @@ specialize_method_descriptor(PyMethodDescrObject *descr, _Ty_CODEUNIT *instr, SPECIALIZATION_FAIL(CALL, SPEC_FAIL_WRONG_NUMBER_ARGUMENTS); return -1; } - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); TyObject *list_append = interp->callable_cache.list_append; _Ty_CODEUNIT next = instr[INLINE_CACHE_ENTRIES_CALL + 1]; bool pop = (next.op.code == POP_TOP); @@ -2086,8 +2086,8 @@ specialize_py_call(PyFunctionObject *func, _Ty_CODEUNIT *instr, int nargs, if (kind == SIMPLE_FUNCTION) { argcount = code->co_argcount; } - int version = _PyFunction_GetVersionForCurrentState(func); - if (!_PyFunction_IsVersionValid(version)) { + int version = _TyFunction_GetVersionForCurrentState(func); + if (!_TyFunction_IsVersionValid(version)) { SPECIALIZATION_FAIL(CALL, SPEC_FAIL_OUT_OF_VERSIONS); return -1; } @@ -2121,8 +2121,8 @@ specialize_py_call_kw(PyFunctionObject *func, _Ty_CODEUNIT *instr, int nargs, SPECIALIZATION_FAIL(CALL, SPEC_FAIL_CODE_NOT_OPTIMIZED); return -1; } - int version = _PyFunction_GetVersionForCurrentState(func); - if (!_PyFunction_IsVersionValid(version)) { + int version = _TyFunction_GetVersionForCurrentState(func); + if (!_TyFunction_IsVersionValid(version)) { SPECIALIZATION_FAIL(CALL, SPEC_FAIL_OUT_OF_VERSIONS); return -1; } @@ -2147,7 +2147,7 @@ specialize_c_call(TyObject *callable, _Ty_CODEUNIT *instr, int nargs) return 1; } /* len(o) */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (callable == interp->callable_cache.len && instr->op.arg == 1) { specialize(instr, CALL_LEN); return 0; @@ -2158,7 +2158,7 @@ specialize_c_call(TyObject *callable, _Ty_CODEUNIT *instr, int nargs) case METH_FASTCALL: { if (nargs == 2) { /* isinstance(o1, o2) */ - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (callable == interp->callable_cache.isinstance) { specialize(instr, CALL_ISINSTANCE); return 0; @@ -2183,7 +2183,7 @@ _Py_Specialize_Call(_PyStackRef callable_st, _Ty_CODEUNIT *instr, int nargs) TyObject *callable = PyStackRef_AsPyObjectBorrow(callable_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[CALL] == INLINE_CACHE_ENTRIES_CALL); + assert(_TyOpcode_Caches[CALL] == INLINE_CACHE_ENTRIES_CALL); assert(_Py_OPCODE(*instr) != INSTRUMENTED_CALL); int fail; if (PyCFunction_CheckExact(callable)) { @@ -2223,7 +2223,7 @@ _Py_Specialize_CallKw(_PyStackRef callable_st, _Ty_CODEUNIT *instr, int nargs) TyObject *callable = PyStackRef_AsPyObjectBorrow(callable_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[CALL_KW] == INLINE_CACHE_ENTRIES_CALL_KW); + assert(_TyOpcode_Caches[CALL_KW] == INLINE_CACHE_ENTRIES_CALL_KW); assert(_Py_OPCODE(*instr) != INSTRUMENTED_CALL_KW); int fail; if (TyFunction_Check(callable)) { @@ -2579,7 +2579,7 @@ _Py_Specialize_BinaryOp(_PyStackRef lhs_st, _PyStackRef rhs_st, _Ty_CODEUNIT *in TyObject *lhs = PyStackRef_AsPyObjectBorrow(lhs_st); TyObject *rhs = PyStackRef_AsPyObjectBorrow(rhs_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[BINARY_OP] == INLINE_CACHE_ENTRIES_BINARY_OP); + assert(_TyOpcode_Caches[BINARY_OP] == INLINE_CACHE_ENTRIES_BINARY_OP); _PyBinaryOpCache *cache = (_PyBinaryOpCache *)(instr + 1); if (instr->op.code == BINARY_OP_EXTEND) { @@ -2743,7 +2743,7 @@ _Py_Specialize_CompareOp(_PyStackRef lhs_st, _PyStackRef rhs_st, _Ty_CODEUNIT *i uint8_t specialized_op; assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[COMPARE_OP] == INLINE_CACHE_ENTRIES_COMPARE_OP); + assert(_TyOpcode_Caches[COMPARE_OP] == INLINE_CACHE_ENTRIES_COMPARE_OP); // All of these specializations compute boolean values, so they're all valid // regardless of the fifth-lowest oparg bit. if (Ty_TYPE(lhs) != Ty_TYPE(rhs)) { @@ -2803,7 +2803,7 @@ _Py_Specialize_UnpackSequence(_PyStackRef seq_st, _Ty_CODEUNIT *instr, int oparg TyObject *seq = PyStackRef_AsPyObjectBorrow(seq_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[UNPACK_SEQUENCE] == + assert(_TyOpcode_Caches[UNPACK_SEQUENCE] == INLINE_CACHE_ENTRIES_UNPACK_SEQUENCE); if (TyTuple_CheckExact(seq)) { if (TyTuple_GET_SIZE(seq) != oparg) { @@ -2908,7 +2908,7 @@ Ty_NO_INLINE void _Py_Specialize_ForIter(_PyStackRef iter, _Ty_CODEUNIT *instr, int oparg) { assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[FOR_ITER] == INLINE_CACHE_ENTRIES_FOR_ITER); + assert(_TyOpcode_Caches[FOR_ITER] == INLINE_CACHE_ENTRIES_FOR_ITER); TyObject *iter_o = PyStackRef_AsPyObjectBorrow(iter); TyTypeObject *tp = Ty_TYPE(iter_o); #ifdef Ty_GIL_DISABLED @@ -2922,7 +2922,7 @@ _Py_Specialize_ForIter(_PyStackRef iter, _Ty_CODEUNIT *instr, int oparg) #endif if (tp == &PyListIter_Type) { #ifdef Ty_GIL_DISABLED - _PyListIterObject *it = (_PyListIterObject *)iter_o; + _TyListIterObject *it = (_TyListIterObject *)iter_o; if (!_Py_IsOwnedByCurrentThread((TyObject *)it->it_seq) && !_TyObject_GC_IS_SHARED(it->it_seq)) { // Maybe this should just set GC_IS_SHARED in a critical @@ -2965,7 +2965,7 @@ _Py_Specialize_Send(_PyStackRef receiver_st, _Ty_CODEUNIT *instr) TyObject *receiver = PyStackRef_AsPyObjectBorrow(receiver_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[SEND] == INLINE_CACHE_ENTRIES_SEND); + assert(_TyOpcode_Caches[SEND] == INLINE_CACHE_ENTRIES_SEND); TyTypeObject *tp = Ty_TYPE(receiver); if (tp == &TyGen_Type || tp == &TyCoro_Type) { /* Don't specialize if PEP 523 is active */ @@ -3033,7 +3033,7 @@ Ty_NO_INLINE void _Py_Specialize_ToBool(_PyStackRef value_o, _Ty_CODEUNIT *instr) { assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[TO_BOOL] == INLINE_CACHE_ENTRIES_TO_BOOL); + assert(_TyOpcode_Caches[TO_BOOL] == INLINE_CACHE_ENTRIES_TO_BOOL); _PyToBoolCache *cache = (_PyToBoolCache *)(instr + 1); TyObject *value = PyStackRef_AsPyObjectBorrow(value_o); uint8_t specialized_op; @@ -3109,7 +3109,7 @@ _Py_Specialize_ContainsOp(_PyStackRef value_st, _Ty_CODEUNIT *instr) TyObject *value = PyStackRef_AsPyObjectBorrow(value_st); assert(ENABLE_SPECIALIZATION_FT); - assert(_PyOpcode_Caches[CONTAINS_OP] == INLINE_CACHE_ENTRIES_COMPARE_OP); + assert(_TyOpcode_Caches[CONTAINS_OP] == INLINE_CACHE_ENTRIES_COMPARE_OP); if (TyDict_CheckExact(value)) { specialize(instr, CONTAINS_OP_DICT); return; @@ -3193,7 +3193,7 @@ _Py_GatherStats_GetIter(_PyStackRef iterable) #define NO_LOC_4 (128 | (PY_CODE_LOCATION_INFO_NONE << 3) | 3) static const PyBytesObject no_location = { - PyVarObject_HEAD_INIT(&TyBytes_Type, 1) + TyVarObject_HEAD_INIT(&TyBytes_Type, 1) .ob_sval = { NO_LOC_4 } }; diff --git a/Python/stackrefs.c b/Python/stackrefs.c index 9950b8b..10bb8a6 100644 --- a/Python/stackrefs.c +++ b/Python/stackrefs.c @@ -43,7 +43,7 @@ _Ty_stackref_get_object(_PyStackRef ref) if (ref.index == 0) { return NULL; } - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); assert(interp != NULL); if (ref.index >= interp->next_stackref) { _Ty_FatalErrorFormat(__func__, "Garbled stack ref with ID %" PRIu64 "\n", ref.index); @@ -64,7 +64,7 @@ PyStackRef_Is(_PyStackRef a, _PyStackRef b) TyObject * _Ty_stackref_close(_PyStackRef ref, const char *filename, int linenumber) { - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); if (ref.index >= interp->next_stackref) { _Ty_FatalErrorFormat(__func__, "Invalid StackRef with ID %" PRIu64 " at %s:%d\n", (void *)ref.index, filename, linenumber); @@ -112,7 +112,7 @@ _Ty_stackref_create(TyObject *obj, const char *filename, int linenumber) if (obj == NULL) { Ty_FatalError("Cannot create a stackref for NULL"); } - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); uint64_t new_id = interp->next_stackref; interp->next_stackref = new_id + 2; TableEntry *entry = make_table_entry(obj, filename, linenumber); @@ -131,7 +131,7 @@ _Ty_stackref_record_borrow(_PyStackRef ref, const char *filename, int linenumber if (ref.index < INITIAL_STACKREF_INDEX) { return; } - PyInterpreterState *interp = TyInterpreterState_Get(); + TyInterpreterState *interp = TyInterpreterState_Get(); TableEntry *entry = _Ty_hashtable_get(interp->open_stackrefs_table, (void *)ref.index); if (entry == NULL) { #ifdef Ty_STACKREF_CLOSE_DEBUG @@ -150,7 +150,7 @@ _Ty_stackref_record_borrow(_PyStackRef ref, const char *filename, int linenumber void -_Ty_stackref_associate(PyInterpreterState *interp, TyObject *obj, _PyStackRef ref) +_Ty_stackref_associate(TyInterpreterState *interp, TyObject *obj, _PyStackRef ref) { assert(ref.index < INITIAL_STACKREF_INDEX); TableEntry *entry = make_table_entry(obj, "builtin-object", 0); @@ -180,7 +180,7 @@ report_leak(_Ty_hashtable_t *ht, const void *key, const void *value, void *leak) } void -_Ty_stackref_report_leaks(PyInterpreterState *interp) +_Ty_stackref_report_leaks(TyInterpreterState *interp) { int leak = 0; _Ty_hashtable_foreach(interp->open_stackrefs_table, report_leak, &leak); diff --git a/Python/symtable.c b/Python/symtable.c index a397c21..811e553 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -209,7 +209,7 @@ static TyMemberDef ste_memberlist[] = { }; TyTypeObject PySTEntry_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "symtable entry", sizeof(PySTEntryObject), 0, diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 28f1bf7..e25caf0 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -166,7 +166,7 @@ TySys_GetObject(const char *name) } static int -sys_set_object(PyInterpreterState *interp, TyObject *key, TyObject *v) +sys_set_object(TyInterpreterState *interp, TyObject *key, TyObject *v) { if (key == NULL) { return -1; @@ -190,12 +190,12 @@ sys_set_object(PyInterpreterState *interp, TyObject *key, TyObject *v) int _TySys_SetAttr(TyObject *key, TyObject *v) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return sys_set_object(interp, key, v); } static int -sys_set_object_str(PyInterpreterState *interp, const char *name, TyObject *v) +sys_set_object_str(TyInterpreterState *interp, const char *name, TyObject *v) { TyObject *key = v ? TyUnicode_InternFromString(name) : TyUnicode_FromString(name); @@ -207,12 +207,12 @@ sys_set_object_str(PyInterpreterState *interp, const char *name, TyObject *v) int TySys_SetObject(const char *name, TyObject *v) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return sys_set_object_str(interp, name, v); } int -_TySys_ClearAttrString(PyInterpreterState *interp, +_TySys_ClearAttrString(TyInterpreterState *interp, const char *name, int verbose) { if (verbose) { @@ -227,7 +227,7 @@ _TySys_ClearAttrString(PyInterpreterState *interp, static int -should_audit(PyInterpreterState *interp) +should_audit(TyInterpreterState *interp) { /* interp must not be NULL, but test it just in case for extra safety */ assert(interp != NULL); @@ -257,7 +257,7 @@ sys_audit_tstate(TyThreadState *ts, const char *event, assert(ts == _TyThreadState_GET()); /* Early exit when no hooks are registered */ - PyInterpreterState *is = ts->interp; + TyInterpreterState *is = ts->interp; if (!should_audit(is)) { return 0; } @@ -534,7 +534,7 @@ sys_addaudithook_impl(TyObject *module, TyObject *hook) return NULL; } - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; if (interp->audit_hooks == NULL) { interp->audit_hooks = TyList_New(0); if (interp->audit_hooks == NULL) { @@ -667,7 +667,7 @@ sys_breakpointhook(TyObject *self, TyObject *const *args, Ty_ssize_t nargs, TyOb Py_RETURN_NONE; } -PyDoc_STRVAR(breakpointhook_doc, +TyDoc_STRVAR(breakpointhook_doc, "breakpointhook($module, /, *args, **kwargs)\n" "--\n" "\n" @@ -952,7 +952,7 @@ static TyObject * sys_getfilesystemencoding_impl(TyObject *module) /*[clinic end generated code: output=1dc4bdbe9be44aa7 input=8475f8649b8c7d8c]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); const PyConfig *config = _TyInterpreterState_GetConfig(interp); if (wcscmp(config->filesystem_encoding, L"utf-8") == 0) { @@ -977,7 +977,7 @@ static TyObject * sys_getfilesystemencodeerrors_impl(TyObject *module) /*[clinic end generated code: output=ba77b36bbf7c96f5 input=22a1e8365566f1e5]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); const PyConfig *config = _TyInterpreterState_GetConfig(interp); TyObject *u = TyUnicode_FromWideChar(config->filesystem_errors, -1); if (u == NULL) { @@ -1005,7 +1005,7 @@ sys_intern_impl(TyObject *module, TyObject *s) /*[clinic end generated code: output=be680c24f5c9e5d6 input=849483c006924e2f]*/ { if (TyUnicode_CheckExact(s)) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); Ty_INCREF(s); _TyUnicode_InternMortal(interp, &s); return s; @@ -1410,19 +1410,19 @@ sys_get_coroutine_origin_tracking_depth_impl(TyObject *module) static TyTypeObject AsyncGenHooksType; -PyDoc_STRVAR(asyncgen_hooks_doc, +TyDoc_STRVAR(asyncgen_hooks_doc, "asyncgen_hooks\n\ \n\ A named tuple providing information about asynchronous\n\ generators hooks. The attributes are read only."); -static PyStructSequence_Field asyncgen_hooks_fields[] = { +static TyStructSequence_Field asyncgen_hooks_fields[] = { {"firstiter", "Hook to intercept first iteration"}, {"finalizer", "Hook to intercept finalization"}, {0} }; -static PyStructSequence_Desc asyncgen_hooks_desc = { +static TyStructSequence_Desc asyncgen_hooks_desc = { "asyncgen_hooks", /* name */ asyncgen_hooks_doc, /* doc */ asyncgen_hooks_fields , /* fields */ @@ -1487,7 +1487,7 @@ error: return NULL; } -PyDoc_STRVAR(set_asyncgen_hooks_doc, +TyDoc_STRVAR(set_asyncgen_hooks_doc, "set_asyncgen_hooks([firstiter] [, finalizer])\n\ \n\ Set a finalizer for async generators objects." @@ -1509,7 +1509,7 @@ sys_get_asyncgen_hooks_impl(TyObject *module) TyObject *firstiter = _TyEval_GetAsyncGenFirstiter(); TyObject *finalizer = _TyEval_GetAsyncGenFinalizer(); - res = PyStructSequence_New(&AsyncGenHooksType); + res = TyStructSequence_New(&AsyncGenHooksType); if (res == NULL) { return NULL; } @@ -1522,8 +1522,8 @@ sys_get_asyncgen_hooks_impl(TyObject *module) finalizer = Ty_None; } - PyStructSequence_SET_ITEM(res, 0, Ty_NewRef(firstiter)); - PyStructSequence_SET_ITEM(res, 1, Ty_NewRef(finalizer)); + TyStructSequence_SET_ITEM(res, 0, Ty_NewRef(firstiter)); + TyStructSequence_SET_ITEM(res, 1, Ty_NewRef(finalizer)); return res; } @@ -1531,13 +1531,13 @@ sys_get_asyncgen_hooks_impl(TyObject *module) static TyTypeObject Hash_InfoType; -PyDoc_STRVAR(hash_info_doc, +TyDoc_STRVAR(hash_info_doc, "hash_info\n\ \n\ A named tuple providing parameters used for computing\n\ hashes. The attributes are read only."); -static PyStructSequence_Field hash_info_fields[] = { +static TyStructSequence_Field hash_info_fields[] = { {"width", "width of the type used for hashing, in bits"}, {"modulus", "prime number giving the modulus on which the hash " "function is based"}, @@ -1552,7 +1552,7 @@ static PyStructSequence_Field hash_info_fields[] = { {NULL, NULL} }; -static PyStructSequence_Desc hash_info_desc = { +static TyStructSequence_Desc hash_info_desc = { "sys.hash_info", hash_info_doc, hash_info_fields, @@ -1565,7 +1565,7 @@ get_hash_info(TyThreadState *tstate) TyObject *hash_info; int field = 0; PyHash_FuncDef *hashfunc; - hash_info = PyStructSequence_New(&Hash_InfoType); + hash_info = TyStructSequence_New(&Hash_InfoType); if (hash_info == NULL) { return NULL; } @@ -1578,7 +1578,7 @@ get_hash_info(TyThreadState *tstate) Ty_CLEAR(hash_info); \ return NULL; \ } \ - PyStructSequence_SET_ITEM(hash_info, field++, item); \ + TyStructSequence_SET_ITEM(hash_info, field++, item); \ } while(0) SET_HASH_INFO_ITEM(TyLong_FromLong(8 * sizeof(Ty_hash_t))); @@ -1616,7 +1616,7 @@ sys_getrecursionlimit_impl(TyObject *module) static TyTypeObject WindowsVersionType = { 0 }; -static PyStructSequence_Field windows_version_fields[] = { +static TyStructSequence_Field windows_version_fields[] = { {"major", "Major version number"}, {"minor", "Minor version number"}, {"build", "Build number"}, @@ -1630,7 +1630,7 @@ static PyStructSequence_Field windows_version_fields[] = { {0} }; -static PyStructSequence_Desc windows_version_desc = { +static TyStructSequence_Desc windows_version_desc = { "sys.getwindowsversion", /* name */ sys_getwindowsversion__doc__, /* doc */ windows_version_fields, /* fields */ @@ -1726,7 +1726,7 @@ sys_getwindowsversion_impl(TyObject *module) if (!GetVersionExW((OSVERSIONINFOW*) &ver)) return TyErr_SetFromWindowsErr(0); - version = PyStructSequence_New(&WindowsVersionType); + version = TyStructSequence_New(&WindowsVersionType); if (version == NULL) return NULL; @@ -1736,7 +1736,7 @@ sys_getwindowsversion_impl(TyObject *module) if (item == NULL) { \ goto error; \ } \ - PyStructSequence_SET_ITEM(version, pos++, item); \ + TyStructSequence_SET_ITEM(version, pos++, item); \ } while(0) SET_VERSION_INFO(TyLong_FromLong(ver.dwMajorVersion)); @@ -1838,7 +1838,7 @@ static TyObject * sys_setdlopenflags_impl(TyObject *module, int new_val) /*[clinic end generated code: output=ec918b7fe0a37281 input=4c838211e857a77f]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _TyImport_SetDLOpenFlags(interp, new_val); Py_RETURN_NONE; } @@ -1856,7 +1856,7 @@ static TyObject * sys_getdlopenflags_impl(TyObject *module) /*[clinic end generated code: output=e92cd1bc5005da6e input=dc4ea0899c53b4b6]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return TyLong_FromLong( _TyImport_GetDLOpenFlags(interp)); } @@ -1895,7 +1895,7 @@ static TyObject * sys_get_int_max_str_digits_impl(TyObject *module) /*[clinic end generated code: output=0042f5e8ae0e8631 input=61bf9f99bc8b112d]*/ { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); return TyLong_FromLong(interp->long_state.max_str_digits); } @@ -1997,7 +1997,7 @@ sys_getsizeof(TyObject *self, TyObject *args, TyObject *kwds) return TyLong_FromSize_t(size); } -PyDoc_STRVAR(getsizeof_doc, +TyDoc_STRVAR(getsizeof_doc, "getsizeof(object [, default]) -> int\n\ \n\ Return the size of object in bytes."); @@ -2234,7 +2234,7 @@ sys__clear_internal_caches_impl(TyObject *module) /*[clinic end generated code: output=0ee128670a4966d6 input=253e741ca744f6e8]*/ { #ifdef _Ty_TIER2 - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); _Ty_Executors_InvalidateAll(interp, 0); #endif #ifdef Ty_GIL_DISABLED @@ -2684,7 +2684,7 @@ PyAPI_FUNC(int) PyUnstable_PerfMapState_Init(void) { return -1; } } - perf_map_state.map_lock = PyThread_allocate_lock(); + perf_map_state.map_lock = TyThread_allocate_lock(); if (perf_map_state.map_lock == NULL) { fclose(perf_map_state.perf_map); return -2; @@ -2705,10 +2705,10 @@ PyAPI_FUNC(int) PyUnstable_WritePerfMapEntry( return ret; } } - PyThread_acquire_lock(perf_map_state.map_lock, 1); + TyThread_acquire_lock(perf_map_state.map_lock, 1); fprintf(perf_map_state.perf_map, "%" PRIxPTR " %x %s\n", (uintptr_t) code_addr, code_size, entry_name); fflush(perf_map_state.perf_map); - PyThread_release_lock(perf_map_state.map_lock); + TyThread_release_lock(perf_map_state.map_lock); #endif return 0; } @@ -2717,12 +2717,12 @@ PyAPI_FUNC(void) PyUnstable_PerfMapState_Fini(void) { #ifndef MS_WINDOWS if (perf_map_state.perf_map != NULL) { // close the file - PyThread_acquire_lock(perf_map_state.map_lock, 1); + TyThread_acquire_lock(perf_map_state.map_lock, 1); fclose(perf_map_state.perf_map); - PyThread_release_lock(perf_map_state.map_lock); + TyThread_release_lock(perf_map_state.map_lock); // clean up the lock and state - PyThread_free_lock(perf_map_state.map_lock); + TyThread_free_lock(perf_map_state.map_lock); perf_map_state.perf_map = NULL; } #endif @@ -2741,7 +2741,7 @@ PyAPI_FUNC(int) PyUnstable_CopyPerfMapFile(const char* parent_filename) { return -1; } char buf[4096]; - PyThread_acquire_lock(perf_map_state.map_lock, 1); + TyThread_acquire_lock(perf_map_state.map_lock, 1); int fflush_result = 0, result = 0; while (1) { size_t bytes_read = fread(buf, 1, sizeof(buf), from); @@ -2757,7 +2757,7 @@ PyAPI_FUNC(int) PyUnstable_CopyPerfMapFile(const char* parent_filename) { } close_and_release: fclose(from); - PyThread_release_lock(perf_map_state.map_lock); + TyThread_release_lock(perf_map_state.map_lock); return result; #endif return 0; @@ -3224,7 +3224,7 @@ TySys_GetXOptions(void) or other abomination that however *does* understand longer strings, get rid of the !!! comment in the middle and the quotes that surround it. */ PyDoc_VAR(sys_doc) = -PyDoc_STR( +TyDoc_STR( "This module provides access to some objects used or maintained by the\n\ interpreter and to functions that interact strongly with the interpreter.\n\ \n\ @@ -3255,7 +3255,7 @@ last_traceback -- traceback of last uncaught exception\n\ " ) /* concatenating string here */ -PyDoc_STR( +TyDoc_STR( "\n\ Static objects:\n\ \n\ @@ -3280,7 +3280,7 @@ version_info -- version information as a named tuple\n\ ) #ifdef MS_COREDLL /* concatenating string here */ -PyDoc_STR( +TyDoc_STR( "dllhandle -- [Windows only] integer handle of the Python DLL\n\ winver -- [Windows only] version number of the Python DLL\n\ " @@ -3288,12 +3288,12 @@ winver -- [Windows only] version number of the Python DLL\n\ #endif /* MS_COREDLL */ #ifdef MS_WINDOWS /* concatenating string here */ -PyDoc_STR( +TyDoc_STR( "_enablelegacywindowsfsencoding -- [Windows only]\n\ " ) #endif -PyDoc_STR( +TyDoc_STR( "__stdin__ -- the original stdin; don't touch!\n\ __stdout__ -- the original stdout; don't touch!\n\ __stderr__ -- the original stderr; don't touch!\n\ @@ -3322,14 +3322,14 @@ settrace() -- set the global debug tracing function\n\ /* end of sys_doc */ ; -PyDoc_STRVAR(flags__doc__, +TyDoc_STRVAR(flags__doc__, "sys.flags\n\ \n\ Flags provided through command line arguments or environment vars."); static TyTypeObject FlagsType; -static PyStructSequence_Field flags_fields[] = { +static TyStructSequence_Field flags_fields[] = { {"debug", "-d"}, {"inspect", "-i"}, {"interactive", "-i"}, @@ -3356,7 +3356,7 @@ static PyStructSequence_Field flags_fields[] = { #define SYS_FLAGS_INT_MAX_STR_DIGITS 17 -static PyStructSequence_Desc flags_desc = { +static TyStructSequence_Desc flags_desc = { "sys.flags", /* name */ flags__doc__, /* doc */ flags_fields, /* fields */ @@ -3368,8 +3368,8 @@ sys_set_flag(TyObject *flags, Ty_ssize_t pos, TyObject *value) { assert(pos >= 0 && pos < (Ty_ssize_t)(Ty_ARRAY_LENGTH(flags_fields) - 1)); - TyObject *old_value = PyStructSequence_GET_ITEM(flags, pos); - PyStructSequence_SET_ITEM(flags, pos, Ty_NewRef(value)); + TyObject *old_value = TyStructSequence_GET_ITEM(flags, pos); + TyStructSequence_SET_ITEM(flags, pos, Ty_NewRef(value)); Ty_XDECREF(old_value); } @@ -3403,7 +3403,7 @@ _TySys_SetFlagInt(Ty_ssize_t pos, int value) static int -set_flags_from_config(PyInterpreterState *interp, TyObject *flags) +set_flags_from_config(TyInterpreterState *interp, TyObject *flags) { const PyPreConfig *preconfig = &interp->runtime->preconfig; const PyConfig *config = _TyInterpreterState_GetConfig(interp); @@ -3460,9 +3460,9 @@ set_flags_from_config(PyInterpreterState *interp, TyObject *flags) static TyObject* -make_flags(PyInterpreterState *interp) +make_flags(TyInterpreterState *interp) { - TyObject *flags = PyStructSequence_New(&FlagsType); + TyObject *flags = TyStructSequence_New(&FlagsType); if (flags == NULL) { return NULL; } @@ -3475,14 +3475,14 @@ make_flags(PyInterpreterState *interp) } -PyDoc_STRVAR(version_info__doc__, +TyDoc_STRVAR(version_info__doc__, "sys.version_info\n\ \n\ Version information as a named tuple."); static TyTypeObject VersionInfoType; -static PyStructSequence_Field version_info_fields[] = { +static TyStructSequence_Field version_info_fields[] = { {"major", "Major release number"}, {"minor", "Minor release number"}, {"micro", "Patch release number"}, @@ -3491,7 +3491,7 @@ static PyStructSequence_Field version_info_fields[] = { {0} }; -static PyStructSequence_Desc version_info_desc = { +static TyStructSequence_Desc version_info_desc = { "sys.version_info", /* name */ version_info__doc__, /* doc */ version_info_fields, /* fields */ @@ -3505,7 +3505,7 @@ make_version_info(TyThreadState *tstate) char *s; int pos = 0; - version_info = PyStructSequence_New(&VersionInfoType); + version_info = TyStructSequence_New(&VersionInfoType); if (version_info == NULL) { return NULL; } @@ -3525,9 +3525,9 @@ make_version_info(TyThreadState *tstate) #endif #define SetIntItem(flag) \ - PyStructSequence_SET_ITEM(version_info, pos++, TyLong_FromLong(flag)) + TyStructSequence_SET_ITEM(version_info, pos++, TyLong_FromLong(flag)) #define SetStrItem(flag) \ - PyStructSequence_SET_ITEM(version_info, pos++, TyUnicode_FromString(flag)) + TyStructSequence_SET_ITEM(version_info, pos++, TyUnicode_FromString(flag)) SetIntItem(PY_MAJOR_VERSION); SetIntItem(PY_MINOR_VERSION); @@ -3631,14 +3631,14 @@ error: #ifdef __EMSCRIPTEN__ -PyDoc_STRVAR(emscripten_info__doc__, +TyDoc_STRVAR(emscripten_info__doc__, "sys._emscripten_info\n\ \n\ WebAssembly Emscripten platform information."); static TyTypeObject *EmscriptenInfoType; -static PyStructSequence_Field emscripten_info_fields[] = { +static TyStructSequence_Field emscripten_info_fields[] = { {"emscripten_version", "Emscripten version (major, minor, micro)"}, {"runtime", "Runtime (Node.JS version, browser user agent)"}, {"pthreads", "pthread support"}, @@ -3646,7 +3646,7 @@ static PyStructSequence_Field emscripten_info_fields[] = { {0} }; -static PyStructSequence_Desc emscripten_info_desc = { +static TyStructSequence_Desc emscripten_info_desc = { "sys._emscripten_info", /* name */ emscripten_info__doc__ , /* doc */ emscripten_info_fields, /* fields */ @@ -3680,7 +3680,7 @@ make_emscripten_info(void) char *ua; int pos = 0; - emscripten_info = PyStructSequence_New(EmscriptenInfoType); + emscripten_info = TyStructSequence_New(EmscriptenInfoType); if (emscripten_info == NULL) { return NULL; } @@ -3690,7 +3690,7 @@ make_emscripten_info(void) if (version == NULL) { goto error; } - PyStructSequence_SET_ITEM(emscripten_info, pos++, version); + TyStructSequence_SET_ITEM(emscripten_info, pos++, version); ua = _Ty_emscripten_runtime(); if (ua != NULL) { @@ -3699,13 +3699,13 @@ make_emscripten_info(void) if (oua == NULL) { goto error; } - PyStructSequence_SET_ITEM(emscripten_info, pos++, oua); + TyStructSequence_SET_ITEM(emscripten_info, pos++, oua); } else { - PyStructSequence_SET_ITEM(emscripten_info, pos++, Ty_NewRef(Ty_None)); + TyStructSequence_SET_ITEM(emscripten_info, pos++, Ty_NewRef(Ty_None)); } #define SetBoolItem(flag) \ - PyStructSequence_SET_ITEM(emscripten_info, pos++, TyBool_FromLong(flag)) + TyStructSequence_SET_ITEM(emscripten_info, pos++, TyBool_FromLong(flag)) #ifdef __EMSCRIPTEN_PTHREADS__ SetBoolItem(1); @@ -3767,7 +3767,7 @@ _TySys_InitCore(TyThreadState *tstate, TyObject *sysdict) { TyObject *version_info; int res; - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; /* stdin/stdout/stderr are set in pylifecycle.c */ @@ -3852,7 +3852,7 @@ _TySys_InitCore(TyThreadState *tstate, TyObject *sysdict) SET_SYS_FROM_STRING("float_repr_style", "legacy"); #endif - SET_SYS("thread_info", PyThread_GetInfo()); + SET_SYS("thread_info", TyThread_GetInfo()); /* initialize asyncgen_hooks */ if (_PyStructSequence_InitBuiltin(interp, &AsyncGenHooksType, @@ -3863,7 +3863,7 @@ _TySys_InitCore(TyThreadState *tstate, TyObject *sysdict) #ifdef __EMSCRIPTEN__ if (EmscriptenInfoType == NULL) { - EmscriptenInfoType = PyStructSequence_NewType(&emscripten_info_desc); + EmscriptenInfoType = TyStructSequence_NewType(&emscripten_info_desc); if (EmscriptenInfoType == NULL) { goto type_init_failed; } @@ -3894,7 +3894,7 @@ err_occurred: int _TySys_UpdateConfig(TyThreadState *tstate) { - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; TyObject *sysdict = interp->sysdict; const PyConfig *config = _TyInterpreterState_GetConfig(interp); int res; @@ -4009,7 +4009,7 @@ module _jit [clinic start generated code]*/ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=10952f74d7bbd972]*/ -PyDoc_STRVAR(_jit_doc, "Utilities for observing just-in-time compilation."); +TyDoc_STRVAR(_jit_doc, "Utilities for observing just-in-time compilation."); /*[clinic input] _jit.is_available -> bool @@ -4076,7 +4076,7 @@ _TySys_Create(TyThreadState *tstate, TyObject **sysmod_p) { assert(!_TyErr_Occurred(tstate)); - PyInterpreterState *interp = tstate->interp; + TyInterpreterState *interp = tstate->interp; TyObject *modules = _TyImport_InitModules(interp); if (modules == NULL) { @@ -4151,7 +4151,7 @@ error: void -_TySys_FiniTypes(PyInterpreterState *interp) +_TySys_FiniTypes(TyInterpreterState *interp) { _PyStructSequence_FiniBuiltin(interp, &VersionInfoType); _PyStructSequence_FiniBuiltin(interp, &FlagsType); @@ -4208,7 +4208,7 @@ TySys_SetPath(const wchar_t *path) TyObject *v; if ((v = makepathobject(path, DELIM)) == NULL) Ty_FatalError("can't create sys.path"); - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (sys_set_object(interp, &_Ty_ID(path), v) != 0) { Ty_FatalError("can't assign sys.path"); } @@ -4457,9 +4457,9 @@ _TySys_SetIntMaxStrDigits(int maxdigits) return -1; } - // Set PyInterpreterState.long_state.max_str_digits - // and PyInterpreterState.config.int_max_str_digits. - PyInterpreterState *interp = _TyInterpreterState_GET(); + // Set TyInterpreterState.long_state.max_str_digits + // and TyInterpreterState.config.int_max_str_digits. + TyInterpreterState *interp = _TyInterpreterState_GET(); interp->long_state.max_str_digits = maxdigits; interp->config.int_max_str_digits = maxdigits; return 0; diff --git a/Python/thread.c b/Python/thread.c index 98bfbeb..24e431d 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -21,7 +21,7 @@ // Define PY_TIMEOUT_MAX constant. #ifdef _POSIX_THREADS - // PyThread_acquire_lock_timed() uses (us * 1000) to convert microseconds + // TyThread_acquire_lock_timed() uses (us * 1000) to convert microseconds // to nanoseconds. # define PY_TIMEOUT_MAX_VALUE (LLONG_MAX / 1000) #elif defined (NT_THREADS) @@ -39,18 +39,18 @@ const long long PY_TIMEOUT_MAX = PY_TIMEOUT_MAX_VALUE; -static void PyThread__init_thread(void); /* Forward */ +static void TyThread__init_thread(void); /* Forward */ #define initialized _PyRuntime.threads.initialized void -PyThread_init_thread(void) +TyThread_init_thread(void) { if (initialized) { return; } initialized = 1; - PyThread__init_thread(); + TyThread__init_thread(); } #if defined(HAVE_PTHREAD_STUBS) @@ -73,7 +73,7 @@ PyThread_init_thread(void) /* return the current thread stack size */ size_t -PyThread_get_stacksize(void) +TyThread_get_stacksize(void) { return _TyInterpreterState_GET()->threads.stacksize; } @@ -84,7 +84,7 @@ PyThread_get_stacksize(void) -1 if stack size value is invalid, -2 if setting stack size is not supported. */ int -PyThread_set_stacksize(size_t size) +TyThread_set_stacksize(size_t size) { #if defined(THREAD_SET_STACKSIZE) return THREAD_SET_STACKSIZE(size); @@ -95,11 +95,11 @@ PyThread_set_stacksize(size_t size) int -PyThread_ParseTimeoutArg(TyObject *arg, int blocking, PY_TIMEOUT_T *timeout_p) +TyThread_ParseTimeoutArg(TyObject *arg, int blocking, PY_TIMEOUT_T *timeout_p) { - assert(_TyTime_FromSeconds(-1) == PyThread_UNSET_TIMEOUT); + assert(_TyTime_FromSeconds(-1) == TyThread_UNSET_TIMEOUT); if (arg == NULL || arg == Ty_None) { - *timeout_p = blocking ? PyThread_UNSET_TIMEOUT : 0; + *timeout_p = blocking ? TyThread_UNSET_TIMEOUT : 0; return 0; } if (!blocking) { @@ -108,7 +108,7 @@ PyThread_ParseTimeoutArg(TyObject *arg, int blocking, PY_TIMEOUT_T *timeout_p) return -1; } - PyTime_t timeout; + TyTime_t timeout; if (_TyTime_FromSecondsObject(&timeout, arg, _TyTime_ROUND_TIMEOUT) < 0) { return -1; } @@ -128,27 +128,27 @@ PyThread_ParseTimeoutArg(TyObject *arg, int blocking, PY_TIMEOUT_T *timeout_p) return 0; } -PyLockStatus -PyThread_acquire_lock_timed_with_retries(PyThread_type_lock lock, +TyLockStatus +TyThread_acquire_lock_timed_with_retries(TyThread_type_lock lock, PY_TIMEOUT_T timeout) { TyThreadState *tstate = _TyThreadState_GET(); - PyTime_t endtime = 0; + TyTime_t endtime = 0; if (timeout > 0) { endtime = _PyDeadline_Init(timeout); } - PyLockStatus r; + TyLockStatus r; do { - PyTime_t microseconds; + TyTime_t microseconds; microseconds = _TyTime_AsMicroseconds(timeout, _TyTime_ROUND_CEILING); /* first a simple non-blocking try without releasing the GIL */ - r = PyThread_acquire_lock_timed(lock, 0, 0); + r = TyThread_acquire_lock_timed(lock, 0, 0); if (r == PY_LOCK_FAILURE && microseconds != 0) { - Py_BEGIN_ALLOW_THREADS - r = PyThread_acquire_lock_timed(lock, microseconds, 1); - Py_END_ALLOW_THREADS + Ty_BEGIN_ALLOW_THREADS + r = TyThread_acquire_lock_timed(lock, microseconds, 1); + Ty_END_ALLOW_THREADS } if (r == PY_LOCK_INTR) { @@ -183,7 +183,7 @@ PyThread_acquire_lock_timed_with_retries(PyThread_type_lock lock, */ Ty_tss_t * -PyThread_tss_alloc(void) +TyThread_tss_alloc(void) { Ty_tss_t *new_key = (Ty_tss_t *)TyMem_RawMalloc(sizeof(Ty_tss_t)); if (new_key == NULL) { @@ -194,35 +194,35 @@ PyThread_tss_alloc(void) } void -PyThread_tss_free(Ty_tss_t *key) +TyThread_tss_free(Ty_tss_t *key) { if (key != NULL) { - PyThread_tss_delete(key); + TyThread_tss_delete(key); TyMem_RawFree((void *)key); } } int -PyThread_tss_is_created(Ty_tss_t *key) +TyThread_tss_is_created(Ty_tss_t *key) { assert(key != NULL); return key->_is_initialized; } -PyDoc_STRVAR(threadinfo__doc__, +TyDoc_STRVAR(threadinfo__doc__, "sys.thread_info\n\ \n\ A named tuple holding information about the thread implementation."); -static PyStructSequence_Field threadinfo_fields[] = { +static TyStructSequence_Field threadinfo_fields[] = { {"name", "name of the thread implementation"}, {"lock", "name of the lock implementation"}, {"version", "name and version of the thread library"}, {0} }; -static PyStructSequence_Desc threadinfo_desc = { +static TyStructSequence_Desc threadinfo_desc = { "sys.thread_info", /* name */ threadinfo__doc__, /* doc */ threadinfo_fields, /* fields */ @@ -232,7 +232,7 @@ static PyStructSequence_Desc threadinfo_desc = { static TyTypeObject ThreadInfoType; TyObject* -PyThread_GetInfo(void) +TyThread_GetInfo(void) { TyObject *threadinfo, *value; int pos = 0; @@ -242,12 +242,12 @@ PyThread_GetInfo(void) int len; #endif - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); if (_PyStructSequence_InitBuiltin(interp, &ThreadInfoType, &threadinfo_desc) < 0) { return NULL; } - threadinfo = PyStructSequence_New(&ThreadInfoType); + threadinfo = TyStructSequence_New(&ThreadInfoType); if (threadinfo == NULL) return NULL; @@ -256,7 +256,7 @@ PyThread_GetInfo(void) Ty_DECREF(threadinfo); return NULL; } - PyStructSequence_SET_ITEM(threadinfo, pos++, value); + TyStructSequence_SET_ITEM(threadinfo, pos++, value); #ifdef HAVE_PTHREAD_STUBS value = Ty_NewRef(Ty_None); @@ -273,7 +273,7 @@ PyThread_GetInfo(void) #else value = Ty_NewRef(Ty_None); #endif - PyStructSequence_SET_ITEM(threadinfo, pos++, value); + TyStructSequence_SET_ITEM(threadinfo, pos++, value); #if (defined(_POSIX_THREADS) && defined(HAVE_CONFSTR) \ && defined(_CS_GNU_LIBPTHREAD_VERSION)) @@ -289,13 +289,13 @@ PyThread_GetInfo(void) { value = Ty_NewRef(Ty_None); } - PyStructSequence_SET_ITEM(threadinfo, pos++, value); + TyStructSequence_SET_ITEM(threadinfo, pos++, value); return threadinfo; } void -_PyThread_FiniType(PyInterpreterState *interp) +_PyThread_FiniType(TyInterpreterState *interp) { _PyStructSequence_FiniBuiltin(interp, &ThreadInfoType); } diff --git a/Python/thread_nt.h b/Python/thread_nt.h index 5b3e8f5..3842e44 100644 --- a/Python/thread_nt.h +++ b/Python/thread_nt.h @@ -77,10 +77,10 @@ EnterNonRecursiveMutex(PNRMUTEX mutex, DWORD milliseconds) } } else if (milliseconds != 0) { /* wait at least until the deadline */ - PyTime_t timeout = (PyTime_t)milliseconds * (1000 * 1000); - PyTime_t deadline = _PyDeadline_Init(timeout); + TyTime_t timeout = (TyTime_t)milliseconds * (1000 * 1000); + TyTime_t deadline = _PyDeadline_Init(timeout); while (mutex->locked) { - PyTime_t microseconds = _TyTime_AsMicroseconds(timeout, + TyTime_t microseconds = _TyTime_AsMicroseconds(timeout, _TyTime_ROUND_TIMEOUT); if (PyCOND_TIMEDWAIT(&mutex->cv, &mutex->cs, microseconds) < 0) { result = WAIT_FAILED; @@ -147,17 +147,17 @@ LeaveNonRecursiveMutex(PNRMUTEX mutex) } #endif /* _PY_USE_CV_LOCKS */ -unsigned long PyThread_get_thread_ident(void); +unsigned long TyThread_get_thread_ident(void); #ifdef PY_HAVE_THREAD_NATIVE_ID -unsigned long PyThread_get_thread_native_id(void); +unsigned long TyThread_get_thread_native_id(void); #endif /* * Initialization for the current runtime. */ static void -PyThread__init_thread(void) +TyThread__init_thread(void) { // Initialization of the C package should not be needed. } @@ -185,14 +185,14 @@ bootstrap(void *call) } int -PyThread_start_joinable_thread(void (*func)(void *), void *arg, - PyThread_ident_t* ident, PyThread_handle_t* handle) { +TyThread_start_joinable_thread(void (*func)(void *), void *arg, + TyThread_ident_t* ident, TyThread_handle_t* handle) { HANDLE hThread; unsigned threadID; callobj *obj; if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); obj = (callobj*)HeapAlloc(GetProcessHeap(), 0, sizeof(*obj)); if (!obj) @@ -214,15 +214,15 @@ PyThread_start_joinable_thread(void (*func)(void *), void *arg, } *ident = threadID; // The cast is safe since HANDLE is pointer-sized - *handle = (PyThread_handle_t) hThread; + *handle = (TyThread_handle_t) hThread; return 0; } unsigned long -PyThread_start_new_thread(void (*func)(void *), void *arg) { - PyThread_handle_t handle; - PyThread_ident_t ident; - if (PyThread_start_joinable_thread(func, arg, &ident, &handle)) { +TyThread_start_new_thread(void (*func)(void *), void *arg) { + TyThread_handle_t handle; + TyThread_ident_t ident; + if (TyThread_start_joinable_thread(func, arg, &ident, &handle)) { return PYTHREAD_INVALID_THREAD_ID; } CloseHandle((HANDLE) handle); @@ -231,7 +231,7 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) { } int -PyThread_join_thread(PyThread_handle_t handle) { +TyThread_join_thread(TyThread_handle_t handle) { HANDLE hThread = (HANDLE) handle; int errored = (WaitForSingleObject(hThread, INFINITE) != WAIT_OBJECT_0); CloseHandle(hThread); @@ -239,7 +239,7 @@ PyThread_join_thread(PyThread_handle_t handle) { } int -PyThread_detach_thread(PyThread_handle_t handle) { +TyThread_detach_thread(TyThread_handle_t handle) { HANDLE hThread = (HANDLE) handle; return (CloseHandle(hThread) == 0); } @@ -248,19 +248,19 @@ PyThread_detach_thread(PyThread_handle_t handle) { * Return the thread Id instead of a handle. The Id is said to uniquely identify the * thread in the system */ -PyThread_ident_t -PyThread_get_thread_ident_ex(void) +TyThread_ident_t +TyThread_get_thread_ident_ex(void) { if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); return GetCurrentThreadId(); } unsigned long -PyThread_get_thread_ident(void) +TyThread_get_thread_ident(void) { - return (unsigned long) PyThread_get_thread_ident_ex(); + return (unsigned long) TyThread_get_thread_ident_ex(); } @@ -271,10 +271,10 @@ PyThread_get_thread_ident(void) * from the time the thread is created until the thread has been terminated. */ unsigned long -PyThread_get_thread_native_id(void) +TyThread_get_thread_native_id(void) { if (!initialized) { - PyThread_init_thread(); + TyThread_init_thread(); } DWORD native_id; @@ -284,7 +284,7 @@ PyThread_get_thread_native_id(void) #endif void _Ty_NO_RETURN -PyThread_exit_thread(void) +TyThread_exit_thread(void) { if (!initialized) exit(0); @@ -293,7 +293,7 @@ PyThread_exit_thread(void) } void _Ty_NO_RETURN -PyThread_hang_thread(void) +TyThread_hang_thread(void) { while (1) { SleepEx(INFINITE, TRUE); @@ -305,24 +305,24 @@ PyThread_hang_thread(void) * I [Dag] tried to implement it with mutex but I could find a way to * tell whether a thread already own the lock or not. */ -PyThread_type_lock -PyThread_allocate_lock(void) +TyThread_type_lock +TyThread_allocate_lock(void) { PNRMUTEX mutex; if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); mutex = AllocNonRecursiveMutex() ; - PyThread_type_lock aLock = (PyThread_type_lock) mutex; + TyThread_type_lock aLock = (TyThread_type_lock) mutex; assert(aLock); return aLock; } void -PyThread_free_lock(PyThread_type_lock aLock) +TyThread_free_lock(TyThread_type_lock aLock) { FreeNonRecursiveMutex(aLock) ; } @@ -338,15 +338,15 @@ const DWORD TIMEOUT_MS_MAX = 0xFFFFFFFE; * and 0 if the lock was not acquired. This means a 0 is returned * if the lock has already been acquired by this thread! */ -PyLockStatus -PyThread_acquire_lock_timed(PyThread_type_lock aLock, +TyLockStatus +TyThread_acquire_lock_timed(TyThread_type_lock aLock, PY_TIMEOUT_T microseconds, int intr_flag) { assert(aLock); /* Fow now, intr_flag does nothing on Windows, and lock acquires are * uninterruptible. */ - PyLockStatus success; + TyLockStatus success; PY_TIMEOUT_T milliseconds; if (microseconds >= 0) { @@ -356,7 +356,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock aLock, milliseconds++; } if (milliseconds > (PY_TIMEOUT_T)TIMEOUT_MS_MAX) { - // bpo-41710: PyThread_acquire_lock_timed() cannot report timeout + // bpo-41710: TyThread_acquire_lock_timed() cannot report timeout // overflow to the caller, so clamp the timeout to // [0, TIMEOUT_MS_MAX] milliseconds. // @@ -381,13 +381,13 @@ PyThread_acquire_lock_timed(PyThread_type_lock aLock, return success; } int -PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag) +TyThread_acquire_lock(TyThread_type_lock aLock, int waitflag) { - return PyThread_acquire_lock_timed(aLock, waitflag ? -1 : 0, 0); + return TyThread_acquire_lock_timed(aLock, waitflag ? -1 : 0, 0); } void -PyThread_release_lock(PyThread_type_lock aLock) +TyThread_release_lock(TyThread_type_lock aLock) { assert(aLock); (void)LeaveNonRecursiveMutex((PNRMUTEX) aLock); @@ -427,7 +427,7 @@ _pythread_nt_set_stacksize(size_t size) */ int -PyThread_create_key(void) +TyThread_create_key(void) { DWORD result = TlsAlloc(); if (result == TLS_OUT_OF_INDEXES) @@ -436,26 +436,26 @@ PyThread_create_key(void) } void -PyThread_delete_key(int key) +TyThread_delete_key(int key) { TlsFree(key); } int -PyThread_set_key_value(int key, void *value) +TyThread_set_key_value(int key, void *value) { BOOL ok = TlsSetValue(key, value); return ok ? 0 : -1; } void * -PyThread_get_key_value(int key) +TyThread_get_key_value(int key) { return TlsGetValue(key); } void -PyThread_delete_key_value(int key) +TyThread_delete_key_value(int key) { /* NULL is used as "key missing", and it is also the default * given by TlsGetValue() if nothing has been set yet. @@ -468,7 +468,7 @@ PyThread_delete_key_value(int key) * the native TLS functions. And forking isn't supported on Windows either. */ void -PyThread_ReInitTLS(void) +TyThread_ReInitTLS(void) { } @@ -479,7 +479,7 @@ PyThread_ReInitTLS(void) */ int -PyThread_tss_create(Ty_tss_t *key) +TyThread_tss_create(Ty_tss_t *key) { assert(key != NULL); /* If the key has been created, function is silently skipped. */ @@ -498,7 +498,7 @@ PyThread_tss_create(Ty_tss_t *key) } void -PyThread_tss_delete(Ty_tss_t *key) +TyThread_tss_delete(Ty_tss_t *key) { assert(key != NULL); /* If the key has not been created, function is silently skipped. */ @@ -512,7 +512,7 @@ PyThread_tss_delete(Ty_tss_t *key) } int -PyThread_tss_set(Ty_tss_t *key, void *value) +TyThread_tss_set(Ty_tss_t *key, void *value) { assert(key != NULL); BOOL ok = TlsSetValue(key->_key, value); @@ -520,7 +520,7 @@ PyThread_tss_set(Ty_tss_t *key, void *value) } void * -PyThread_tss_get(Ty_tss_t *key) +TyThread_tss_get(Ty_tss_t *key) { assert(key != NULL); int err = GetLastError(); diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index 1629e02..eb503d1 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -153,8 +153,8 @@ _PyThread_cond_init(PyCOND_T *cond) void _PyThread_cond_after(long long us, struct timespec *abs) { - PyTime_t timeout = _TyTime_FromMicrosecondsClamp(us); - PyTime_t t; + TyTime_t timeout = _TyTime_FromMicrosecondsClamp(us); + TyTime_t t; #ifdef CONDATTR_MONOTONIC if (condattr_monotonic) { // silently ignore error: cannot report error to the caller @@ -201,7 +201,7 @@ typedef struct { * Initialization for the current runtime. */ static void -PyThread__init_thread(void) +TyThread__init_thread(void) { // The library is only initialized once in the process, // regardless of how many times the Python runtime is initialized. @@ -223,7 +223,7 @@ PyThread__init_thread(void) /* bpo-33015: pythread_callback struct and pythread_wrapper() cast "void func(void *)" to "void* func(void *)": always return NULL. - PyThread_start_new_thread() uses "void func(void *)" type, whereas + TyThread_start_new_thread() uses "void func(void *)" type, whereas pthread_create() requires a void* return value. */ typedef struct { void (*func) (void *); @@ -256,7 +256,7 @@ do_start_joinable_thread(void (*func)(void *), void *arg, pthread_t* out_id) #endif if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) if (pthread_attr_init(&attrs) != 0) @@ -306,9 +306,9 @@ do_start_joinable_thread(void (*func)(void *), void *arg, pthread_t* out_id) return 0; } -/* Helper to convert pthread_t to PyThread_ident_t. POSIX allows pthread_t to be +/* Helper to convert pthread_t to TyThread_ident_t. POSIX allows pthread_t to be non-arithmetic, e.g., musl typedefs it as a pointer. */ -static PyThread_ident_t +static TyThread_ident_t _pthread_t_to_ident(pthread_t value) { // Cast through an integer type of the same size to avoid sign-extension. #if SIZEOF_PTHREAD_T == SIZEOF_VOID_P @@ -325,20 +325,20 @@ _pthread_t_to_ident(pthread_t value) { } int -PyThread_start_joinable_thread(void (*func)(void *), void *arg, - PyThread_ident_t* ident, PyThread_handle_t* handle) { +TyThread_start_joinable_thread(void (*func)(void *), void *arg, + TyThread_ident_t* ident, TyThread_handle_t* handle) { pthread_t th = (pthread_t) 0; if (do_start_joinable_thread(func, arg, &th)) { return -1; } *ident = _pthread_t_to_ident(th); - *handle = (PyThread_handle_t) th; + *handle = (TyThread_handle_t) th; assert(th == (pthread_t) *handle); return 0; } unsigned long -PyThread_start_new_thread(void (*func)(void *), void *arg) +TyThread_start_new_thread(void (*func)(void *), void *arg) { pthread_t th = (pthread_t) 0; if (do_start_joinable_thread(func, arg, &th)) { @@ -349,12 +349,12 @@ PyThread_start_new_thread(void (*func)(void *), void *arg) } int -PyThread_join_thread(PyThread_handle_t th) { +TyThread_join_thread(TyThread_handle_t th) { return pthread_join((pthread_t) th, NULL); } int -PyThread_detach_thread(PyThread_handle_t th) { +TyThread_detach_thread(TyThread_handle_t th) { return pthread_detach((pthread_t) th); } @@ -364,27 +364,27 @@ PyThread_detach_thread(PyThread_handle_t th) { - The cast to unsigned long is inherently unsafe. - It is not clear that the 'volatile' (for AIX?) are any longer necessary. */ -PyThread_ident_t -PyThread_get_thread_ident_ex(void) { +TyThread_ident_t +TyThread_get_thread_ident_ex(void) { volatile pthread_t threadid; if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); threadid = pthread_self(); return _pthread_t_to_ident(threadid); } unsigned long -PyThread_get_thread_ident(void) +TyThread_get_thread_ident(void) { - return (unsigned long) PyThread_get_thread_ident_ex(); + return (unsigned long) TyThread_get_thread_ident_ex(); } #ifdef PY_HAVE_THREAD_NATIVE_ID unsigned long -PyThread_get_thread_native_id(void) +TyThread_get_thread_native_id(void) { if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); #ifdef __APPLE__ uint64_t native_id; (void) pthread_threadid_np(NULL, &native_id); @@ -415,7 +415,7 @@ PyThread_get_thread_native_id(void) #endif void _Ty_NO_RETURN -PyThread_exit_thread(void) +TyThread_exit_thread(void) { if (!initialized) exit(0); @@ -431,7 +431,7 @@ PyThread_exit_thread(void) } void _Ty_NO_RETURN -PyThread_hang_thread(void) +TyThread_hang_thread(void) { while (1) { #if defined(__wasi__) @@ -448,14 +448,14 @@ PyThread_hang_thread(void) * Lock support. */ -PyThread_type_lock -PyThread_allocate_lock(void) +TyThread_type_lock +TyThread_allocate_lock(void) { sem_t *lock; int status, error = 0; if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); lock = (sem_t *)TyMem_RawMalloc(sizeof(sem_t)); @@ -469,11 +469,11 @@ PyThread_allocate_lock(void) } } - return (PyThread_type_lock)lock; + return (TyThread_type_lock)lock; } void -PyThread_free_lock(PyThread_type_lock lock) +TyThread_free_lock(TyThread_type_lock lock) { sem_t *thelock = (sem_t *)lock; int status, error = 0; @@ -501,19 +501,19 @@ fix_status(int status) return (status == -1) ? errno : status; } -PyLockStatus -PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds, +TyLockStatus +TyThread_acquire_lock_timed(TyThread_type_lock lock, PY_TIMEOUT_T microseconds, int intr_flag) { - PyLockStatus success; + TyLockStatus success; sem_t *thelock = (sem_t *)lock; int status, error = 0; (void) error; /* silence unused-but-set-variable warning */ - PyTime_t timeout; // relative timeout + TyTime_t timeout; // relative timeout if (microseconds >= 0) { - // bpo-41710: PyThread_acquire_lock_timed() cannot report timeout + // bpo-41710: TyThread_acquire_lock_timed() cannot report timeout // overflow to the caller, so clamp the timeout to // [PyTime_MIN, PyTime_MAX]. // @@ -531,14 +531,14 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds, struct timespec abs_timeout; // Local scope for deadline { - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_MonotonicRaw(&now); - PyTime_t deadline = _TyTime_Add(now, timeout); + TyTime_t deadline = _TyTime_Add(now, timeout); _TyTime_AsTimespec_clamp(deadline, &abs_timeout); } #else - PyTime_t deadline = 0; + TyTime_t deadline = 0; if (timeout > 0 && !intr_flag) { deadline = _PyDeadline_Init(timeout); } @@ -550,10 +550,10 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds, status = fix_status(sem_clockwait(thelock, CLOCK_MONOTONIC, &abs_timeout)); #else - PyTime_t now; + TyTime_t now; // silently ignore error: cannot report error to the caller (void)PyTime_TimeRaw(&now); - PyTime_t abs_time = _TyTime_Add(now, timeout); + TyTime_t abs_time = _TyTime_Add(now, timeout); struct timespec ts; _TyTime_AsTimespec_clamp(abs_time, &ts); @@ -620,7 +620,7 @@ PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds, } void -PyThread_release_lock(PyThread_type_lock lock) +TyThread_release_lock(TyThread_type_lock lock) { sem_t *thelock = (sem_t *)lock; int status, error = 0; @@ -636,14 +636,14 @@ PyThread_release_lock(PyThread_type_lock lock) /* * Lock support. */ -PyThread_type_lock -PyThread_allocate_lock(void) +TyThread_type_lock +TyThread_allocate_lock(void) { pthread_lock *lock; int status, error = 0; if (!initialized) - PyThread_init_thread(); + TyThread_init_thread(); lock = (pthread_lock *) TyMem_RawCalloc(1, sizeof(pthread_lock)); if (lock) { @@ -667,11 +667,11 @@ PyThread_allocate_lock(void) } } - return (PyThread_type_lock) lock; + return (TyThread_type_lock) lock; } void -PyThread_free_lock(PyThread_type_lock lock) +TyThread_free_lock(TyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; int status, error = 0; @@ -690,11 +690,11 @@ PyThread_free_lock(PyThread_type_lock lock) TyMem_RawFree((void *)thelock); } -PyLockStatus -PyThread_acquire_lock_timed(PyThread_type_lock lock, PY_TIMEOUT_T microseconds, +TyLockStatus +TyThread_acquire_lock_timed(TyThread_type_lock lock, PY_TIMEOUT_T microseconds, int intr_flag) { - PyLockStatus success = PY_LOCK_FAILURE; + TyLockStatus success = PY_LOCK_FAILURE; pthread_lock *thelock = (pthread_lock *)lock; int status, error = 0; @@ -777,7 +777,7 @@ done: } void -PyThread_release_lock(PyThread_type_lock lock) +TyThread_release_lock(TyThread_type_lock lock) { pthread_lock *thelock = (pthread_lock *)lock; int status, error = 0; @@ -800,16 +800,16 @@ PyThread_release_lock(PyThread_type_lock lock) #endif /* USE_SEMAPHORES */ int -_PyThread_at_fork_reinit(PyThread_type_lock *lock) +_PyThread_at_fork_reinit(TyThread_type_lock *lock) { - PyThread_type_lock new_lock = PyThread_allocate_lock(); + TyThread_type_lock new_lock = TyThread_allocate_lock(); if (new_lock == NULL) { return -1; } /* bpo-6721, bpo-40089: The old lock can be in an inconsistent state. fork() can be called in the middle of an operation on the lock done by - another thread. So don't call PyThread_free_lock(*lock). + another thread. So don't call TyThread_free_lock(*lock). Leak memory on purpose. Don't release the memory either since the address of a mutex is relevant. Putting two mutexes at the same address @@ -820,9 +820,9 @@ _PyThread_at_fork_reinit(PyThread_type_lock *lock) } int -PyThread_acquire_lock(PyThread_type_lock lock, int waitflag) +TyThread_acquire_lock(TyThread_type_lock lock, int waitflag) { - return PyThread_acquire_lock_timed(lock, waitflag ? -1 : 0, /*intr_flag=*/0); + return TyThread_acquire_lock_timed(lock, waitflag ? -1 : 0, /*intr_flag=*/0); } /* set the thread stack size. @@ -877,7 +877,7 @@ _pythread_pthread_set_stacksize(size_t size) */ /* Issue #25658: On platforms where native TLS key is defined in a way that - cannot be safely cast to int, PyThread_create_key returns immediately a + cannot be safely cast to int, TyThread_create_key returns immediately a failure status and other TLS functions all are no-ops. This indicates clearly that the old API is not supported on platforms where it cannot be used reliably, and that no effort will be made to add such support. @@ -887,7 +887,7 @@ _pythread_pthread_set_stacksize(size_t size) */ int -PyThread_create_key(void) +TyThread_create_key(void) { #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT pthread_key_t key; @@ -907,7 +907,7 @@ PyThread_create_key(void) } void -PyThread_delete_key(int key) +TyThread_delete_key(int key) { #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT pthread_key_delete(key); @@ -915,7 +915,7 @@ PyThread_delete_key(int key) } void -PyThread_delete_key_value(int key) +TyThread_delete_key_value(int key) { #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT pthread_setspecific(key, NULL); @@ -923,7 +923,7 @@ PyThread_delete_key_value(int key) } int -PyThread_set_key_value(int key, void *value) +TyThread_set_key_value(int key, void *value) { #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT int fail = pthread_setspecific(key, value); @@ -934,7 +934,7 @@ PyThread_set_key_value(int key, void *value) } void * -PyThread_get_key_value(int key) +TyThread_get_key_value(int key) { #ifdef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT return pthread_getspecific(key); @@ -945,7 +945,7 @@ PyThread_get_key_value(int key) void -PyThread_ReInitTLS(void) +TyThread_ReInitTLS(void) { } @@ -956,7 +956,7 @@ PyThread_ReInitTLS(void) */ int -PyThread_tss_create(Ty_tss_t *key) +TyThread_tss_create(Ty_tss_t *key) { assert(key != NULL); /* If the key has been created, function is silently skipped. */ @@ -973,7 +973,7 @@ PyThread_tss_create(Ty_tss_t *key) } void -PyThread_tss_delete(Ty_tss_t *key) +TyThread_tss_delete(Ty_tss_t *key) { assert(key != NULL); /* If the key has not been created, function is silently skipped. */ @@ -987,7 +987,7 @@ PyThread_tss_delete(Ty_tss_t *key) } int -PyThread_tss_set(Ty_tss_t *key, void *value) +TyThread_tss_set(Ty_tss_t *key, void *value) { assert(key != NULL); int fail = pthread_setspecific(key->_key, value); @@ -995,7 +995,7 @@ PyThread_tss_set(Ty_tss_t *key, void *value) } void * -PyThread_tss_get(Ty_tss_t *key) +TyThread_tss_get(Ty_tss_t *key) { assert(key != NULL); return pthread_getspecific(key->_key); diff --git a/Python/traceback.c b/Python/traceback.c index 44fe151..cc9dfe1 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -5,7 +5,7 @@ #include "pycore_call.h" // _TyObject_CallMethodFormat() #include "pycore_fileutils.h" // _Ty_BEGIN_SUPPRESS_IPH #include "pycore_frame.h" // PyFrameObject -#include "pycore_interp.h" // PyInterpreterState.gc +#include "pycore_interp.h" // TyInterpreterState.gc #include "pycore_interpframe.h" // _TyFrame_GetCode() #include "pycore_pyerrors.h" // _TyErr_GetRaisedException() #include "pycore_pystate.h" // _TyThreadState_GET() @@ -260,7 +260,7 @@ tb_clear(TyObject *op) } TyTypeObject PyTraceBack_Type = { - PyVarObject_HEAD_INIT(&TyType_Type, 0) + TyVarObject_HEAD_INIT(&TyType_Type, 0) "traceback", sizeof(PyTracebackObject), 0, @@ -1030,7 +1030,7 @@ tstate_is_freed(TyThreadState *tstate) static int -interp_is_freed(PyInterpreterState *interp) +interp_is_freed(TyInterpreterState *interp) { return _TyMem_IsPtrFreed(interp); } @@ -1154,7 +1154,7 @@ write_thread_id(int fd, TyThreadState *tstate, int is_current) The caller is responsible to call TyErr_CheckSignals() to call Python signal handlers if signals were received. */ const char* -_Ty_DumpTracebackThreads(int fd, PyInterpreterState *interp, +_Ty_DumpTracebackThreads(int fd, TyInterpreterState *interp, TyThreadState *current_tstate) { if (current_tstate == NULL) { diff --git a/Python/tracemalloc.c b/Python/tracemalloc.c index 8c25727..1154d0e 100644 --- a/Python/tracemalloc.c +++ b/Python/tracemalloc.c @@ -96,9 +96,9 @@ tracemalloc_error(const char *format, ...) static int get_reentrant(void) { - assert(PyThread_tss_is_created(&tracemalloc_reentrant_key)); + assert(TyThread_tss_is_created(&tracemalloc_reentrant_key)); - void *ptr = PyThread_tss_get(&tracemalloc_reentrant_key); + void *ptr = TyThread_tss_get(&tracemalloc_reentrant_key); if (ptr != NULL) { assert(ptr == REENTRANT); return 1; @@ -112,15 +112,15 @@ static void set_reentrant(int reentrant) { assert(reentrant == 0 || reentrant == 1); - assert(PyThread_tss_is_created(&tracemalloc_reentrant_key)); + assert(TyThread_tss_is_created(&tracemalloc_reentrant_key)); if (reentrant) { assert(!get_reentrant()); - PyThread_tss_set(&tracemalloc_reentrant_key, REENTRANT); + TyThread_tss_set(&tracemalloc_reentrant_key, REENTRANT); } else { assert(get_reentrant()); - PyThread_tss_set(&tracemalloc_reentrant_key, NULL); + TyThread_tss_set(&tracemalloc_reentrant_key, NULL); } } @@ -733,7 +733,7 @@ _PyTraceMalloc_Init(void) TyMem_GetAllocator(PYMEM_DOMAIN_RAW, &allocators.raw); - if (PyThread_tss_create(&tracemalloc_reentrant_key) != 0) { + if (TyThread_tss_create(&tracemalloc_reentrant_key) != 0) { return _TyStatus_NO_MEMORY(); } @@ -781,7 +781,7 @@ tracemalloc_deinit(void) _Ty_hashtable_destroy(tracemalloc_tracebacks); _Ty_hashtable_destroy(tracemalloc_filenames); - PyThread_tss_delete(&tracemalloc_reentrant_key); + TyThread_tss_delete(&tracemalloc_reentrant_key); } diff --git a/Python/uniqueid.c b/Python/uniqueid.c index 7428d0c..2882fe6 100644 --- a/Python/uniqueid.c +++ b/Python/uniqueid.c @@ -79,7 +79,7 @@ resize_local_refcounts(_PyThreadStateImpl *tstate) Ty_ssize_t _TyObject_AssignUniqueId(TyObject *obj) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _Ty_unique_id_pool *pool = &interp->unique_ids; LOCK_POOL(pool); @@ -104,7 +104,7 @@ _TyObject_AssignUniqueId(TyObject *obj) void _TyObject_ReleaseUniqueId(Ty_ssize_t unique_id) { - PyInterpreterState *interp = _TyInterpreterState_GET(); + TyInterpreterState *interp = _TyInterpreterState_GET(); struct _Ty_unique_id_pool *pool = &interp->unique_ids; LOCK_POOL(pool); @@ -201,7 +201,7 @@ _TyObject_FinalizePerThreadRefcounts(_PyThreadStateImpl *tstate) } void -_TyObject_FinalizeUniqueIdPool(PyInterpreterState *interp) +_TyObject_FinalizeUniqueIdPool(TyInterpreterState *interp) { struct _Ty_unique_id_pool *pool = &interp->unique_ids;