Index: generic/tclAPI.h =================================================================== diff -u -r7c5c045a38db603c9a506d17a29403065256a845 -rb62dcaa16d03cd56d95a75f493cbd0de0fb5c60b --- generic/tclAPI.h (.../tclAPI.h) (revision 7c5c045a38db603c9a506d17a29403065256a845) +++ generic/tclAPI.h (.../tclAPI.h) (revision b62dcaa16d03cd56d95a75f493cbd0de0fb5c60b) @@ -109,18 +109,18 @@ static int XOTclCMixinGuardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclCNewMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclCRecreateMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); +static int XOTclClassInfoClassMixinOfMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoFilterMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoFilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoForwardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoHeritageMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoInstancesMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); -static int XOTclClassInfoInstmixinofMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoInvarMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoMethodMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoMethodsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoMixinMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoMixinguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); -static int XOTclClassInfoMixinofMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); +static int XOTclClassInfoObjectMixinOfMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoParameterMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoSlotsMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoSubclassMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); @@ -196,18 +196,18 @@ static int XOTclCMixinGuardMethod(Tcl_Interp *interp, XOTclClass *cl, char *mixin, Tcl_Obj *guard); static int XOTclCNewMethod(Tcl_Interp *interp, XOTclClass *cl, XOTclObject *withChildof, int nobjc, Tcl_Obj *CONST nobjv[]); static int XOTclCRecreateMethod(Tcl_Interp *interp, XOTclClass *cl, Tcl_Obj *name, int objc, Tcl_Obj *CONST objv[]); +static int XOTclClassInfoClassMixinOfMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoFilterMethod(Tcl_Interp *interp, XOTclClass *class, int withGuards, char *pattern); static int XOTclClassInfoFilterguardMethod(Tcl_Interp *interp, XOTclClass *class, char *filter); static int XOTclClassInfoForwardMethod(Tcl_Interp *interp, XOTclClass *class, int withDefinition, char *name); static int XOTclClassInfoHeritageMethod(Tcl_Interp *interp, XOTclClass *class, char *pattern); static int XOTclClassInfoInstancesMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); -static int XOTclClassInfoInstmixinofMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoInvarMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoMethodMethod(Tcl_Interp *interp, XOTclClass *class, int infomethodsubcmd, char *name); static int XOTclClassInfoMethodsMethod(Tcl_Interp *interp, XOTclClass *object, int withMethodtype, int withCallprotection, int withNomixins, int withIncontext, char *pattern); static int XOTclClassInfoMixinMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, int withGuards, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoMixinguardMethod(Tcl_Interp *interp, XOTclClass *class, char *mixin); -static int XOTclClassInfoMixinofMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); +static int XOTclClassInfoObjectMixinOfMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); static int XOTclClassInfoParameterMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoSlotsMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoSubclassMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); @@ -284,18 +284,18 @@ XOTclCMixinGuardMethodIdx, XOTclCNewMethodIdx, XOTclCRecreateMethodIdx, + XOTclClassInfoClassMixinOfMethodIdx, XOTclClassInfoFilterMethodIdx, XOTclClassInfoFilterguardMethodIdx, XOTclClassInfoForwardMethodIdx, XOTclClassInfoHeritageMethodIdx, XOTclClassInfoInstancesMethodIdx, - XOTclClassInfoInstmixinofMethodIdx, XOTclClassInfoInvarMethodIdx, XOTclClassInfoMethodMethodIdx, XOTclClassInfoMethodsMethodIdx, XOTclClassInfoMixinMethodIdx, XOTclClassInfoMixinguardMethodIdx, - XOTclClassInfoMixinofMethodIdx, + XOTclClassInfoObjectMixinOfMethodIdx, XOTclClassInfoParameterMethodIdx, XOTclClassInfoSlotsMethodIdx, XOTclClassInfoSubclassMethodIdx, @@ -623,6 +623,40 @@ } static int +XOTclClassInfoClassMixinOfMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { + parseContext pc; + + if (ArgumentParse(interp, objc, objv, NULL, objv[0], + method_definitions[XOTclClassInfoClassMixinOfMethodIdx].paramDefs, + method_definitions[XOTclClassInfoClassMixinOfMethodIdx].nrParameters, + &pc) != TCL_OK) { + return TCL_ERROR; + } else { + XOTclClass *class = (XOTclClass *)pc.clientData[0]; + int withClosure = (int )pc.clientData[1]; + char *patternString = NULL; + XOTclObject *patternObj = NULL; + Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[2]; + int returnCode; + + if (getMatchObject(interp, pattern, objv[2], &patternObj, &patternString) == -1) { + if (pattern) { + DECR_REF_COUNT(pattern); + } + return TCL_OK; + } + + parseContextRelease(&pc); + returnCode = XOTclClassInfoClassMixinOfMethod(interp, class, withClosure, patternString, patternObj); + + if (pattern) { + DECR_REF_COUNT(pattern); + } + return returnCode; + } +} + +static int XOTclClassInfoFilterMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; @@ -735,40 +769,6 @@ } static int -XOTclClassInfoInstmixinofMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; - - if (ArgumentParse(interp, objc, objv, NULL, objv[0], - method_definitions[XOTclClassInfoInstmixinofMethodIdx].paramDefs, - method_definitions[XOTclClassInfoInstmixinofMethodIdx].nrParameters, - &pc) != TCL_OK) { - return TCL_ERROR; - } else { - XOTclClass *class = (XOTclClass *)pc.clientData[0]; - int withClosure = (int )pc.clientData[1]; - char *patternString = NULL; - XOTclObject *patternObj = NULL; - Tcl_Obj *pattern = (Tcl_Obj *)pc.clientData[2]; - int returnCode; - - if (getMatchObject(interp, pattern, objv[2], &patternObj, &patternString) == -1) { - if (pattern) { - DECR_REF_COUNT(pattern); - } - return TCL_OK; - } - - parseContextRelease(&pc); - returnCode = XOTclClassInfoInstmixinofMethod(interp, class, withClosure, patternString, patternObj); - - if (pattern) { - DECR_REF_COUNT(pattern); - } - return returnCode; - } -} - -static int XOTclClassInfoInvarMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; @@ -884,12 +884,12 @@ } static int -XOTclClassInfoMixinofMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { +XOTclClassInfoObjectMixinOfMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; if (ArgumentParse(interp, objc, objv, NULL, objv[0], - method_definitions[XOTclClassInfoMixinofMethodIdx].paramDefs, - method_definitions[XOTclClassInfoMixinofMethodIdx].nrParameters, + method_definitions[XOTclClassInfoObjectMixinOfMethodIdx].paramDefs, + method_definitions[XOTclClassInfoObjectMixinOfMethodIdx].nrParameters, &pc) != TCL_OK) { return TCL_ERROR; } else { @@ -908,7 +908,7 @@ } parseContextRelease(&pc); - returnCode = XOTclClassInfoMixinofMethod(interp, class, withClosure, patternString, patternObj); + returnCode = XOTclClassInfoObjectMixinOfMethod(interp, class, withClosure, patternString, patternObj); if (pattern) { DECR_REF_COUNT(pattern); @@ -2136,6 +2136,11 @@ {"name", 1, 0, convertToTclobj}, {"args", 0, 0, convertToNothing}} }, +{"::xotcl::cmd::ClassInfo::class-mixin-of", XOTclClassInfoClassMixinOfMethodStub, 3, { + {"class", 1, 0, convertToClass}, + {"-closure", 0, 0, convertToString}, + {"pattern", 0, 0, convertToObjpattern}} +}, {"::xotcl::cmd::ClassInfo::filter", XOTclClassInfoFilterMethodStub, 3, { {"class", 1, 0, convertToClass}, {"-guards", 0, 0, convertToString}, @@ -2159,11 +2164,6 @@ {"-closure", 0, 0, convertToString}, {"pattern", 0, 0, convertToObjpattern}} }, -{"::xotcl::cmd::ClassInfo::instmixinof", XOTclClassInfoInstmixinofMethodStub, 3, { - {"class", 1, 0, convertToClass}, - {"-closure", 0, 0, convertToString}, - {"pattern", 0, 0, convertToObjpattern}} -}, {"::xotcl::cmd::ClassInfo::invar", XOTclClassInfoInvarMethodStub, 1, { {"class", 1, 0, convertToClass}} }, @@ -2190,7 +2190,7 @@ {"class", 1, 0, convertToClass}, {"mixin", 1, 0, convertToString}} }, -{"::xotcl::cmd::ClassInfo::mixinof", XOTclClassInfoMixinofMethodStub, 3, { +{"::xotcl::cmd::ClassInfo::object-mixin-of", XOTclClassInfoObjectMixinOfMethodStub, 3, { {"class", 1, 0, convertToClass}, {"-closure", 0, 0, convertToString}, {"pattern", 0, 0, convertToObjpattern}}