[svn] made speedups python2.3/python2.4 compatible
authorArmin Ronacher <armin.ronacher@active-4.com>
Sat, 28 Apr 2007 12:47:32 +0000 (14:47 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Sat, 28 Apr 2007 12:47:32 +0000 (14:47 +0200)
--HG--
branch : trunk

jinja/_speedups.c

index dc71a1f253cd88ae977a46469286b29b112fc2c5..426476cc741d648d490c7822abf272130ab33d42 100644 (file)
@@ -402,7 +402,11 @@ static PySequenceMethods BaseContext_as_sequence[] = {
 };
 
 static PyMappingMethods BaseContext_as_mapping[] = {
+#if Py_VERSION_HEX < 0x02050000
+       (inquiry)BaseContext_length
+#else
        (lenfunc)BaseContext_length,
+#endif
        (binaryfunc)BaseContext_getitem,
        (objobjargproc)BaseContext_setitem
 };