]> Creatis software - gdcm.git/blobdiff - src/jdatadst.cxx
ENH: Adding a deprecation mechanism to gdcm via two MACRO and two config options
[gdcm.git] / src / jdatadst.cxx
index 3b85057033088a5165efae472ad333dd43262b58..547eb2fda4e889cbf3ffc48a33b8934003c1cd1f 100644 (file)
 
 /* Expanded data destination object for stdio output */
 
+extern "C" {
+  typedef  boolean(*boolean_jpeg_compress_struct)(jpeg_compress_struct*);
+  typedef  void(*void_jpeg_compress_struct)(jpeg_compress_struct*);
+}
+
 typedef struct {
   struct jpeg_destination_mgr pub; /* public fields */
 
@@ -159,8 +164,8 @@ jpeg_stdio_dest (j_compress_ptr cinfo, std::ofstream * outfile)
   }
 
   dest = (my_dest_ptr) cinfo->dest;
-  dest->pub.init_destination = init_destination;
-  dest->pub.empty_output_buffer = empty_output_buffer;
-  dest->pub.term_destination = term_destination;
+  dest->pub.init_destination = reinterpret_cast<void_jpeg_compress_struct>(init_destination);
+  dest->pub.empty_output_buffer = reinterpret_cast<boolean_jpeg_compress_struct>(empty_output_buffer);
+  dest->pub.term_destination = reinterpret_cast<void_jpeg_compress_struct>(term_destination);
   dest->outfile = outfile;
 }