Don't generate nb_index slot: it is not used yet and breaks compatibility with Python < 2.5

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2008-10-07 12:13:05 +01:00
1 parent 3ea77fd1f0
commit 9c1dcf79df
1 file changed
+4 -4
+4 -4
View File
@@ -148,9 +148,9 @@ class PyNumberMethods(object):
' (binaryfunc) %(nb_true_divide)s,\n'
' (binaryfunc) %(nb_inplace_floor_divide)s,\n'
' (binaryfunc) %(nb_inplace_true_divide)s,\n'
'\n'
' /* Added in release 2.5 */\n'
' (unaryfunc) %(nb_index)s,\n'
#'\n'
#' /* Added in release 2.5 */\n'
#' (unaryfunc) %(nb_index)s,\n'
'\n'
'};\n'
)
@@ -203,7 +203,7 @@ class PyNumberMethods(object):
slots.setdefault('nb_true_divide', 'NULL')
slots.setdefault('nb_inplace_floor_divide', 'NULL')
slots.setdefault('nb_inplace_true_divide', 'NULL')
slots.setdefault('nb_index', 'NULL')
#slots.setdefault('nb_index', 'NULL')
code_sink.writeln(self.TEMPLATE % slots)