summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/bytesobject.c2
-rw-r--r--Objects/obmalloc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 30b0e50..b015974 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -673,7 +673,7 @@ _PyBytes_Format(PyObject *format, PyObject *args)
"* wants int");
goto error;
}
- prec = PyLong_AsSsize_t(v);
+ prec = _PyLong_AsInt(v);
if (prec == -1 && PyErr_Occurred())
goto error;
if (prec < 0)
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index e900cc3..7cc889f 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -1339,7 +1339,7 @@ _PyObject_Alloc(int use_calloc, void *ctx, size_t nelem, size_t elsize)
pool = (poolp)usable_arenas->pool_address;
assert((block*)pool <= (block*)usable_arenas->address +
ARENA_SIZE - POOL_SIZE);
- pool->arenaindex = usable_arenas - arenas;
+ pool->arenaindex = (uint)(usable_arenas - arenas);
assert(&arenas[pool->arenaindex] == usable_arenas);
pool->szidx = DUMMY_SIZE_IDX;
usable_arenas->pool_address += POOL_SIZE;