Internal API for developers
TclTk.Impl.value_type — Function
TclTk.Impl.value_type(x)
TclTk.Impl.value_type(typeof(x))Return the suitable type for storing a Julia object x in a Tcl object.
See also
TclTk.Impl.new_object — Function
TclTk.Impl.new_object(x) -> ptrReturn a pointer to a new Tcl object storing value x. The new object has a reference count of 0.
See also
TclObj, TclTk.Impl.new_list, TclTk.Impl.value_type, TclTk.Impl.Tcl_GetRefCount, TclTk.Impl.Tcl_IncrRefCount, and TclTk.Impl.Tcl_DecrRefCount.
TclTk.Impl.new_list — Function
TclTk.Impl.new_list() -> lstptrReturn a pointer to a Tcl object storing an empty list.
TclTk.Impl.new_list(f, [interp,] args...) -> lstptrReturn a pointer to a Tcl object storing a list built by calling f(interp, list, arg) for each arg in args.... Typically, f is TclTk.Impl.unsafe_append_element or TclTk.Impl.unsafe_append_list.
Optional argument interp is a Tcl interpreter that can be used to retrieve the error message in case of failure.
TclTk.Impl.Tcl_GetRefCount — Function
TclTk.Impl.Tcl_GetRefCount(objptr) -> refcntReturn the current reference count of the Tcl object at address objptr.
This is not provided in <tcl.h> but is useful.
Unsafe function: object pointer must not be null and must remain valid during the call to this function.
See also
TclTk.Impl.Tcl_IncrRefCount and TclTk.Impl.Tcl_DecrRefCount.
TclTk.Impl.Tcl_IncrRefCount — Function
TclTk.Impl.Tcl_IncrRefCount(objptr) -> objptrIncrement the reference count of the Tcl object given its pointer and return it.
This method emulates the Tcl_IncrRefCount macro defined in <tcl.h>.
Unsafe function: object pointer must not be null and must remain valid during the call to this function.
See also
TclTk.Impl.Tcl_DecrRefCount — Function
TclTk.Impl.Tcl_DecrRefCount(objptr) -> refcntDecrement the reference count of the Tcl object given its pointer and return its new reference count. If refcnt < 1 holds, the Tcl object has been released and objptr shall no longer be used.
This method emulates the Tcl_DecrRefCount macro defined in <tcl.h>.
Unsafe function: object pointer must not be null and must remain valid during the call to this function.
See also
TclTk.Impl.unsafe_append_element — Function
TclTk.Impl.unsafe_append_element([interp,] list, item) -> nothingPrivate method to append item as a single element to the Tcl object list.
Optional argument interp is a pointer to a Tcl interpreter. If interp is specified and non-null, it is used to retrieve the error message in case of failure.
The following conditions are asserted: list must be writable (i.e., a non-null pointer to a non-shared Tcl object) and item must be readable (i.e., a non-null pointer to a Tcl object).
Unsafe method: list, item, and interp (the latter if non-null) must remain valid during the call to this method (e.g., preserved from being garbage collected).
The method may throw and the caller is responsible of managing the reference count of item to have it automatically deleted in case of errors if it is fresh object created by new_object(val).
See also
TclTk.Impl.unsafe_append_list — Function
TclTk.Impl.unsafe_append_list([interp,] list, iter) -> nothingPrivate method to concatenate the elements of iter to the end of the Tcl object list.
See also