Skip to content
Snippets Groups Projects
Commit bb51952fbbb4 authored by Bob Ippolito's avatar Bob Ippolito
Browse files

Merge pull request #119 from cgohlke/patch-1

_speedups.c fails to compile with msvc
Branches
No related tags found
No related merge requests found
......@@ -663,7 +663,8 @@
else if (PyInt_Check(key) || PyLong_Check(key)) {
if (!(PyInt_CheckExact(key) || PyLong_CheckExact(key))) {
/* See #118, do not trust custom str/repr */
PyObject *res;
PyObject *tmp = PyObject_CallFunctionObjArgs((PyObject *)&PyLong_Type, key, NULL);
if (tmp == NULL) {
return NULL;
}
......@@ -666,8 +667,8 @@
PyObject *tmp = PyObject_CallFunctionObjArgs((PyObject *)&PyLong_Type, key, NULL);
if (tmp == NULL) {
return NULL;
}
PyObject *res = PyObject_Str(tmp);
res = PyObject_Str(tmp);
Py_DECREF(tmp);
return res;
}
......@@ -2818,7 +2819,8 @@
}
else {
/* See #118, do not trust custom str/repr */
PyObject *res;
PyObject *tmp = PyObject_CallFunctionObjArgs((PyObject *)&PyFloat_Type, obj, NULL);
if (tmp == NULL) {
return NULL;
}
......@@ -2821,8 +2823,8 @@
PyObject *tmp = PyObject_CallFunctionObjArgs((PyObject *)&PyFloat_Type, obj, NULL);
if (tmp == NULL) {
return NULL;
}
PyObject *res = PyObject_Repr(tmp);
res = PyObject_Repr(tmp);
Py_DECREF(tmp);
return res;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment