Itcl - the [incr Tcl] extension

Check-in [48d5801f5a]
Login

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

Overview
Comment:Remove internal routine Itcl_CreateMethodVariable (name is deceptive) which no longer has callers
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 48d5801f5a9731c3da38558d7934c5cd623282fffa9ab82846eec87243f70df3
User & Date: dgp 2019-11-05 14:30:00.787
References
2019-11-05
15:46
amend to [48d5801f5a]: remove header declaration check-in: 6fae71f276 user: sebres tags: trunk
Context
2019-11-05
15:46
amend to [48d5801f5a]: remove header declaration check-in: 6fae71f276 user: sebres tags: trunk
14:30
Remove internal routine Itcl_CreateMethodVariable (name is deceptive) which no longer has callers check-in: 48d5801f5a user: dgp tags: trunk
2019-11-04
21:24
integrate bug fix of [777ae99cfb], fixes mem-leaks, certain optimizations check-in: 8b790617eb user: sebres tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/itclClass.c.
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
    }

    Tcl_SetHashValue(hPtr, imvPtr);

    *imvPtrPtr = imvPtr;
    return TCL_OK;
}

/* 
 * TODO: remove this if unused (seems to be internal API only),
 *       now superseded by ItclCreateMethodVariable.
 */
int
Itcl_CreateMethodVariable(
    Tcl_Interp *interp,       /* interpreter managing this transaction */
    ItclClass* iclsPtr,       /* class containing this variable */
    Tcl_Obj* namePtr,         /* variable name */
    Tcl_Obj* defaultPtr,      /* initial value */
    Tcl_Obj* callbackPtr,     /* code invoked when variable is set */
    ItclMethodVariable** imvPtrPtr)
                              /* returns: new methdovariable definition */
{
    ItclVariable *ivPtr;
    Tcl_HashEntry *hPtr;

    /*
     *  Search variable reference (ivPtr).
     */
    hPtr = Tcl_FindHashEntry(&iclsPtr->variables, (char *)namePtr);
    if (!hPtr || !(ivPtr = (ItclVariable*)Tcl_GetHashValue(hPtr))) {
        Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
            "variable name \"", Tcl_GetString(namePtr),
	    "\" is not declared in class \"",
            Tcl_GetString (iclsPtr->fullNamePtr), "\"",
            NULL);
        return TCL_ERROR;
    }

    /*
     *  Create method variable.
     */
    return ItclCreateMethodVariable(interp, ivPtr, defaultPtr, callbackPtr,
		imvPtrPtr);
}


/*
 * ------------------------------------------------------------------------
 *  Itcl_GetCommonVar()
 *
 *  Returns the current value for a common class variable.  The member
 *  name is interpreted with respect to the given class scope.  That







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







2165
2166
2167
2168
2169
2170
2171






































2172
2173
2174
2175
2176
2177
2178
    }

    Tcl_SetHashValue(hPtr, imvPtr);

    *imvPtrPtr = imvPtr;
    return TCL_OK;
}







































/*
 * ------------------------------------------------------------------------
 *  Itcl_GetCommonVar()
 *
 *  Returns the current value for a common class variable.  The member
 *  name is interpreted with respect to the given class scope.  That