Skip to content

Commit 6471855

Browse files
committed
Change variable T to Clong_or_Clonglong
1 parent fbb7ad0 commit 6471855

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/CFITSIO.jl

+21-21
Original file line numberDiff line numberDiff line change
@@ -2435,7 +2435,7 @@ end
24352435
# and 64-bit integers in cfitsio. Rather than providing both of these, we
24362436
# provide only one according to the native integer type on the platform.
24372437
if promote_type(Int, Clong) == Clong
2438-
const T = Clong
2438+
const Clong_or_Clonglong = Clong
24392439
const ffgtdm = "ffgtdm"
24402440
const ffgnrw = "ffgnrw"
24412441
const ffptdm = "ffptdm"
@@ -2444,7 +2444,7 @@ if promote_type(Int, Clong) == Clong
24442444
const ffgdes = "ffgdes"
24452445
const ffgisz = "ffgisz"
24462446
else
2447-
const T = Int64
2447+
const Clong_or_Clonglong = Int64
24482448
const ffgtdm = "ffgtdmll"
24492449
const ffgnrw = "ffgnrwll"
24502450
const ffptdm = "ffptdmll"
@@ -2472,13 +2472,13 @@ function fits_get_coltype end
24722472
function fits_get_coltype(ff::FITSFile, colnum::Integer)
24732473
fits_assert_open(ff)
24742474
typecode = Ref{Cint}(0)
2475-
repcnt = Ref{$T}(0)
2476-
width = Ref{$T}(0)
2475+
repcnt = Ref{$Clong_or_Clonglong}(0)
2476+
width = Ref{$Clong_or_Clonglong}(0)
24772477
status = Ref{Cint}(0)
24782478
ccall(
24792479
($ffgtcl, libcfitsio),
24802480
Cint,
2481-
(Ptr{Cvoid}, Cint, Ref{Cint}, Ref{$T}, Ref{$T}, Ref{Cint}),
2481+
(Ptr{Cvoid}, Cint, Ref{Cint}, Ref{$Clong_or_Clonglong}, Ref{$Clong_or_Clonglong}, Ref{Cint}),
24822482
ff.ptr,
24832483
colnum,
24842484
typecode,
@@ -2493,13 +2493,13 @@ function fits_get_coltype end
24932493
function fits_get_eqcoltype(ff::FITSFile, colnum::Integer)
24942494
fits_assert_open(ff)
24952495
typecode = Ref{Cint}(0)
2496-
repcnt = Ref{$T}(0)
2497-
width = Ref{$T}(0)
2496+
repcnt = Ref{$Clong_or_Clonglong}(0)
2497+
width = Ref{$Clong_or_Clonglong}(0)
24982498
status = Ref{Cint}(0)
24992499
ccall(
25002500
($ffeqty, libcfitsio),
25012501
Cint,
2502-
(Ptr{Cvoid}, Cint, Ref{Cint}, Ref{$T}, Ref{$T}, Ref{Cint}),
2502+
(Ptr{Cvoid}, Cint, Ref{Cint}, Ref{$Clong_or_Clonglong}, Ref{$Clong_or_Clonglong}, Ref{Cint}),
25032503
ff.ptr,
25042504
colnum,
25052505
typecode,
@@ -2514,12 +2514,12 @@ function fits_get_coltype end
25142514
function fits_get_img_size(f::FITSFile)
25152515
fits_assert_open(f)
25162516
ndim = fits_get_img_dim(f)
2517-
naxes = Vector{$T}(undef, ndim)
2517+
naxes = Vector{$Clong_or_Clonglong}(undef, ndim)
25182518
status = Ref{Cint}(0)
25192519
ccall(
25202520
($ffgisz, libcfitsio),
25212521
Cint,
2522-
(Ptr{Cvoid}, Cint, Ptr{$T}, Ref{Cint}),
2522+
(Ptr{Cvoid}, Cint, Ptr{$Clong_or_Clonglong}, Ref{Cint}),
25232523
f.ptr,
25242524
ndim,
25252525
naxes,
@@ -2530,12 +2530,12 @@ function fits_get_coltype end
25302530
end
25312531

25322532
function fits_get_img_size(f::FITSFile, ::Val{N}) where {N}
2533-
naxes = Ref(zerost($T, N))
2533+
naxes = Ref(zerost($Clong_or_Clonglong, N))
25342534
status = Ref{Cint}(0)
25352535
ccall(
25362536
($ffgisz, libcfitsio),
25372537
Cint,
2538-
(Ptr{Cvoid}, Cint, Ptr{NTuple{N,$T}}, Ref{Cint}),
2538+
(Ptr{Cvoid}, Cint, Ptr{NTuple{N,$Clong_or_Clonglong}}, Ref{Cint}),
25392539
f.ptr,
25402540
N,
25412541
naxes,
@@ -2547,12 +2547,12 @@ function fits_get_coltype end
25472547

25482548
function fits_get_num_rows(f::FITSFile)
25492549
fits_assert_open(f)
2550-
result = Ref{$T}(0)
2550+
result = Ref{$Clong_or_Clonglong}(0)
25512551
status = Ref{Cint}(0)
25522552
ccall(
25532553
($ffgnrw, libcfitsio),
25542554
Cint,
2555-
(Ptr{Cvoid}, Ref{$T}, Ref{Cint}),
2555+
(Ptr{Cvoid}, Ref{$Clong_or_Clonglong}, Ref{Cint}),
25562556
f.ptr,
25572557
result,
25582558
status,
@@ -2561,7 +2561,7 @@ function fits_get_coltype end
25612561
return Int(result[])
25622562
end
25632563

2564-
fits_read_tdim_buffer() = (; naxes = Vector{$T}(undef, 99)) # 99 is the maximum allowed number of axes
2564+
fits_read_tdim_buffer() = (; naxes = Vector{$Clong_or_Clonglong}(undef, 99)) # 99 is the maximum allowed number of axes
25652565
# `fits_read_tdim` returns the dimensions of a table column in a
25662566
# binary table. Normally this information is given by the TDIMn
25672567
# keyword, but if this keyword is not present then this routine
@@ -2576,7 +2576,7 @@ function fits_get_coltype end
25762576
ccall(
25772577
($ffgtdm, libcfitsio),
25782578
Cint,
2579-
(Ptr{Cvoid}, Cint, Cint, Ref{Cint}, Ptr{$T}, Ref{Cint}),
2579+
(Ptr{Cvoid}, Cint, Cint, Ref{Cint}, Ptr{$Clong_or_Clonglong}, Ref{Cint}),
25802580
ff.ptr,
25812581
colnum,
25822582
length(naxes),
@@ -2588,13 +2588,13 @@ function fits_get_coltype end
25882588
return naxes[1:naxis[]]
25892589
end
25902590

2591-
function fits_write_tdim(ff::FITSFile, colnum::Integer, naxes::Array{$T})
2591+
function fits_write_tdim(ff::FITSFile, colnum::Integer, naxes::Array{$Clong_or_Clonglong})
25922592
fits_assert_open(ff)
25932593
status = Ref{Cint}(0)
25942594
ccall(
25952595
($ffptdm, libcfitsio),
25962596
Cint,
2597-
(Ptr{Cvoid}, Cint, Cint, Ptr{$T}, Ref{Cint}),
2597+
(Ptr{Cvoid}, Cint, Cint, Ptr{$Clong_or_Clonglong}, Ref{Cint}),
25982598
ff.ptr,
25992599
colnum,
26002600
length(naxes),
@@ -2606,13 +2606,13 @@ function fits_get_coltype end
26062606

26072607
function fits_read_descript(f::FITSFile, colnum::Integer, rownum::Integer)
26082608
fits_assert_open(f)
2609-
repeat = Ref{$T}(0)
2610-
offset = Ref{$T}(0)
2609+
repeat = Ref{$Clong_or_Clonglong}(0)
2610+
offset = Ref{$Clong_or_Clonglong}(0)
26112611
status = Ref{Cint}(0)
26122612
ccall(
26132613
($ffgdes, libcfitsio),
26142614
Cint,
2615-
(Ptr{Cvoid}, Cint, Int64, Ref{$T}, Ref{$T}, Ref{Cint}),
2615+
(Ptr{Cvoid}, Cint, Int64, Ref{$Clong_or_Clonglong}, Ref{$Clong_or_Clonglong}, Ref{Cint}),
26162616
f.ptr,
26172617
colnum,
26182618
rownum,

0 commit comments

Comments
 (0)