Index: Modules/_ctypes/callproc.c =================================================================== --- Modules/_ctypes/callproc.c (revision 54869) +++ Modules/_ctypes/callproc.c (working copy) @@ -1247,9 +1247,9 @@ static PyObject *py_dl_close(PyObject *self, PyObject *args) { - int handle; + Py_ssize_t handle; - if (!PyArg_ParseTuple(args, "i:dlclose", &handle)) + if (!PyArg_ParseTuple(args, "n:dlclose", &handle)) return NULL; if (dlclose((void*)handle)) { PyErr_SetString(PyExc_OSError, @@ -1263,10 +1263,10 @@ static PyObject *py_dl_sym(PyObject *self, PyObject *args) { char *name; - int handle; + Py_ssize_t handle; void *ptr; - if (!PyArg_ParseTuple(args, "is:dlsym", &handle, &name)) + if (!PyArg_ParseTuple(args, "ns:dlsym", &handle, &name)) return NULL; ptr = ctypes_dlsym((void*)handle, name); if (!ptr) { @@ -1286,12 +1286,12 @@ static PyObject * call_function(PyObject *self, PyObject *args) { - int func; + Py_ssize_t func; PyObject *arguments; PyObject *result; if (!PyArg_ParseTuple(args, - "iO!", + "nO!", &func, &PyTuple_Type, &arguments)) return NULL; @@ -1317,12 +1317,12 @@ static PyObject * call_cdeclfunction(PyObject *self, PyObject *args) { - int func; + Py_ssize_t func; PyObject *arguments; PyObject *result; if (!PyArg_ParseTuple(args, - "iO!", + "nO!", &func, &PyTuple_Type, &arguments)) return NULL;