mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Register C++ exception handler correctly for little endian platforms as well as big endian ones.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32608 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
84c3d01a61
commit
397d15d8a1
1 changed files with 6 additions and 0 deletions
|
@ -50,10 +50,16 @@ static Class CXXExceptionClass;
|
|||
// TODO: Add an API for registering other classes for other exception types
|
||||
static Class boxClass(int64_t foo)
|
||||
{
|
||||
// Big endian platforms
|
||||
if (foo == *(int64_t*)(void*)"GNUCC++\0")
|
||||
{
|
||||
return CXXExceptionClass;
|
||||
}
|
||||
// Little endian platforms
|
||||
if (foo == *(int64_t*)(void*)"\0++CCUNG")
|
||||
{
|
||||
return CXXExceptionClass;
|
||||
}
|
||||
return Nil;
|
||||
}
|
||||
+ (void) load
|
||||
|
|
Loading…
Reference in a new issue