mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Invocation fixups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16412 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b3bd3dc830
commit
898deae09b
3 changed files with 20 additions and 10 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-04-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/callframe.m:
|
||||
* Source/cifframe.m:
|
||||
Fix error in returning data via pointer arguments ... was writing to
|
||||
wrong memory location.
|
||||
|
||||
2003-04-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSTcpPort.m:
|
||||
|
|
|
@ -697,6 +697,7 @@ callframe_build_return (NSInvocation *inv,
|
|||
&& ((flags & _F_OUT) || !(flags & _F_IN)))
|
||||
{
|
||||
void *ptr;
|
||||
|
||||
/* The argument is a pointer (to a non-char), and
|
||||
the pointer's value is qualified as an OUT
|
||||
parameter, or it not explicitly qualified as an
|
||||
|
@ -705,11 +706,12 @@ callframe_build_return (NSInvocation *inv,
|
|||
tmptype++;
|
||||
ctxt->type = tmptype;
|
||||
|
||||
(*decoder) (ctxt);
|
||||
/* Copy the pointed-to data back to the original
|
||||
pointer */
|
||||
/* Use the original pointer to find the buffer
|
||||
* to store the returned data */
|
||||
[inv getArgument: &ptr atIndex: argnum];
|
||||
memcpy(ptr, datum, objc_sizeof_type(tmptype));
|
||||
ctxt->datum = ptr;
|
||||
|
||||
(*decoder) (ctxt);
|
||||
}
|
||||
else if (*tmptype == _C_CHARPTR
|
||||
&& ((flags & _F_OUT) || !(flags & _F_IN)))
|
||||
|
|
|
@ -1102,11 +1102,12 @@ cifframe_build_return (NSInvocation *inv,
|
|||
tmptype++;
|
||||
ctxt->type = tmptype;
|
||||
|
||||
(*decoder) (ctxt);
|
||||
/* Copy the pointed-to data back to the original
|
||||
pointer */
|
||||
/* Use the original pointer to find the buffer
|
||||
* to store the returned data */
|
||||
[inv getArgument: &ptr atIndex: argnum];
|
||||
memcpy(ptr, datum, objc_sizeof_type(tmptype));
|
||||
ctxt->datum = ptr;
|
||||
|
||||
(*decoder) (ctxt);
|
||||
}
|
||||
else if (*tmptype == _C_CHARPTR
|
||||
&& ((flags & _F_OUT) || !(flags & _F_IN)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue