Skip to content

Commit cbfa3b4

Browse files
committed
fix undefined behavior
1 parent 1d68ab5 commit cbfa3b4

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
## Changelog
22

3-
### [unreleased] -
3+
### [2.13.5] - 2022-12-11
44
#### Added
55
- added docs to sdist
66

7+
#### Fixed
8+
- fix two cases of undefined behavior in `process.cdist`
9+
710
### [2.13.4] - 2022-12-08
811
#### Changed
912
- handle `float("nan")` similar to None for query / choice, since this is common for

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ else()
8989
add_library(Taskflow::Taskflow ALIAS Taskflow)
9090
endif()
9191

92-
find_package(rapidfuzz 1.10.1 QUIET)
92+
find_package(rapidfuzz 1.10.2 QUIET)
9393
if(rapidfuzz_FOUND)
9494
message(STATUS "Using system supplied version of rapidfuzz-cpp")
9595
else()

extern/rapidfuzz-cpp

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def show_message(*lines):
1313

1414
setup_args = {
1515
"name": "rapidfuzz",
16-
"version": "2.13.4",
16+
"version": "2.13.5",
1717
"extras_require": {"full": ["numpy"]},
1818
"url": "https://github.com/maxbachmann/RapidFuzz",
1919
"author": "Max Bachmann",

src/rapidfuzz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
__author__: str = "Max Bachmann"
55
__license__: str = "MIT"
6-
__version__: str = "2.13.4"
6+
__version__: str = "2.13.5"
77

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

src/rapidfuzz/process_cpp_impl.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ cdef inline vector[RF_StringWrapper] preprocess(queries, processor) except *:
13271327
# No processor
13281328
if not processor:
13291329
for query in queries:
1330-
proc_queries.emplace_back(conv_sequence(query))
1330+
proc_queries.emplace_back(conv_sequence(query), <PyObject*>query)
13311331
else:
13321332
processor_capsule = getattr(processor, '_RF_Preprocess', processor)
13331333
if PyCapsule_IsValid(processor_capsule, NULL):
@@ -1337,7 +1337,7 @@ cdef inline vector[RF_StringWrapper] preprocess(queries, processor) except *:
13371337
if processor_context != NULL and processor_context.version == SCORER_STRUCT_VERSION:
13381338
for query in queries:
13391339
processor_context.preprocess(query, &proc_str)
1340-
proc_queries.emplace_back(proc_str)
1340+
proc_queries.emplace_back(proc_str, <PyObject*>query)
13411341

13421342
# Call Processor through Python
13431343
else:

0 commit comments

Comments
 (0)