Tcl Source Code

Check-in [c8a862480b]
Login

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

Overview
Comment:Minor compilation issue fix, make sure variable declaration (via macro) is first.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | aku-mem-debug-allow-regular
Files: files | file ages | folders
SHA1: c8a862480b7ebd98151f1fa0452cee0a5bfcd992
User & Date: mistachkin 2015-05-22 23:26:29
Context
2015-05-27
18:25
Make tweak to the mem-debug tracking official. It is now again possible to use regular packages with... check-in: 38ddcfe658 user: andreask tags: core-8-5-branch
2015-05-22
23:26
Minor compilation issue fix, make sure variable declaration (via macro) is first. Closed-Leaf check-in: c8a862480b user: mistachkin tags: aku-mem-debug-allow-regular
20:21
Moved Tcl_Obj* objThreadMap release tracking to a location where regular packages will call through,... check-in: 1f5c53bf5d user: andreask tags: aku-mem-debug-allow-regular
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclObj.c.

1311
1312
1313
1314
1315
1316
1317







1318
1319
1320
1321
1322
1323
1324

#ifdef TCL_MEM_DEBUG
void
TclFreeObj(
    register Tcl_Obj *objPtr)	/* The object to be freed. */
{
    register Tcl_ObjType *typePtr = objPtr->typePtr;







# ifdef TCL_THREADS
    /*
     * Check to make sure that the Tcl_Obj was allocated by the current
     * thread. Don't do this check when shutting down since thread local
     * storage can be finalized before the last Tcl_Obj is freed.
     */








>
>
>
>
>
>
>







1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331

#ifdef TCL_MEM_DEBUG
void
TclFreeObj(
    register Tcl_Obj *objPtr)	/* The object to be freed. */
{
    register Tcl_ObjType *typePtr = objPtr->typePtr;

    /*
     * This macro declares a variable, so must come here...
     */

    ObjInitDeletionContext(context);

# ifdef TCL_THREADS
    /*
     * Check to make sure that the Tcl_Obj was allocated by the current
     * thread. Don't do this check when shutting down since thread local
     * storage can be finalized before the last Tcl_Obj is freed.
     */

1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
	    }

	    Tcl_DeleteHashEntry(hPtr);
	}
    }
# endif

    /*
     * This macro declares a variable, so must come here...
     */

    ObjInitDeletionContext(context);

    /*
     * Check for a double free of the same value.  This is slightly tricky
     * because it is customary to free a Tcl_Obj when its refcount falls
     * either from 1 to 0, or from 0 to -1.  Falling from -1 to -2, though,
     * and so on, is always a sign of a botch in the caller.
     */
    if (objPtr->refCount < -1) {







<
<
<
<
<
<







1351
1352
1353
1354
1355
1356
1357






1358
1359
1360
1361
1362
1363
1364
	    }

	    Tcl_DeleteHashEntry(hPtr);
	}
    }
# endif







    /*
     * Check for a double free of the same value.  This is slightly tricky
     * because it is customary to free a Tcl_Obj when its refcount falls
     * either from 1 to 0, or from 0 to -1.  Falling from -1 to -2, though,
     * and so on, is always a sign of a botch in the caller.
     */
    if (objPtr->refCount < -1) {