From 673f931995a184eea390ad5d745cd102312e6343 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 9 Sep 2022 12:04:29 +0000 Subject: Change TclObjInterpProc() to a macro, since extensions should never invoke it directly, always through TclGetObjInterpProc() --- generic/tclBasic.c | 1 + generic/tclIntDecls.h | 2 ++ generic/tclProc.c | 2 ++ generic/tclStubInit.c | 1 + 4 files changed, 6 insertions(+) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 4bacba6..b806c33 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -780,6 +780,7 @@ Tcl_CreateInterp(void) Tcl_MutexUnlock(&cancelLock); } +#undef TclObjInterpProc if (commandTypeInit == 0) { TclRegisterCommandTypeName(TclObjInterpProc, "proc"); TclRegisterCommandTypeName(TclEnsembleImplementationCmd, "ensemble"); diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 69aee7c..588a1fa 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -1418,6 +1418,8 @@ extern const TclIntStubs *tclIntStubsPtr; #undef TclGuessPackageName #undef TclUnusedStubEntry #undef TclSetPreInitScript +#undef TclObjInterpProc +#define TclObjInterpProc TclGetObjInterpProc() #ifndef TCL_NO_DEPRECATED # define TclSetPreInitScript Tcl_SetPreInitScript # define TclGuessPackageName(fileName, pkgName) ((void)fileName,(void)pkgName,0) diff --git a/generic/tclProc.c b/generic/tclProc.c index 9a3785c..059e751 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -148,6 +148,7 @@ static const Tcl_ObjType lambdaType = { *---------------------------------------------------------------------- */ +#undef TclObjInterpProc int Tcl_ProcObjCmd( TCL_UNUSED(ClientData), @@ -1645,6 +1646,7 @@ TclPushProcCallFrame( *---------------------------------------------------------------------- */ +#undef TclObjInterpProc int TclObjInterpProc( ClientData clientData, /* Record describing procedure to be diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 87c9d0a..ae00b04 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -83,6 +83,7 @@ #undef Tcl_UtfAtIndex #undef Tcl_GetRange #undef Tcl_GetUniChar +#undef TclObjInterpProc #if defined(_WIN32) || defined(__CYGWIN__) #define TclWinConvertWSAError (void (*)(DWORD))(void *)Tcl_WinConvertError -- cgit v0.12