From 1e9e75caec2711bf57d786b87265474169bbadd4 Mon Sep 17 00:00:00 2001 From: tradke Date: Tue, 19 Mar 2002 15:09:25 +0000 Subject: 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 --- src/main/Parameters.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main/Parameters.c') 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); } -- cgit v1.2.3