tclBinary.c File Reference

#include "tclInt.h"
#include "tommath.h"
#include <math.h>

Go to the source code of this file.

Data Structures

struct  ByteArray

Defines

#define BINARY_ALL   -1
#define BINARY_NOCOUNT   -2
#define BINARY_SIGNED   0
#define BINARY_UNSIGNED   1
#define BINARY_SCAN_MAX_CACHE   260
#define BYTEARRAY_SIZE(len)   ((unsigned) (sizeof(ByteArray) - 4 + (len)))
#define GET_BYTEARRAY(objPtr)   ((ByteArray *) (objPtr)->internalRep.otherValuePtr)
#define SET_BYTEARRAY(objPtr, baPtr)   (objPtr)->internalRep.otherValuePtr = (VOID *) (baPtr)

Functions

Tcl_ObjTcl_NewByteArrayObj (const unsigned char *bytes, int length)
Tcl_ObjTcl_DbNewByteArrayObj (const unsigned char *bytes, int length, const char *file, int line)
void Tcl_SetByteArrayObj (Tcl_Obj *objPtr, const unsigned char *bytes, int length)
unsigned char * Tcl_GetByteArrayFromObj (Tcl_Obj *objPtr, int *lengthPtr)
unsigned char * Tcl_SetByteArrayLength (Tcl_Obj *objPtr, int length)
int Tcl_BinaryObjCmd (ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])

Variables

Tcl_ObjType tclByteArrayType


Define Documentation

#define BINARY_ALL   -1

Definition at line 26 of file tclBinary.c.

Referenced by Tcl_BinaryObjCmd().

#define BINARY_NOCOUNT   -2

Definition at line 27 of file tclBinary.c.

Referenced by Tcl_BinaryObjCmd().

#define BINARY_SCAN_MAX_CACHE   260

Definition at line 53 of file tclBinary.c.

#define BINARY_SIGNED   0

Definition at line 33 of file tclBinary.c.

#define BINARY_UNSIGNED   1

Definition at line 34 of file tclBinary.c.

#define BYTEARRAY_SIZE ( len   )     ((unsigned) (sizeof(ByteArray) - 4 + (len)))

Definition at line 126 of file tclBinary.c.

Referenced by Tcl_SetByteArrayLength(), and Tcl_SetByteArrayObj().

#define GET_BYTEARRAY ( objPtr   )     ((ByteArray *) (objPtr)->internalRep.otherValuePtr)

Definition at line 128 of file tclBinary.c.

Referenced by Tcl_GetByteArrayFromObj(), and Tcl_SetByteArrayLength().

#define SET_BYTEARRAY ( objPtr,
baPtr   )     (objPtr)->internalRep.otherValuePtr = (VOID *) (baPtr)

Definition at line 130 of file tclBinary.c.

Referenced by Tcl_SetByteArrayLength(), and Tcl_SetByteArrayObj().


Function Documentation

Tcl_Obj* Tcl_DbNewByteArrayObj ( const unsigned char *  bytes,
int  length,
const char *  file,
int  line 
)

Definition at line 230 of file tclBinary.c.

References Tcl_NewByteArrayObj().

Referenced by Tcl_BinaryObjCmd().

unsigned char* Tcl_GetByteArrayFromObj ( Tcl_Obj objPtr,
int *  lengthPtr 
)

Tcl_Obj* Tcl_NewByteArrayObj ( const unsigned char *  bytes,
int  length 
)

unsigned char* Tcl_SetByteArrayLength ( Tcl_Obj objPtr,
int  length 
)

void Tcl_SetByteArrayObj ( Tcl_Obj objPtr,
const unsigned char *  bytes,
int  length 
)


Variable Documentation

Initial value:

 {
    "bytearray",
    FreeByteArrayInternalRep,
    DupByteArrayInternalRep,
    UpdateStringOfByteArray,
    SetByteArrayFromAny
}

Definition at line 101 of file tclBinary.c.

Referenced by Tcl_GetByteArrayFromObj(), Tcl_SetByteArrayLength(), Tcl_SetByteArrayObj(), TclExecuteByteCode(), TclInitObjSubsystem(), and TclStringMatchObj().



Generated on Wed Mar 12 12:18:28 2008 by  doxygen 1.5.1