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 cdc13af..a7418aa 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -328,7 +328,7 @@ TclNamespaceEnsembleCmd( } continue; } - case CRT_PREFIX: + case CRT_PREFIX: { if (Tcl_GetBooleanFromObj(interp, objv[1], &permitPrefix) != TCL_OK) { if (allocatedMapFlag) { @@ -337,6 +337,7 @@ TclNamespaceEnsembleCmd( return TCL_ERROR; } continue; + } case CRT_UNKNOWN: if (TclListObjLengthM(interp, objv[1], &len) != TCL_OK) { if (allocatedMapFlag) { @@ -2931,14 +2932,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; } /* @@ -2963,7 +2964,7 @@ TclCompileEnsemble( * to proceed. */ - goto failed; + goto tryCompileToInv; } /* @@ -2977,7 +2978,7 @@ TclCompileEnsemble( * Figuring out how to compile this has become too much. Bail out. */ - goto failed; + goto tryCompileToInv; } /* @@ -3000,7 +3001,7 @@ TclCompileEnsemble( Tcl_Obj *matchObj = NULL; if (TclListObjGetElementsM(NULL, listObj, &len, &elems) != TCL_OK) { - goto failed; + goto tryCompileToInv; } for (i=0 ; i<len ; i++) { str = TclGetStringFromObj(elems[i], &sclen); @@ -3011,7 +3012,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; @@ -3029,17 +3030,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 { @@ -3069,7 +3070,7 @@ TclCompileEnsemble( */ if (!(flags & TCL_ENSEMBLE_PREFIX)) { - goto failed; + goto tryCompileToInv; } /* @@ -3104,7 +3105,7 @@ TclCompileEnsemble( if (matched != 1) { invokeAnyway = 1; - goto failed; + goto tryCompileToInv; } } @@ -3120,7 +3121,7 @@ TclCompileEnsemble( doneMapLookup: Tcl_ListObjAppendElement(NULL, replaced, replacement); if (TclListObjGetElementsM(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 @@ -3208,7 +3209,7 @@ TclCompileEnsemble( * instead of going through the ensemble lookup process again. */ - failed: + tryCompileToInv: if (depth < 250) { if (depth > 1) { if (!invokeAnyway) { |
