1. petsc
  2. PETSc
  3. petsc

Commits

Satish Balay  committed ca9f0ff

extern-c: convert PetscObjectQueryFunction(),PetscFunctionListFind() to macros with a typedef/typecast

  • Participants
  • Parent commits 53bc5f5
  • Branches jed/cray-externc

Comments (0)

Files changed (3)

File include/petscsys.h

View file
  • Ignore whitespace
 PETSC_EXTERN PetscErrorCode PetscObjectPrintClassNamePrefixType(PetscObject,PetscViewer,const char[]);
 PETSC_EXTERN PetscErrorCode PetscObjectView(PetscObject,PetscViewer);
 
-PETSC_EXTERN PetscErrorCode PetscObjectQueryFunction(PetscObject,const char[],void (**)(void));
+PETSC_EXTERN PetscErrorCode PetscObjectQueryFunction_Private(PetscObject,const char[],void (**)(void));
+#define PetscObjectQueryFunction(a,b,d) PetscObjectQueryFunction_Private(a,b,(PetscVoidFunction*)(d))
 PETSC_EXTERN PetscErrorCode PetscObjectSetOptionsPrefix(PetscObject,const char[]);
 PETSC_EXTERN PetscErrorCode PetscObjectAppendOptionsPrefix(PetscObject,const char[]);
 PETSC_EXTERN PetscErrorCode PetscObjectPrependOptionsPrefix(PetscObject,const char[]);
 */
 PETSC_EXTERN PetscErrorCode PetscFunctionListAdd(PetscFunctionList*,const char[],void (*)(void));
 PETSC_EXTERN PetscErrorCode PetscFunctionListDestroy(PetscFunctionList*);
-PETSC_EXTERN PetscErrorCode PetscFunctionListFind(PetscFunctionList,const char[],void (**)(void));
+PETSC_EXTERN PetscErrorCode PetscFunctionListFind_Private(PetscFunctionList,const char[],void (**)(void));
+#define PetscFunctionListFind(a,b,d) PetscFunctionListFind_Private(a,b,(PetscVoidFunction*)(d))
 PETSC_EXTERN PetscErrorCode PetscFunctionListPrintTypes(MPI_Comm,FILE*,const char[],const char[],const char[],const char[],PetscFunctionList,const char[]);
 PETSC_EXTERN PetscErrorCode PetscFunctionListDuplicate(PetscFunctionList,PetscFunctionList *);
 PETSC_EXTERN PetscErrorCode PetscFunctionListView(PetscFunctionList,PetscViewer);

File src/sys/dll/reg.c

View file
  • Ignore whitespace
 
 .seealso: PetscFunctionListAddDynamic(), PetscFunctionList
 @*/
-PETSC_EXTERN PetscErrorCode PetscFunctionListFind(PetscFunctionList fl,const char name[],void (**r)(void))
+PETSC_EXTERN PetscErrorCode PetscFunctionListFind_Private(PetscFunctionList fl,const char name[],void (**r)(void))
 {
   PetscFunctionList entry = fl;
   PetscErrorCode    ierr;

File src/sys/objects/inherit.c

View file
  • Ignore whitespace
 
 .seealso: PetscObjectComposeFunction()
 @*/
-PETSC_EXTERN PetscErrorCode PetscObjectQueryFunction(PetscObject obj,const char name[],void (**ptr)(void))
+PETSC_EXTERN PetscErrorCode PetscObjectQueryFunction_Private(PetscObject obj,const char name[],void (**ptr)(void))
 {
   PetscErrorCode ierr;