mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 21:55:26 +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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user