Index: generic/gentclAPI.decls =================================================================== diff -u -r6b0cef2dbca601425c74c3ee586d15cfeab47b91 -rca676cbf49393571d278e6307a5c4f6239dc10c9 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision 6b0cef2dbca601425c74c3ee586d15cfeab47b91) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision ca676cbf49393571d278e6307a5c4f6239dc10c9) @@ -390,7 +390,7 @@ {-argName "-guards"} {-argName "pattern"} } -infoClassMethod instfilterguard XOTclClassInfoInstfilterguardMethod { +infoClassMethod filterguard XOTclClassInfoFilterguardMethod { {-argName "class" -required 1 -type class} {-argName "filter" -required 1} } Index: generic/tclAPI.h =================================================================== diff -u -r6b0cef2dbca601425c74c3ee586d15cfeab47b91 -rca676cbf49393571d278e6307a5c4f6239dc10c9 --- generic/tclAPI.h (.../tclAPI.h) (revision 6b0cef2dbca601425c74c3ee586d15cfeab47b91) +++ generic/tclAPI.h (.../tclAPI.h) (revision ca676cbf49393571d278e6307a5c4f6239dc10c9) @@ -103,9 +103,9 @@ static int XOTclCSetterMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoAliasMethodStub(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 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 XOTclClassInfoInstfilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoInstforwardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv []); static int XOTclClassInfoInstinvarMethodStub(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 []); @@ -199,9 +199,9 @@ static int XOTclCSetterMethod(Tcl_Interp *interp, XOTclClass *cl, int withPer_object, char *name); static int XOTclClassInfoAliasMethod(Tcl_Interp *interp, XOTclClass *object, int withDefinition, char *name); static int XOTclClassInfoFilterMethod(Tcl_Interp *interp, XOTclClass *class, int withGuards, char *pattern); +static int XOTclClassInfoFilterguardMethod(Tcl_Interp *interp, XOTclClass *class, char *filter); 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 XOTclClassInfoInstfilterguardMethod(Tcl_Interp *interp, XOTclClass *class, char *filter); static int XOTclClassInfoInstforwardMethod(Tcl_Interp *interp, XOTclClass *class, int withDefinition, char *name); static int XOTclClassInfoInstinvarMethod(Tcl_Interp *interp, XOTclClass *class); static int XOTclClassInfoInstmixinofMethod(Tcl_Interp *interp, XOTclClass *class, int withClosure, char *patternString, XOTclObject *patternObj); @@ -296,9 +296,9 @@ XOTclCSetterMethodIdx, XOTclClassInfoAliasMethodIdx, XOTclClassInfoFilterMethodIdx, + XOTclClassInfoFilterguardMethodIdx, XOTclClassInfoHeritageMethodIdx, XOTclClassInfoInstancesMethodIdx, - XOTclClassInfoInstfilterguardMethodIdx, XOTclClassInfoInstforwardMethodIdx, XOTclClassInfoInstinvarMethodIdx, XOTclClassInfoInstmixinofMethodIdx, @@ -704,6 +704,25 @@ } static int +XOTclClassInfoFilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { + parseContext pc; + + if (ArgumentParse(interp, objc, objv, NULL, objv[0], + method_definitions[XOTclClassInfoFilterguardMethodIdx].paramDefs, + method_definitions[XOTclClassInfoFilterguardMethodIdx].nrParameters, + &pc) != TCL_OK) { + return TCL_ERROR; + } else { + XOTclClass *class = (XOTclClass *)pc.clientData[0]; + char *filter = (char *)pc.clientData[1]; + + parseContextRelease(&pc); + return XOTclClassInfoFilterguardMethod(interp, class, filter); + + } +} + +static int XOTclClassInfoHeritageMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; @@ -757,25 +776,6 @@ } static int -XOTclClassInfoInstfilterguardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - parseContext pc; - - if (ArgumentParse(interp, objc, objv, NULL, objv[0], - method_definitions[XOTclClassInfoInstfilterguardMethodIdx].paramDefs, - method_definitions[XOTclClassInfoInstfilterguardMethodIdx].nrParameters, - &pc) != TCL_OK) { - return TCL_ERROR; - } else { - XOTclClass *class = (XOTclClass *)pc.clientData[0]; - char *filter = (char *)pc.clientData[1]; - - parseContextRelease(&pc); - return XOTclClassInfoInstfilterguardMethod(interp, class, filter); - - } -} - -static int XOTclClassInfoInstforwardMethodStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { parseContext pc; @@ -2346,6 +2346,10 @@ {"-guards", 0, 0, convertToString}, {"pattern", 0, 0, convertToString}} }, +{"::xotcl::cmd::ClassInfo::filterguard", XOTclClassInfoFilterguardMethodStub, 2, { + {"class", 1, 0, convertToClass}, + {"filter", 1, 0, convertToString}} +}, {"::xotcl::cmd::ClassInfo::heritage", XOTclClassInfoHeritageMethodStub, 2, { {"class", 1, 0, convertToClass}, {"pattern", 0, 0, convertToString}} @@ -2355,10 +2359,6 @@ {"-closure", 0, 0, convertToString}, {"pattern", 0, 0, convertToObjpattern}} }, -{"::xotcl::cmd::ClassInfo::instfilterguard", XOTclClassInfoInstfilterguardMethodStub, 2, { - {"class", 1, 0, convertToClass}, - {"filter", 1, 0, convertToString}} -}, {"::xotcl::cmd::ClassInfo::instforward", XOTclClassInfoInstforwardMethodStub, 3, { {"class", 1, 0, convertToClass}, {"-definition", 0, 0, convertToString}, Index: generic/xotcl.c =================================================================== diff -u -r6b0cef2dbca601425c74c3ee586d15cfeab47b91 -rca676cbf49393571d278e6307a5c4f6239dc10c9 --- generic/xotcl.c (.../xotcl.c) (revision 6b0cef2dbca601425c74c3ee586d15cfeab47b91) +++ generic/xotcl.c (.../xotcl.c) (revision ca676cbf49393571d278e6307a5c4f6239dc10c9) @@ -12822,7 +12822,7 @@ return class->opt ? FilterInfo(interp, class->opt->instfilters, pattern, withGuards, 0) : TCL_OK; } -static int XOTclClassInfoInstfilterguardMethod(Tcl_Interp *interp, XOTclClass * class, char * filter) { +static int XOTclClassInfoFilterguardMethod(Tcl_Interp *interp, XOTclClass * class, char * filter) { return class->opt ? GuardList(interp, class->opt->instfilters, filter) : TCL_OK; } Index: library/lib/xotcl1.xotcl =================================================================== diff -u -r6b0cef2dbca601425c74c3ee586d15cfeab47b91 -rca676cbf49393571d278e6307a5c4f6239dc10c9 --- library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision 6b0cef2dbca601425c74c3ee586d15cfeab47b91) +++ library/lib/xotcl1.xotcl (.../xotcl1.xotcl) (revision ca676cbf49393571d278e6307a5c4f6239dc10c9) @@ -305,7 +305,7 @@ } foreach cmd [::info command ::xotcl::cmd::ClassInfo::*] { set cmdName [namespace tail $cmd] - if {$cmdName in [list "method" "methods" "filter" "mixin" "mixinguard"]} continue + if {$cmdName in [list "method" "methods" "filter" "filterguard" "mixin" "mixinguard"]} continue ::xotcl::alias ::xotcl::classInfo $cmdName $cmd } ::xotcl::alias ::xotcl::objectInfo is ::xotcl::is @@ -315,6 +315,7 @@ ::xotcl::alias ::xotcl::classInfo instmixin ::xotcl::cmd::ClassInfo::mixin ::xotcl::alias ::xotcl::classInfo instmixinguard ::xotcl::cmd::ClassInfo::mixinguard ::xotcl::alias ::xotcl::classInfo instfilter ::xotcl::cmd::ClassInfo::filter + ::xotcl::alias ::xotcl::classInfo instfilterguard ::xotcl::cmd::ClassInfo::filterguard # define info methods from objectInfo on classInfo as well ::xotcl::alias classInfo body objectInfo::body