view src/of-fits-3-octave-9-compat.patch @ 7186:19a46de50b18 default tip @

* src/jasper.mk: update to v4.2.4
author John Donoghue <john.donoghue@ieee.org>
date Thu, 02 May 2024 09:22:30 -0400
parents 297b371a6713
children
line wrap: on
line source

Replace "fortran_vec" on const objects with "data".
Casting away const is ok here. The pointers are only passed to functions that
don't modify the data afaict.

--- fits-1.0.7/src/save_fits_image.cc.orig	2022-11-17 11:09:21.875653000 +0100
+++ fits-1.0.7/src/save_fits_image.cc	2022-11-18 17:04:28.843175674 +0100
@@ -129,7 +129,7 @@
     return octave_value_list();
   }
 
-  double * datap = const_cast<double*>( image.fortran_vec() );
+  double * datap = const_cast<double *> ( image.data () );
   if( fits_write_img( fp, TDOUBLE, fpixel, len, datap , &status ) > 0 )
   {
     fprintf( stderr, "Could not write image data.\n" );

--- fits-1.0.7/src/save_fits_image_multi_ext.cc.orig	2022-11-17 11:09:21.875653000 +0100
+++ fits-1.0.7/src/save_fits_image_multi_ext.cc	2022-11-18 17:21:18.905761447 +0100
@@ -137,7 +137,7 @@
       fits_report_error( stderr, status );
       return octave_value_list();
     }
-    double * datap = const_cast<double*>( image.fortran_vec() );
+    double * datap = const_cast<double *> ( image.data () );
     if( fits_write_img( fp, TDOUBLE, fpixel, sz_axes[0]*sz_axes[1], datap + i*sz_axes[0]*sz_axes[1], &status ) > 0 )
     {
       fprintf( stderr, "Could not write image data.\n" );