diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCmdMZ.c | 7 | ||||
-rw-r--r-- | generic/tclObj.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index ab673d5..aed0022 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -264,8 +264,11 @@ Tcl_RegexpObjCmd( * start of the string unless the previous character is a newline. */ - if ((offset == 0) || ((offset > 0) && (offset < stringLength) && - (Tcl_GetUniChar(objPtr, offset-1) == (Tcl_UniChar)'\n'))) { + if (offset == 0) { + eflags = 0; + } else if (offset > stringLength) { + eflags = TCL_REG_NOTBOL; + } else if (Tcl_GetUniChar(objPtr, offset-1) == (Tcl_UniChar)'\n') { eflags = 0; } else { eflags = TCL_REG_NOTBOL; diff --git a/generic/tclObj.c b/generic/tclObj.c index 5c17df2..a30ba6e 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -384,6 +384,9 @@ typedef struct ResolvedCmdName { void TclInitObjSubsystem(void) { + ObjInitDeletionContext(context); + ObjDeletionLock(context); + Tcl_MutexLock(&tableMutex); typeTableInitialized = 1; Tcl_InitHashTable(&typeTable, TCL_STRING_KEYS); @@ -485,6 +488,9 @@ TclFinalizeThreadObjects(void) void TclFinalizeObjects(void) { + ObjInitDeletionContext(context); + ObjDeletionUnlock(context); + Tcl_MutexLock(&tableMutex); if (typeTableInitialized) { Tcl_DeleteHashTable(&typeTable); |