mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-25 06:05: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:
@@ -5,49 +5,49 @@
|
||||
#include "pycore_bytes_methods.h"
|
||||
|
||||
static TyObject*
|
||||
stringlib_isspace(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_isspace(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_isspace(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_isalpha(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_isalpha(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_isalpha(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_isalnum(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_isalnum(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_isalnum(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_isascii(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_isascii(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_isascii(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_isdigit(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_isdigit(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_isdigit(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_islower(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_islower(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_islower(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_isupper(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_isupper(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_isupper(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_istitle(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_istitle(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
return _Ty_bytes_istitle(STRINGLIB_STR(self), STRINGLIB_LEN(self));
|
||||
}
|
||||
@@ -56,7 +56,7 @@ stringlib_istitle(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
/* functions that return a new object partially translated by ctype funcs: */
|
||||
|
||||
static TyObject*
|
||||
stringlib_lower(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_lower(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
TyObject* newobj;
|
||||
newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self));
|
||||
@@ -68,7 +68,7 @@ stringlib_lower(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_upper(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_upper(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
TyObject* newobj;
|
||||
newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self));
|
||||
@@ -80,7 +80,7 @@ stringlib_upper(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_title(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_title(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
TyObject* newobj;
|
||||
newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self));
|
||||
@@ -92,7 +92,7 @@ stringlib_title(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_capitalize(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_capitalize(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
TyObject* newobj;
|
||||
newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self));
|
||||
@@ -104,7 +104,7 @@ stringlib_capitalize(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
}
|
||||
|
||||
static TyObject*
|
||||
stringlib_swapcase(TyObject *self, TyObject *Ty_UNUSED(ignored))
|
||||
stringlib_swapcase(TyObject *self, TyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
TyObject* newobj;
|
||||
newobj = STRINGLIB_NEW(NULL, STRINGLIB_LEN(self));
|
||||
|
||||
@@ -64,7 +64,7 @@ Ty_LOCAL_INLINE(TyObject *)
|
||||
SubString_new_object(SubString *str)
|
||||
{
|
||||
if (str->str == NULL)
|
||||
Ty_RETURN_NONE;
|
||||
Py_RETURN_NONE;
|
||||
return TyUnicode_Substring(str->str, str->start, str->end);
|
||||
}
|
||||
|
||||
@@ -1100,7 +1100,7 @@ static TyTypeObject PyFormatterIter_Type = {
|
||||
describing the parsed elements. It's a wrapper around
|
||||
stringlib/string_format.h's MarkupIterator */
|
||||
static TyObject *
|
||||
formatter_parser(TyObject *Ty_UNUSED(module), TyObject *self)
|
||||
formatter_parser(TyObject *Py_UNUSED(module), TyObject *self)
|
||||
{
|
||||
formatteriterobject *it;
|
||||
|
||||
@@ -1236,7 +1236,7 @@ static TyTypeObject PyFieldNameIter_Type = {
|
||||
field_name_split. The iterator it returns is a
|
||||
FieldNameIterator */
|
||||
static TyObject *
|
||||
formatter_field_name_split(TyObject *Ty_UNUSED(module), TyObject *self)
|
||||
formatter_field_name_split(TyObject *Py_UNUSED(module), TyObject *self)
|
||||
{
|
||||
SubString first;
|
||||
Ty_ssize_t first_idx;
|
||||
|
||||
Reference in New Issue
Block a user