Skip to content

Commit

Permalink
Fixes typo in speedups
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard O'Dwyer committed Jul 18, 2015
1 parent ff1e1bf commit 939c64f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions markupsafe/_speedups.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static int
init_constants(void)
{
PyObject *module;
/* happing of characters to replace */
/* mapping of characters to replace */
escaped_chars_repl['"'] = UNICHR(""");
escaped_chars_repl['\''] = UNICHR("'");
escaped_chars_repl['&'] = UNICHR("&");
Expand All @@ -41,7 +41,7 @@ init_constants(void)
escaped_chars_delta_len['"'] = escaped_chars_delta_len['\''] = \
escaped_chars_delta_len['&'] = 4;
escaped_chars_delta_len['<'] = escaped_chars_delta_len['>'] = 3;

/* import markup type so that we can mark the return value */
module = PyImport_ImportModule("markupsafe");
if (!module)
Expand Down Expand Up @@ -94,7 +94,7 @@ escape_unicode(PyUnicodeObject *in)
}
++next_escp;
}

if (next_escp > inp) {
/* copy unescaped chars between inp and next_escp */
Py_UNICODE_COPY(outp, inp, next_escp-inp);
Expand Down

0 comments on commit 939c64f

Please sign in to comment.