Skip to content

Fix long array stream

vtkDataWriter writes VTK_LONG array as "long", whatever their size is (platform dependant), while vtkDataReader assumes that "long" data is 4 byte long.

This MR ensures the VTK_LONG array are written as "int" if their size is 4 bytes and as "vtktypeint64" if their size is 8.

On vtkDataReader side, the "long" code should not be used now but the old file may still contain "long" data, in that case, we suppose that this long data as the size of long on the machine running the code, when doing the byte swap.

Related to paraview/paraview#18555 (closed)

Edited by Joachim Pouderoux

Merge request reports