Created
August 24, 2012 10:26
-
-
Save naoh16/3448896 to your computer and use it in GitHub Desktop.
Patch file for chasen-2.3.3 with darts-0.32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- chasen-2.3.3/lib/dartsdic.cpp.org 2003-07-31 01:06:57.000000000 +0900 | |
+++ chasen-2.3.3/lib/dartsdic.cpp 2012-08-24 19:24:13.000000000 +0900 | |
@@ -68,7 +68,7 @@ | |
da = (darts_t*)cha_malloc(sizeof(darts_t)); | |
da->da_mmap = cha_mmap_file(daname); | |
- darts->setArray(cha_mmap_map(da->da_mmap)); | |
+ darts->set_array(cha_mmap_map(da->da_mmap)); | |
da->da = darts; | |
da->lex_mmap = cha_mmap_file(lexname); | |
da->dat_mmap = cha_mmap_file(datname); | |
@@ -177,7 +177,7 @@ | |
lex_indices.push_back(i->second); | |
} | |
lens[size] = key.size(); | |
- (const char*)keys[size] = key.data(); | |
+ keys[size] = (char*)key.data(); | |
vals[size] = redump_lex(lens[size], lex_indices, tmpfile, lexfile); | |
if (vals[size] < 0) { | |
std::cerr << "Unexpected error at " << key << std::endl; | |
@@ -188,7 +188,7 @@ | |
std::cerr << size << " keys" << std::endl; | |
DoubleArrayL da; | |
- da.build(size, keys, lens, vals); | |
+ da.build(size, (const char**)keys, lens, vals); | |
da.save(builder->path->c_str(), "wb"); | |
return builder->entries->size(); |
Usage:
tar xvzf chasen-2.3.3.tar.gz
wget https://raw.github.com/gist/3448896/chasen-2.3.3-darts-0.32.patch
patch -Np0 < chasen-2.3.3-darts-0.32.patch
OR
tar xvzf chasen-2.3.3.tar.gz
curl https://raw.github.com/gist/3448896/chasen-2.3.3-darts-0.32.patch | patch -Np0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference: http://www.drk7.jp/MT/archives/001497.html