summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dandrimont <nicolas.dandrimont@gmail.com>2007-11-24 22:59:39 +0100
committerGuillaume Seguin <guillaume@segu.in>2007-11-24 23:21:12 +0100
commit3167a3d1d5d88e741f502e72c47e492f82a1697c (patch)
treec058f4474f794abc303f1d72c4ef7225798f630b
parentca04edcccfdddfca7b2951ec895c86356b4f53a6 (diff)
downloadgmathlib-3167a3d1d5d88e741f502e72c47e492f82a1697c.tar.gz
gmathlib-3167a3d1d5d88e741f502e72c47e492f82a1697c.tar.bz2
Adding parent setting for GMathArray's children
-rw-r--r--core/gmathlib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/gmathlib.c b/core/gmathlib.c
index 96bbfa8..b3e53b8 100644
--- a/core/gmathlib.c
+++ b/core/gmathlib.c
@@ -269,6 +269,7 @@ gmathsymbol_new_array (GMathContext *context, guint hsize, guint vsize,
{
GMathSymbol *symbol;
GMathArray *array;
+ guint i;
symbol = gmathsymbol_new (context, "array");
gmathsymbol_set_value (symbol, "");
@@ -283,6 +284,9 @@ gmathsymbol_new_array (GMathContext *context, guint hsize, guint vsize,
array->children = contents;
+ for(i = 0; i < vsize*hsize; i++)
+ array->children[i]->parent = array;
+
return symbol;
}