Guilty. I have changed them all the use the PetscObject cast you  
prefer.

    Barry

As to the macros: no, never, not in a million years :-)



On Aug 7, 2008, at 2:05 PM, Lisandro Dalcin wrote:

> I've noticed that recent commits are now accessing PetscObject
> internals like this
>
> obj->hdr.comm
> obj->hdr.type_name
>
> I would really prefer to not do that, and instead use the more verbose
>
> ((PetscObject)obj)->comm
> ((PetscObject)obj)->type_name
>
> If this is really disgusting, perhaps we should define and use some
> (private?) macros like below. By far, 'comm', 'type_name', and
> 'prefix' are the more commonly accessed members when implementeing
> Vec, Mat, KSP, PC, etc.
>
> PetscCOMM(obj)
> PetscTYPE(obj)
> PetscPREFIX(obj)
>
>
>
> -- 
> Lisandro Dalc?n
> ---------------
> Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC)
> Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC)
> Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET)
> PTLC - G?emes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
>


Reply via email to