summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-23 15:47:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-23 15:47:16 (GMT)
commit11766bbb13293cf8afd2bc81b2af2cf0cb6798d7 (patch)
treec16829f342096d869d6c09652a7f7eee7ec728bf /generic/tclInt.h
parent78d1e3a62472af13174a3836a3704ac0f7264535 (diff)
parentf527a3f4568093147bf17db414cc0340bbac5045 (diff)
downloadtcl-11766bbb13293cf8afd2bc81b2af2cf0cb6798d7.zip
tcl-11766bbb13293cf8afd2bc81b2af2cf0cb6798d7.tar.gz
tcl-11766bbb13293cf8afd2bc81b2af2cf0cb6798d7.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index e8ca771..27ed734 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -282,7 +282,7 @@ typedef struct Namespace {
* frames for this namespace that are on the
* Tcl call stack. The namespace won't be
* freed until activationCount becomes zero. */
- size_t refCount; /* Count of references by namespaceName
+ TCL_HASH_TYPE refCount; /* Count of references by namespaceName
* objects. The namespace can't be freed until
* refCount becomes zero. */
Tcl_HashTable cmdTable; /* Contains all the commands currently
@@ -307,12 +307,12 @@ typedef struct Namespace {
* registered using "namespace export". */
size_t maxExportPatterns; /* Number of export patterns for which space
* is currently allocated. */
- size_t cmdRefEpoch; /* Incremented if a newly added command
+ TCL_HASH_TYPE cmdRefEpoch; /* Incremented if a newly added command
* shadows a command for which this namespace
* has already cached a Command* pointer; this
* causes all its cached Command* pointers to
* be invalidated. */
- size_t resolverEpoch; /* Incremented whenever (a) the name
+ TCL_HASH_TYPE resolverEpoch; /* Incremented whenever (a) the name
* resolution rules change for this namespace
* or (b) a newly added command shadows a
* command that is compiled to bytecodes. This
@@ -339,7 +339,7 @@ typedef struct Namespace {
* LookupCompiledLocal to resolve variable
* references within the namespace at compile
* time. */
- size_t exportLookupEpoch; /* Incremented whenever a command is added to
+ TCL_HASH_TYPE exportLookupEpoch; /* Incremented whenever a command is added to
* a namespace, removed from a namespace or
* the exports of a namespace are changed.
* Allows TIP#112-driven command lists to be
@@ -439,7 +439,7 @@ typedef struct EnsembleConfig {
* if the command has been deleted (or never
* existed; the global namespace never has an
* ensemble command.) */
- size_t epoch; /* The epoch at which this ensemble's table of
+ TCL_HASH_TYPE epoch; /* The epoch at which this ensemble's table of
* exported commands is valid. */
char **subcommandArrayPtr; /* Array of ensemble subcommand names. At all
* consistent points, this will have the same
@@ -552,7 +552,7 @@ typedef struct CommandTrace {
struct CommandTrace *nextPtr;
/* Next in list of traces associated with a
* particular command. */
- size_t refCount; /* Used to ensure this structure is not
+ TCL_HASH_TYPE refCount; /* Used to ensure this structure is not
* deleted too early. Keeps track of how many
* pieces of code have a pointer to this
* structure. */
@@ -625,7 +625,7 @@ typedef struct Var {
typedef struct VarInHash {
Var var;
- size_t refCount; /* Counts number of active uses of this
+ TCL_HASH_TYPE refCount; /* Counts number of active uses of this
* variable: 1 for the entry in the hash
* table, 1 for each additional variable whose
* linkPtr points here, 1 for each nested
@@ -967,7 +967,7 @@ typedef struct CompiledLocal {
typedef struct Proc {
struct Interp *iPtr; /* Interpreter for which this command is
* defined. */
- size_t refCount; /* Reference count: 1 if still present in
+ TCL_HASH_TYPE refCount; /* Reference count: 1 if still present in
* command table plus 1 for each call to the
* procedure that is currently active. This
* structure can be freed when refCount
@@ -1084,7 +1084,7 @@ typedef struct AssocData {
*/
typedef struct LocalCache {
- size_t refCount;
+ TCL_HASH_TYPE refCount;
size_t numVars;
Tcl_Obj *varName0;
} LocalCache;
@@ -1250,7 +1250,7 @@ typedef struct CmdFrame {
typedef struct CFWord {
CmdFrame *framePtr; /* CmdFrame to access. */
size_t word; /* Index of the word in the command. */
- size_t refCount; /* Number of times the word is on the
+ TCL_HASH_TYPE refCount; /* Number of times the word is on the
* stack. */
} CFWord;
@@ -1518,7 +1518,7 @@ typedef struct LiteralEntry {
* NULL if end of chain. */
Tcl_Obj *objPtr; /* Points to Tcl object that holds the
* literal's bytes and length. */
- size_t refCount; /* If in an interpreter's global literal
+ TCL_HASH_TYPE refCount; /* If in an interpreter's global literal
* table, the number of ByteCode structures
* that share the literal object; the literal
* entry can be freed when refCount drops to
@@ -1536,13 +1536,13 @@ typedef struct LiteralTable {
LiteralEntry *staticBuckets[TCL_SMALL_HASH_TABLE];
/* Bucket array used for small tables to avoid
* mallocs and frees. */
- size_t numBuckets; /* Total number of buckets allocated at
+ TCL_HASH_TYPE numBuckets; /* Total number of buckets allocated at
* **buckets. */
- size_t numEntries; /* Total number of entries present in
+ TCL_HASH_TYPE numEntries; /* Total number of entries present in
* table. */
- size_t rebuildSize; /* Enlarge table when numEntries gets to be
+ TCL_HASH_TYPE rebuildSize; /* Enlarge table when numEntries gets to be
* this large. */
- size_t mask; /* Mask value used in hashing function. */
+ TCL_HASH_TYPE mask; /* Mask value used in hashing function. */
} LiteralTable;
/*
@@ -1660,12 +1660,12 @@ typedef struct Command {
* recreated). */
Namespace *nsPtr; /* Points to the namespace containing this
* command. */
- size_t refCount; /* 1 if in command hashtable plus 1 for each
+ TCL_HASH_TYPE refCount; /* 1 if in command hashtable plus 1 for each
* reference from a CmdName Tcl object
* representing a command's name in a ByteCode
* instruction sequence. This structure can be
* freed when refCount becomes zero. */
- size_t cmdEpoch; /* Incremented to invalidate any references
+ TCL_HASH_TYPE cmdEpoch; /* Incremented to invalidate any references
* that point to this command when it is
* renamed, deleted, hidden, or exposed. */
CompileProc *compileProc; /* Procedure called to compile command. NULL
@@ -1893,7 +1893,7 @@ typedef struct Interp {
* compiled by the interpreter. Indexed by the
* string representations of literals. Used to
* avoid creating duplicate objects. */
- size_t compileEpoch; /* Holds the current "compilation epoch" for
+ TCL_HASH_TYPE compileEpoch; /* Holds the current "compilation epoch" for
* this interpreter. This is incremented to
* invalidate existing ByteCodes when, e.g., a
* command with a compile procedure is
@@ -2375,7 +2375,7 @@ typedef enum TclEolTranslation {
*/
typedef struct List {
- size_t refCount;
+ TCL_HASH_TYPE refCount;
size_t maxElemCount; /* Total number of element array slots. */
size_t elemCount; /* Current number of list elements. */
int canonicalFlag; /* Set if the string representation was
@@ -2587,7 +2587,7 @@ typedef Tcl_Channel (TclOpenFileChannelProc_)(Tcl_Interp *interp,
*----------------------------------------------------------------
*/
-typedef void (TclInitProcessGlobalValueProc)(char **valuePtr, size_t *lengthPtr,
+typedef void (TclInitProcessGlobalValueProc)(char **valuePtr, TCL_HASH_TYPE *lengthPtr,
Tcl_Encoding *encodingPtr);
/*
@@ -2599,9 +2599,9 @@ typedef void (TclInitProcessGlobalValueProc)(char **valuePtr, size_t *lengthPtr,
*/
typedef struct ProcessGlobalValue {
- size_t epoch; /* Epoch counter to detect changes in the
+ TCL_HASH_TYPE epoch; /* Epoch counter to detect changes in the
* global value. */
- size_t numBytes; /* Length of the global string. */
+ TCL_HASH_TYPE numBytes; /* Length of the global string. */
char *value; /* The global string value. */
Tcl_Encoding encoding; /* system encoding when global string was
* initialized. */
@@ -2966,7 +2966,7 @@ MODULE_SCOPE Tcl_Obj * TclGetProcessGlobalValue(ProcessGlobalValue *pgvPtr);
MODULE_SCOPE Tcl_Obj * TclGetSourceFromFrame(CmdFrame *cfPtr, int objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE char * TclGetStringStorage(Tcl_Obj *objPtr,
- size_t *sizePtr);
+ TCL_HASH_TYPE *sizePtr);
MODULE_SCOPE int TclGetLoadedLibraries(Tcl_Interp *interp,
const char *targetName,
const char *packageName);
@@ -3084,7 +3084,7 @@ MODULE_SCOPE int TclpThreadCreate(Tcl_ThreadId *idPtr,
size_t stackSize, int flags);
MODULE_SCOPE size_t TclpFindVariable(const char *name, size_t *lengthPtr);
MODULE_SCOPE void TclpInitLibraryPath(char **valuePtr,
- size_t *lengthPtr, Tcl_Encoding *encodingPtr);
+ TCL_HASH_TYPE *lengthPtr, Tcl_Encoding *encodingPtr);
MODULE_SCOPE void TclpInitLock(void);
MODULE_SCOPE ClientData TclpInitNotifier(void);
MODULE_SCOPE void TclpInitPlatform(void);
@@ -4435,7 +4435,7 @@ MODULE_SCOPE void TclDbInitNewObj(Tcl_Obj *objPtr, const char *file,
(objPtr)->bytes = &tclEmptyString; \
(objPtr)->length = 0; \
} else { \
- (objPtr)->bytes = (char *)Tcl_Alloc((size_t)(len) + 1U); \
+ (objPtr)->bytes = (char *)Tcl_Alloc((len) + 1U); \
memcpy((objPtr)->bytes, (bytePtr) ? (bytePtr) : &tclEmptyString, (len)); \
(objPtr)->bytes[len] = '\0'; \
(objPtr)->length = (len); \