mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-28 23:55:28 +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:
@@ -189,7 +189,7 @@ meth_dealloc(TyObject *self)
|
||||
}
|
||||
|
||||
static TyObject *
|
||||
meth_reduce(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
meth_reduce(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyCFunctionObject *m = _PyCFunctionObject_CAST(self);
|
||||
if (m->m_self == NULL || TyModule_Check(m->m_self))
|
||||
@@ -321,18 +321,18 @@ meth_richcompare(TyObject *self, TyObject *other, int op)
|
||||
TyObject *res;
|
||||
int eq;
|
||||
|
||||
if ((op != Ty_EQ && op != Ty_NE) ||
|
||||
if ((op != Py_EQ && op != Py_NE) ||
|
||||
!PyCFunction_Check(self) ||
|
||||
!PyCFunction_Check(other))
|
||||
{
|
||||
Ty_RETURN_NOTIMPLEMENTED;
|
||||
Py_RETURN_NOTIMPLEMENTED;
|
||||
}
|
||||
a = (PyCFunctionObject *)self;
|
||||
b = (PyCFunctionObject *)other;
|
||||
eq = a->m_self == b->m_self;
|
||||
if (eq)
|
||||
eq = a->m_ml->ml_meth == b->m_ml->ml_meth;
|
||||
if (op == Ty_EQ)
|
||||
if (op == Py_EQ)
|
||||
res = eq ? Ty_True : Ty_False;
|
||||
else
|
||||
res = eq ? Ty_False : Ty_True;
|
||||
|
||||
Reference in New Issue
Block a user