prep_cif.c (ffi_prep_cif): Move the validity check after the initialization.

2003-11-06  Andreas Tobler  <a.tobler@schweiz.ch>

	* src/prep_cif.c (ffi_prep_cif): Move the validity check after
	the initialization.

From-SVN: r73309
This commit is contained in:
Andreas Tobler 2003-11-06 16:47:41 +01:00 committed by Andreas Tobler
parent 4b88687391
commit 2b04d015d6
2 changed files with 10 additions and 3 deletions

View file

@ -1,6 +1,11 @@
2003-11-06 Andreas Tobler <a.tobler@schweiz.ch>
* src/prep_cif.c (ffi_prep_cif): Move the validity check after
the initialization.
2003-10-23 Andreas Tobler <a.tobler@schweiz.ch>
* src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace
* src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace
FFI_ASSERT(FALSE) with FFI_ASSERT(0).
2003-10-22 David Daney <ddaney@avtrex.com>

View file

@ -125,13 +125,15 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
for (ptr = cif->arg_types, i = cif->nargs; i > 0; i--, ptr++)
{
/* Perform a sanity check on the argument type */
FFI_ASSERT_VALID_TYPE(*ptr);
/* Initialize any uninitialized aggregate type definitions */
if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
return FFI_BAD_TYPEDEF;
/* Perform a sanity check on the argument type, do this
check after the initialization. */
FFI_ASSERT_VALID_TYPE(*ptr);
#if !defined __x86_64__ && !defined S390
#ifdef SPARC
if (((*ptr)->type == FFI_TYPE_STRUCT