Skip to content

Commit e920c97

Browse files
committed
hashlib: fix the 'digest_size' property
Closes: #6796
1 parent 6572f85 commit e920c97

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shared-bindings/hashlib/Hash.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@
3939
//| digest_size: int
4040
//| """Digest size in bytes"""
4141
//|
42-
STATIC mp_obj_t hashlib_hash_get_digest_size(mp_obj_t self_in) {
42+
STATIC mp_obj_t hashlib_hash_digest_size_get(mp_obj_t self_in) {
4343
mp_check_self(mp_obj_is_type(self_in, &hashlib_hash_type));
4444
hashlib_hash_obj_t *self = MP_OBJ_TO_PTR(self_in);
4545
return MP_OBJ_NEW_SMALL_INT(common_hal_hashlib_hash_get_digest_size(self));
4646
}
47-
MP_PROPERTY_GETTER(hashlib_hash_digest_size_obj, hashlib_hash_get_digest_size);
47+
MP_DEFINE_CONST_FUN_OBJ_1(hashlib_hash_digest_size_get_obj, hashlib_hash_digest_size_get);
48+
MP_PROPERTY_GETTER(hashlib_hash_digest_size_obj, (mp_obj_t)&hashlib_hash_digest_size_get_obj);
4849

4950
//| def update(self, data: ReadableBuffer) -> None:
5051
//| """Update the hash with the given bytes.

0 commit comments

Comments
 (0)