/////////////////////////////////////////////////////////////////////////////////////////////// #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); }
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); }