/// <summary> Tcl_GetlongFromObj -> TclLong.get /// /// Returns the long value of the object. /// /// </summary> /// <param name="interp">current interpreter. /// </param> /// <param name="tobj">the object to operate on. /// </param> /// <returns> the long value of the object. /// </returns> public static long get(Interp interp, TclObject tobj) { setlongFromAny(interp, tobj); TclLong tlong = (TclLong)tobj.InternalRep; return(tlong.value); }
public static void Tcl_SetLongObj(TclObject to, long result) { while (to.Shared) { to.Release(); } TclLong.set(to, result); to.Preserve(); }
public static bool Tcl_GetLong(Interp interp, TclObject to, out i64 value) { try { value = (i64)TclLong.get(interp, to); return(false); } catch { value = 0; return(true); } }
public static bool Tcl_GetWideIntFromObj(Interp interp, TclObject to, out sqlite_int64 value) { try { if (to.ToString() == "NaN") { unchecked { value = (long)Double.NaN; } } else { value = TclLong.get(interp, to); } return(false); } catch { value = 0; return(true); }; }
public static TclObject Tcl_NewWideIntObj(long value) { return(TclLong.newInstance(value)); }