[petsc-dev] removing PETSC_NULL?

Karl Rupp rupp at mcs.anl.gov
Wed Feb 6 19:55:22 CST 2013


Hi,

I'm in favor of getting rid of PETSC_NULL. We will otherwise always have 
to torture users sending patches.

As a side note, there are also uses of
  my_ptr = (void*)0;
which are not included in the 272 occurrences. Am I correct to assume 
that the rhs should be replaced with NULL in these cases?

Best regards,
Karli


On 02/06/2013 07:35 PM, Barry Smith wrote:
>
>     In 1994 NULL was a pain because for different systems it was in different include files and sometimes you had to do very nasty stuff like
>
> #if !defined(NULL)
> #define NULL  0
>
> This is why PETSC_NULL came into existence.
>
> Is the world a different place now? Based on the fact there are numerous (272 to be exact thanks to Karl) uses of NULL in PETSc today and they seem to cause absolutely no grief? (Except to Barry's tidy little mind) it seems PETSC_NULL is not needed any longer?
>
>     If this is the case I propose we eradicate PETSC_NULL replacing it everywhere with NULL.
>
>     Ok?
>
>     Barry
>




More information about the petsc-dev mailing list