@@ -2435,7 +2435,7 @@ end
2435
2435
# and 64-bit integers in cfitsio. Rather than providing both of these, we
2436
2436
# provide only one according to the native integer type on the platform.
2437
2437
if promote_type (Int, Clong) == Clong
2438
- const T = Clong
2438
+ const Clong_or_Clonglong = Clong
2439
2439
const ffgtdm = " ffgtdm"
2440
2440
const ffgnrw = " ffgnrw"
2441
2441
const ffptdm = " ffptdm"
@@ -2444,7 +2444,7 @@ if promote_type(Int, Clong) == Clong
2444
2444
const ffgdes = " ffgdes"
2445
2445
const ffgisz = " ffgisz"
2446
2446
else
2447
- const T = Int64
2447
+ const Clong_or_Clonglong = Int64
2448
2448
const ffgtdm = " ffgtdmll"
2449
2449
const ffgnrw = " ffgnrwll"
2450
2450
const ffptdm = " ffptdmll"
@@ -2472,13 +2472,13 @@ function fits_get_coltype end
2472
2472
function fits_get_coltype (ff:: FITSFile , colnum:: Integer )
2473
2473
fits_assert_open (ff)
2474
2474
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 )
2477
2477
status = Ref {Cint} (0 )
2478
2478
ccall (
2479
2479
($ ffgtcl, libcfitsio),
2480
2480
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}),
2482
2482
ff. ptr,
2483
2483
colnum,
2484
2484
typecode,
@@ -2493,13 +2493,13 @@ function fits_get_coltype end
2493
2493
function fits_get_eqcoltype (ff:: FITSFile , colnum:: Integer )
2494
2494
fits_assert_open (ff)
2495
2495
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 )
2498
2498
status = Ref {Cint} (0 )
2499
2499
ccall (
2500
2500
($ ffeqty, libcfitsio),
2501
2501
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}),
2503
2503
ff. ptr,
2504
2504
colnum,
2505
2505
typecode,
@@ -2514,12 +2514,12 @@ function fits_get_coltype end
2514
2514
function fits_get_img_size (f:: FITSFile )
2515
2515
fits_assert_open (f)
2516
2516
ndim = fits_get_img_dim (f)
2517
- naxes = Vector {$T } (undef, ndim)
2517
+ naxes = Vector {$Clong_or_Clonglong } (undef, ndim)
2518
2518
status = Ref {Cint} (0 )
2519
2519
ccall (
2520
2520
($ ffgisz, libcfitsio),
2521
2521
Cint,
2522
- (Ptr{Cvoid}, Cint, Ptr{$ T }, Ref{Cint}),
2522
+ (Ptr{Cvoid}, Cint, Ptr{$ Clong_or_Clonglong }, Ref{Cint}),
2523
2523
f. ptr,
2524
2524
ndim,
2525
2525
naxes,
@@ -2530,12 +2530,12 @@ function fits_get_coltype end
2530
2530
end
2531
2531
2532
2532
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))
2534
2534
status = Ref {Cint} (0 )
2535
2535
ccall (
2536
2536
($ ffgisz, libcfitsio),
2537
2537
Cint,
2538
- (Ptr{Cvoid}, Cint, Ptr{NTuple{N,$ T }}, Ref{Cint}),
2538
+ (Ptr{Cvoid}, Cint, Ptr{NTuple{N,$ Clong_or_Clonglong }}, Ref{Cint}),
2539
2539
f. ptr,
2540
2540
N,
2541
2541
naxes,
@@ -2547,12 +2547,12 @@ function fits_get_coltype end
2547
2547
2548
2548
function fits_get_num_rows (f:: FITSFile )
2549
2549
fits_assert_open (f)
2550
- result = Ref {$T } (0 )
2550
+ result = Ref {$Clong_or_Clonglong } (0 )
2551
2551
status = Ref {Cint} (0 )
2552
2552
ccall (
2553
2553
($ ffgnrw, libcfitsio),
2554
2554
Cint,
2555
- (Ptr{Cvoid}, Ref{$ T }, Ref{Cint}),
2555
+ (Ptr{Cvoid}, Ref{$ Clong_or_Clonglong }, Ref{Cint}),
2556
2556
f. ptr,
2557
2557
result,
2558
2558
status,
@@ -2561,7 +2561,7 @@ function fits_get_coltype end
2561
2561
return Int (result[])
2562
2562
end
2563
2563
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
2565
2565
# `fits_read_tdim` returns the dimensions of a table column in a
2566
2566
# binary table. Normally this information is given by the TDIMn
2567
2567
# keyword, but if this keyword is not present then this routine
@@ -2576,7 +2576,7 @@ function fits_get_coltype end
2576
2576
ccall (
2577
2577
($ ffgtdm, libcfitsio),
2578
2578
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}),
2580
2580
ff. ptr,
2581
2581
colnum,
2582
2582
length (naxes),
@@ -2588,13 +2588,13 @@ function fits_get_coltype end
2588
2588
return naxes[1 : naxis[]]
2589
2589
end
2590
2590
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 } )
2592
2592
fits_assert_open (ff)
2593
2593
status = Ref {Cint} (0 )
2594
2594
ccall (
2595
2595
($ ffptdm, libcfitsio),
2596
2596
Cint,
2597
- (Ptr{Cvoid}, Cint, Cint, Ptr{$ T }, Ref{Cint}),
2597
+ (Ptr{Cvoid}, Cint, Cint, Ptr{$ Clong_or_Clonglong }, Ref{Cint}),
2598
2598
ff. ptr,
2599
2599
colnum,
2600
2600
length (naxes),
@@ -2606,13 +2606,13 @@ function fits_get_coltype end
2606
2606
2607
2607
function fits_read_descript (f:: FITSFile , colnum:: Integer , rownum:: Integer )
2608
2608
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 )
2611
2611
status = Ref {Cint} (0 )
2612
2612
ccall (
2613
2613
($ ffgdes, libcfitsio),
2614
2614
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}),
2616
2616
f. ptr,
2617
2617
colnum,
2618
2618
rownum,
0 commit comments