diff options
Diffstat (limited to 'src/cxml.cc')
| -rw-r--r-- | src/cxml.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cxml.cc b/src/cxml.cc index f667584..3fa3d94 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -349,6 +349,19 @@ locale_convert (string x) } template<> +long long +locale_convert (string x) +{ + long long y = 0; +#ifdef LIBCXML_WINDOWS + __mingw_sscanf (x.c_str(), "%lld", &y); +#else + sscanf (x.c_str(), "%lld", &y); +#endif + return y; +} + +template<> float locale_convert (string x) { @@ -381,6 +394,13 @@ cxml::raw_convert (string v) } template <> +long long +cxml::raw_convert (string v) +{ + return locale_convert<long long> (make_local(v)); +} + +template <> unsigned int cxml::raw_convert (string v) { |
