Skip to content

Commit 009fb65

Browse files
authored
Merge pull request #48 from JuliaRobotics/pathof
Switch to `pathof(::Module)`
2 parents 7448b04 + 4c8f392 commit 009fb65

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ branches:
1313
only:
1414
- master
1515
- /^release-.*$/
16-
# matrix:
17-
# allow_failures:
18-
# - julia: 0.7
16+
matrix:
17+
allow_failures:
18+
- julia: 0.7
1919
after_success:
2020
- julia -e 'cd(Pkg.dir("LCMCore")); Pkg.add("Coverage"); using Coverage; Codecov.submit(process_folder())'
2121

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
julia 0.7-alpha
1+
julia 0.7-rc1
22
BinDeps 0.4.0
33
@osx Homebrew 0.3.0
44
CMakeWrapper 0.0.1

deps/build.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ lcm_cmake_arguments = [
5151
using Homebrew
5252
provides(Homebrew.HB, "glib", glib, os=:Darwin)
5353
push!(lcm_cmake_arguments,
54-
"-DCMAKE_LIBRARY_PATH=$(joinpath(Pkg.dir("Homebrew"), "deps", "usr", "lib"))",
55-
"-DCMAKE_INCLUDE_PATH=$(joinpath(Pkg.dir("Homebrew"), "deps", "usr", "include"))")
54+
"-DCMAKE_LIBRARY_PATH=$(joinpath(dirname(pathof(Homebrew)), "..", "deps", "usr", "lib"))",
55+
"-DCMAKE_INCLUDE_PATH=$(joinpath(dirname(pathof(Homebrew)), "..", "deps", "usr", "include"))")
5656
end
5757

5858
provides(Yum,

src/LCMCore.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
__precompile__()
2-
31
module LCMCore
42

53
using StaticArrays

src/util.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ struct ReverseDimIndices{C<:CartesianIndices}
66
end
77
ReverseDimIndices(A::AbstractArray) = ReverseDimIndices(CartesianIndices(reverse(size(A))))
88

9-
Base.start(inds::ReverseDimIndices{N}) where {N} = 1
10-
function Base.next(inds::ReverseDimIndices{N}, state::Int) where N
9+
function Base.iterate(inds::ReverseDimIndices{N}, state::Int=1) where {N}
10+
if state > inds.length
11+
return nothing
12+
end
1113
ind = CartesianIndex(reverse(inds.revcartinds[state].I))
12-
ind, state + 1
14+
return ind, state + 1
1315
end
14-
Base.done(inds::ReverseDimIndices, state::Int) = state > inds.length
16+
1517
Base.length(inds::ReverseDimIndices) = inds.length
1618

1719
reversedimindices(A::AbstractArray) = ReverseDimIndices(A)

test/test_lcmtype.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ end
2828

2929
@testset "LCMType" begin
3030
using .lcmtesttypes
31-
srand(1)
31+
Random.seed!(1)
3232

3333
# Check base hashes (obtained from lcm-gen --debug; note that hash reported by lcm-gen is a **signed** integer (despite the 0x prefix))
3434
@test LCMCore.basehash(lcm_test_type_1) == 0x6ac981fb91a46d8b

0 commit comments

Comments
 (0)