summaryrefslogtreecommitdiff
path: root/embed.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-02-09 10:40:38 -0700
committerKarl Williamson <khw@cpan.org>2016-02-09 23:30:53 -0700
commitc6871b765d934773fb82823602c1e03e073c38ac (patch)
treeff9962440fdd86916e5ebe1953801dbfe6f372cf /embed.h
parent54e70d91fbed63597a6d5ea1113abcb56b8a22c0 (diff)
downloadperl-c6871b765d934773fb82823602c1e03e073c38ac.tar.gz
regcomp.c: Add code to compute edit distance (Damerau–Levenshtein)
This will be used in a future commit. This code is taken from CPAN Text::Levenshtein::Damerau::XS with the author's knowledge. There have been white-space changes to make it conform better to perl's core coding standards, and declaration changes to make it more portable, such as using UV instead of 'unsigned int', and PERL_STATIC_INLINE instead of a less portable form, but the logic is unchanged. One variable was changed to signed from unsigned to avoid a warning message from some compilers. The author and I will decide later about keeping the cpan module and this code in sync. It changes very rarely.
Diffstat (limited to 'embed.h')
-rw-r--r--embed.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/embed.h b/embed.h
index 24b61bff4d..82b7ced268 100644
--- a/embed.h
+++ b/embed.h
@@ -997,6 +997,7 @@
#define compute_EXACTish S_compute_EXACTish
#define construct_ahocorasick_from_trie(a,b,c) S_construct_ahocorasick_from_trie(aTHX_ a,b,c)
#define could_it_be_a_POSIX_class S_could_it_be_a_POSIX_class
+#define edit_distance S_edit_distance
#define get_ANYOF_cp_list_for_ssc(a,b) S_get_ANYOF_cp_list_for_ssc(aTHX_ a,b)
#define get_invlist_iter_addr S_get_invlist_iter_addr
#define grok_bslash_N(a,b,c,d,e,f) S_grok_bslash_N(aTHX_ a,b,c,d,e,f)