Fix cls_double_va.c and update docs

This commit is contained in:
Anthony Green
2011-11-18 15:13:00 -05:00
parent 95f31151ec
commit 03e9ee321a
4 changed files with 56 additions and 29 deletions

View File

@@ -50,6 +50,9 @@ int main (void)
printf("res: %d\n", (int) res);
// { dg-output "\nres: 4" }
/* The call to cls_double_va_fn is static, so have to use a normal prep_cif */
CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ffi_type_sint, arg_types) == FFI_OK);
CHECK(ffi_prep_closure_loc(pcl, &cif, cls_double_va_fn, NULL, code) == FFI_OK);
res = ((int(*)(char*, double))(code))(format, doubleArg);