[petsc-dev] macro wrappers around functions to caste suck

Barry Smith bsmith at mcs.anl.gov
Sun Apr 7 16:10:30 CDT 2013


On Apr 5, 2013, at 9:34 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> 
> On Fri, Apr 5, 2013 at 9:28 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> The biggest mistake of C was CPP
> 
>    Hey, we can eliminate the currently needed (PetscObject) cast in a bunch of places with this horrible trick.
> 
> I thought you liked the explicitness of that cast.

   That was my rationalization for ugly code; until a better solution appeared and I no longer needed the rationalization  :-)      
>  
>    This actually doesn't introduce any more macros, its the same number with more reasonable naming.
> 
> Sure, it just uses #undef. I have no problem with changing it.




More information about the petsc-dev mailing list