Skip to content

Commit 851c4e9

Browse files
Replace _PyLong_Format with PyNumber_ToBase
`_PyLong_Format` is in Python’s internal, private API; `PyNumber_ToBase` belongs to the Stable API, and is a fairly thin wrapper around `_PyLong_Format` with a bit of extra error checking. Fixes #116.
1 parent 3ba46f7 commit 851c4e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

immutables/_map.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ map_node_bitmap_dump(MapNode_Bitmap *node,
12841284
if (tmp1 == NULL) {
12851285
goto error;
12861286
}
1287-
tmp2 = _PyLong_Format(tmp1, 2);
1287+
tmp2 = PyNumber_ToBase(tmp1, 2);
12881288
Py_DECREF(tmp1);
12891289
if (tmp2 == NULL) {
12901290
goto error;

0 commit comments

Comments
 (0)