コード例 #1
0
ファイル: Tcl+Conversions.cs プロジェクト: BclEx/GpuStructs
 public static bool Tcl_SetCommandInfo(Interp interp, string command, WrappedCommand value)
 {
     try
     {
         value = interp.getObjCommand(command);
         return(false);
     }
     catch
     {
         return(true);
     }
 }
コード例 #2
0
ファイル: InterpSlaveCmd.cs プロジェクト: BclEx/GpuStructs
        /// <summary>----------------------------------------------------------------------
        ///
        /// disposeCmd --
        ///
        /// Invoked when an object command for a slave interpreter is deleted;
        /// cleans up all state associated with the slave interpreter and destroys
        /// the slave interpreter.
        ///
        /// Results:
        /// None.
        ///
        /// Side effects:
        /// Cleans up all state associated with the slave interpreter and
        /// destroys the slave interpreter.
        ///
        /// ----------------------------------------------------------------------
        /// </summary>

        public void Dispose()
        {
            // Unlink the slave from its master interpreter.

            SupportClass.HashtableRemove(masterInterp._slaveTable, path);

            // Set to null so that when the InterpInfo is cleaned up in the slave
            // it does not try to delete the command causing all sorts of grief.
            // See SlaveRecordDeleteProc().

            interpCmd = null;

            if (slaveInterp != null)
            {
                slaveInterp.Dispose();
            }
        }
コード例 #3
0
        internal static bool isProc(WrappedCommand cmd)
        {
            return(cmd.cmd is Procedure);

            /*
             * // FIXME: do we really want to get the original command
             * // and test that? Methods like InfoCmd.InfoProcsCmd seem
             * // to do this already.
             *
             * WrappedCommand origCmd;
             *
             * origCmd = NamespaceCmd.getOriginalCommand(cmd);
             * if (origCmd != null) {
             * cmd = origCmd;
             * }
             * return (cmd.cmd instanceof Procedure);
             */
        }