Re: [petsc-dev] macro wrappers around functions to caste suck
7 Apr
2013
7 Apr
'13
5:13 p.m.
Barry Smith <[email protected]> writes:
Presumably the cast for function pointers IS needed for certain C++ compilers and cannot (or should not?) be done manually by users so we would do the trick for those?
Yeah, that cast to (PetscVoidFunction*) is clumsy and we really want to interpret the function as untyped. Some compilers will warn despite the cast if a user tries to pass something that is not a function pointer, thus I think the hidden cast is definitely the right thing there. The PetscObject argument is far from opaque (function pointer or non) data so I think a cast there is more dubious.
4873
Age (days ago)
4873
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jed Brown