Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

small fix for Python 2.4

--HG--
branch : trunk
  • Loading branch information...
commit f4e1fb4d3608b3699f1bbe2f4210dd1b96bbe573 1 parent 3e39651
@mitsuhiko authored
Showing with 9 additions and 2 deletions.
  1. +7 −0 jinja2/_speedups.c
  2. +2 −2 setup.py
View
7 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];
View
4 setup.py
@@ -28,14 +28,14 @@
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
"""
Please sign in to comment.
Something went wrong with that request. Please try again.