Itcl - the [incr Tcl] extension

Check-in [2642a4eccf]
Login

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

Overview
Comment:Best I can tell, the condition on make only an implemented method known to the TclOO machinery -- leaving out those with no body yet defined -- is just an error. TclOO needs to know about them in order to match them up with the itcl::body that later defines them or to trigger auto-loading of their bodies.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dgp-member-flags
Files: files | file ages | folders
SHA1: 2642a4eccf376dc9174d3573f3009a825339b92e
User & Date: dgp 2015-05-21 13:56:59
Context
2015-05-21
13:58
TEA update/repair Closed-Leaf check-in: f60f298360 user: dgp tags: dgp-member-flags
13:56
Best I can tell, the condition on make only an implemented method known to the TclOO machinery -- leaving out those with no body yet defined -- is just an error. TclOO needs to know about them in order to match them up with the itcl::body that later defines them or to trigger auto-loading of their bodies. check-in: 2642a4eccf user: dgp tags: dgp-member-flags
2015-05-20
20:04
Suppress clearly broken code (ItclMemberFunc != ItclDelegatedFunction). check-in: b049519e72 user: dgp tags: dgp-member-flags
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/itclBuiltin.c.

1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
        Tcl_IncrRefCount(objPtr);
        hPtr = Tcl_FindHashEntry(&iclsPtr->delegatedFunctions,
                (char *)objPtr);
        Tcl_DecrRefCount(objPtr);
	if (hPtr != NULL) {
	    idmPtr = Tcl_GetHashValue(hPtr);
            isStar = 1;
	} else {
#if 0
	    hPtr = Tcl_FindHashEntry(&iclsPtr->functions,
	            (char *)objv[2]);
	    if (hPtr != NULL) {
	        idmPtr = Tcl_GetHashValue(hPtr);
	    }
#endif
	}
    } else {
        found = 1;
	idmPtr = Tcl_GetHashValue(hPtr);
    }
    if (isStar) {
       /* check if the function is in the exceptions */







<
<
<
<
<
<
<
<







1677
1678
1679
1680
1681
1682
1683








1684
1685
1686
1687
1688
1689
1690
        Tcl_IncrRefCount(objPtr);
        hPtr = Tcl_FindHashEntry(&iclsPtr->delegatedFunctions,
                (char *)objPtr);
        Tcl_DecrRefCount(objPtr);
	if (hPtr != NULL) {
	    idmPtr = Tcl_GetHashValue(hPtr);
            isStar = 1;








	}
    } else {
        found = 1;
	idmPtr = Tcl_GetHashValue(hPtr);
    }
    if (isStar) {
       /* check if the function is in the exceptions */

Changes to generic/itclParse.c.

772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
     *  Build the name resolution tables for all data members.
     */
    Itcl_BuildVirtualTables(iclsPtr);

    /* make the methods and procs known to TclOO */
    Tcl_DStringInit(&buffer);
    FOREACH_HASH_VALUE(imPtr, &iclsPtr->functions) {
        if (Itcl_IsMemberCodeImplemented(imPtr->codePtr)) {
    	    ClientData pmPtr;
	    argumentPtr = imPtr->codePtr->argumentPtr;
	    bodyPtr = imPtr->codePtr->bodyPtr;
	    if (imPtr->codePtr->flags & ITCL_BUILTIN) {
		int isDone;
		isDone = 0;
		if (imPtr->builtinArgumentPtr == NULL) {







<







772
773
774
775
776
777
778

779
780
781
782
783
784
785
     *  Build the name resolution tables for all data members.
     */
    Itcl_BuildVirtualTables(iclsPtr);

    /* make the methods and procs known to TclOO */
    Tcl_DStringInit(&buffer);
    FOREACH_HASH_VALUE(imPtr, &iclsPtr->functions) {

    	    ClientData pmPtr;
	    argumentPtr = imPtr->codePtr->argumentPtr;
	    bodyPtr = imPtr->codePtr->bodyPtr;
	    if (imPtr->codePtr->flags & ITCL_BUILTIN) {
		int isDone;
		isDone = 0;
		if (imPtr->builtinArgumentPtr == NULL) {
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
	    } else {
	        imPtr->accessCmd = Tcl_CreateObjCommand(interp,
		        Tcl_GetString(imPtr->fullNamePtr),
			Itcl_ExecProc, imPtr, ItclReleaseIMF);
		ItclPreserveIMF(imPtr);
	    }
            Tcl_DStringInit(&buffer);
        }
    }
    if (iclsPtr->flags & (ITCL_TYPE|ITCL_WIDGETADAPTOR)) {
	/* initialize the typecomponents and typevariables */
        if (Itcl_PushCallFrame(interp, &frame, iclsPtr->nsPtr,
                /*isProcCallFrame*/0) != TCL_OK) {
	    result = TCL_ERROR;
	    goto errorReturn;







<







991
992
993
994
995
996
997

998
999
1000
1001
1002
1003
1004
	    } else {
	        imPtr->accessCmd = Tcl_CreateObjCommand(interp,
		        Tcl_GetString(imPtr->fullNamePtr),
			Itcl_ExecProc, imPtr, ItclReleaseIMF);
		ItclPreserveIMF(imPtr);
	    }
            Tcl_DStringInit(&buffer);

    }
    if (iclsPtr->flags & (ITCL_TYPE|ITCL_WIDGETADAPTOR)) {
	/* initialize the typecomponents and typevariables */
        if (Itcl_PushCallFrame(interp, &frame, iclsPtr->nsPtr,
                /*isProcCallFrame*/0) != TCL_OK) {
	    result = TCL_ERROR;
	    goto errorReturn;