diff options
author | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-03-19 15:09:25 +0000 |
---|---|---|
committer | tradke <tradke@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2002-03-19 15:09:25 +0000 |
commit | 1e9e75caec2711bf57d786b87265474169bbadd4 (patch) | |
tree | 9943ce992f48a832fc31a261706372b5d7354789 /src/main/Parameters.c | |
parent | 022328123e4139e8af4df3ffd661f28d22a1de36 (diff) |
Allow the param_type argument to CCTK_ParameterGet() to be passed in as
a NULL pointer if no such information is wanted.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2649 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/main/Parameters.c')
-rw-r--r-- | src/main/Parameters.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/Parameters.c b/src/main/Parameters.c index 8b1f8c61..98aedbd8 100644 --- a/src/main/Parameters.c +++ b/src/main/Parameters.c @@ -447,10 +447,10 @@ int CCTK_ParameterSet (const char *name, const char *thorn, const char *value) @vio in @endvar @var type - @vdesc The type of the parameter + @vdesc If not NULL, a pointer to an integer which will hold the type + of the parameter @vtype int * @vio out - @vcomment An integer representing the type of the parameter @endvar @returntype const void * @@ -1103,7 +1103,10 @@ static int ParameterInsert (t_sktree **tree, t_param *newparam) @@*/ static const void *ParameterGetSimple (const t_param *param, int *type) { - *type = param->props->type; + if (type) + { + *type = param->props->type; + } return (param->data); } |