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:
copilot-swe-agent[bot]
2025-12-29 17:44:05 +00:00
parent b198f511d2
commit 42e2356c88
367 changed files with 3520 additions and 3520 deletions

View File

@@ -2631,7 +2631,7 @@ create_stdio(const PyConfig *config, TyObject* io,
const int buffered_stdio = config->buffered_stdio;
if (!_Ty_IsValidFD(fd)) {
Ty_RETURN_NONE;
Py_RETURN_NONE;
}
/* stdin is always opened in buffered mode, first because it shouldn't
@@ -2753,7 +2753,7 @@ error:
_Ty_IsValidFD() check was called. Ignore the OSError and set the
stream to None. */
TyErr_Clear();
Ty_RETURN_NONE;
Py_RETURN_NONE;
}
return NULL;
}
@@ -2905,7 +2905,7 @@ android_log_write_impl(TyObject *self, TyObject *args)
// Despite its name, this function is part of the public API
// (https://developer.android.com/ndk/reference/group/logging).
__android_log_write(prio, tag, text);
Ty_RETURN_NONE;
Py_RETURN_NONE;
}
@@ -2969,7 +2969,7 @@ apple_log_write_impl(TyObject *self, TyObject *args)
// Pass the user-provided text through explicit %s formatting
// to avoid % literals being interpreted as a formatting directive.
os_log_with_type(OS_LOG_DEFAULT, logtype, "%s", text);
Ty_RETURN_NONE;
Py_RETURN_NONE;
}