Skip to main content
`Ctrl`+`K`

# PetscVoidFn

A prototype of a `void fn(void)` function

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef void PetscVoidFn(void);

## Notes

`PetscVoidFn *` plays the role of `void *` for function pointers in the PETSc API that do not return an error code. It is used where a function pointer is needed but it is not possible to use the full prototype of the function.

`PetscErrorCodeFn` is similar to `PetscVoidFn` but should be used when the function returns a `PetscErrorCode`

The deprecated `PetscVoidFunction` works as a replacement for `PetscVoidFn` *.

The deprecated `PetscVoidStarFunction` works as a replacement for `PetscVoidFn` **.

## See Also

`PetscErrorCodeFn`, `PetscObject`, `PetscObjectDestroy()`

## Level

advanced

## Location

include/petscsys.h

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages