Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TCL_VARARGS_DEF/TCL_VARARGS_START usage #22

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generic/tclExtend.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ EXTERN void TclX_SplitWinCmdLine (int *argcPtr, char ***argvPtr);
#if defined(__GNUC__) && __GNUC__ >= 4
__attribute__((sentinel))
#endif
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
Loading