Skip to content

Commit

Permalink
Merge pull request #16 from ntessore/pr47b93ec
Browse files Browse the repository at this point in the history
Fix deprecation warnings.
  • Loading branch information
nolta committed Nov 14, 2014
2 parents 8531f22 + 3e9c599 commit 7781cd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions REQUIRE
@@ -1,2 +1,3 @@
julia 0.2
BinDeps
Compat
8 changes: 5 additions & 3 deletions src/cfitsio.jl
@@ -1,3 +1,5 @@
using Compat

type FITSFile
ptr::Ptr{Void}

Expand Down Expand Up @@ -43,11 +45,11 @@ _cfitsio_bitpix(::Type{Int8}) = int32(10) # SBYTE_IMG
_cfitsio_bitpix(::Type{Uint16}) = int32(20) # USHORT_IMG
_cfitsio_bitpix(::Type{Uint32}) = int32(40) # ULONG_IMG

const bitpix_to_type = [int32(8)=>Uint8, int32(16)=>Int16,
const bitpix_to_type = @compat Dict(int32(8)=>Uint8, int32(16)=>Int16,
int32(32)=>Int32, int32(64)=>Int64,
int32(-32)=>Float32, int32(-64)=>Float64,
int32(10)=>Int8, int32(20)=>Uint16,
int32(40)=>Uint32]
int32(40)=>Uint32)

_cfitsio_datatype(::Type{Uint8}) = int32(11)
_cfitsio_datatype(::Type{Int8}) = int32(12)
Expand Down Expand Up @@ -75,7 +77,7 @@ function hdu_int_to_type(hdu_type_int)
:unknown
end

const mode_strs = [int32(0)=>"READONLY", int32(1)=>"READWRITE"]
const mode_strs = @compat Dict(int32(0)=>"READONLY", int32(1)=>"READWRITE")


# General-purpose functions
Expand Down

0 comments on commit 7781cd2

Please sign in to comment.