Skip to content

Commit

Permalink
Merge pull request #49 from JuliaOpt/cb/fix07
Browse files Browse the repository at this point in the history
Fixes for julia 0.7
  • Loading branch information
carlobaldassi committed Jul 16, 2018
2 parents 242ef3a + 48945da commit aca66cf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ os:
- osx
julia:
- 0.6
- 0.7
- nightly
env:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.6
GLPK 0.2.8
MathProgBase 0.5 0.8
Compat 0.17.0
Compat 0.66
2 changes: 1 addition & 1 deletion src/GLPKInterfaceBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function MPB.loadproblem!(lpm::GLPKMathProgModel, A::AbstractMatrix, collb, colu
checksize(rowub, m, "rowub")
checksize(obj, n, "obj")

(ia, ja, ar) = findnz(A)
(ia, ja, ar) = findnz(sparse(A))

GLPK.erase_prob(lp)

Expand Down
2 changes: 1 addition & 1 deletion src/GLPKInterfaceMIP.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function MPB.LinearQuadraticModel(s::GLPKSolverMIP)
lpm.param.presolve = GLPK.ON
end

lpm.param.cb_func = cfunction(_internal_callback, Cvoid, Tuple{Ptr{Cvoid}, Ptr{Cvoid}})
lpm.param.cb_func = @cfunction(_internal_callback, Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}))
lpm.param.cb_info = pointer_from_objref(lpm.cbdata)

for (k,v) in s.opts
Expand Down

0 comments on commit aca66cf

Please sign in to comment.