interface
  subroutine PetscLayoutRestoreRanges(map, ranges, ierr)
    use, intrinsic :: ISO_C_binding
    import tPetscLayout
    PetscLayout map
    PetscInt, pointer :: ranges(:)
    PetscErrorCode, intent(out) :: ierr
  end subroutine

  subroutine PetscSectionRestoreConstraintIndices(s, point, indices, ierr)
    use, intrinsic :: ISO_C_binding
    import tPetscSection
    PetscInt point
    PetscInt, pointer :: indices(:)
    PetscErrorCode, intent(out) :: ierr
    PetscSection s
  end subroutine

  subroutine PetscSectionRestoreFieldConstraintIndices(s, point, field, indices, ierr)
    use, intrinsic :: ISO_C_binding
    import tPetscSection
    PetscSection      :: s
    PetscInt          :: point
    PetscInt          :: field
    PetscInt, pointer :: indices(:)
    PetscErrorCode, intent(out) :: ierr
  end subroutine
end interface

#if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
!DEC$ ATTRIBUTES DLLEXPORT::PetscLayoutRestoreRanges
!DEC$ ATTRIBUTES DLLEXPORT::PetscSectionRestoreConstraintIndices
!DEC$ ATTRIBUTES DLLEXPORT::PetscSectionRestoreFieldConstraintIndices
#endif
