diff options
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r-- | generic/tclEnsemble.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index ad6ced3..051eb7f 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -330,7 +330,7 @@ TclNamespaceEnsembleCmd( } continue; } - case CRT_PREFIX: + case CRT_PREFIX: { if (Tcl_GetBooleanFromObj(interp, objv[1], &permitPrefix) != TCL_OK) { if (allocatedMapFlag) { @@ -339,6 +339,7 @@ TclNamespaceEnsembleCmd( return TCL_ERROR; } continue; + } case CRT_UNKNOWN: if (TclListObjLength(interp, objv[1], &len) != TCL_OK) { if (allocatedMapFlag) { @@ -2934,14 +2935,14 @@ TclCompileEnsemble( TclNewObj(replaced); Tcl_IncrRefCount(replaced); if (parsePtr->numWords <= depth) { - goto failed; + goto tryCompileToInv; } if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { /* * Too hard. */ - goto failed; + goto tryCompileToInv; } /* @@ -2966,7 +2967,7 @@ TclCompileEnsemble( * to proceed. */ - goto failed; + goto tryCompileToInv; } /* @@ -2980,7 +2981,7 @@ TclCompileEnsemble( * Figuring out how to compile this has become too much. Bail out. */ - goto failed; + goto tryCompileToInv; } /* @@ -3003,7 +3004,7 @@ TclCompileEnsemble( Tcl_Obj *matchObj = NULL; if (TclListObjGetElements(NULL, listObj, &len, &elems) != TCL_OK) { - goto failed; + goto tryCompileToInv; } for (i=0 ; i<len ; i++) { str = Tcl_GetStringFromObj(elems[i], &sclen); @@ -3014,7 +3015,7 @@ TclCompileEnsemble( result = Tcl_DictObjGet(NULL, mapObj,elems[i], &targetCmdObj); if (result != TCL_OK || targetCmdObj == NULL) { - goto failed; + goto tryCompileToInv; } replacement = elems[i]; goto doneMapLookup; @@ -3032,17 +3033,17 @@ TclCompileEnsemble( if ((flags & TCL_ENSEMBLE_PREFIX) && strncmp(word, str, numBytes) == 0) { if (matchObj != NULL) { - goto failed; + goto tryCompileToInv; } matchObj = elems[i]; } } if (matchObj == NULL) { - goto failed; + goto tryCompileToInv; } result = Tcl_DictObjGet(NULL, mapObj, matchObj, &targetCmdObj); if (result != TCL_OK || targetCmdObj == NULL) { - goto failed; + goto tryCompileToInv; } replacement = matchObj; } else { @@ -3072,7 +3073,7 @@ TclCompileEnsemble( */ if (!(flags & TCL_ENSEMBLE_PREFIX)) { - goto failed; + goto tryCompileToInv; } /* @@ -3107,7 +3108,7 @@ TclCompileEnsemble( if (matched != 1) { invokeAnyway = 1; - goto failed; + goto tryCompileToInv; } } @@ -3123,7 +3124,7 @@ TclCompileEnsemble( doneMapLookup: Tcl_ListObjAppendElement(NULL, replaced, replacement); if (TclListObjGetElements(NULL, targetCmdObj, &len, &elems) != TCL_OK) { - goto failed; + goto tryCompileToInv; } else if (len != 1) { /* * Note that at this point we know we can't issue any special @@ -3211,7 +3212,7 @@ TclCompileEnsemble( * instead of going through the ensemble lookup process again. */ - failed: + tryCompileToInv: if (depth < 250) { if (depth > 1) { if (!invokeAnyway) { |