Skip to content

Commit

Permalink
Add explicit noexcept to string functions
Browse files Browse the repository at this point in the history
  • Loading branch information
phoerious committed Apr 4, 2024
1 parent 432a2d1 commit 57f11c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resiliparse/resiliparse_common/string_util.pxd
Expand Up @@ -86,7 +86,7 @@ cdef extern from * nogil:
cdef string strip_str(string s)


cdef inline string_view strip_sv(string_view s) nogil:
cdef inline string_view strip_sv(string_view s) noexcept nogil:
"""Strip leading and trailing white space from a C++ string_view."""
cdef const char* start = s.data()
cdef size_t l = strip_c_str(&start, s.size())
Expand All @@ -97,7 +97,7 @@ cdef inline string_view strip_sv(string_view s) nogil:
return s


cdef inline string str_to_lower(string s) nogil:
cdef inline string str_to_lower(string s) noexcept nogil:
"""Convert a C++ string to lower-case characters."""
cdef size_t i
for i in range(s.size()):
Expand Down

0 comments on commit 57f11c3

Please sign in to comment.