summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Dittrich <markusle@gentoo.org>2007-09-20 21:44:50 +0000
committerMarkus Dittrich <markusle@gentoo.org>2007-09-20 21:44:50 +0000
commita5e4cae61ea06f8399455d7b11e0eb5790068272 (patch)
treec89a0b70a303e934d961b6a9a63eaa5ebba587ed /sci-chemistry/vmd/files
parentMarking madplay-0.15.2b-r1 ppc64 for bug # 189875 (diff)
downloadgentoo-2-a5e4cae61ea06f8399455d7b11e0eb5790068272.tar.gz
gentoo-2-a5e4cae61ea06f8399455d7b11e0eb5790068272.tar.bz2
gentoo-2-a5e4cae61ea06f8399455d7b11e0eb5790068272.zip
Added patch to fix python-2.5 compile issues on amd64 (fixes bug #192902).
(Portage version: 2.1.3.9)
Diffstat (limited to 'sci-chemistry/vmd/files')
-rw-r--r--sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch b/sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch
new file mode 100644
index 000000000000..ad8d0ae9b51a
--- /dev/null
+++ b/sci-chemistry/vmd/files/vmd-1.8.6-python-2.5.patch
@@ -0,0 +1,37 @@
+--- 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
+ };