Skip to content

Commit

Permalink
Remove TCL_VARARGS* usage
Browse files Browse the repository at this point in the history
  • Loading branch information
chrstphrchvz committed Oct 31, 2023
1 parent db8f0de commit 543ca78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion generic/tclExtend.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ EXTERN void TclX_SplitWinCmdLine (int *argcPtr, char ***argvPtr);
/*
* Exported utility functions.
*/
EXTERN void TclX_AppendObjResult TCL_VARARGS_DEF(Tcl_Interp *, interpArg);
EXTERN void TclX_AppendObjResult (Tcl_Interp *interp, ...);

EXTERN char * TclX_DownShift (char *targetStr, CONST char *sourceStr);

Expand Down
6 changes: 2 additions & 4 deletions generic/tclXutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,22 +791,20 @@ TclX_WrongArgs (Tcl_Interp *interp, Tcl_Obj *commandNameObj, char *string)
*-----------------------------------------------------------------------------
*/
void
TclX_AppendObjResult TCL_VARARGS_DEF (Tcl_Interp *, arg1)
TclX_AppendObjResult (Tcl_Interp *interp, ...)
{
Tcl_Interp *interp;
Tcl_Obj *resultPtr;
va_list argList;
char *string;

interp = TCL_VARARGS_START (Tcl_Interp *, arg1, argList);
resultPtr = Tcl_GetObjResult (interp);

if (Tcl_IsShared(resultPtr)) {
resultPtr = Tcl_NewStringObj((char *)NULL, 0);
Tcl_SetObjResult(interp, resultPtr);
}

TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
va_start(argList, interp);
while (1) {
string = va_arg(argList, char *);
if (string == NULL) {
Expand Down

0 comments on commit 543ca78

Please sign in to comment.