Tcl Source Code

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

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

Overview
Comment:TIP 484 proposes a re-implementation of Tcl's "int" Tcl_ObjType. Since the new implementation is not consistent with the former one, any callers of Tcl_GetObjType("int") who are expecting the return value to point them at something playing by the former rules are at risk of having their code broken. In this branch I remove the registation of Tcl's "int" type, so such callers will get NULL (which they should already be able to handle) instead of something misleading them into breakage.

Examine this branch and decide if it should be incorporated into TIP 484.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | end-int-registration
Files: files | file ages | folders
SHA3-256:d9ee6504b41a436a4b60dff3c5e48b74f83845749e88f43713fea8bd964111fc
User & Date: dgp 2017-11-14 18:35:22
Context
2017-11-15
14:13
Merge dgp's "end-int-registration" branch, but slightly different: In stead of not registering "int"... check-in: d1aa4663ab user: jan.nijtmans tags: no-wideint
2017-11-14
18:35
TIP 484 proposes a re-implementation of Tcl's "int" Tcl_ObjType. Since the new implementation is not... Closed-Leaf check-in: d9ee6504b4 user: dgp tags: end-int-registration
18:19
merge 8.7 check-in: ccd961edbd user: dgp tags: no-wideint
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclObj.c.

379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
    typeTableInitialized = 1;
    Tcl_InitHashTable(&typeTable, TCL_STRING_KEYS);
    Tcl_MutexUnlock(&tableMutex);

    Tcl_RegisterObjType(&tclByteArrayType);
    Tcl_RegisterObjType(&tclDoubleType);
    Tcl_RegisterObjType(&tclEndOffsetType);
    Tcl_RegisterObjType(&tclIntType);
    Tcl_RegisterObjType(&tclStringType);
    Tcl_RegisterObjType(&tclListType);
    Tcl_RegisterObjType(&tclDictType);
    Tcl_RegisterObjType(&tclByteCodeType);
    Tcl_RegisterObjType(&tclCmdNameType);
    Tcl_RegisterObjType(&tclRegexpType);
    Tcl_RegisterObjType(&tclProcBodyType);







<







379
380
381
382
383
384
385

386
387
388
389
390
391
392
    typeTableInitialized = 1;
    Tcl_InitHashTable(&typeTable, TCL_STRING_KEYS);
    Tcl_MutexUnlock(&tableMutex);

    Tcl_RegisterObjType(&tclByteArrayType);
    Tcl_RegisterObjType(&tclDoubleType);
    Tcl_RegisterObjType(&tclEndOffsetType);

    Tcl_RegisterObjType(&tclStringType);
    Tcl_RegisterObjType(&tclListType);
    Tcl_RegisterObjType(&tclDictType);
    Tcl_RegisterObjType(&tclByteCodeType);
    Tcl_RegisterObjType(&tclCmdNameType);
    Tcl_RegisterObjType(&tclRegexpType);
    Tcl_RegisterObjType(&tclProcBodyType);