Skip to content
Tcl Source Code Update of ”byteArray Object Type”
Login

Update of ”byteArray Object Type”

Overview

Artifact ID: bcef79d4d04159ecfbf03d7457f263a592543f4e
Page Name:byteArray Object Type
Date: 2016-09-24 15:45:59
Original User: dkf
Parent: 67d1a20384ed61ea9734a63cadf088c73a241b80 (diff)
Next 01fff4816037a38c7bb669030a7f2d1bb804b49d
Content

Source Files

Public Interface

Private Interface

Directly Depends On Public Interface Of

Directly Depends On Private Interface of

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;