mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 13:45:05 +00:00
Fix incorrect replacements in Py_ to Ty_ renaming
Fixed several macros and constants that should not have been renamed: - _Py_CAST, _Py_NULL, _Py_RVALUE (internal utility macros) - Py_UNUSED (unused parameter macro) - Py_EQ, Py_NE, Py_LT, Py_LE, Py_GT, Py_GE (comparison constants) - Py_RETURN_* macros (NONE, TRUE, FALSE, NOTIMPLEMENTED, RICHCOMPARE) - Py_READONLY, Py_ULL, Py_CONTEXT_SWITCHED - TyGC_Head in generated clinic files Build is still in progress with some remaining issues to resolve. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -121,7 +121,7 @@ tb_new_impl(TyTypeObject *type, TyObject *tb_next, PyFrameObject *tb_frame,
|
||||
}
|
||||
|
||||
static TyObject *
|
||||
tb_dir(TyObject *Ty_UNUSED(self), TyObject *Ty_UNUSED(ignored))
|
||||
tb_dir(TyObject *Py_UNUSED(self), TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return Ty_BuildValue("[ssss]", "tb_frame", "tb_next",
|
||||
"tb_lasti", "tb_lineno");
|
||||
@@ -154,14 +154,14 @@ tb_get_lineno(TyObject *op)
|
||||
}
|
||||
|
||||
static TyObject *
|
||||
tb_lineno_get(TyObject *op, void *Ty_UNUSED(_))
|
||||
tb_lineno_get(TyObject *op, void *Py_UNUSED(_))
|
||||
{
|
||||
PyTracebackObject *self = _PyTracebackObject_CAST(op);
|
||||
int lineno = self->tb_lineno;
|
||||
if (lineno == -1) {
|
||||
lineno = tb_get_lineno(op);
|
||||
if (lineno < 0) {
|
||||
Ty_RETURN_NONE;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
}
|
||||
return TyLong_FromLong(lineno);
|
||||
@@ -220,8 +220,8 @@ static TyMethodDef tb_methods[] = {
|
||||
};
|
||||
|
||||
static TyMemberDef tb_memberlist[] = {
|
||||
{"tb_frame", _Ty_T_OBJECT, OFF(tb_frame), Ty_READONLY|Ty_AUDIT_READ},
|
||||
{"tb_lasti", Ty_T_INT, OFF(tb_lasti), Ty_READONLY},
|
||||
{"tb_frame", _Ty_T_OBJECT, OFF(tb_frame), Py_READONLY|Ty_AUDIT_READ},
|
||||
{"tb_lasti", Ty_T_INT, OFF(tb_lasti), Py_READONLY},
|
||||
{NULL} /* Sentinel */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user