mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-25 14:15:29 +00:00
Fix more missed Py_ patterns - opcode, thread, exception
Fixed additional patterns: - _PyOpcode_* → _TyOpcode_* (all opcode metadata) - _PyUOpName → _TyUOpName - _PyFunction_* → _TyFunction_* - _PyListIterObject → _TyListIterObject - _Py_T_OBJECT → _Ty_T_OBJECT - Py_BEGIN_ALLOW_THREADS, Py_END_ALLOW_THREADS → Ty_* - PyDoc_STRVAR, PyDoc_STR → TyDoc_* - PyInterpreterState, PyThread_*, PyTime_t → Ty* - PyStructSequence_* → TyStructSequence_* - PyLockStatus → TyLockStatus - PyVarObject_HEAD_INIT → TyVarObject_HEAD_INIT - PyBaseExceptionObject → TyBaseExceptionObject - Fixed _PyExc_ → _TyExc_ in exception macros Build is progressing further. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
8
Python/Python-ast.c
generated
8
Python/Python-ast.c
generated
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user