• R/O
  • SSH
  • HTTPS

senna-java: コミット


コミットメタ情報

リビジョン13 (tree)
日時2009-01-15 13:56:06
作者mir

ログメッセージ

src/jni/senna_Snippet.c: fixed bug: Snippet API doesn't work.

変更サマリ

差分

--- trunk/ChangeLog (revision 12)
+++ trunk/ChangeLog (revision 13)
@@ -1,3 +1,6 @@
1+2009-01-15 Tetsuro IKEDA <ikdttr@gmail.com>
2+ * src/jni/senna_Snippet.c: fixed bug: Snippet API doesn't work.
3+
14 2008-12-26 Tetsuro IKEDA <ikdttr@gmail.com>
25 * build.xml: changed junit setting to put build failure when test failed.
36
--- trunk/src/jni/senna_Snippet.c (revision 12)
+++ trunk/src/jni/senna_Snippet.c (revision 13)
@@ -39,6 +39,7 @@
3939 unsigned int open_len, close_len;
4040 jclass clazz;
4141 jfieldID fieldID;
42+ flags = flags | SEN_SNIP_COPY_TAG | SEN_SNIP_SKIP_LEADING_SPACES;
4243 open_str = (*env)->GetStringUTFChars(env, defaultopentag, NULL);
4344 close_str = (*env)->GetStringUTFChars(env, defaultclosetag, NULL);
4445 open_len = (*env)->GetStringUTFLength(env, defaultopentag);
@@ -97,7 +98,6 @@
9798 string = (*env)->GetStringUTFChars(env, jstr, NULL);
9899 string_len = (*env)->GetStringUTFLength(env, jstr);
99100 rc = sen_snip_exec(snip, string, string_len, &nresults, &max_tagged_len);
100- (*env)->ReleaseStringUTFChars(env, jstr, string);
101101 if (rc != sen_success)
102102 ThrowNewSennaException(env, "Failed to call sen_snip_exec().", rc);
103103
@@ -119,6 +119,7 @@
119119 (*env)->SetObjectArrayElement(env, array, i, (*env)->NewStringUTF(env, results[i]));
120120 }
121121 free(results);
122+ (*env)->ReleaseStringUTFChars(env, jstr, string);
122123 return array;
123124 }
124125
旧リポジトリブラウザで表示