Skip to content

Commit

Permalink
cast to PyUnicodeObject
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Oct 8, 2024
1 parent 2c60930 commit cf4fc43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Version 3.0.1

Unreleased

- Address compiler warnings that became errors in GCC 14. :issue:`466`


Version 3.0.0
-------------
Expand Down
6 changes: 3 additions & 3 deletions src/markupsafe/_speedups.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ escape_unicode(PyObject *self, PyObject *s)

switch (PyUnicode_KIND(s)) {
case PyUnicode_1BYTE_KIND:
return escape_unicode_kind1(s);
return escape_unicode_kind1((PyUnicodeObject*) s);
case PyUnicode_2BYTE_KIND:
return escape_unicode_kind2(s);
return escape_unicode_kind2((PyUnicodeObject*) s);
case PyUnicode_4BYTE_KIND:
return escape_unicode_kind4(s);
return escape_unicode_kind4((PyUnicodeObject*) s);
}
assert(0); /* shouldn't happen */
return NULL;
Expand Down

0 comments on commit cf4fc43

Please sign in to comment.