You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2013/08/26 01:51:06 UTC

[lucy-commits] [5/5] git commit: refs/heads/cfish-string-prep1 - Eliminate CB_Mimic_Str in RegexTokenizer

Eliminate CB_Mimic_Str in RegexTokenizer


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/4d667ac8
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/4d667ac8
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/4d667ac8

Branch: refs/heads/cfish-string-prep1
Commit: 4d667ac83e648e2d53507cc22c7b0bef3e83a990
Parents: 5b22e89
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Mon Aug 26 01:30:53 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Mon Aug 26 01:50:20 2013 +0200

----------------------------------------------------------------------
 perl/xs/Lucy/Analysis/RegexTokenizer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/4d667ac8/perl/xs/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/perl/xs/Lucy/Analysis/RegexTokenizer.c b/perl/xs/Lucy/Analysis/RegexTokenizer.c
index e8ccf7d..154f30c 100644
--- a/perl/xs/Lucy/Analysis/RegexTokenizer.c
+++ b/perl/xs/Lucy/Analysis/RegexTokenizer.c
@@ -115,7 +115,8 @@ S_set_pattern_from_token_re(lucy_RegexTokenizer *self, void *token_re) {
     SV *rv = newRV((SV*)token_re);
     STRLEN len = 0;
     char *ptr = SvPVutf8((SV*)rv, len);
-    CFISH_CB_Mimic_Str(ivars->pattern, ptr, len);
+    CFISH_DECREF(ivars->pattern);
+    ivars->pattern = cfish_CB_new_from_trusted_utf8(ptr, len);
     SvREFCNT_dec(rv);
 }