D 2016-09-24T15:45:59.936 L byteArray\sObject\sType P 67d1a20384ed61ea9734a63cadf088c73a241b80 U dkf W 1285

Source Files

* portions of [/finfo?name=generic/tclBinary.c|tclBinary.c]

Public Interface

* Tcl_NewByteArrayObj * Tcl_DbNewByteArrayObj * Tcl_SetByteArrayObj * Tcl_GetByteArrayFromObj * Tcl_SetByteArrayLength

Private Interface

* TclAppendBytesToByteArray * tclByteArrayType

Directly Depends On Public Interface Of

* [Tcl_Obj System] * [Panic] * [UTF-8 String] * [Allocation]

Directly Depends On Private Interface of

* [Tcl_Obj System]

Discussion

The rest of the file implements the [binary] command. The public routines have similar INT_MAX size limitations to other parts of Tcl. The type is implemented by a pointer in the ptr1 field of the internalRep; that points to a ByteArray structure with the following declaration (NB: normative declaration is in the code).
typedef struct ByteArray {
    int used;			/* The number of bytes used in the byte
				 * array. */
    int allocated;		/* The amount of space actually allocated
				 * minus 1 byte. */
    unsigned char bytes[];	/* The array of bytes. The actual size of this
				 * field depends on the 'allocated' field
				 * above. */
} ByteArray;
Z 1b23d9c018dc0a8b14f2f0b96ef044a0