Tcl package Thread source code

Check-in [fe731813cd]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Eliminate use of Tcl_UniChar type, so Thread compilation doesn't depend on value of TCL_UTF_MAX any more.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | thread-2-8-branch
Files: files | file ages | folders
SHA3-256: fe731813cde5d6720619c8473378d0d0e2657fa06fdab91a37e1793f9374754a
User & Date: jan.nijtmans 2019-03-19 15:01:13
References
2019-03-20
14:47
Further amend to [fe731813cd]: When using Tcl from the utf-max-6 branch (TIP upcoming), compiled with TCL_UTF_MAX>3, then use The Utf-32 version of Tcl_GetUnicodeFromObj() in stead of the Utf-16 version, switchable at run-time. check-in: 67e9a624e2 user: jan.nijtmans tags: thread-2-8-branch
2019-03-19
15:38
amend to [fe731813cd]: use Tcl_GetUnicodeFromObj (instead of Tcl_GetCharLength) for object-conversion in order to find string-type; There are really tcl-versions (or forks;) where Tcl_GetCharLength would not necessarily convert object to unicode. check-in: b49a179e29 user: sebres tags: thread-2-8-branch
Context
2019-03-19
15:38
amend to [fe731813cd]: use Tcl_GetUnicodeFromObj (instead of Tcl_GetCharLength) for object-conversion in order to find string-type; There are really tcl-versions (or forks;) where Tcl_GetCharLength would not necessarily convert object to unicode. check-in: b49a179e29 user: sebres tags: thread-2-8-branch
15:03
Merge 2.8 check-in: ba84bb8eed user: jan.nijtmans tags: trunk
15:01
Eliminate use of Tcl_UniChar type, so Thread compilation doesn't depend on value of TCL_UTF_MAX any more. check-in: fe731813cd user: jan.nijtmans tags: thread-2-8-branch
2019-03-15
14:05
Eliminate some useless type-casts check-in: d8ef48d392 user: jan.nijtmans tags: thread-2-8-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/threadSvCmd.c.

2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
....
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
int
Sv_Init (interp)
    Tcl_Interp *interp;
{
    int i;
    Bucket *bucketPtr;
    SvCmdInfo *cmdPtr;
    const Tcl_UniChar no[3] = {'n', 'o', 0} ;
    Tcl_Obj *obj;

#ifdef SV_FINALIZE
    /*
     * Create exit handler for this thread
     */
    Tcl_CreateThreadExitHandler(SvFinalize, NULL);
................................................................................
    Sv_RegisterListCommands();

    /*
     * Get Tcl object types. These are used
     * in custom object duplicator function.
     */

    obj = Tcl_NewUnicodeObj(no, -1);
    stringObjTypePtr = obj->typePtr;
    Tcl_GetBooleanFromObj(NULL, obj, &i);
    booleanObjTypePtr   = obj->typePtr;
    Tcl_DecrRefCount(obj);

    obj = Tcl_NewByteArrayObj((unsigned char *)no, 2);
    byteArrayObjTypePtr = obj->typePtr;
    Tcl_DecrRefCount(obj);

    obj = Tcl_NewDoubleObj(0.0);
    doubleObjTypePtr    = obj->typePtr;
    Tcl_DecrRefCount(obj);







<







 







|
|
|
|
|
|
<







2192
2193
2194
2195
2196
2197
2198

2199
2200
2201
2202
2203
2204
2205
....
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240

2241
2242
2243
2244
2245
2246
2247
int
Sv_Init (interp)
    Tcl_Interp *interp;
{
    int i;
    Bucket *bucketPtr;
    SvCmdInfo *cmdPtr;

    Tcl_Obj *obj;

#ifdef SV_FINALIZE
    /*
     * Create exit handler for this thread
     */
    Tcl_CreateThreadExitHandler(SvFinalize, NULL);
................................................................................
    Sv_RegisterListCommands();

    /*
     * Get Tcl object types. These are used
     * in custom object duplicator function.
     */

    obj = Tcl_NewStringObj("no", -1);
    Tcl_GetBooleanFromObj(NULL, obj, &i);
    booleanObjTypePtr   = obj->typePtr;
    Tcl_GetCharLength(obj);
    stringObjTypePtr = obj->typePtr;
    Tcl_GetByteArrayFromObj(obj, &i);

    byteArrayObjTypePtr = obj->typePtr;
    Tcl_DecrRefCount(obj);

    obj = Tcl_NewDoubleObj(0.0);
    doubleObjTypePtr    = obj->typePtr;
    Tcl_DecrRefCount(obj);

Changes to win/makefile.vc.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# In addition to the command line macros described there the following
# may also be defined.
#  ADDOPTDEFINES - addition compiler options
#  ADDLINKOPTS - addition link options
# E.g.
#   nmake -nologo -f makefile.vc TCLDIR=%TCLDIR% ... ADDOPTDEFINES="-I%LMDBDIR%" ADDLINKOPTS="%LMDBDIR%\Release\lmdb.lib"
# 
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#------------------------------------------------------------------------------

PROJECT = thread
RCFILE = thread.rc






|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# In addition to the command line macros described there the following
# may also be defined.
#  ADDOPTDEFINES - addition compiler options
#  ADDLINKOPTS - addition link options
# E.g.
#   nmake -nologo -f makefile.vc TCLDIR=%TCLDIR% ... ADDOPTDEFINES="-I%LMDBDIR%" ADDLINKOPTS="%LMDBDIR%\Release\lmdb.lib"
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#------------------------------------------------------------------------------

PROJECT = thread
RCFILE = thread.rc