[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:08 UTC 2009
The following commit has been merged in the upstream branch:
commit ffedbb34bedb5c8cbf9bf19cfad61e06a9709ac6
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Mar 25 09:35:46 2008 +1100
Checks that variable names are not reserved keywords
darcs-hash:20080324223546-d4795-ad25812bf440b39ad5d30ebb656936e013a5de92.gz
diff --git a/src/variable.c b/src/variable.c
index 61748fc..95099b3 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -44,11 +44,15 @@ static void gfs_variable_read (GtsObject ** o, GtsFile * fp)
gts_file_error (fp, "expecting a string (name)");
return;
}
+ domain = (*o)->reserved;
+ if (gfs_derived_variable_from_name (domain->derived_variables, fp->token->str)) {
+ gts_file_error (fp, "`%s' is a reserved keyword", fp->token->str);
+ return;
+ }
v = GFS_VARIABLE1 (*o);
v->name = g_strdup (fp->token->str);
gts_file_next_token (fp);
- domain = (*o)->reserved;
if ((old = gfs_variable_from_name (domain->variables, v->name))) {
GSList * i;
if ((i = g_slist_find (domain->variables_io, old)))
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list