small fix for Python 2.4
authorArmin Ronacher <armin.ronacher@active-4.com>
Mon, 9 Jun 2008 16:54:56 +0000 (18:54 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Mon, 9 Jun 2008 16:54:56 +0000 (18:54 +0200)
--HG--
branch : trunk

jinja2/_speedups.c
setup.py

index 8a9a1085b753d8c1abc10fadc8e884ceccd2891b..61858ef84ccc4ca4ccedc143cda8453eb25f3acd 100644 (file)
 #define ESCAPED_CHARS_TABLE_SIZE 63
 #define UNICHR(x) (((PyUnicodeObject*)PyUnicode_DecodeASCII(x, strlen(x), NULL))->str);
 
+#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+#endif
+
+
 static PyObject* markup;
 static Py_ssize_t escaped_chars_delta_len[ESCAPED_CHARS_TABLE_SIZE];
 static Py_UNICODE *escaped_chars_repl[ESCAPED_CHARS_TABLE_SIZE];
index ed3e974b626eaf2e526c6618cf44a321a1c2b6a9..f9f447dbdc9280c14b5140bca7d0e565134de3c4 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -28,14 +28,14 @@ Philosophy
 Application logic is for the controller but don't try to make the life
 for the template designer too hard by giving him too few functionality.
 
-For more informations visit the new `jinja2 webpage`_ and `documentation`_.
+For more informations visit the new `Jinja2 webpage`_ and `documentation`_.
 
 The `Jinja2 tip`_ is installable via `easy_install` with ``easy_install
 Jinja2==dev``.
 
 .. _sandboxed: http://en.wikipedia.org/wiki/Sandbox_(computer_security)
 .. _Django: http://www.djangoproject.com/
-.. _jinja2 webpage: http://jinja.pocoo.org/
+.. _Jinja2 webpage: http://jinja.pocoo.org/
 .. _documentation: http://jinja.pocoo.org/2/documentation/
 .. _Jinja2 tip: http://dev.pocoo.org/hg/jinja2-main/archive/tip.tar.gz#egg=Jinja2-dev
 """