64 bit proof install of ops

Fixes crashes on win-amd64
This commit is contained in:
Christoph Gohlke 2013-03-08 10:46:46 -08:00
parent a67b849bb0
commit 8f90358d9a

View File

@ -222,7 +222,7 @@ static PyMethodDef _functions[] = {
static void static void
install(PyObject *d, char* name, void* value) install(PyObject *d, char* name, void* value)
{ {
PyObject *v = PyInt_FromLong((long) value); PyObject *v = PyInt_FromSsize_t((Py_ssize_t) value);
if (!v || PyDict_SetItemString(d, name, v)) if (!v || PyDict_SetItemString(d, name, v))
PyErr_Clear(); PyErr_Clear();
Py_XDECREF(v); Py_XDECREF(v);