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_Obj * | Tcl_NewStringObj (const char *bytes, int length) |
Tcl_Obj * | Tcl_DbNewStringObj (const char *bytes, register int length, const char *file, int line) |
Tcl_Obj * | Tcl_NewUnicodeObj (const Tcl_UniChar *unicode, int numChars) |
int | Tcl_GetCharLength (Tcl_Obj *objPtr) |
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_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_Obj * | Tcl_Format (Tcl_Interp *interp, const char *format, int objc, Tcl_Obj *const objv[]) |
void | Tcl_AppendPrintfToObj (Tcl_Obj *objPtr, const char *format,...) |
Tcl_Obj * | Tcl_ObjPrintf (const char *format,...) |
Tcl_Obj * | TclStringObjReverse (Tcl_Obj *objPtr) |
Variables |
Tcl_ObjType | tclStringType |
Define Documentation
Definition at line 114 of file tclStringObj.c.
Referenced by Tcl_AppendLimitedToObj(), Tcl_AppendObjToObj(), Tcl_AppendStringsToObjVA(), Tcl_AppendUnicodeToObj(), Tcl_AttemptSetObjLength(), Tcl_GetCharLength(), Tcl_GetRange(), Tcl_GetUniChar(), Tcl_GetUnicode(), Tcl_GetUnicodeFromObj(), Tcl_SetObjLength(), and TclStringObjReverse().
#define MAX_FLOAT_SIZE 320 |
#define SET_STRING |
( |
objPtr, |
|
|
stringPtr |
|
) |
((objPtr)->internalRep.otherValuePtr = (void *) (stringPtr)) |
#define STATIC_LIST_SIZE 16 |
#define STRING_SIZE |
( |
ualloc |
|
) |
|
#define STRING_UALLOC |
( |
numChars |
|
) |
(numChars * sizeof(Tcl_UniChar)) |
#define TCL_GROWTH_MIN_ALLOC 1024 |
Function Documentation
int Tcl_AppendFormatToObj |
( |
Tcl_Interp * |
interp, |
|
|
Tcl_Obj * |
appendObj, |
|
|
const char * |
format, |
|
|
int |
objc, |
|
|
Tcl_Obj *const |
objv[] | |
|
) |
| | |
Definition at line 1693 of file tclStringObj.c.
References DIGIT_BIT, mp_int::dp, MAX_FLOAT_SIZE, mp_cmp_d, MP_LT, mp_mod_2d, Tcl_AppendObjToObj(), Tcl_AppendToObj(), Tcl_DecrRefCount, TCL_ERROR, Tcl_GetBignumFromObj(), Tcl_GetCharLength(), Tcl_GetDoubleFromObj(), Tcl_GetRange(), Tcl_GetWideIntFromObj(), Tcl_IncrRefCount, TCL_INTEGER_SPACE, Tcl_IsShared, Tcl_NewBignumObj(), Tcl_NewIntObj(), Tcl_NewLongObj(), Tcl_NewObj(), Tcl_NewStringObj(), Tcl_NewWideIntObj(), TCL_OK, Tcl_Panic(), Tcl_SetObjLength(), Tcl_SetObjResult(), Tcl_UniCharToUtf(), TCL_UTF_MAX, Tcl_UtfToUniChar(), Tcl_UtfToUpper(), Tcl_WideAsLong, TclGetIntFromObj, TclGetLongFromObj, TclGetString, TclGetStringFromObj, UCHAR, and mp_int::used.
void Tcl_AppendLimitedToObj |
( |
register Tcl_Obj * |
objPtr, |
|
|
const char * |
bytes, |
|
|
register int |
length, |
|
|
register int |
limit, |
|
|
const char * |
ellipsis | |
|
) |
| | |
Definition at line 1198 of file tclStringObj.c.
References GET_STRING, String::hasUnicode, String::numChars, TclGetStringFromObj, tclStringType, Tcl_Obj::typePtr, and String::unicode.
Referenced by Tcl_AppendFormatToObj(), Tcl_ExecObjCmd(), Tcl_FSGetNormalizedPath(), Tcl_GetLongFromObj(), Tcl_GetVariableFullName(), Tcl_GetWideIntFromObj(), Tcl_GlobObjCmd(), Tcl_JoinObjCmd(), Tcl_SubstObj(), Tcl_WrongNumArgs(), TclChanCreateObjCmd(), TclExecuteByteCode(), TclFSNormalizeAbsolutePath(), TclPtrSetVar(), and TclWordKnownAtCompileTime().
void Tcl_AppendPrintfToObj |
( |
Tcl_Obj * |
objPtr, |
|
|
const char * |
format, |
|
|
|
... | |
|
) |
| | |
void Tcl_AppendStringsToObj |
( |
Tcl_Obj * |
objPtr, |
|
|
|
... | |
|
) |
| | |
void Tcl_AppendStringsToObjVA |
( |
Tcl_Obj * |
objPtr, |
|
|
va_list |
argList | |
|
) |
| | |
Definition at line 1518 of file tclStringObj.c.
References String::allocated, Tcl_Obj::bytes, ckalloc, ckfree, ckrealloc, GET_STRING, Tcl_Obj::length, STATIC_LIST_SIZE, Tcl_AttemptSetObjLength(), TCL_GROWTH_MIN_ALLOC, Tcl_IsShared, Tcl_Panic(), and Tcl_SetObjLength().
Referenced by Tcl_AppendResultVA(), and Tcl_AppendStringsToObj().
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 | |
|
) |
| | |
int Tcl_AttemptSetObjLength |
( |
register Tcl_Obj * |
objPtr, |
|
|
register int |
length | |
|
) |
| | |
Definition at line 856 of file tclStringObj.c.
References String::allocated, attemptckalloc, attemptckrealloc, GET_STRING, String::hasUnicode, String::numChars, SET_STRING, STRING_SIZE, STRING_UALLOC, Tcl_InvalidateStringRep(), Tcl_IsShared, Tcl_Panic(), tclEmptyStringRep, String::uallocated, and String::unicode.
Tcl_Obj* Tcl_DbNewStringObj |
( |
const char * |
bytes, |
|
|
register int |
length, |
|
|
const char * |
file, |
|
|
int |
line | |
|
) |
| | |
int Tcl_GetCharLength |
( |
Tcl_Obj * |
objPtr |
) |
|
Definition at line 362 of file tclStringObj.c.
References Tcl_Obj::bytes, GET_STRING, String::hasUnicode, Tcl_Obj::length, String::numChars, and Tcl_NumUtfChars().
Referenced by Tcl_AppendFormatToObj(), Tcl_GetRange(), Tcl_GetUniChar(), Tcl_RegexpObjCmd(), Tcl_RegsubObjCmd(), TclExecuteByteCode(), and TclStringObjReverse().
Definition at line 612 of file tclStringObj.c.
References Tcl_Obj::bytes, GET_STRING, Tcl_Obj::length, String::numChars, Tcl_GetCharLength(), Tcl_NewStringObj(), Tcl_NewUnicodeObj(), TclGetString, and String::unicode.
Referenced by Tcl_AppendFormatToObj(), Tcl_RegexpObjCmd(), and Tcl_SwitchObjCmd().
Tcl_Obj* Tcl_NewStringObj |
( |
const char * |
bytes, |
|
|
int |
length | |
|
) |
| | |
Definition at line 305 of file tclStringObj.c.
References String::allocated, ckalloc, String::hasUnicode, String::numChars, SET_STRING, STRING_SIZE, STRING_UALLOC, Tcl_InvalidateStringRep(), TclNewObj, tclStringType, Tcl_Obj::typePtr, String::uallocated, and String::unicode.
Tcl_Obj* Tcl_ObjPrintf |
( |
const char * |
format, |
|
|
|
... | |
|
) |
| | |
void Tcl_SetObjLength |
( |
register Tcl_Obj * |
objPtr, |
|
|
register int |
length | |
|
) |
| | |
Definition at line 742 of file tclStringObj.c.
References String::allocated, ckalloc, ckrealloc, GET_STRING, String::hasUnicode, String::numChars, SET_STRING, STRING_SIZE, STRING_UALLOC, Tcl_InvalidateStringRep(), Tcl_IsShared, Tcl_Panic(), tclEmptyStringRep, String::uallocated, and String::unicode.
void Tcl_SetStringObj |
( |
register Tcl_Obj * |
objPtr, |
|
|
const char * |
bytes, |
|
|
register int |
length | |
|
) |
| | |
Definition at line 974 of file tclStringObj.c.
References String::allocated, ckalloc, String::hasUnicode, String::numChars, SET_STRING, STRING_SIZE, STRING_UALLOC, Tcl_InvalidateStringRep(), TclFreeIntRep, tclStringType, Tcl_Obj::typePtr, String::uallocated, and String::unicode.
Definition at line 2535 of file tclStringObj.c.
References GET_STRING, String::hasUnicode, Tcl_GetCharLength(), Tcl_GetUnicode(), Tcl_InvalidateStringRep(), Tcl_IsShared, Tcl_NewObj(), Tcl_NewUnicodeObj(), Tcl_SetObjLength(), TclGetString, and String::unicode.
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
1.5.1
|