Itcl - the [incr Tcl] extension

Check-in [c8831b5a95]
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:small review
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sebres-memopt-perf-branch
Files: files | file ages | folders
SHA3-256: c8831b5a957a979d96af4bc06500378805031968553ffee96a262956bb341232
User & Date: sebres 2019-04-14 15:19:13
Context
2019-04-17
20:36
fix disable assert for release-version (normally NDEBUG signaling no asserts) check-in: fcbb36b8f9 user: sebres tags: sebres-on-dmnd-resolver-perf-branch
2019-04-14
15:19
small review Leaf check-in: c8831b5a95 user: sebres tags: sebres-memopt-perf-branch
2019-02-10
02:01
remove second (unused) resolver (simplify code before new on-demand-resolver introduced) check-in: f7de92b810 user: sebres tags: sebres-memopt-perf-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/itclUtil.c.

492
493
494
495
496
497
498
499
500
501
502

503
504
505
506
507
508
509
...
824
825
826
827
828
829
830


831
832
833
834
835
836
837
838
839
840
841
842
 * ------------------------------------------------------------------------
 */
void
Itcl_SetListValue(elemPtr,val)
    Itcl_ListElem *elemPtr; /* list element being modified */
    ClientData val;         /* new value associated with element */
{
    Itcl_List *listPtr = elemPtr->owner;
    assert(listPtr->validate == ITCL_VALID_LIST);
    assert(elemPtr != NULL);


    elemPtr->value = val;
}

 
/*
 * ------------------------------------------------------------------------
 *  Itcl_FinishList()
................................................................................
 *
 * Results:
 *	None.
 *
 * ------------------------------------------------------------------------
 */
void ItclCkfree(void *ptr) {


    if (ptr == NULL) {
	return;
    }
    /* Itcl memory block to ckalloc block */
    ItclPresMemoryPrefix *blk = ((ItclPresMemoryPrefix *)ptr)-1;

    assert(blk->refCount <= 0); /* it should be not preserved */
    #if 0
    assert(blk->freeProc == NULL); /* it should be released */
    #endif
    ckfree(blk);
}






<
<

<
>







 







>
>




|







492
493
494
495
496
497
498


499

500
501
502
503
504
505
506
507
...
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
 * ------------------------------------------------------------------------
 */
void
Itcl_SetListValue(elemPtr,val)
    Itcl_ListElem *elemPtr; /* list element being modified */
    ClientData val;         /* new value associated with element */
{


    assert(elemPtr != NULL);

    assert(elemPtr->owner->validate == ITCL_VALID_LIST);
    elemPtr->value = val;
}

 
/*
 * ------------------------------------------------------------------------
 *  Itcl_FinishList()
................................................................................
 *
 * Results:
 *	None.
 *
 * ------------------------------------------------------------------------
 */
void ItclCkfree(void *ptr) {
    ItclPresMemoryPrefix *blk;
    
    if (ptr == NULL) {
	return;
    }
    /* Itcl memory block to ckalloc block */
    blk = ((ItclPresMemoryPrefix *)ptr)-1;

    assert(blk->refCount <= 0); /* it should be not preserved */
    #if 0
    assert(blk->freeProc == NULL); /* it should be released */
    #endif
    ckfree(blk);
}