X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Fuffi-c-test-lib.c;h=26884c638a6e20033ab37ec96adf27d5357afe03;hb=a27a393f26a7a423d758e902dbff07c81ccead91;hp=99b9004f956342444965ddcd865194f1dae86db0;hpb=7612015bdcfa851374a4e8c6f3ff68a8dd8b9a9a;p=uffi.git diff --git a/tests/uffi-c-test-lib.c b/tests/uffi-c-test-lib.c index 99b9004..26884c6 100644 --- a/tests/uffi-c-test-lib.c +++ b/tests/uffi-c-test-lib.c @@ -6,7 +6,7 @@ * Programer: Kevin M. Rosenberg * Date Started: Mar 2002 * - * CVS Id: $Id: uffi-c-test-lib.c,v 1.3 2003/08/14 21:40:13 kevin Exp $ + * CVS Id: $Id: uffi-c-test-lib.c,v 1.4 2003/08/15 02:34:34 kevin Exp $ * * This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg * @@ -118,3 +118,24 @@ cast_test_float () *y = 3.21; return y; } + +DLLEXPORT int fvar_addend = 3; + +typedef struct { + int i; + double d; +} fvar_struct_type; + +fvar_struct_type fvar_struct = {42, 3.2}; + +DLLEXPORT +int fvar_struct_int () { + return (fvar_addend + fvar_struct.i); +} + +DLLEXPORT +double fvar_struct_double () { + return fvar_struct.d; +} + +