From: Armin Ronacher Date: Mon, 9 Jun 2008 16:54:56 +0000 (+0200) Subject: small fix for Python 2.4 X-Git-Tag: 2.0rc1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4e1fb4d3608b3699f1bbe2f4210dd1b96bbe573;p=thirdparty%2Fjinja.git small fix for Python 2.4 --HG-- branch : trunk --- diff --git a/jinja2/_speedups.c b/jinja2/_speedups.c index 8a9a1085..61858ef8 100644 --- a/jinja2/_speedups.c +++ b/jinja2/_speedups.c @@ -17,6 +17,13 @@ #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]; diff --git a/setup.py b/setup.py index ed3e974b..f9f447db 100644 --- 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 """