Skip to content

Commit

Permalink
Replace _PyLong_Format with PyNumber_ToBase
Browse files Browse the repository at this point in the history
`_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.
  • Loading branch information
musicinmybrain committed Jun 5, 2024
1 parent 3ba46f7 commit 851c4e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion immutables/_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ map_node_bitmap_dump(MapNode_Bitmap *node,
if (tmp1 == NULL) {
goto error;
}
tmp2 = _PyLong_Format(tmp1, 2);
tmp2 = PyNumber_ToBase(tmp1, 2);
Py_DECREF(tmp1);
if (tmp2 == NULL) {
goto error;
Expand Down

0 comments on commit 851c4e9

Please sign in to comment.