diff options
author | evgeny <me@ch1p.com> | 2016-09-17 14:58:25 +0300 |
---|---|---|
committer | evgeny <me@ch1p.com> | 2016-09-17 14:58:25 +0300 |
commit | 5c92afe26a3164eb89ea26b34034753124da91b3 (patch) | |
tree | 14dad1d2ac9b36b33a13520cc5731f4a05db4bcd /index.cpp | |
parent | b82d8703b74dd8f1f2e1feec83f2957048ee5afd (diff) |
code fixes
Diffstat (limited to 'index.cpp')
-rwxr-xr-x | index.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -27,10 +27,18 @@ void flex(const FunctionCallbackInfo<Value>& args) { string typeString(*typeArg); string ctypeStringWindows1251 = utf2cp(typeString); - int sex = args[1]->NumberValue(); - int lang = args[4]->NumberValue(); - - char *result = do_flex(nameStringWindows1251.c_str(), nameStringWindows1251.length(), caseStringWindows1251.c_str(), caseStringWindows1251.length(), sex, ctypeStringWindows1251.c_str(), ctypeStringWindows1251.length(), lang); + int sex = (int)args[1]->NumberValue(); + int lang = (int)args[4]->NumberValue(); + + char *result = do_flex( + nameStringWindows1251.c_str(), + nameStringWindows1251.length(), + caseStringWindows1251.c_str(), + caseStringWindows1251.length(), + sex, + ctypeStringWindows1251.c_str(), + ctypeStringWindows1251.length(), + lang); string resultStringWindows1251(result); string resultString = cp2utf(resultStringWindows1251); |