Skip to content

Commit

Permalink
Fix deprecation warnings for Julia v0.6 (#83)
Browse files Browse the repository at this point in the history
* Fix deprecation warnings for Julia v0.6

* Fix deprecation warnings for Julia v0.6

* Updated appveyor.yml and travis.yml to test 0.6

* Updated appveyor.yml and travis.yml to test 0.6
  • Loading branch information
benhemingway authored and stevengj committed Jul 20, 2017
1 parent dda85b9 commit e7d5b9f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ os:
julia:
- 0.4
- 0.5
- 0.6
- nightly
notifications:
email: false
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ environment:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.4/julia-0.4-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.5/julia-0.5-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.5/julia-0.5-latest-win64.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"

Expand Down
4 changes: 2 additions & 2 deletions src/NLopt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end
# apparently default to sizeof(enum)==sizeof(int).] So, if Julia is
# ever ported to ARM, this may need to be fixed (since all of these enums
# will be packed into a single byte on -fshort-enums architectures).
typealias Cenum Cint
const Cenum = Cint
cenum(x) = convert(Cenum, x)

# enum nlopt_algorithm
Expand Down Expand Up @@ -128,7 +128,7 @@ const res2sym = Dict{Cenum,Symbol}(FAILURE=>:FAILURE, INVALID_ARGS=>:INVALID_ARG
############################################################################
# wrapper around nlopt_opt type

typealias _Opt Ptr{Void} # nlopt_opt
const _Opt = Ptr{Void} # nlopt_opt

# pass both f and o to the callback so that we can handle exceptions
type Callback_Data
Expand Down
2 changes: 1 addition & 1 deletion src/NLoptSolverInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function SolverInterface.loadproblem!(m::NLoptMathProgModel, numVar::Integer, nu
ineqidx = find(g_lb .!= g_ub)

# map from eqidx/ineqidx to index in equalities/inequalities
constrmap = Array(Int,numConstr)
constrmap = Array{Int}(numConstr)
for i in 1:length(eqidx)
constrmap[eqidx[i]] = i
end
Expand Down

0 comments on commit e7d5b9f

Please sign in to comment.