-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae49643
commit b255904
Showing
8 changed files
with
36 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
#include <cxxabi.h> | ||
#define __XTD_CORE_NATIVE_LIBRARY__ | ||
#include <xtd/native/types> | ||
#include "../../../../include/xtd/native/macos/semaphore.h" | ||
#include "../../../../include/xtd/native/macos/strings.h" | ||
#undef __XTD_CORE_NATIVE_LIBRARY__ | ||
#include <cxxabi.h> | ||
|
||
using namespace abi; | ||
using namespace std; | ||
using namespace xtd::native; | ||
|
||
string types::demangle(const string& name) { | ||
string __xtd_abi_demangle(const string& name) { | ||
auto status = 0; | ||
auto demangled_name = __cxa_demangle(name.c_str(), nullptr, 0, &status); | ||
auto result = xtd::native::macos::strings::replace(status == 0 && demangled_name ? demangled_name : name, "std::__1::", "std::"); | ||
free(demangled_name); | ||
return result; | ||
} | ||
|
||
string types::demangle(const string& name) { | ||
return __xtd_abi_demangle(name); | ||
} | ||
|
||
intmax_t types::invalid_handle() noexcept { | ||
return reinterpret_cast<intmax_t>(SEM_FAILED); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters