Skip to content

Commit

Permalink
(back-port from tcl-core) original clock ensemble supports prefixes (…
Browse files Browse the repository at this point in the history
…restore it)
  • Loading branch information
sebres committed Mar 13, 2024
1 parent cadfae6 commit 7324c62
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion generic/tclClockModInt.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,16 @@ EnvEpochTraceProc(
int TclpCompileEnsemblObjCmd(
ClientData unused, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
{
int ensFlags = 0;
Tcl_Command token = Tcl_FindCommand(interp, "clock", NULL, TCL_GLOBAL_ONLY);
return Tcl_SetEnsembleFlags(interp, token, ENSEMBLE_COMPILE);
if (!token) {
return TCL_ERROR;
}
if (Tcl_GetEnsembleFlags(interp, token, &ensFlags) != TCL_OK) {
return TCL_ERROR;
}
ensFlags |= ENSEMBLE_COMPILE;
return Tcl_SetEnsembleFlags(interp, token, ensFlags);
}


Expand Down

0 comments on commit 7324c62

Please sign in to comment.