Use the new Py_ARRAY_LENGTH macro
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 85b3353..43e5f01 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -2444,8 +2444,7 @@
                     break;
                 }
     }
-    assert(1 <= x_size &&
-           x_size <= (Py_ssize_t)(sizeof(x_digits)/sizeof(digit)));
+    assert(1 <= x_size && x_size <= (Py_ssize_t)Py_ARRAY_LENGTH(x_digits));
 
     /* Round, and convert to double. */
     x_digits[0] += half_even_correction[x_digits[0] & 7];
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 32b2672..2e6eb0a 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2355,7 +2355,7 @@
     res->ht_type.tp_flags = spec->flags | Py_TPFLAGS_HEAPTYPE;
 
     for (slot = spec->slots; slot->slot; slot++) {
-        if (slot->slot >= sizeof(slotoffsets)/sizeof(slotoffsets[0])) {
+        if (slot->slot >= Py_ARRAY_LENGTH(slotoffsets)) {
             PyErr_SetString(PyExc_RuntimeError, "invalid slot offset");
             goto fail;
         }
@@ -2583,7 +2583,7 @@
     return PyDict_New();
 }
 
-/* 
+/*
    Merge the __dict__ of aclass into dict, and recursively also all
    the __dict__s of aclass's base classes.  The order of merging isn't
    defined, as it's expected that only the final set of dict keys is
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index bff74d9..387974d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -12552,7 +12552,7 @@
     /* initialize the linebreak bloom filter */
     bloom_linebreak = make_bloom_mask(
         PyUnicode_2BYTE_KIND, linebreak,
-        sizeof(linebreak) / sizeof(linebreak[0]));
+        Py_ARRAY_LENGTH(linebreak));
 
     PyType_Ready(&EncodingMapType);
 }