Set values after prepping cifframe

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13791 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-06-07 03:39:27 +00:00
parent bbc1e817eb
commit 395e1058fe
2 changed files with 18 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2002-06-06 Adam Fedor <fedor@gnu.org>
* Source/cifframe.m (cifframe_from_info): Set value locations
after prepping cifframe.
2002-06-06 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSLog.m: patch by Jeff Teunissen to avoid adding date/time

View file

@ -204,6 +204,19 @@ cifframe_from_info (NSArgumentInfo *info, int numargs, void **retval)
cframe->arg_types = buf + type_offset;
memcpy(cframe->arg_types, arg_types, sizeof(ffi_type *) * numargs);
cframe->values = buf + offset;
}
if (ffi_prep_cif(&cframe->cif, FFI_DEFAULT_ABI, cframe->nargs,
rtype, cframe->arg_types) != FFI_OK)
{
free(cframe);
cframe = NULL;
}
if (cframe)
{
/* Set values locations. This must be done after ffi_prep_cif so
that any structure sizes get calculated first. */
offset += numargs * sizeof(void*);
if (offset % align != 0)
{
@ -222,13 +235,6 @@ cifframe_from_info (NSArgumentInfo *info, int numargs, void **retval)
}
}
if (ffi_prep_cif(&cframe->cif, FFI_DEFAULT_ABI, cframe->nargs,
rtype, cframe->arg_types) != FFI_OK)
{
free(cframe);
cframe = NULL;
}
return cframe;
}