mirror of https://github.com/kiwix/libkiwix.git
Merge branch 'master' of ssh://git.code.sf.net/p/kiwix/kiwix
This commit is contained in:
commit
7d3d54d01e
|
@ -30,7 +30,12 @@ const char *nsStringToCString(const nsAString &str) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NS_CStringGetData(tmpStr, &cStr);
|
NS_CStringGetData(tmpStr, &cStr);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
return _strdup(cStr);
|
||||||
|
#else
|
||||||
return strdup(cStr);
|
return strdup(cStr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string nsStringToString(const nsEmbedString &str) {
|
std::string nsStringToString(const nsEmbedString &str) {
|
||||||
|
@ -70,5 +75,10 @@ const char *nsStringToUTF8(const nsAString &str) {
|
||||||
nsCString tmpStr;
|
nsCString tmpStr;
|
||||||
CopyUTF16toUTF8(str, tmpStr);
|
CopyUTF16toUTF8(str, tmpStr);
|
||||||
NS_CStringGetData(tmpStr, &cStr);
|
NS_CStringGetData(tmpStr, &cStr);
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
return _strdup(cStr);
|
||||||
|
#else
|
||||||
return strdup(cStr);
|
return strdup(cStr);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
#ifndef KIWIX_COMPONENTTOOLS_H
|
#ifndef KIWIX_COMPONENTTOOLS_H
|
||||||
#define KIWIX_COMPONENTTOOLS_H
|
#define KIWIX_COMPONENTTOOLS_H
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <mozilla/Char16.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include<string>
|
#include<string>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
Loading…
Reference in New Issue