mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Hack to fix encode/decode for architectures that pass structures byref.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3512 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
93f93c7781
commit
29250f5f23
1 changed files with 16 additions and 0 deletions
|
@ -406,6 +406,12 @@
|
|||
{
|
||||
[aCoder encodeObject: *(id*)datum];
|
||||
}
|
||||
#if MFRAME_STRUCT_BYREF
|
||||
else if (*type == _C_STRUCT_B || *type == _C_UNION_B || *type == _C_ARY_B)
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: type at: *(void**)datum];
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: type at: datum];
|
||||
|
@ -439,6 +445,16 @@
|
|||
for (i = 3; i <= numArgs; i++)
|
||||
{
|
||||
datum = mframe_arg_addr(argframe, &info[i]);
|
||||
#if MFRAME_STRUCT_BYREF
|
||||
{
|
||||
const char *t = info[i].type;
|
||||
if (*t == _C_STRUCT_B || *t == _C_UNION_B || *t == _C_ARY_B)
|
||||
{
|
||||
*(void**)datum = _fastMallocBuffer(info[i].size);
|
||||
[aCoder decodeValueOfObjCType: type at: *(void**)datum];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
[aCoder decodeValueOfObjCType: info[i].type at: datum];
|
||||
}
|
||||
argsRetained = YES;
|
||||
|
|
Loading…
Reference in a new issue