[goffice] Fix get_size for GODataVector and GODataMatrix.



commit 4370262c7967c7ffdfbf146adae2dfd5c7f4ec4f
Author: Emmanuel Pacaud <emmanuel pacaud lapp in2p3 fr>
Date:   Tue Apr 21 16:59:25 2009 +0200

    Fix get_size for GODataVector and GODataMatrix.
    
    We can't access GODataVector.len and GODataMatrix.size directly, since
    the size may not be correctly computed yet. Use go_data_vector_get_len
    and go_data_matrix_get_size which do the right thing.
---
 goffice/data/go-data.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/goffice/data/go-data.c b/goffice/data/go-data.c
index 83f7c0c..cc86bee 100644
--- a/goffice/data/go-data.c
+++ b/goffice/data/go-data.c
@@ -591,7 +591,7 @@ _data_vector_get_sizes (GOData *data, unsigned int *sizes)
 {
 	GODataVector *vector = (GODataVector *) data;
 
-	sizes[0] = vector->len;
+	sizes[0] = go_data_vector_get_len (vector);
 }
 
 static double *
@@ -761,9 +761,12 @@ static void
 _data_matrix_get_sizes (GOData *data, unsigned int *sizes)
 {
 	GODataMatrix *matrix = (GODataMatrix *) data;
+	GODataMatrixSize size;
 
-	sizes[0] = matrix->size.columns;
-	sizes[1] = matrix->size.rows;
+	size = go_data_matrix_get_size (matrix);
+
+	sizes[0] = size.columns;
+	sizes[1] = size.rows;
 }
 
 static double *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]