Skip to content

Commit b15ad61

Browse files
committed
use Py_ARRAY_LENGTH
1 parent fd24d7b commit b15ad61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/specialize.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2561,7 +2561,7 @@ binary_op_extended_specialization(PyObject *lhs, PyObject *rhs, int oparg,
25612561
_PyBinaryOpSpecializationDescr **descr)
25622562
{
25632563
typedef _PyBinaryOpSpecializationDescr descr_type;
2564-
size_t size = sizeof(binaryop_extend_builtins)/sizeof(descr_type);
2564+
size_t size = Py_ARRAY_LENGTH(binaryop_extend_builtins);
25652565
for (size_t i = 0; i < size; i++) {
25662566
descr_type *d = (descr_type *)&binaryop_extend_builtins[i];
25672567
assert(d != NULL);

0 commit comments

Comments
 (0)