Skip to content

Commit

Permalink
fix undefined behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Dec 10, 2022
1 parent 1d68ab5 commit cbfa3b4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## Changelog

### [unreleased] -
### [2.13.5] - 2022-12-11
#### Added
- added docs to sdist

#### Fixed
- fix two cases of undefined behavior in `process.cdist`

### [2.13.4] - 2022-12-08
#### Changed
- handle `float("nan")` similar to None for query / choice, since this is common for
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ else()
add_library(Taskflow::Taskflow ALIAS Taskflow)
endif()

find_package(rapidfuzz 1.10.1 QUIET)
find_package(rapidfuzz 1.10.2 QUIET)
if(rapidfuzz_FOUND)
message(STATUS "Using system supplied version of rapidfuzz-cpp")
else()
Expand Down
2 changes: 1 addition & 1 deletion extern/rapidfuzz-cpp
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def show_message(*lines):

setup_args = {
"name": "rapidfuzz",
"version": "2.13.4",
"version": "2.13.5",
"extras_require": {"full": ["numpy"]},
"url": "https://github.com/maxbachmann/RapidFuzz",
"author": "Max Bachmann",
Expand Down
2 changes: 1 addition & 1 deletion src/rapidfuzz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
__author__: str = "Max Bachmann"
__license__: str = "MIT"
__version__: str = "2.13.4"
__version__: str = "2.13.5"

from rapidfuzz import distance, fuzz, process, string_metric, utils

Expand Down
4 changes: 2 additions & 2 deletions src/rapidfuzz/process_cpp_impl.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ cdef inline vector[RF_StringWrapper] preprocess(queries, processor) except *:
# No processor
if not processor:
for query in queries:
proc_queries.emplace_back(conv_sequence(query))
proc_queries.emplace_back(conv_sequence(query), <PyObject*>query)
else:
processor_capsule = getattr(processor, '_RF_Preprocess', processor)
if PyCapsule_IsValid(processor_capsule, NULL):
Expand All @@ -1337,7 +1337,7 @@ cdef inline vector[RF_StringWrapper] preprocess(queries, processor) except *:
if processor_context != NULL and processor_context.version == SCORER_STRUCT_VERSION:
for query in queries:
processor_context.preprocess(query, &proc_str)
proc_queries.emplace_back(proc_str)
proc_queries.emplace_back(proc_str, <PyObject*>query)

# Call Processor through Python
else:
Expand Down

0 comments on commit cbfa3b4

Please sign in to comment.