diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-13 16:55:19 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-13 16:56:03 -0800 |
commit | cd1edebb5034ea52396a5b68304e84ae80878740 (patch) | |
tree | 6a6f8364ea74985d11c4f6ff74e5b80e08dc849d /system/lib/libcxxabi/src/stdexcept.cpp | |
parent | af59788f8b7b76515e36bee1bf66edf497b801db (diff) | |
parent | 2914deb17f3857bb02eeec87a58a3ed6d4a8853a (diff) |
Merge branch 'incoming' of github.com:kripken/emscripten into incoming1.8.8
conflicts: tests/test_core.py tools/shared.py
Diffstat (limited to 'system/lib/libcxxabi/src/stdexcept.cpp')
-rw-r--r-- | system/lib/libcxxabi/src/stdexcept.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/system/lib/libcxxabi/src/stdexcept.cpp b/system/lib/libcxxabi/src/stdexcept.cpp index de859db4..246eea4b 100644 --- a/system/lib/libcxxabi/src/stdexcept.cpp +++ b/system/lib/libcxxabi/src/stdexcept.cpp @@ -47,7 +47,7 @@ private: #if __APPLE__ static const void* - compute_gcc_empty_string_storage() _LIBCPP_CANTTHROW + compute_gcc_empty_string_storage() _NOEXCEPT { void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD); if (handle == 0) @@ -57,7 +57,7 @@ private: static const void* - get_gcc_empty_string_storage() _LIBCPP_CANTTHROW + get_gcc_empty_string_storage() _NOEXCEPT { static const void* p = compute_gcc_empty_string_storage(); return p; @@ -66,9 +66,9 @@ private: public: explicit __libcpp_nmstr(const char* msg); - __libcpp_nmstr(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; - __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _LIBCPP_CANTTHROW; - ~__libcpp_nmstr() _LIBCPP_CANTTHROW; + __libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT; + __libcpp_nmstr& operator=(const __libcpp_nmstr& s) _NOEXCEPT; + ~__libcpp_nmstr(); const char* c_str() const _NOEXCEPT {return str_;} }; @@ -80,11 +80,11 @@ __libcpp_nmstr::__libcpp_nmstr(const char* msg) c->len = c->cap = len; str_ += offset; count() = 0; - std::strcpy(const_cast<char*>(c_str()), msg); + std::memcpy(const_cast<char*>(c_str()), msg, len + 1); } inline -__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) +__libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) _NOEXCEPT : str_(s.str_) { #if __APPLE__ @@ -94,7 +94,7 @@ __libcpp_nmstr::__libcpp_nmstr(const __libcpp_nmstr& s) } __libcpp_nmstr& -__libcpp_nmstr::operator=(const __libcpp_nmstr& s) +__libcpp_nmstr::operator=(const __libcpp_nmstr& s) _NOEXCEPT { const char* p = str_; str_ = s.str_; |