[Flesh-cvs] DEVELOPMENT CVS "Cactus/lib/sbin CreateFunctionBindings.pl"
Thomas Radke
tradke at aei.mpg.de
Thu Aug 31 09:35:04 CDT 2006
Update of /cactusdevcvs/Cactus/lib/sbin
In directory asylum.cct.lsu.edu:/tmp/cvs-serv9447
Modified Files:
CreateFunctionBindings.pl
Log Message:
Fix a bug in generating the bindings for aliased functions which take a
CCTK_FPOINTER callback argument which itself takes a CCTK_STRING argument.
This CCTK_STRING argument used to be passed by reference but should be passed
by value.
Example:
interface.ccl:
CCTK_INT FUNCTION Foo (CCTK_INT CCTK_FPOINTER IN Bar (CCTK_STRING IN s))
PROVIDES FUNCTION Foo WITH MyFoo LANGUAGE C
generated C bindings for invocation of callback:
static CCTK_INT (*CCTK_FptrMyFooBar) (CCTK_STRING s);
static CCTK_INT CCTK_WrapMyFooBar (CCTK_STRING s);
CCTK_INT CCTK_WrapMyFooBar (CCTK_STRING s)
{
return (*CCTK_FptrMyFooBar) (&s); /* before applying this patch WRONG */
return (*CCTK_FptrMyFooBar) (s); /* after applying this patch */
}
More information about the Flesh-cvs
mailing list