Kaydet (Commit) ad89bbcd authored tarafından Guido van Rossum's avatar Guido van Rossum

Trent Mick: change a few casts for Win64 compatibility.

üst 2c9cb7af
...@@ -283,7 +283,7 @@ set_name(c, v) ...@@ -283,7 +283,7 @@ set_name(c, v)
{ {
if (v == NULL || !PyString_Check(v)) if (v == NULL || !PyString_Check(v))
return "__name__ must be a string object"; 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"; return "__name__ must not contain null bytes";
set_slot(&c->cl_name, v); set_slot(&c->cl_name, v);
return ""; return "";
......
...@@ -366,7 +366,7 @@ make_pair(v, w) ...@@ -366,7 +366,7 @@ make_pair(v, w)
if (pair == NULL) { if (pair == NULL) {
return NULL; return NULL;
} }
if ((long)v <= (long)w) { if (v <= w) {
PyTuple_SET_ITEM(pair, 0, PyLong_FromVoidPtr((void *)v)); PyTuple_SET_ITEM(pair, 0, PyLong_FromVoidPtr((void *)v));
PyTuple_SET_ITEM(pair, 1, PyLong_FromVoidPtr((void *)w)); PyTuple_SET_ITEM(pair, 1, PyLong_FromVoidPtr((void *)w));
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment