internal static void invokeHidden( Interp interp, Interp slaveInterp, bool global, int objIx, TclObject[] objv ) { TCL.CompletionCode result; if ( interp.isSafe ) { throw new TclException( interp, "not allowed to " + "invoke hidden commands from safe interpreter" ); } slaveInterp.preserve(); slaveInterp.allowExceptions(); TclObject[] localObjv = new TclObject[objv.Length - objIx]; for ( int i = 0; i < objv.Length - objIx; i++ ) { localObjv[i] = objv[i + objIx]; } try { if ( global ) { slaveInterp.invokeGlobal( localObjv, Interp.INVOKE_HIDDEN ); } else { slaveInterp.invoke( localObjv, Interp.INVOKE_HIDDEN ); } result = slaveInterp.returnCode; } catch ( TclException e ) { result = e.getCompletionCode(); } slaveInterp.release(); interp.transferResult( slaveInterp, result ); }