Skip to content

Commit

Permalink
remove Compat
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 4, 2017
1 parent a7c4033 commit 6d61a48
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
julia 0.6
BinDeps 0.4.3
Compat 0.17.0
DiffEqBase 1.5.1
Reexport
1 change: 0 additions & 1 deletion src/Sundials.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ __precompile__()

module Sundials

using Compat
using Reexport
@reexport using DiffEqBase
import DiffEqBase: solve
Expand Down
4 changes: 2 additions & 2 deletions src/algorithms.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Sundials.jl algorithms

# Abstract Types
@compat abstract type SundialsODEAlgorithm{Method,LinearSolver} <: AbstractODEAlgorithm end
@compat abstract type SundialsDAEAlgorithm{LinearSolver} <: AbstractDAEAlgorithm end
abstract type SundialsODEAlgorithm{Method,LinearSolver} <: AbstractODEAlgorithm end
abstract type SundialsDAEAlgorithm{LinearSolver} <: AbstractDAEAlgorithm end

# ODE Algorithms
immutable CVODE_BDF{Method,LinearSolver} <: SundialsODEAlgorithm{Method,LinearSolver}
Expand Down
4 changes: 2 additions & 2 deletions src/handle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
See `Handle`.
"""
@compat abstract type AbstractSundialsObject end
abstract type AbstractSundialsObject end

immutable CVODEMem <: AbstractSundialsObject end
const CVODEMemPtr = Ptr{CVODEMem}
Expand All @@ -32,7 +32,7 @@ const KINMemPtr = Ptr{KINMem}
immutable Handle{T <: AbstractSundialsObject}
ptr_ref::Ref{Ptr{T}} # pointer to a pointer

@compat function (::Type{Handle}){T <: AbstractSundialsObject}(ptr::Ptr{T})
function (::Type{Handle}){T <: AbstractSundialsObject}(ptr::Ptr{T})
h = new{T}(Ref{Ptr{T}}(ptr))
finalizer(h.ptr_ref, release_handle)
return h
Expand Down
6 changes: 3 additions & 3 deletions src/nvector_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ Base.similar(nv::NVector) = NVector(similar(nv.v))

nvlength(x::N_Vector) = unsafe_load(unsafe_load(convert(Ptr{Ptr{Clong}}, x)))
# asarray() creates an array pointing to N_Vector data, but does not take the ownership
@inline asarray(x::N_Vector) = @compat unsafe_wrap(Array, __N_VGetArrayPointer_Serial(x), (nvlength(x),), false)
@inline asarray(x::N_Vector, dims::Tuple) = @compat unsafe_wrap(Array, __N_VGetArrayPointer_Serial(x), dims, false)
@inline asarray(x::N_Vector) = unsafe_wrap(Array, __N_VGetArrayPointer_Serial(x), (nvlength(x),), false)
@inline asarray(x::N_Vector, dims::Tuple) = unsafe_wrap(Array, __N_VGetArrayPointer_Serial(x), dims, false)
asarray(x::Vector{realtype}) = x
asarray(x::Ptr{realtype}, dims::Tuple) = @compat unsafe_wrap(Array, x, dims, false)
asarray(x::Ptr{realtype}, dims::Tuple) = unsafe_wrap(Array, x, dims, false)
@inline Base.convert(::Type{Vector{realtype}}, x::N_Vector) = asarray(x)
@inline Base.convert(::Type{Vector}, x::N_Vector) = asarray(x)

Expand Down
2 changes: 0 additions & 2 deletions src/types_and_consts.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Automatically generated using Clang.jl wrap_c, version 0.0.0

using Compat

const SUNDIALS_PACKAGE_VERSION = "2.5.0"
const SUNDIALS_DOUBLE_PRECISION = Cint(1)
const SUNDIALS_BLAS_LAPACK = Cint(0)
Expand Down

0 comments on commit 6d61a48

Please sign in to comment.