internal static void expose( Interp interp, Interp slaveInterp, int objIx, TclObject[] objv ) { if ( interp._isSafe ) { throw new TclException( interp, "permission denied: " + "safe interpreter cannot expose commands" ); } int nameIdx = objv.Length - objIx == 1 ? objIx : objIx + 1; try { slaveInterp.exposeCommand( objv[objIx].ToString(), objv[nameIdx].ToString() ); } catch ( TclException e ) { interp.transferResult( slaveInterp, e.GetCompletionCode() ); throw; } }