mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
Rewrote ([-invoke]) to retrieve return values correctly by using
mframe_decode_return() git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2843 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4179091e51
commit
cb50c403d0
1 changed files with 9 additions and 13 deletions
|
@ -624,25 +624,21 @@ my_method_get_next_argument (arglist_t argframe,
|
||||||
types_get_size_of_stack_arguments(return_type));
|
types_get_size_of_stack_arguments(return_type));
|
||||||
if (return_size)
|
if (return_size)
|
||||||
{
|
{
|
||||||
if (*return_type == _C_DBL)
|
if (*return_type == _C_ID)
|
||||||
/* DBL's are stored in a different place relative to RET. */
|
|
||||||
memcpy(return_value, (char*)ret + 2*sizeof(void*), return_size);
|
|
||||||
else if (*return_type == _C_ID)
|
|
||||||
{
|
{
|
||||||
if (*(id*)return_value != *(id*)ret)
|
id old = *(id*)return_value;
|
||||||
|
|
||||||
|
mframe_decode_return(return_type, return_value, ret);
|
||||||
|
|
||||||
|
if (return_retained && (*(id*)return_value != old))
|
||||||
{
|
{
|
||||||
if (return_retained)
|
[old release];
|
||||||
{
|
[*(id*)return_value retain];
|
||||||
if (*(id*)return_value)
|
|
||||||
[*(id*)return_value release];
|
|
||||||
[*(id*)ret retain];
|
|
||||||
}
|
|
||||||
*(id*)return_value = *(id*)ret;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memcpy(return_value, ret, return_size);
|
mframe_decode_return(return_type, return_value, ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue