Function CDM_NewLongObj


Definition:#include <CDM.h>
Prototype:Tcl_Obj * CDM_NewLongObj(long Value);
Arguments:

Value: The long integer that should be placed in the object. (long)

C/C++ API Sections
Tcl API Sections
Description
Return Value
Notes
See Also
Index

Description:

This function will create and return an object that holds the specified by the "Value" parameter long integer. The advantage of this function compared to Tcl_NewLongObj is that CDM_NewLongObj will look into the CDM cache before creating a new object: If a suitable object is found in the cache, the cached object is returned. Otherwise, a new object is created, appended to the CDM cache and returned. As a result, calling this function instead of Tcl_NewLongObj is more memory efficient if it is known that many objects holding the same long integer are required or that the CDM cache already contains a suitable object. (Remember that the CDM holds numerous objects holding long integers used as Annotation Ids and in Spans...)

Return Value:

This function will return an object (of type Tcl_Obj *) that will contain as value the specified long integer.

Note that the returned object is property of the CDM and should never be freed or modified in any way by the caller.

Notes:

This function does not have an equivalent in the Tcl API.

See Also:

CDM_NewStringObj, Tcl_NewLongObj


Generated by: petasis@aias on Wed Aug 16 10:31:57 PM EEST 2006.