The R Project SVN R

Rev

Rev 76872 | Rev 77242 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 76872 Rev 77188
Line 2382... Line 2382...
2382
	    ptcd->finally(ptcd->fdata);
2382
	    ptcd->finally(ptcd->fdata);
2383
	return R_NilValue;
2383
	return R_NilValue;
2384
    default: return R_NilValue; /* should not happen */
2384
    default: return R_NilValue; /* should not happen */
2385
    }
2385
    }
2386
}
2386
}
-
 
2387
 
-
 
2388
SEXP attribute_hidden do_addGlobHands(SEXP call, SEXP op,SEXP args, SEXP rho)
-
 
2389
{
-
 
2390
    SEXP oldstk = R_ToplevelContext->handlerstack;
-
 
2391
 
-
 
2392
    R_HandlerStack = R_NilValue;
-
 
2393
    do_addCondHands(call, op, args, rho);
-
 
2394
 
-
 
2395
    /* This is needed to handle intermediate contexts that would
-
 
2396
       restore the handler stack to the value when begincontext was
-
 
2397
       called. This function should only be called in a context where
-
 
2398
       there are no handlers on the stack. */
-
 
2399
#ifdef DODO
-
 
2400
    for (RCNTXT *cptr = R_GlobalContext;
-
 
2401
	 cptr != R_ToplevelContext;
-
 
2402
	 cptr = cptr->nextcontext)
-
 
2403
	if (cptr->handlerstack == R_NilValue)
-
 
2404
	    cptr->handlerstack = R_HandlerStack;
-
 
2405
#endif
-
 
2406
    for (RCNTXT *cptr = R_GlobalContext;
-
 
2407
	 cptr != R_ToplevelContext;
-
 
2408
	 cptr = cptr->nextcontext)
-
 
2409
	if (cptr->handlerstack == oldstk)
-
 
2410
	    cptr->handlerstack = R_HandlerStack;
-
 
2411
	else error("should not be called with handlers on the stack");
-
 
2412
 
-
 
2413
    R_ToplevelContext->handlerstack = R_HandlerStack;
-
 
2414
    return NULL;
-
 
2415
}