Merge pull request #84 from cgohlke/patch-5

64 bit proof install of ops
This commit is contained in:
Alex Clark ☺ 2013-03-08 11:01:07 -08:00
commit 8f63a27c65

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);