mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-24 13:45: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:
@@ -835,7 +835,7 @@ _blake2_blake2b_update_impl(Blake2Object *self, TyObject *data)
|
||||
|
||||
PyBuffer_Release(&buf);
|
||||
|
||||
Ty_RETURN_NONE;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
@@ -925,7 +925,7 @@ static TyMethodDef py_blake2b_methods[] = {
|
||||
|
||||
|
||||
static TyObject *
|
||||
py_blake2b_get_name(TyObject *op, void *Ty_UNUSED(closure))
|
||||
py_blake2b_get_name(TyObject *op, void *Py_UNUSED(closure))
|
||||
{
|
||||
Blake2Object *self = _Blake2Object_CAST(op);
|
||||
return TyUnicode_FromString(is_blake2b(self->impl) ? "blake2b" : "blake2s");
|
||||
@@ -934,7 +934,7 @@ py_blake2b_get_name(TyObject *op, void *Ty_UNUSED(closure))
|
||||
|
||||
|
||||
static TyObject *
|
||||
py_blake2b_get_block_size(TyObject *op, void *Ty_UNUSED(closure))
|
||||
py_blake2b_get_block_size(TyObject *op, void *Py_UNUSED(closure))
|
||||
{
|
||||
Blake2Object *self = _Blake2Object_CAST(op);
|
||||
return TyLong_FromLong(is_blake2b(self->impl) ? HACL_HASH_BLAKE2B_BLOCK_BYTES : HACL_HASH_BLAKE2S_BLOCK_BYTES);
|
||||
@@ -943,7 +943,7 @@ py_blake2b_get_block_size(TyObject *op, void *Ty_UNUSED(closure))
|
||||
|
||||
|
||||
static TyObject *
|
||||
py_blake2b_get_digest_size(TyObject *op, void *Ty_UNUSED(closure))
|
||||
py_blake2b_get_digest_size(TyObject *op, void *Py_UNUSED(closure))
|
||||
{
|
||||
Blake2Object *self = _Blake2Object_CAST(op);
|
||||
switch (self->impl) {
|
||||
|
||||
Reference in New Issue
Block a user