bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264)

diff --git a/Python/hamt.c b/Python/hamt.c
index aa90d37..67af04c 100644
--- a/Python/hamt.c
+++ b/Python/hamt.c
@@ -2005,7 +2005,7 @@
             goto error;
         }
 
-        if (_hamt_dump_format(writer, "%d::\n", i)) {
+        if (_hamt_dump_format(writer, "%zd::\n", i)) {
             goto error;
         }