mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-26 14:45:06 +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:
@@ -527,29 +527,29 @@ float_richcompare(TyObject *v, TyObject *w, int op)
|
||||
|
||||
Compare:
|
||||
switch (op) {
|
||||
case Ty_EQ:
|
||||
case Py_EQ:
|
||||
r = i == j;
|
||||
break;
|
||||
case Ty_NE:
|
||||
case Py_NE:
|
||||
r = i != j;
|
||||
break;
|
||||
case Ty_LE:
|
||||
case Py_LE:
|
||||
r = i <= j;
|
||||
break;
|
||||
case Ty_GE:
|
||||
case Py_GE:
|
||||
r = i >= j;
|
||||
break;
|
||||
case Ty_LT:
|
||||
case Py_LT:
|
||||
r = i < j;
|
||||
break;
|
||||
case Ty_GT:
|
||||
case Py_GT:
|
||||
r = i > j;
|
||||
break;
|
||||
}
|
||||
return TyBool_FromLong(r);
|
||||
|
||||
Unimplemented:
|
||||
Ty_RETURN_NOTIMPLEMENTED;
|
||||
Py_RETURN_NOTIMPLEMENTED;
|
||||
}
|
||||
|
||||
static Ty_hash_t
|
||||
@@ -862,7 +862,7 @@ float_is_integer_impl(TyObject *self)
|
||||
if (x == -1.0 && TyErr_Occurred())
|
||||
return NULL;
|
||||
if (!isfinite(x))
|
||||
Ty_RETURN_FALSE;
|
||||
Py_RETURN_FALSE;
|
||||
errno = 0;
|
||||
o = (floor(x) == x) ? Ty_True : Ty_False;
|
||||
if (errno != 0) {
|
||||
@@ -1749,13 +1749,13 @@ float___getformat___impl(TyTypeObject *type, const char *typestr)
|
||||
|
||||
|
||||
static TyObject *
|
||||
float_getreal(TyObject *v, void *Ty_UNUSED(closure))
|
||||
float_getreal(TyObject *v, void *Py_UNUSED(closure))
|
||||
{
|
||||
return float_float(v);
|
||||
}
|
||||
|
||||
static TyObject *
|
||||
float_getimag(TyObject *Ty_UNUSED(v), void *Ty_UNUSED(closure))
|
||||
float_getimag(TyObject *Py_UNUSED(v), void *Py_UNUSED(closure))
|
||||
{
|
||||
return TyFloat_FromDouble(0.0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user