tclStringObj.c File Reference

#include "tclInt.h"
#include "tommath.h"

Go to the source code of this file.

Data Structures

struct  String

Defines

#define STRING_UALLOC(numChars)   (numChars * sizeof(Tcl_UniChar))
#define STRING_SIZE(ualloc)
#define GET_STRING(objPtr)   ((String *) (objPtr)->internalRep.otherValuePtr)
#define SET_STRING(objPtr, stringPtr)   ((objPtr)->internalRep.otherValuePtr = (void *) (stringPtr))
#define TCL_GROWTH_MIN_ALLOC   1024
#define STATIC_LIST_SIZE   16
#define MAX_FLOAT_SIZE   320

Functions

Tcl_ObjTcl_NewStringObj (const char *bytes, int length)
Tcl_ObjTcl_DbNewStringObj (const char *bytes, register int length, const char *file, int line)
Tcl_ObjTcl_NewUnicodeObj (const Tcl_UniChar *unicode, int numChars)
int Tcl_GetCharLength (Tcl_Obj *objPtr)
Tcl_UniChar Tcl_GetUniChar (Tcl_Obj *objPtr, int index)
Tcl_UniCharTcl_GetUnicode (Tcl_Obj *objPtr)
Tcl_UniCharTcl_GetUnicodeFromObj (Tcl_Obj *objPtr, int *lengthPtr)
Tcl_ObjTcl_GetRange (Tcl_Obj *objPtr, int first, int last)
void Tcl_SetStringObj (register Tcl_Obj *objPtr, const char *bytes, register int length)
void Tcl_SetObjLength (register Tcl_Obj *objPtr, register int length)
int Tcl_AttemptSetObjLength (register Tcl_Obj *objPtr, register int length)
void Tcl_SetUnicodeObj (Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int numChars)
void Tcl_AppendLimitedToObj (register Tcl_Obj *objPtr, const char *bytes, register int length, register int limit, const char *ellipsis)
void Tcl_AppendToObj (register Tcl_Obj *objPtr, const char *bytes, register int length)
void Tcl_AppendUnicodeToObj (register Tcl_Obj *objPtr, const Tcl_UniChar *unicode, int length)
void Tcl_AppendObjToObj (Tcl_Obj *objPtr, Tcl_Obj *appendObjPtr)
void Tcl_AppendStringsToObjVA (Tcl_Obj *objPtr, va_list argList)
void Tcl_AppendStringsToObj (Tcl_Obj *objPtr,...)
int Tcl_AppendFormatToObj (Tcl_Interp *interp, Tcl_Obj *appendObj, const char *format, int objc, Tcl_Obj *const objv[])
Tcl_ObjTcl_Format (Tcl_Interp *interp, const char *format, int objc, Tcl_Obj *const objv[])
void Tcl_AppendPrintfToObj (Tcl_Obj *objPtr, const char *format,...)
Tcl_ObjTcl_ObjPrintf (const char *format,...)
Tcl_ObjTclStringObjReverse (Tcl_Obj *objPtr)

Variables

Tcl_ObjType tclStringType


Define Documentation

#define MAX_FLOAT_SIZE   320

Referenced by Tcl_AppendFormatToObj().

#define SET_STRING ( objPtr,
stringPtr   )     ((objPtr)->internalRep.otherValuePtr = (void *) (stringPtr))

#define STATIC_LIST_SIZE   16

#define STRING_SIZE ( ualloc   ) 

Value:

((unsigned) ((ualloc) \
                 ? sizeof(String) - sizeof(Tcl_UniChar) + (ualloc) \
                 : sizeof(String)))

Definition at line 110 of file tclStringObj.c.

Referenced by Tcl_AttemptSetObjLength(), Tcl_NewUnicodeObj(), Tcl_SetObjLength(), and Tcl_SetUnicodeObj().

#define STRING_UALLOC ( numChars   )     (numChars * sizeof(Tcl_UniChar))

#define TCL_GROWTH_MIN_ALLOC   1024

Definition at line 154 of file tclStringObj.c.

Referenced by Tcl_AppendStringsToObjVA().


Function Documentation

void Tcl_AppendLimitedToObj ( register Tcl_Obj objPtr,
const char *  bytes,
register int  length,
register int  limit,
const char *  ellipsis 
)

Definition at line 1037 of file tclStringObj.c.

References GET_STRING, String::hasUnicode, Tcl_IsShared, Tcl_Panic(), and Tcl_UtfPrev().

void Tcl_AppendPrintfToObj ( Tcl_Obj objPtr,
const char *  format,
  ... 
)

Definition at line 2476 of file tclStringObj.c.

void Tcl_AppendStringsToObj ( Tcl_Obj objPtr,
  ... 
)

void Tcl_AppendToObj ( register Tcl_Obj objPtr,
const char *  bytes,
register int  length 
)

Definition at line 1118 of file tclStringObj.c.

References Tcl_AppendLimitedToObj().

void Tcl_AppendUnicodeToObj ( register Tcl_Obj objPtr,
const Tcl_UniChar unicode,
int  length 
)

Definition at line 1147 of file tclStringObj.c.

References GET_STRING, String::hasUnicode, Tcl_IsShared, and Tcl_Panic().

Tcl_Obj* Tcl_DbNewStringObj ( const char *  bytes,
register int  length,
const char *  file,
int  line 
)

Definition at line 269 of file tclStringObj.c.

References Tcl_NewStringObj().

Tcl_Obj* Tcl_Format ( Tcl_Interp interp,
const char *  format,
int  objc,
Tcl_Obj *const   objv[] 
)

Definition at line 2301 of file tclStringObj.c.

References Tcl_AppendFormatToObj(), Tcl_DecrRefCount, Tcl_NewObj(), and TCL_OK.

Tcl_UniChar Tcl_GetUniChar ( Tcl_Obj objPtr,
int  index 
)

Tcl_UniChar* Tcl_GetUnicode ( Tcl_Obj objPtr  ) 

Tcl_UniChar* Tcl_GetUnicodeFromObj ( Tcl_Obj objPtr,
int *  lengthPtr 
)

Tcl_Obj* Tcl_NewStringObj ( const char *  bytes,
int  length 
)

Definition at line 197 of file tclStringObj.c.

References TclNewStringObj.

Tcl_Obj* Tcl_ObjPrintf ( const char *  format,
  ... 
)

Definition at line 2503 of file tclStringObj.c.

References Tcl_NewObj().

void Tcl_SetStringObj ( register Tcl_Obj objPtr,
const char *  bytes,
register int  length 
)


Variable Documentation

Initial value:

 {
    "string",                   
    FreeStringInternalRep,      
    DupStringInternalRep,       
    UpdateStringOfString,       
    SetStringFromAny            
}

Definition at line 67 of file tclStringObj.c.



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