Itcl - the [incr Tcl] extension

Check-in [c8831b5a95]
Login

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

Overview
Comment:small review
Downloads: Tarball | ZIP 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.477
Context
2019-06-27
14:05
merge trunk check-in: b2bcfb0404 user: dgp tags: sebres-memopt-perf-branch
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 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
Unified Diff 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
 * ------------------------------------------------------------------------
 */
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()







<
<

|







492
493
494
495
496
497
498


499
500
501
502
503
504
505
506
507
 * ------------------------------------------------------------------------
 */
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()
824
825
826
827
828
829
830


831
832
833
834
835
836
837
838
839
840
841
842
 *
 * 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);
}







>
>




|







822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
 *
 * 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);
}