コード例 #1
0
        ///////////////////////////////////////////////////////////////////////////////////////////////

#if HAVE_SIZEOF
        public static Tcl_ObjType MarshalObjectType(Tcl_Obj obj)
        {
            Tcl_ObjType result = null;

            try
            {
                if (obj.typePtr != IntPtr.Zero)
                {
                    result = MarshalObjectType(obj.typePtr);
                }
            }
            catch
            {
                // do nothing.
            }

            return(result);
        }
コード例 #2
0
        public static Tcl_Obj MarshalObject(IntPtr objPtr)
        {
            Tcl_Obj result = null;

            try
            {
                if (objPtr != IntPtr.Zero)
                {
                    result = (Tcl_Obj)Marshal.PtrToStructure(objPtr, typeof(Tcl_Obj));
                }
            }
            catch
            {
                // do nothing.
            }

            return(result);
        }