summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c148
1 files changed, 74 insertions, 74 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 42d8fde..f8fecbd 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -837,7 +837,7 @@ Tcl_AppendAllObjTypes(
* name of each registered type is appended as
* a list element. */
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
int numElems;
@@ -885,7 +885,7 @@ const Tcl_ObjType *
Tcl_GetObjType(
const char *typeName) /* Name of Tcl object type to look up. */
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
const Tcl_ObjType *typePtr = NULL;
Tcl_MutexLock(&tableMutex);
@@ -1015,10 +1015,10 @@ TclDbDumpActiveObjects(
#ifdef TCL_MEM_DEBUG
void
TclDbInitNewObj(
- register Tcl_Obj *objPtr,
- register const char *file, /* The name of the source file calling this
+ Tcl_Obj *objPtr,
+ const char *file, /* The name of the source file calling this
* function; used for debugging. */
- register int line) /* Line number in the source file; used for
+ int line) /* Line number in the source file; used for
* debugging. */
{
objPtr->refCount = 0;
@@ -1102,7 +1102,7 @@ Tcl_NewObj(void)
Tcl_Obj *
Tcl_NewObj(void)
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
/*
* Use the macro defined in tclInt.h - it will use the correct allocator.
@@ -1144,12 +1144,12 @@ Tcl_NewObj(void)
Tcl_Obj *
Tcl_DbNewObj(
- register const char *file, /* The name of the source file calling this
+ const char *file, /* The name of the source file calling this
* function; used for debugging. */
- register int line) /* Line number in the source file; used for
+ int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
/*
* Use the macro defined in tclInt.h - it will use the correct allocator.
@@ -1199,8 +1199,8 @@ TclAllocateFreeObjects(void)
{
size_t bytesToAlloc = (OBJS_TO_ALLOC_EACH_TIME * sizeof(Tcl_Obj));
char *basePtr;
- register Tcl_Obj *prevPtr, *objPtr;
- register int i;
+ Tcl_Obj *prevPtr, *objPtr;
+ int i;
/*
* This has been noted by Purify to be a potential leak. The problem is
@@ -1251,9 +1251,9 @@ TclAllocateFreeObjects(void)
#ifdef TCL_MEM_DEBUG
void
TclFreeObj(
- register Tcl_Obj *objPtr) /* The object to be freed. */
+ Tcl_Obj *objPtr) /* The object to be freed. */
{
- register const Tcl_ObjType *typePtr = objPtr->typePtr;
+ const Tcl_ObjType *typePtr = objPtr->typePtr;
/*
* This macro declares a variable, so must come here...
@@ -1376,7 +1376,7 @@ TclFreeObj(
void
TclFreeObj(
- register Tcl_Obj *objPtr) /* The object to be freed. */
+ Tcl_Obj *objPtr) /* The object to be freed. */
{
/*
* Invalidate the string rep first so we can use the bytes value for our
@@ -1585,7 +1585,7 @@ TclSetDuplicateObj(
char *
Tcl_GetString(
- register Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
+ Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
* be returned. */
{
if (objPtr->bytes == NULL) {
@@ -1641,9 +1641,9 @@ Tcl_GetString(
char *
Tcl_GetStringFromObj(
- register Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
+ Tcl_Obj *objPtr, /* Object whose string rep byte pointer should
* be returned. */
- register int *lengthPtr) /* If non-NULL, the location where the string
+ int *lengthPtr) /* If non-NULL, the location where the string
* rep's byte array length should * be stored.
* If NULL, no length is stored. */
{
@@ -1779,7 +1779,7 @@ Tcl_InitStringRep(
void
Tcl_InvalidateStringRep(
- register Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
+ Tcl_Obj *objPtr) /* Object whose string rep byte pointer should
* be freed. */
{
TclInvalidateStringRep(objPtr);
@@ -1918,8 +1918,8 @@ Tcl_FreeIntRep(
int
Tcl_GetBooleanFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get boolean. */
- register int *boolPtr) /* Place to store resulting boolean. */
+ Tcl_Obj *objPtr, /* The object from which to get boolean. */
+ int *boolPtr) /* Place to store resulting boolean. */
{
do {
if (objPtr->typePtr == &tclIntType || objPtr->typePtr == &tclBooleanType) {
@@ -1975,7 +1975,7 @@ Tcl_GetBooleanFromObj(
int
TclSetBooleanFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
/*
* For some "pure" numeric Tcl_ObjTypes (no string rep), we can determine
@@ -2021,7 +2021,7 @@ TclSetBooleanFromAny(
static int
ParseBoolean(
- register Tcl_Obj *objPtr) /* The object to parse/convert. */
+ Tcl_Obj *objPtr) /* The object to parse/convert. */
{
int newBool;
char lowerCase[6];
@@ -2163,7 +2163,7 @@ ParseBoolean(
Tcl_Obj *
Tcl_NewDoubleObj(
- register double dblValue) /* Double used to initialize the object. */
+ double dblValue) /* Double used to initialize the object. */
{
return Tcl_DbNewDoubleObj(dblValue, "unknown", 0);
}
@@ -2172,9 +2172,9 @@ Tcl_NewDoubleObj(
Tcl_Obj *
Tcl_NewDoubleObj(
- register double dblValue) /* Double used to initialize the object. */
+ double dblValue) /* Double used to initialize the object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewDoubleObj(objPtr, dblValue);
return objPtr;
@@ -2211,13 +2211,13 @@ Tcl_NewDoubleObj(
Tcl_Obj *
Tcl_DbNewDoubleObj(
- register double dblValue, /* Double used to initialize the object. */
+ double dblValue, /* Double used to initialize the object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclDbNewObj(objPtr, file, line);
/* Optimized TclInvalidateStringRep() */
@@ -2232,7 +2232,7 @@ Tcl_DbNewDoubleObj(
Tcl_Obj *
Tcl_DbNewDoubleObj(
- register double dblValue, /* Double used to initialize the object. */
+ double dblValue, /* Double used to initialize the object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
@@ -2262,8 +2262,8 @@ Tcl_DbNewDoubleObj(
void
Tcl_SetDoubleObj(
- register Tcl_Obj *objPtr, /* Object whose internal rep to init. */
- register double dblValue) /* Double used to set the object's value. */
+ Tcl_Obj *objPtr, /* Object whose internal rep to init. */
+ double dblValue) /* Double used to set the object's value. */
{
if (Tcl_IsShared(objPtr)) {
Tcl_Panic("%s called with shared object", "Tcl_SetDoubleObj");
@@ -2295,8 +2295,8 @@ Tcl_SetDoubleObj(
int
Tcl_GetDoubleFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get a double. */
- register double *dblPtr) /* Place to store resulting double. */
+ Tcl_Obj *objPtr, /* The object from which to get a double. */
+ double *dblPtr) /* Place to store resulting double. */
{
do {
if (objPtr->typePtr == &tclDoubleType) {
@@ -2350,7 +2350,7 @@ Tcl_GetDoubleFromObj(
static int
SetDoubleFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
return TclParseNumber(interp, objPtr, "floating-point number", NULL, -1,
NULL, 0);
@@ -2378,7 +2378,7 @@ SetDoubleFromAny(
static void
UpdateStringOfDouble(
- register Tcl_Obj *objPtr) /* Double obj with string rep to update. */
+ Tcl_Obj *objPtr) /* Double obj with string rep to update. */
{
char *dst = Tcl_InitStringRep(objPtr, NULL, TCL_DOUBLE_SPACE);
@@ -2420,8 +2420,8 @@ UpdateStringOfDouble(
int
Tcl_GetIntFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get a int. */
- register int *intPtr) /* Place to store resulting int. */
+ Tcl_Obj *objPtr, /* The object from which to get a int. */
+ int *intPtr) /* Place to store resulting int. */
{
#if (LONG_MAX == INT_MAX)
return TclGetLongFromObj(interp, objPtr, (long *) intPtr);
@@ -2491,7 +2491,7 @@ SetIntFromAny(
static void
UpdateStringOfInt(
- register Tcl_Obj *objPtr) /* Int object whose string rep to update. */
+ Tcl_Obj *objPtr) /* Int object whose string rep to update. */
{
char *dst = Tcl_InitStringRep( objPtr, NULL, TCL_INTEGER_SPACE);
@@ -2536,7 +2536,7 @@ UpdateStringOfInt(
Tcl_Obj *
Tcl_NewLongObj(
- register long longValue) /* Long integer used to initialize the
+ long longValue) /* Long integer used to initialize the
* new object. */
{
return Tcl_DbNewWideIntObj(longValue, "unknown", 0);
@@ -2546,10 +2546,10 @@ Tcl_NewLongObj(
Tcl_Obj *
Tcl_NewLongObj(
- register long longValue) /* Long integer used to initialize the
+ long longValue) /* Long integer used to initialize the
* new object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewIntObj(objPtr, longValue);
return objPtr;
@@ -2595,14 +2595,14 @@ Tcl_NewLongObj(
Tcl_Obj *
Tcl_DbNewLongObj(
- register long longValue, /* Long integer used to initialize the new
+ long longValue, /* Long integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclDbNewObj(objPtr, file, line);
/* Optimized TclInvalidateStringRep */
@@ -2617,7 +2617,7 @@ Tcl_DbNewLongObj(
Tcl_Obj *
Tcl_DbNewLongObj(
- register long longValue, /* Long integer used to initialize the new
+ long longValue, /* Long integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
@@ -2653,8 +2653,8 @@ Tcl_DbNewLongObj(
int
Tcl_GetLongFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* The object from which to get a long. */
- register long *longPtr) /* Place to store resulting long. */
+ Tcl_Obj *objPtr, /* The object from which to get a long. */
+ long *longPtr) /* Place to store resulting long. */
{
do {
#ifdef TCL_WIDE_INT_IS_LONG
@@ -2767,7 +2767,7 @@ Tcl_GetLongFromObj(
Tcl_Obj *
Tcl_NewWideIntObj(
- register Tcl_WideInt wideValue)
+ Tcl_WideInt wideValue)
/* Wide integer used to initialize the new
* object. */
{
@@ -2778,11 +2778,11 @@ Tcl_NewWideIntObj(
Tcl_Obj *
Tcl_NewWideIntObj(
- register Tcl_WideInt wideValue)
+ Tcl_WideInt wideValue)
/* Wide integer used to initialize the new
* object. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclNewObj(objPtr);
TclSetIntObj(objPtr, wideValue);
@@ -2826,7 +2826,7 @@ Tcl_NewWideIntObj(
Tcl_Obj *
Tcl_DbNewWideIntObj(
- register Tcl_WideInt wideValue,
+ Tcl_WideInt wideValue,
/* Wide integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
@@ -2834,7 +2834,7 @@ Tcl_DbNewWideIntObj(
int line) /* Line number in the source file; used for
* debugging. */
{
- register Tcl_Obj *objPtr;
+ Tcl_Obj *objPtr;
TclDbNewObj(objPtr, file, line);
TclSetIntObj(objPtr, wideValue);
@@ -2845,7 +2845,7 @@ Tcl_DbNewWideIntObj(
Tcl_Obj *
Tcl_DbNewWideIntObj(
- register Tcl_WideInt wideValue,
+ Tcl_WideInt wideValue,
/* Long integer used to initialize the new
* object. */
const char *file, /* The name of the source file calling this
@@ -2877,8 +2877,8 @@ Tcl_DbNewWideIntObj(
void
Tcl_SetWideIntObj(
- register Tcl_Obj *objPtr, /* Object w. internal rep to init. */
- register Tcl_WideInt wideValue)
+ Tcl_Obj *objPtr, /* Object w. internal rep to init. */
+ Tcl_WideInt wideValue)
/* Wide integer used to initialize the
* object's value. */
{
@@ -2913,8 +2913,8 @@ Tcl_SetWideIntObj(
int
Tcl_GetWideIntFromObj(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr, /* Object from which to get a wide int. */
- register Tcl_WideInt *wideIntPtr)
+ Tcl_Obj *objPtr, /* Object from which to get a wide int. */
+ Tcl_WideInt *wideIntPtr)
/* Place to store resulting long. */
{
do {
@@ -3605,7 +3605,7 @@ Tcl_IsShared(
void
Tcl_DbIncrRefCount(
- register Tcl_Obj *objPtr, /* The object we are registering a reference
+ Tcl_Obj *objPtr, /* The object we are registering a reference
* to. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
@@ -3668,7 +3668,7 @@ Tcl_DbIncrRefCount(
void
Tcl_DbDecrRefCount(
- register Tcl_Obj *objPtr, /* The object we are releasing a reference
+ Tcl_Obj *objPtr, /* The object we are releasing a reference
* to. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
@@ -3734,7 +3734,7 @@ Tcl_DbDecrRefCount(
int
Tcl_DbIsShared(
- register Tcl_Obj *objPtr, /* The object to test for being shared. */
+ Tcl_Obj *objPtr, /* The object to test for being shared. */
const char *file, /* The name of the source file calling this
* function; used for debugging. */
int line) /* Line number in the source file; used for
@@ -3806,7 +3806,7 @@ Tcl_DbIsShared(
void
Tcl_InitObjHashTable(
- register Tcl_HashTable *tablePtr)
+ Tcl_HashTable *tablePtr)
/* Pointer to table record, which is supplied
* by the caller. */
{
@@ -3869,8 +3869,8 @@ TclCompareObjKeys(
{
Tcl_Obj *objPtr1 = (Tcl_Obj *) keyPtr;
Tcl_Obj *objPtr2 = (Tcl_Obj *) hPtr->key.oneWordValue;
- register const char *p1, *p2;
- register size_t l1, l2;
+ const char *p1, *p2;
+ size_t l1, l2;
/*
* If the object pointers are the same then they match.
@@ -4027,13 +4027,13 @@ Tcl_Command
Tcl_GetCommandFromObj(
Tcl_Interp *interp, /* The interpreter in which to resolve the
* command and to report errors. */
- register Tcl_Obj *objPtr) /* The object containing the command's name.
+ Tcl_Obj *objPtr) /* The object containing the command's name.
* If the name starts with "::", will be
* looked up in global namespace. Else, looked
* up first in the current namespace, then in
* global namespace. */
{
- register ResolvedCmdName *resPtr;
+ ResolvedCmdName *resPtr;
/*
* Get the internal representation, converting to a command type if
@@ -4056,12 +4056,12 @@ Tcl_GetCommandFromObj(
resPtr = objPtr->internalRep.twoPtrValue.ptr1;
if (objPtr->typePtr == &tclCmdNameType) {
- register Command *cmdPtr = resPtr->cmdPtr;
+ Command *cmdPtr = resPtr->cmdPtr;
if ((cmdPtr->cmdEpoch == resPtr->cmdEpoch)
&& (interp == cmdPtr->nsPtr->interp)
&& !(cmdPtr->nsPtr->flags & NS_DYING)) {
- register Namespace *refNsPtr = (Namespace *)
+ Namespace *refNsPtr = (Namespace *)
TclGetCurrentNamespace(interp);
if ((resPtr->refNsPtr == NULL)
@@ -4163,12 +4163,12 @@ void
TclSetCmdNameObj(
Tcl_Interp *interp, /* Points to interpreter containing command
* that should be cached in objPtr. */
- register Tcl_Obj *objPtr, /* Points to Tcl object to be changed to a
+ Tcl_Obj *objPtr, /* Points to Tcl object to be changed to a
* CmdName object. */
Command *cmdPtr) /* Points to Command structure that the
* CmdName object should refer to. */
{
- register ResolvedCmdName *resPtr;
+ ResolvedCmdName *resPtr;
if (objPtr->typePtr == &tclCmdNameType) {
resPtr = objPtr->internalRep.twoPtrValue.ptr1;
@@ -4203,10 +4203,10 @@ TclSetCmdNameObj(
static void
FreeCmdNameInternalRep(
- register Tcl_Obj *objPtr) /* CmdName object with internal
+ Tcl_Obj *objPtr) /* CmdName object with internal
* representation to free. */
{
- register ResolvedCmdName *resPtr = objPtr->internalRep.twoPtrValue.ptr1;
+ ResolvedCmdName *resPtr = objPtr->internalRep.twoPtrValue.ptr1;
/*
* Decrement the reference count of the ResolvedCmdName structure. If
@@ -4251,9 +4251,9 @@ FreeCmdNameInternalRep(
static void
DupCmdNameInternalRep(
Tcl_Obj *srcPtr, /* Object with internal rep to copy. */
- register Tcl_Obj *copyPtr) /* Object with internal rep to set. */
+ Tcl_Obj *copyPtr) /* Object with internal rep to set. */
{
- register ResolvedCmdName *resPtr = srcPtr->internalRep.twoPtrValue.ptr1;
+ ResolvedCmdName *resPtr = srcPtr->internalRep.twoPtrValue.ptr1;
copyPtr->internalRep.twoPtrValue.ptr1 = resPtr;
copyPtr->internalRep.twoPtrValue.ptr2 = NULL;
@@ -4285,11 +4285,11 @@ DupCmdNameInternalRep(
static int
SetCmdNameFromAny(
Tcl_Interp *interp, /* Used for error reporting if not NULL. */
- register Tcl_Obj *objPtr) /* The object to convert. */
+ Tcl_Obj *objPtr) /* The object to convert. */
{
const char *name;
- register Command *cmdPtr;
- register ResolvedCmdName *resPtr;
+ Command *cmdPtr;
+ ResolvedCmdName *resPtr;
if (interp == NULL) {
return TCL_ERROR;