--- vmd-1.8.6/src/py_atomsel.C 2007-04-08 07:04:03.000000000 +0200 +++ vmd-1.8.6.new/src/py_atomsel.C 2007-09-20 19:30:41.000000000 +0200 @@ -25,6 +25,10 @@ #include "py_commands.h" #include "BondSearch.h" +#if PY_VERSION_HEX < ((2<<24)|(5<<16)) +typedef int Py_ssize_t; +#endif + typedef struct { PyObject_HEAD AtomSel *atomSel; @@ -915,9 +919,11 @@ * Support for mapping protocol */ -static int -atomselection_length( PyAtomSelObject *a ) { - return a->atomSel->selected; + +static Py_ssize_t +atomselection_length(PyObject *a) +{ + return ((PyAtomSelObject *)a)->atomSel->selected; } // for integer argument, return True or False if index in in selection @@ -935,7 +941,7 @@ } static PyMappingMethods atomsel_mapping = { - (inquiry)atomselection_length, + atomselection_length, (binaryfunc)atomselection_subscript, 0 };