Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MJPA/SimpleJSON.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorklokik <0xb000@gmail.com>2013-09-21 11:02:48 +0400
committerklokik <0xb000@gmail.com>2013-09-21 11:02:48 +0400
commit8575f53936fb35b9ff8eddc09c0e0823df231257 (patch)
tree3b57f265df864179969da35fd29fff7cda064957 /src
parent012bad0120f02988c298324f32277035beb87957 (diff)
Fixes for android
Diffstat (limited to 'src')
-rw-r--r--src/JSON.cpp4
-rw-r--r--src/JSON.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/JSON.cpp b/src/JSON.cpp
index f5ff449..0b966c0 100644
--- a/src/JSON.cpp
+++ b/src/JSON.cpp
@@ -56,6 +56,10 @@ JSONValue *JSON::Parse(const char *data)
free(w_data);
return NULL;
}
+ #elif defined(ANDROID)
+ // mbstowcs seems to misbehave on android
+ for(size_t i = 0; i<length; i++)
+ w_data[i] = (wchar_t)data[i];
#else
if (mbstowcs(w_data, data, length) == (size_t)-1)
{
diff --git a/src/JSON.h b/src/JSON.h
index ff126e4..184a5de 100644
--- a/src/JSON.h
+++ b/src/JSON.h
@@ -43,7 +43,7 @@
#endif
// Mac compile fixes - from quaker66, Lion fix by dabrahams
-#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L || (defined(WIN32) && defined(__GNUC__))
+#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L || (defined(WIN32) && defined(__GNUC__)) || defined(ANDROID)
#include <wctype.h>
#include <wchar.h>