From fa2c405c53e4f95d49716cca148b626d4cdd7880 Mon Sep 17 00:00:00 2001 From: converse Date: Wed, 7 Jun 1995 19:12:49 +0000 Subject: A new function, _XtFreeArgList, is called from XtVaSetValues. This function frees the argument list, which doubles as a data structure to represent memory allocated to hold a value returned in a typed argument conversion. This overloading of the use of the argument list is inelegant but it preserves the interface of _XtVaToArgList. #7167 --- xc/lib/Xt/VarCreate.c | 7 +++---- xc/lib/Xt/VarargsI.h | 8 +++++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'xc') diff --git a/xc/lib/Xt/VarCreate.c b/xc/lib/Xt/VarCreate.c index 1102eef4d..bea480dcb 100644 --- a/xc/lib/Xt/VarCreate.c +++ b/xc/lib/Xt/VarCreate.c @@ -1,4 +1,4 @@ -/* $XConsortium: VarCreate.c,v 1.30 94/04/17 20:15:01 converse Exp $ */ +/* $XConsortium: VarCreate.c,v 1.31 94/06/07 11:17:18 kaleb Exp converse $ */ /* @@ -273,9 +273,8 @@ void XtVaSetValues(widget, va_alist) _XtVaToArgList(widget, var, total_count, &args, &num_args); XtSetValues(widget, args, num_args); - if (args != NULL) { - XtFree((XtPointer)args); - } + _XtFreeArgList(args, total_count, typed_count); + UNLOCK_APP(app); va_end(var); } diff --git a/xc/lib/Xt/VarargsI.h b/xc/lib/Xt/VarargsI.h index 07a85b409..5468f3c06 100644 --- a/xc/lib/Xt/VarargsI.h +++ b/xc/lib/Xt/VarargsI.h @@ -1,4 +1,4 @@ -/* $XConsortium: VarargsI.h,v 1.15 94/01/10 20:26:41 converse Exp $ */ +/* $XConsortium: VarargsI.h,v 1.16 94/04/17 20:15:03 converse Exp $ */ /* @@ -64,4 +64,10 @@ extern XtTypedArgList _XtVaCreateTypedArgList( #endif ); +extern void _XtFreeArgList( +#if NeedFunctionPrototypes + ArgList /*args*/, int /*total_count*/, int /*typed_count*/ +#endif +); + #endif /* _VarargsI_h_ */ -- cgit v1.2.3