diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/classobject.c | 2 | ||||
-rw-r--r-- | Objects/object.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 04362a7..9e1d1b2 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -283,7 +283,7 @@ set_name(c, v) { if (v == NULL || !PyString_Check(v)) return "__name__ must be a string object"; - if ((long)strlen(PyString_AS_STRING(v)) != PyString_GET_SIZE(v)) + if (strlen(PyString_AS_STRING(v)) != (size_t)PyString_GET_SIZE(v)) return "__name__ must not contain null bytes"; set_slot(&c->cl_name, v); return ""; diff --git a/Objects/object.c b/Objects/object.c index 5560792..9a0e87c 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -366,7 +366,7 @@ make_pair(v, w) if (pair == NULL) { return NULL; } - if ((long)v <= (long)w) { + if (v <= w) { PyTuple_SET_ITEM(pair, 0, PyLong_FromVoidPtr((void *)v)); PyTuple_SET_ITEM(pair, 1, PyLong_FromVoidPtr((void *)w)); } else { |