Compare commits
23
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebb646039f | ||
|
|
e175267bec | ||
|
|
65878c47af | ||
|
|
543cd3200b | ||
|
|
d75c345663 | ||
|
|
1172c3966d | ||
|
|
d0abfbe72a | ||
|
|
18aadfce45 | ||
|
|
c4047c81e6 | ||
|
|
216ade8493 | ||
|
|
383f020ee8 | ||
|
|
edbfaa468e | ||
|
|
9d1312440e | ||
|
|
3ad87b0a02 | ||
|
|
c83af8f8d4 | ||
|
|
7413854f34 | ||
|
|
73b02508fa | ||
|
|
5e1eaa44bc | ||
|
|
c5f68dde5c | ||
|
|
878c0cff52 | ||
|
|
ce9b84204c | ||
|
|
e929b91222 | ||
|
|
96fec1a88c |
+14
-2
@@ -9,7 +9,7 @@
|
||||
.TH Threads 3 "8.1" Tcl "Tcl Library Procedures"
|
||||
.BS
|
||||
.SH NAME
|
||||
Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_ConditionFinalize, Tcl_GetThreadData, Tcl_MutexLock, Tcl_MutexUnlock, Tcl_MutexFinalize, Tcl_CreateThread, Tcl_JoinThread \- Tcl thread support
|
||||
Tcl_ConditionNotify, Tcl_ConditionWait, Tcl_ConditionFinalize, Tcl_GetThreadData, Tcl_UnsetThreadData, Tcl_MutexLock, Tcl_MutexUnlock, Tcl_MutexFinalize, Tcl_CreateThread, Tcl_JoinThread \- Tcl thread support
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
\fB#include <tcl.h>\fR
|
||||
@@ -27,6 +27,9 @@ Void *
|
||||
\fBTcl_GetThreadData\fR(\fIkeyPtr, size\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_UnsetThreadData\fR(\fIkeyPtr, size, all\fR)
|
||||
.sp
|
||||
void
|
||||
\fBTcl_MutexLock\fR(\fImutexPtr\fR)
|
||||
.sp
|
||||
void
|
||||
@@ -53,10 +56,13 @@ Note that a polling value of 0 seconds does not make much sense.
|
||||
This identifies a block of thread local storage. The key should be
|
||||
static and process-wide, yet each thread will end up associating
|
||||
a different block of storage with this key.
|
||||
.AP int *size in
|
||||
.AP int size in
|
||||
The size of the thread local storage block. This amount of data
|
||||
is allocated and initialized to zero the first time each thread
|
||||
calls \fBTcl_GetThreadData\fR.
|
||||
.AP int all in
|
||||
Non-zero if the thread local storage block is to be unset for all
|
||||
threads.
|
||||
.AP Tcl_ThreadId *idPtr out
|
||||
The referred storage will contain the id of the newly created thread as
|
||||
returned by the operating system.
|
||||
@@ -129,6 +135,12 @@ thread-private data. Its argument is a key that is shared by all threads
|
||||
and a size for the block of storage. The storage is automatically
|
||||
allocated and initialized to all zeros the first time each thread asks for it.
|
||||
The storage is automatically deallocated by \fBTcl_FinalizeThread\fR.
|
||||
.PP
|
||||
The \fBTcl_UnsetThreadData\fR function is used to manually destroy
|
||||
and remove the block of thread local storage. Normally, calling this
|
||||
function is not necessary. However, if an individual thread local
|
||||
storage block needs to be manually removed, this function provides a
|
||||
means to do it.
|
||||
.SS "SYNCHRONIZATION AND COMMUNICATION"
|
||||
Tcl provides \fBTcl_ThreadQueueEvent\fR and \fBTcl_ThreadAlert\fR
|
||||
for handling event queuing in multithreaded applications. See
|
||||
|
||||
+2
-2
@@ -96,7 +96,7 @@ The input substring must be an octal integer. It is read in and the
|
||||
integer value is stored in the variable,
|
||||
truncated as required by the size modifier value.
|
||||
.TP 10
|
||||
\fBx\fR
|
||||
\fBx\fR or \fBX\fR
|
||||
The input substring must be a hexadecimal integer.
|
||||
It is read in and the integer value is stored in the variable,
|
||||
truncated as required by the size modifier value.
|
||||
@@ -126,7 +126,7 @@ substring may be a white-space character.
|
||||
The input substring consists of all the characters up to the next
|
||||
white-space character; the characters are copied to the variable.
|
||||
.TP 10
|
||||
\fBe\fR or \fBf\fR or \fBg\fR
|
||||
\fBe\fR or \fBf\fR or \fBg\fR or \fBE\fR or \fBG\fR
|
||||
The input substring must be a floating-point number consisting
|
||||
of an optional sign, a string of decimal digits possibly
|
||||
containing a decimal point, and an optional exponent consisting
|
||||
|
||||
+12
-10
@@ -118,7 +118,7 @@ static const struct cname {
|
||||
* Unicode character-class tables.
|
||||
*/
|
||||
|
||||
typedef struct crange {
|
||||
typedef struct {
|
||||
chr start;
|
||||
chr end;
|
||||
} crange;
|
||||
@@ -260,7 +260,7 @@ static const chr alphaCharTable[] = {
|
||||
|
||||
static const crange controlRangeTable[] = {
|
||||
{0x0, 0x1f}, {0x7f, 0x9f}, {0x600, 0x604}, {0x200b, 0x200f},
|
||||
{0x202a, 0x202e}, {0x2060, 0x2064}, {0x206a, 0x206f}, {0xe000, 0xf8ff},
|
||||
{0x202a, 0x202e}, {0x2060, 0x2064}, {0x2066, 0x206f}, {0xe000, 0xf8ff},
|
||||
{0xfff9, 0xfffb}
|
||||
#if TCL_UTF_MAX > 4
|
||||
,{0x1d173, 0x1d17a}, {0xe0020, 0xe007f}, {0xf0000, 0xffffd}, {0x100000, 0x10fffd}
|
||||
@@ -270,7 +270,7 @@ static const crange controlRangeTable[] = {
|
||||
#define NUM_CONTROL_RANGE (sizeof(controlRangeTable)/sizeof(crange))
|
||||
|
||||
static const chr controlCharTable[] = {
|
||||
0xad, 0x6dd, 0x70f, 0xfeff
|
||||
0xad, 0x61c, 0x6dd, 0x70f, 0x180e, 0xfeff
|
||||
#if TCL_UTF_MAX > 4
|
||||
,0x110bd, 0xe0001
|
||||
#endif
|
||||
@@ -316,12 +316,13 @@ static const crange punctRangeTable[] = {
|
||||
{0x17d8, 0x17da}, {0x1800, 0x180a}, {0x1aa0, 0x1aa6}, {0x1aa8, 0x1aad},
|
||||
{0x1b5a, 0x1b60}, {0x1bfc, 0x1bff}, {0x1c3b, 0x1c3f}, {0x1cc0, 0x1cc7},
|
||||
{0x2010, 0x2027}, {0x2030, 0x2043}, {0x2045, 0x2051}, {0x2053, 0x205e},
|
||||
{0x2768, 0x2775}, {0x27e6, 0x27ef}, {0x2983, 0x2998}, {0x29d8, 0x29db},
|
||||
{0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e3b}, {0x3001, 0x3003},
|
||||
{0x3008, 0x3011}, {0x3014, 0x301f}, {0xa60d, 0xa60f}, {0xa6f2, 0xa6f7},
|
||||
{0xa874, 0xa877}, {0xa8f8, 0xa8fa}, {0xa9c1, 0xa9cd}, {0xaa5c, 0xaa5f},
|
||||
{0xfe10, 0xfe19}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61}, {0xff01, 0xff03},
|
||||
{0xff05, 0xff0a}, {0xff0c, 0xff0f}, {0xff3b, 0xff3d}, {0xff5f, 0xff65}
|
||||
{0x2308, 0x230b}, {0x2768, 0x2775}, {0x27e6, 0x27ef}, {0x2983, 0x2998},
|
||||
{0x29d8, 0x29db}, {0x2cf9, 0x2cfc}, {0x2e00, 0x2e2e}, {0x2e30, 0x2e3b},
|
||||
{0x3001, 0x3003}, {0x3008, 0x3011}, {0x3014, 0x301f}, {0xa60d, 0xa60f},
|
||||
{0xa6f2, 0xa6f7}, {0xa874, 0xa877}, {0xa8f8, 0xa8fa}, {0xa9c1, 0xa9cd},
|
||||
{0xaa5c, 0xaa5f}, {0xfe10, 0xfe19}, {0xfe30, 0xfe52}, {0xfe54, 0xfe61},
|
||||
{0xff01, 0xff03}, {0xff05, 0xff0a}, {0xff0c, 0xff0f}, {0xff3b, 0xff3d},
|
||||
{0xff5f, 0xff65}
|
||||
#if TCL_UTF_MAX > 4
|
||||
,{0x10100, 0x10102}, {0x10a50, 0x10a58}, {0x10b39, 0x10b3f}, {0x11047, 0x1104d},
|
||||
{0x110be, 0x110c1}, {0x11140, 0x11143}, {0x111c5, 0x111c8}, {0x12470, 0x12473}
|
||||
@@ -361,7 +362,8 @@ static const crange spaceRangeTable[] = {
|
||||
#define NUM_SPACE_RANGE (sizeof(spaceRangeTable)/sizeof(crange))
|
||||
|
||||
static const chr spaceCharTable[] = {
|
||||
0x20, 0xa0, 0x1680, 0x180e, 0x2028, 0x2029, 0x202f, 0x205f, 0x3000
|
||||
0x20, 0xa0, 0x1680, 0x180e, 0x2028, 0x2029, 0x202f, 0x205f, 0x2060,
|
||||
0x3000, 0xfeff
|
||||
};
|
||||
|
||||
#define NUM_SPACE_CHAR (sizeof(spaceCharTable)/sizeof(chr))
|
||||
|
||||
@@ -2108,6 +2108,9 @@ declare 578 {
|
||||
declare 579 {
|
||||
void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, const char *format, ...)
|
||||
}
|
||||
declare 580 {
|
||||
void Tcl_UnsetThreadData(Tcl_ThreadDataKey *keyPtr, int size, int all)
|
||||
}
|
||||
declare 630 {
|
||||
void TclUnusedStubEntry(void)
|
||||
}
|
||||
|
||||
+11
-3
@@ -3408,7 +3408,12 @@ EXTERN Tcl_Obj * Tcl_ObjPrintf(CONST char *format, ...);
|
||||
EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr,
|
||||
CONST char *format, ...);
|
||||
#endif
|
||||
/* Slot 580 is reserved */
|
||||
#ifndef Tcl_UnsetThreadData_TCL_DECLARED
|
||||
#define Tcl_UnsetThreadData_TCL_DECLARED
|
||||
/* 580 */
|
||||
EXTERN void Tcl_UnsetThreadData(Tcl_ThreadDataKey *keyPtr,
|
||||
int size, int all);
|
||||
#endif
|
||||
/* Slot 581 is reserved */
|
||||
/* Slot 582 is reserved */
|
||||
/* Slot 583 is reserved */
|
||||
@@ -4078,7 +4083,7 @@ typedef struct TclStubs {
|
||||
int (*tcl_AppendFormatToObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, CONST char *format, int objc, Tcl_Obj *CONST objv[]); /* 577 */
|
||||
Tcl_Obj * (*tcl_ObjPrintf) (CONST char *format, ...); /* 578 */
|
||||
void (*tcl_AppendPrintfToObj) (Tcl_Obj *objPtr, CONST char *format, ...); /* 579 */
|
||||
VOID *reserved580;
|
||||
void (*tcl_UnsetThreadData) (Tcl_ThreadDataKey *keyPtr, int size, int all); /* 580 */
|
||||
VOID *reserved581;
|
||||
VOID *reserved582;
|
||||
VOID *reserved583;
|
||||
@@ -6483,7 +6488,10 @@ extern TclStubs *tclStubsPtr;
|
||||
#define Tcl_AppendPrintfToObj \
|
||||
(tclStubsPtr->tcl_AppendPrintfToObj) /* 579 */
|
||||
#endif
|
||||
/* Slot 580 is reserved */
|
||||
#ifndef Tcl_UnsetThreadData
|
||||
#define Tcl_UnsetThreadData \
|
||||
(tclStubsPtr->tcl_UnsetThreadData) /* 580 */
|
||||
#endif
|
||||
/* Slot 581 is reserved */
|
||||
/* Slot 582 is reserved */
|
||||
/* Slot 583 is reserved */
|
||||
|
||||
+11
-2
@@ -1230,13 +1230,17 @@ typedef void **TclHandle;
|
||||
MODULE_SCOPE void * TclThreadDataKeyGet(Tcl_ThreadDataKey *keyPtr);
|
||||
MODULE_SCOPE void TclThreadDataKeySet(Tcl_ThreadDataKey *keyPtr,
|
||||
void *data);
|
||||
MODULE_SCOPE void TclThreadFreeData(void *blockPtr, int size);
|
||||
|
||||
/*
|
||||
* This is a convenience macro used to initialize a thread local storage ptr.
|
||||
*/
|
||||
|
||||
#define TCL_TSD_INIT(keyPtr) \
|
||||
(ThreadSpecificData *)Tcl_GetThreadData((keyPtr), sizeof(ThreadSpecificData))
|
||||
#define TCL_TSD_INIT(keyPtr) (ThreadSpecificData *) \
|
||||
Tcl_GetThreadData((keyPtr), sizeof(ThreadSpecificData))
|
||||
|
||||
#define TCL_TSD_TERM(keyPtr) (ThreadSpecificData *) \
|
||||
Tcl_UnsetThreadData((keyPtr), sizeof(ThreadSpecificData), 0)
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------
|
||||
@@ -2665,6 +2669,7 @@ MODULE_SCOPE int TclpThreadCreate(Tcl_ThreadId *idPtr,
|
||||
MODULE_SCOPE int TclpFindVariable(const char *name, int *lengthPtr);
|
||||
MODULE_SCOPE void TclpInitLibraryPath(char **valuePtr,
|
||||
int *lengthPtr, Tcl_Encoding *encodingPtr);
|
||||
MODULE_SCOPE void TclpResetLocks(void);
|
||||
MODULE_SCOPE void TclpInitLock(void);
|
||||
MODULE_SCOPE void TclpInitPlatform(void);
|
||||
MODULE_SCOPE void TclpInitUnlock(void);
|
||||
@@ -2705,6 +2710,10 @@ MODULE_SCOPE void TclpUnloadFile(Tcl_LoadHandle loadHandle);
|
||||
MODULE_SCOPE void * TclpThreadDataKeyGet(Tcl_ThreadDataKey *keyPtr);
|
||||
MODULE_SCOPE void TclpThreadDataKeySet(Tcl_ThreadDataKey *keyPtr,
|
||||
void *data);
|
||||
MODULE_SCOPE void TclpThreadDataKeyUnset(Tcl_ThreadDataKey *keyPtr,
|
||||
int freeValue);
|
||||
MODULE_SCOPE void TclpThreadDataKeyUnsetAll(Tcl_ThreadDataKey *keyPtr,
|
||||
int freeValue);
|
||||
MODULE_SCOPE void TclpThreadExit(int status);
|
||||
MODULE_SCOPE size_t TclpThreadGetStackSize(void);
|
||||
MODULE_SCOPE void TclRememberCondition(Tcl_Condition *mutex);
|
||||
|
||||
+59
-24
@@ -737,6 +737,10 @@ Tcl_CreateNamespace(
|
||||
Tcl_DString *namePtr, *buffPtr;
|
||||
int newEntry, nameLen;
|
||||
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
|
||||
const char *nameStr;
|
||||
Tcl_DString tmpBuffer;
|
||||
|
||||
Tcl_DStringInit(&tmpBuffer);
|
||||
|
||||
/*
|
||||
* If there is no active namespace, the interpreter is being initialized.
|
||||
@@ -750,39 +754,68 @@ Tcl_CreateNamespace(
|
||||
|
||||
parentPtr = NULL;
|
||||
simpleName = "";
|
||||
} else if (*name == '\0') {
|
||||
goto doCreate;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure that there are no trailing colons as that causes chaos when a
|
||||
* deleteProc is specified. [Bug d614d63989]
|
||||
*/
|
||||
|
||||
if (deleteProc != NULL) {
|
||||
nameStr = name + strlen(name) - 2;
|
||||
if (nameStr >= name && nameStr[1] == ':' && nameStr[0] == ':') {
|
||||
Tcl_DStringAppend(&tmpBuffer, name, -1);
|
||||
while ((nameLen = Tcl_DStringLength(&tmpBuffer)) > 0
|
||||
&& Tcl_DStringValue(&tmpBuffer)[nameLen-1] == ':') {
|
||||
Tcl_DStringSetLength(&tmpBuffer, nameLen-1);
|
||||
}
|
||||
name = Tcl_DStringValue(&tmpBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we've ended up with an empty string now, we're attempting to create
|
||||
* the global namespace despite the global namespace existing. That's
|
||||
* naughty!
|
||||
*/
|
||||
|
||||
if (*name == '\0') {
|
||||
Tcl_ResetResult(interp);
|
||||
Tcl_AppendResult(interp, "can't create namespace \"\": "
|
||||
"only global namespace can have empty name", NULL);
|
||||
Tcl_DStringFree(&tmpBuffer);
|
||||
return NULL;
|
||||
} else {
|
||||
/*
|
||||
* Find the parent for the new namespace.
|
||||
*/
|
||||
}
|
||||
|
||||
TclGetNamespaceForQualName(interp, name, NULL, TCL_CREATE_NS_IF_UNKNOWN,
|
||||
&parentPtr, &dummy1Ptr, &dummy2Ptr, &simpleName);
|
||||
/*
|
||||
* Find the parent for the new namespace.
|
||||
*/
|
||||
|
||||
/*
|
||||
* If the unqualified name at the end is empty, there were trailing
|
||||
* "::"s after the namespace's name which we ignore. The new namespace
|
||||
* was already (recursively) created and is pointed to by parentPtr.
|
||||
*/
|
||||
TclGetNamespaceForQualName(interp, name, NULL, TCL_CREATE_NS_IF_UNKNOWN,
|
||||
&parentPtr, &dummy1Ptr, &dummy2Ptr, &simpleName);
|
||||
|
||||
if (*simpleName == '\0') {
|
||||
return (Tcl_Namespace *) parentPtr;
|
||||
}
|
||||
/*
|
||||
* If the unqualified name at the end is empty, there were trailing "::"s
|
||||
* after the namespace's name which we ignore. The new namespace was
|
||||
* already (recursively) created and is pointed to by parentPtr.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Check for a bad namespace name and make sure that the name does not
|
||||
* already exist in the parent namespace.
|
||||
*/
|
||||
if (*simpleName == '\0') {
|
||||
Tcl_DStringFree(&tmpBuffer);
|
||||
return (Tcl_Namespace *) parentPtr;
|
||||
}
|
||||
|
||||
if (Tcl_FindHashEntry(&parentPtr->childTable, simpleName) != NULL) {
|
||||
Tcl_AppendResult(interp, "can't create namespace \"", name,
|
||||
"\": already exists", NULL);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
* Check for a bad namespace name and make sure that the name does not
|
||||
* already exist in the parent namespace.
|
||||
*/
|
||||
|
||||
if (Tcl_FindHashEntry(&parentPtr->childTable, simpleName) != NULL) {
|
||||
Tcl_AppendResult(interp, "can't create namespace \"", name,
|
||||
"\": already exists", NULL);
|
||||
Tcl_DStringFree(&tmpBuffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -790,6 +823,7 @@ Tcl_CreateNamespace(
|
||||
* of namespaces created.
|
||||
*/
|
||||
|
||||
doCreate:
|
||||
nsPtr = (Namespace *) ckalloc(sizeof(Namespace));
|
||||
nsPtr->name = ckalloc((unsigned) (strlen(simpleName)+1));
|
||||
strcpy(nsPtr->name, simpleName);
|
||||
@@ -879,6 +913,7 @@ Tcl_CreateNamespace(
|
||||
|
||||
Tcl_DStringFree(&buffer1);
|
||||
Tcl_DStringFree(&buffer2);
|
||||
Tcl_DStringFree(&tmpBuffer);
|
||||
|
||||
/*
|
||||
* Return a pointer to the new namespace.
|
||||
|
||||
@@ -398,11 +398,14 @@ ValidateFormat(
|
||||
*/
|
||||
case 'd':
|
||||
case 'e':
|
||||
case 'E':
|
||||
case 'f':
|
||||
case 'g':
|
||||
case 'G':
|
||||
case 'i':
|
||||
case 'o':
|
||||
case 'x':
|
||||
case 'X':
|
||||
break;
|
||||
case 'u':
|
||||
if (flags & SCAN_BIG) {
|
||||
@@ -727,6 +730,7 @@ Tcl_ScanObjCmd(
|
||||
parseFlag |= TCL_PARSE_OCTAL_ONLY | TCL_PARSE_SCAN_PREFIXES;
|
||||
break;
|
||||
case 'x':
|
||||
case 'X':
|
||||
op = 'i';
|
||||
parseFlag |= TCL_PARSE_HEXADECIMAL_ONLY;
|
||||
break;
|
||||
@@ -738,7 +742,9 @@ Tcl_ScanObjCmd(
|
||||
|
||||
case 'f':
|
||||
case 'e':
|
||||
case 'E':
|
||||
case 'g':
|
||||
case 'G':
|
||||
op = 'f';
|
||||
break;
|
||||
|
||||
|
||||
Executable → Regular
@@ -1340,7 +1340,7 @@ TclStubs tclStubs = {
|
||||
Tcl_AppendFormatToObj, /* 577 */
|
||||
Tcl_ObjPrintf, /* 578 */
|
||||
Tcl_AppendPrintfToObj, /* 579 */
|
||||
NULL, /* 580 */
|
||||
Tcl_UnsetThreadData, /* 580 */
|
||||
NULL, /* 581 */
|
||||
NULL, /* 582 */
|
||||
NULL, /* 583 */
|
||||
|
||||
@@ -101,6 +101,70 @@ Tcl_GetThreadData(
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* Tcl_UnsetThreadData --
|
||||
*
|
||||
* This function finalizes and deallocates a chunk of thread local
|
||||
* storage.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
Tcl_UnsetThreadData(
|
||||
Tcl_ThreadDataKey *keyPtr, /* Identifier for the data chunk */
|
||||
int size, /* Size of storage block */
|
||||
int all) /* Unset for all threads? */
|
||||
{
|
||||
#ifdef TCL_THREADS
|
||||
void *result = TclpThreadDataKeyGet(keyPtr);
|
||||
if (all) {
|
||||
TclpThreadDataKeyUnsetAll(keyPtr, 1 /* free */);
|
||||
} else {
|
||||
TclpThreadDataKeyUnset(keyPtr, 1 /* free */);
|
||||
}
|
||||
#else
|
||||
void *result = *keyPtr;
|
||||
TclThreadFreeData(result, size);
|
||||
ForgetSyncObject((char *) keyPtr, &keyRecord);
|
||||
#endif /* TCL_THREADS */
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclThreadFreeData --
|
||||
*
|
||||
* This function deallocates a chunk of thread local storage.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
TclThreadFreeData(
|
||||
void *blockPtr, /* Pointer to thread local data chunk */
|
||||
int size) /* Size of storage block */
|
||||
{
|
||||
if (blockPtr != NULL) {
|
||||
memset(blockPtr, 0, (size_t) size);
|
||||
ckfree((char *) blockPtr);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
|
||||
@@ -397,6 +397,96 @@ TclpThreadDataKeySet(
|
||||
Tcl_SetHashValue(hPtr, data);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpThreadDataKeyUnset --
|
||||
*
|
||||
* This procedure removes the pointer to a block of thread local
|
||||
* storage.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
TclpThreadDataKeyUnset(
|
||||
Tcl_ThreadDataKey *keyPtr, /* Identifier for the data chunk, really
|
||||
* (pthread_key_t **) */
|
||||
int freeValue) /* Also free the value? */
|
||||
{
|
||||
Tcl_HashTable *hashTablePtr;
|
||||
Tcl_HashEntry *hPtr;
|
||||
|
||||
hashTablePtr = ThreadStorageGetHashTable(Tcl_GetCurrentThread());
|
||||
hPtr = Tcl_FindHashEntry(hashTablePtr, (char *) keyPtr);
|
||||
|
||||
if (hPtr != NULL) {
|
||||
if (freeValue) {
|
||||
void *blockPtr = Tcl_GetHashValue(hPtr);
|
||||
|
||||
if (blockPtr != NULL) {
|
||||
ckfree(blockPtr);
|
||||
}
|
||||
}
|
||||
Tcl_DeleteHashEntry(hPtr);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* TclpThreadDataKeyUnsetAll --
|
||||
*
|
||||
* This procedure removes the pointer to a block of thread local
|
||||
* storage from all threads.
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
*
|
||||
* Side effects:
|
||||
* None.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
void
|
||||
TclpThreadDataKeyUnsetAll(
|
||||
Tcl_ThreadDataKey *keyPtr, /* Identifier for the data chunk, really
|
||||
* (pthread_key_t **) */
|
||||
int freeValue) /* Also free the value? */
|
||||
{
|
||||
Tcl_HashEntry *hPtr;
|
||||
Tcl_HashSearch search;
|
||||
Tcl_MutexLock(&threadStorageLock);
|
||||
for (hPtr = Tcl_FirstHashEntry(&threadStorageHashTable, &search);
|
||||
hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) {
|
||||
Tcl_HashTable *hashTablePtr = Tcl_GetHashValue(hPtr);
|
||||
|
||||
if (hashTablePtr != NULL) {
|
||||
Tcl_HashEntry *hPtr2 = Tcl_FindHashEntry(hashTablePtr,
|
||||
(char *) keyPtr);
|
||||
|
||||
if (hPtr2 != NULL) {
|
||||
if (freeValue) {
|
||||
void *blockPtr = Tcl_GetHashValue(hPtr2);
|
||||
|
||||
if (blockPtr != NULL) {
|
||||
ckfree(blockPtr);
|
||||
}
|
||||
}
|
||||
Tcl_DeleteHashEntry(hPtr2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Tcl_MutexUnlock(&threadStorageLock);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
|
||||
+95
-95
@@ -624,7 +624,7 @@ static const unsigned char groupMap[] = {
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 15, 15, 15, 3, 3, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 0, 7, 7, 7, 3, 3,
|
||||
4, 3, 3, 14, 14, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 3, 0,
|
||||
4, 3, 3, 14, 14, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 3, 17,
|
||||
0, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
85, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 86, 86, 86, 86, 86, 86,
|
||||
@@ -792,118 +792,118 @@ static const unsigned char groupMap[] = {
|
||||
116, 86, 116, 116, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 3, 3,
|
||||
3, 85, 3, 3, 3, 4, 15, 86, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
|
||||
0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0,
|
||||
0, 3, 3, 3, 3, 3, 3, 8, 3, 3, 3, 3, 86, 86, 86, 2, 0, 9, 9, 9, 9, 9,
|
||||
9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 15, 15, 15, 85, 15, 15, 15, 15, 15,
|
||||
0, 3, 3, 3, 3, 3, 3, 8, 3, 3, 3, 3, 86, 86, 86, 17, 0, 9, 9, 9, 9,
|
||||
9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 15, 15, 15, 85, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 86, 15, 0, 0, 0, 0, 0,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 86, 15, 0, 0, 0, 0,
|
||||
0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 86, 86, 86, 116, 116, 116, 116,
|
||||
86, 86, 116, 116, 116, 0, 0, 0, 0, 116, 116, 86, 116, 116, 116, 116,
|
||||
116, 116, 86, 86, 86, 0, 0, 0, 0, 14, 0, 0, 0, 3, 3, 9, 9, 9, 9, 9,
|
||||
9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 0, 0, 0, 86, 86, 86, 116, 116, 116, 116, 86,
|
||||
86, 116, 116, 116, 0, 0, 0, 0, 116, 116, 86, 116, 116, 116, 116, 116,
|
||||
116, 86, 86, 86, 0, 0, 0, 0, 14, 0, 0, 0, 3, 3, 9, 9, 9, 9, 9, 9, 9,
|
||||
9, 9, 9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 15,
|
||||
15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 116, 116, 116, 116, 116, 116,
|
||||
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 15, 15, 15,
|
||||
15, 15, 15, 15, 116, 116, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9,
|
||||
9, 9, 18, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
0, 0, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 116, 116, 116,
|
||||
116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116,
|
||||
15, 15, 15, 15, 15, 15, 15, 116, 116, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
|
||||
9, 9, 9, 9, 9, 9, 18, 0, 0, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 86, 86, 116, 116, 116,
|
||||
0, 0, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 116, 86, 116, 86, 86, 86, 86, 86, 86, 86,
|
||||
0, 86, 116, 86, 116, 116, 86, 86, 86, 86, 86, 86, 86, 86, 116, 116,
|
||||
116, 116, 116, 116, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 0, 0, 86,
|
||||
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9,
|
||||
9, 9, 9, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 85, 3, 3, 3, 3, 3,
|
||||
3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 86, 86,
|
||||
86, 116, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 86, 86, 116,
|
||||
116, 86, 0, 0, 3, 3, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 116, 86, 116, 86, 86, 86, 86, 86,
|
||||
86, 86, 0, 86, 116, 86, 116, 116, 86, 86, 86, 86, 86, 86, 86, 86, 116,
|
||||
116, 116, 116, 116, 116, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 0,
|
||||
0, 86, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9,
|
||||
9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 85, 3, 3,
|
||||
3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
|
||||
86, 86, 86, 116, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 86, 116,
|
||||
86, 86, 86, 86, 86, 116, 86, 116, 116, 116, 116, 116, 86, 116, 116,
|
||||
15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9,
|
||||
9, 3, 3, 3, 3, 3, 3, 3, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
0, 0, 0, 86, 86, 116, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 116, 86, 86, 86, 86, 116, 116, 86, 86, 116, 86, 116, 116, 15, 15,
|
||||
9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 86, 116, 86, 86, 116, 116, 116, 86, 116, 86, 86, 86, 116, 116,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 15, 15, 15, 15, 116, 116, 116,
|
||||
116, 116, 116, 116, 116, 86, 86, 86, 86, 86, 86, 86, 86, 116, 116,
|
||||
86, 86, 0, 0, 0, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0,
|
||||
0, 15, 15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 15,
|
||||
86, 116, 86, 86, 86, 86, 86, 116, 86, 116, 116, 116, 116, 116, 86,
|
||||
116, 116, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9,
|
||||
9, 9, 9, 9, 3, 3, 3, 3, 3, 3, 3, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 86, 86, 86, 86, 86, 86, 86, 86, 86, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 0, 0, 0, 86, 86, 116, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 85, 85, 85, 85, 85, 85, 3, 3, 3, 3, 3,
|
||||
3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 86, 86, 86, 3, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 116, 86, 86, 86, 86, 86, 86, 86,
|
||||
15, 15, 15, 15, 86, 15, 15, 15, 15, 116, 116, 86, 15, 15, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
||||
15, 15, 15, 116, 86, 86, 86, 86, 116, 116, 86, 86, 116, 86, 116, 116,
|
||||
15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 86, 116, 86, 86, 116, 116, 116, 86, 116, 86, 86, 86,
|
||||
116, 116, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 15, 15, 15, 15, 116,
|
||||
116, 116, 116, 116, 116, 116, 116, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
116, 116, 86, 86, 0, 0, 0, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9,
|
||||
9, 0, 0, 0, 15, 15, 15, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 85, 85, 85, 85, 85, 85, 3, 3, 3,
|
||||
3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 86, 86, 86, 3, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 116, 86, 86, 86, 86, 86,
|
||||
86, 86, 15, 15, 15, 15, 86, 15, 15, 15, 15, 116, 116, 86, 15, 15, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
||||
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
||||
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 85, 85, 85,
|
||||
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 85,
|
||||
85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
||||
85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
||||
85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
||||
85, 85, 85, 85, 85, 85, 85, 85, 85, 21, 21, 21, 21, 21, 21, 21, 21,
|
||||
21, 21, 21, 21, 21, 85, 119, 21, 21, 21, 120, 21, 21, 21, 21, 21, 21,
|
||||
85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 21, 21, 21, 21, 21, 21,
|
||||
21, 21, 21, 21, 21, 21, 21, 85, 119, 21, 21, 21, 120, 21, 21, 21, 21,
|
||||
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
||||
21, 21, 21, 21, 21, 21, 85, 85, 85, 85, 85, 86, 86, 86, 86, 86, 86,
|
||||
86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
86, 86, 86, 86, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23,
|
||||
24, 23, 24, 23, 24, 23, 24, 23, 24, 21, 21, 21, 21, 21, 121, 21, 21,
|
||||
122, 21, 123, 123, 123, 123, 123, 123, 123, 123, 124, 124, 124, 124,
|
||||
124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 0, 0, 124, 124, 124,
|
||||
124, 124, 124, 0, 0, 123, 123, 123, 123, 123, 123, 123, 123, 124, 124,
|
||||
124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 123, 123,
|
||||
124, 124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123,
|
||||
0, 0, 124, 124, 124, 124, 124, 124, 0, 0, 21, 123, 21, 123, 21, 123,
|
||||
21, 123, 0, 124, 0, 124, 0, 124, 0, 124, 123, 123, 123, 123, 123, 123,
|
||||
123, 123, 124, 124, 124, 124, 124, 124, 124, 124, 125, 125, 126, 126,
|
||||
126, 126, 127, 127, 128, 128, 129, 129, 130, 130, 0, 0, 123, 123, 123,
|
||||
123, 123, 123, 123, 123, 131, 131, 131, 131, 131, 131, 131, 131, 123,
|
||||
123, 123, 123, 123, 123, 123, 123, 131, 131, 131, 131, 131, 131, 131,
|
||||
131, 123, 123, 123, 123, 123, 123, 123, 123, 131, 131, 131, 131, 131,
|
||||
131, 131, 131, 123, 123, 21, 132, 21, 0, 21, 21, 124, 124, 133, 133,
|
||||
134, 11, 135, 11, 11, 11, 21, 132, 21, 0, 21, 21, 136, 136, 136, 136,
|
||||
134, 11, 11, 11, 123, 123, 21, 21, 0, 0, 21, 21, 124, 124, 137, 137,
|
||||
0, 11, 11, 11, 123, 123, 21, 21, 21, 106, 21, 21, 124, 124, 138, 138,
|
||||
109, 11, 11, 11, 0, 0, 21, 132, 21, 0, 21, 21, 139, 139, 140, 140,
|
||||
134, 11, 11, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 17, 17, 17, 17,
|
||||
8, 8, 8, 8, 8, 8, 3, 3, 16, 20, 5, 16, 16, 20, 5, 16, 3, 3, 3, 3, 3,
|
||||
3, 3, 3, 141, 142, 17, 17, 17, 17, 17, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||
16, 20, 3, 3, 3, 3, 12, 12, 3, 3, 3, 7, 5, 6, 3, 3, 3, 3, 3, 3, 3,
|
||||
3, 3, 3, 3, 7, 3, 12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 17, 17, 17,
|
||||
17, 17, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 18, 85, 0, 0, 18, 18,
|
||||
18, 18, 18, 18, 7, 7, 7, 5, 6, 85, 18, 18, 18, 18, 18, 18, 18, 18,
|
||||
18, 18, 7, 7, 7, 5, 6, 0, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
||||
85, 85, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 111, 111, 111, 111, 86, 111, 111, 111, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 14, 14, 100, 14, 14, 14, 14, 100, 14, 14, 21, 100, 100, 100,
|
||||
21, 21, 100, 100, 100, 21, 14, 100, 14, 14, 7, 100, 100, 100, 100,
|
||||
100, 14, 14, 14, 14, 14, 14, 100, 14, 143, 14, 100, 14, 144, 145, 100,
|
||||
100, 14, 21, 100, 100, 146, 100, 21, 15, 15, 15, 15, 21, 14, 14, 21,
|
||||
21, 100, 100, 7, 7, 7, 7, 7, 100, 21, 21, 21, 21, 14, 7, 14, 14, 147,
|
||||
14, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
|
||||
148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
|
||||
148, 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
|
||||
149, 149, 149, 149, 118, 118, 118, 23, 24, 118, 118, 118, 118, 18,
|
||||
0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 7, 7, 14, 14,
|
||||
14, 14, 7, 14, 14, 7, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 7, 14,
|
||||
21, 21, 21, 21, 21, 21, 21, 21, 85, 85, 85, 85, 85, 86, 86, 86, 86,
|
||||
86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 86, 86, 86, 86, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 23, 24,
|
||||
23, 24, 23, 24, 23, 24, 23, 24, 23, 24, 21, 21, 21, 21, 21, 121, 21,
|
||||
21, 122, 21, 123, 123, 123, 123, 123, 123, 123, 123, 124, 124, 124,
|
||||
124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 0, 0, 124, 124,
|
||||
124, 124, 124, 124, 0, 0, 123, 123, 123, 123, 123, 123, 123, 123, 124,
|
||||
124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 123,
|
||||
123, 124, 124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123,
|
||||
123, 0, 0, 124, 124, 124, 124, 124, 124, 0, 0, 21, 123, 21, 123, 21,
|
||||
123, 21, 123, 0, 124, 0, 124, 0, 124, 0, 124, 123, 123, 123, 123, 123,
|
||||
123, 123, 123, 124, 124, 124, 124, 124, 124, 124, 124, 125, 125, 126,
|
||||
126, 126, 126, 127, 127, 128, 128, 129, 129, 130, 130, 0, 0, 123, 123,
|
||||
123, 123, 123, 123, 123, 123, 131, 131, 131, 131, 131, 131, 131, 131,
|
||||
123, 123, 123, 123, 123, 123, 123, 123, 131, 131, 131, 131, 131, 131,
|
||||
131, 131, 123, 123, 123, 123, 123, 123, 123, 123, 131, 131, 131, 131,
|
||||
131, 131, 131, 131, 123, 123, 21, 132, 21, 0, 21, 21, 124, 124, 133,
|
||||
133, 134, 11, 135, 11, 11, 11, 21, 132, 21, 0, 21, 21, 136, 136, 136,
|
||||
136, 134, 11, 11, 11, 123, 123, 21, 21, 0, 0, 21, 21, 124, 124, 137,
|
||||
137, 0, 11, 11, 11, 123, 123, 21, 21, 21, 106, 21, 21, 124, 124, 138,
|
||||
138, 109, 11, 11, 11, 0, 0, 21, 132, 21, 0, 21, 21, 139, 139, 140,
|
||||
140, 134, 11, 11, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 17, 17, 17,
|
||||
17, 8, 8, 8, 8, 8, 8, 3, 3, 16, 20, 5, 16, 16, 20, 5, 16, 3, 3, 3,
|
||||
3, 3, 3, 3, 3, 141, 142, 17, 17, 17, 17, 17, 2, 3, 3, 3, 3, 3, 3, 3,
|
||||
3, 3, 16, 20, 3, 3, 3, 3, 12, 12, 3, 3, 3, 7, 5, 6, 3, 3, 3, 3, 3,
|
||||
3, 3, 3, 3, 3, 3, 7, 3, 12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 17, 17,
|
||||
17, 17, 17, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 85, 0, 0,
|
||||
18, 18, 18, 18, 18, 18, 7, 7, 7, 5, 6, 85, 18, 18, 18, 18, 18, 18,
|
||||
18, 18, 18, 18, 7, 7, 7, 5, 6, 0, 85, 85, 85, 85, 85, 85, 85, 85, 85,
|
||||
85, 85, 85, 85, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 86, 86, 86, 86, 86, 86, 86, 86,
|
||||
86, 86, 86, 86, 111, 111, 111, 111, 86, 111, 111, 111, 86, 86, 86,
|
||||
86, 86, 86, 86, 86, 86, 86, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 14, 14, 100, 14, 14, 14, 14, 100, 14, 14, 21, 100, 100,
|
||||
100, 21, 21, 100, 100, 100, 21, 14, 100, 14, 14, 7, 100, 100, 100,
|
||||
100, 100, 14, 14, 14, 14, 14, 14, 100, 14, 143, 14, 100, 14, 144, 145,
|
||||
100, 100, 14, 21, 100, 100, 146, 100, 21, 15, 15, 15, 15, 21, 14, 14,
|
||||
21, 21, 100, 100, 7, 7, 7, 7, 7, 100, 21, 21, 21, 21, 14, 7, 14, 14,
|
||||
147, 14, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
|
||||
18, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
|
||||
148, 148, 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
|
||||
149, 149, 149, 149, 149, 118, 118, 118, 23, 24, 118, 118, 118, 118,
|
||||
18, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 14, 14, 14, 14, 14, 7, 7, 14,
|
||||
14, 14, 14, 7, 14, 14, 7, 14, 14, 7, 14, 14, 14, 14, 14, 14, 14, 7,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 14, 14, 7,
|
||||
14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 14, 14,
|
||||
7, 14, 7, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 7, 7, 7, 7, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 5, 6, 5, 6, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 7, 14, 14, 14, 14,
|
||||
14, 14, 14, 5, 6, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
|
||||
|
||||
Executable → Regular
+12
-9
@@ -11,7 +11,7 @@
|
||||
package require Tcl 8.4
|
||||
# Keep this in sync with pkgIndex.tcl and with the install directories in
|
||||
# Makefiles
|
||||
package provide http 2.7.12
|
||||
package provide http 2.7.13
|
||||
|
||||
namespace eval http {
|
||||
# Allow resourcing to not clobber existing data
|
||||
@@ -107,7 +107,7 @@ proc http::Log {args} {}
|
||||
|
||||
proc http::register {proto port command} {
|
||||
variable urlTypes
|
||||
set urlTypes($proto) [list $port $command]
|
||||
set urlTypes([string tolower $proto]) [list $port $command]
|
||||
}
|
||||
|
||||
# http::unregister --
|
||||
@@ -121,11 +121,12 @@ proc http::register {proto port command} {
|
||||
|
||||
proc http::unregister {proto} {
|
||||
variable urlTypes
|
||||
if {![info exists urlTypes($proto)]} {
|
||||
set lower [string tolower $proto]
|
||||
if {![info exists urlTypes($lower)]} {
|
||||
return -code error "unsupported url type \"$proto\""
|
||||
}
|
||||
set old $urlTypes($proto)
|
||||
unset urlTypes($proto)
|
||||
set old $urlTypes($lower)
|
||||
unset urlTypes($lower)
|
||||
return $old
|
||||
}
|
||||
|
||||
@@ -505,12 +506,13 @@ proc http::geturl {url args} {
|
||||
if {$proto eq ""} {
|
||||
set proto http
|
||||
}
|
||||
if {![info exists urlTypes($proto)]} {
|
||||
set lower [string tolower $proto]
|
||||
if {![info exists urlTypes($lower)]} {
|
||||
unset $token
|
||||
return -code error "Unsupported URL type \"$proto\""
|
||||
}
|
||||
set defport [lindex $urlTypes($proto) 0]
|
||||
set defcmd [lindex $urlTypes($proto) 1]
|
||||
set defport [lindex $urlTypes($lower) 0]
|
||||
set defcmd [lindex $urlTypes($lower) 1]
|
||||
|
||||
if {$port eq ""} {
|
||||
set port $defport
|
||||
@@ -641,7 +643,8 @@ proc http::Connected { token proto phost srvurl} {
|
||||
set host [lindex [split $state(socketinfo) :] 0]
|
||||
set port [lindex [split $state(socketinfo) :] 1]
|
||||
|
||||
set defport [lindex $urlTypes($proto) 0]
|
||||
set lower [string tolower $proto]
|
||||
set defport [lindex $urlTypes($lower) 0]
|
||||
|
||||
# Send data in cr-lf format, but accept any line terminators
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Tcl package index file, version 1.1
|
||||
|
||||
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
|
||||
package ifneeded http 2.7.12 [list tclPkgSetup $dir http 2.7.12 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
|
||||
package ifneeded http 2.7.13 [list tclPkgSetup $dir http 2.7.13 {{http.tcl source {::http::config ::http::formatQuery ::http::geturl ::http::reset ::http::wait ::http::register ::http::unregister ::http::mapReply}}}]
|
||||
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user