Index: generic/xotcl.c =================================================================== diff -u -r915842c26db98121eb7ed1c6adfbe499ce586cac -rd46e7113b9f5ce270538786bda1eb5d9eee2618d --- generic/xotcl.c (.../xotcl.c) (revision 915842c26db98121eb7ed1c6adfbe499ce586cac) +++ generic/xotcl.c (.../xotcl.c) (revision d46e7113b9f5ce270538786bda1eb5d9eee2618d) @@ -13980,15 +13980,15 @@ * Begin Object Info Methods ***************************/ /* -infoObjectMethod callable XOTclObjInfoCallableMethod { - {-argName "object" -type object} +objectInfoMethod callable XOTclObjInfoCallableMethod { {-argName "infocallablesubcmd" -nrargs 1 -type "filter|method|methods" -required 1} {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter"} {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default all} {-argName "-application"} {-argName "-nomixins"} {-argName "-incontext"} {-argName "pattern" -required 0} +} */ static int XOTclObjInfoCallableMethod(Tcl_Interp *interp, XOTclObject *object, int subcmd, @@ -14038,8 +14038,7 @@ } /* -infoObjectMethod children XOTclObjInfoChildrenMethod { - {-argName "object" -required 1 -type object} +objectInfoMethod children XOTclObjInfoChildrenMethod { {-argName "pattern" -required 0} } */ @@ -14048,8 +14047,7 @@ } /* -infoObjectMethod class XOTclObjInfoClassMethod { - {-argName "object" -required 1 -type object} +objectInfoMethod class XOTclObjInfoClassMethod { } */ static int XOTclObjInfoClassMethod(Tcl_Interp *interp, XOTclObject *object) { @@ -14058,6 +14056,15 @@ } /* +objectInfoMethod filterguard XOTclObjInfoFilterguardMethod { + {-argName "filter" -required 1} +} +*/ +static int XOTclObjInfoFilterguardMethod(Tcl_Interp *interp, XOTclObject *object, CONST char *filter) { + return object->opt ? GuardList(interp, object->opt->filters, filter) : TCL_OK; +} + +/* objectInfoMethod filtermethods XOTclObjInfoFiltermethodsMethod { {-argName "-guards"} {-argName "-order"} @@ -14078,27 +14085,7 @@ } /* -objectInfoMethod filterguard XOTclObjInfoFilterguardMethod { - {-argName "filter" -required 1} -} -*/ -static int XOTclObjInfoFilterguardMethod(Tcl_Interp *interp, XOTclObject *object, CONST char *filter) { - return object->opt ? GuardList(interp, object->opt->filters, filter) : TCL_OK; -} - -/* TODO MOVE ME */ -/* -classInfoMethod filterguard XOTclClassInfoFilterguardMethod { - {-argName "filter" -required 1} - } -*/ -static int XOTclClassInfoFilterguardMethod(Tcl_Interp *interp, XOTclClass *class, CONST char *filter) { - return class->opt ? GuardList(interp, class->opt->classfilters, filter) : TCL_OK; -} - -/* -infoObjectMethod forward XOTclObjInfoForwardMethod { - {-argName "object" -required 1 -type object} +objectInfoMethod forward XOTclObjInfoForwardMethod { {-argName "-definition"} {-argName "name"} } @@ -14141,9 +14128,8 @@ } /* -infoObjectMethod method XOTclObjInfoMethodMethod { - {-argName "object" -type object} - {-argName "infomethodsubcmd" -type "args|definition|handle|parameter|parametersyntax|type|precondition|postcondition"} +objectInfoMethod method XOTclObjInfoMethodMethod { + {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition"} {-argName "name"} } */ @@ -14162,14 +14148,13 @@ } /* -infoObjectMethod methods XOTclObjInfoMethodsMethod { - {-argName "object" -type object} +objectInfoMethod methods XOTclObjInfoMethodsMethod { {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter"} {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default public} {-argName "-nomixins"} {-argName "-incontext"} {-argName "pattern"} - } +} */ static int XOTclObjInfoMethodsMethod(Tcl_Interp *interp, XOTclObject *object, int withMethodtype, int withCallproctection, @@ -14209,8 +14194,7 @@ } /* -infoObjectMethod parent XOTclObjInfoParentMethod { - {-argName "object" -required 1 -type object} +objectInfoMethod parent XOTclObjInfoParentMethod { } */ static int XOTclObjInfoParentMethod(Tcl_Interp *interp, XOTclObject *object) { @@ -14221,8 +14205,7 @@ } /* -infoObjectMethod precedence XOTclObjInfoPrecedenceMethod { - {-argName "object" -required 1 -type object} +objectInfoMethod precedence XOTclObjInfoPrecedenceMethod { {-argName "-intrinsic"} {-argName "pattern" -required 0} } @@ -14240,8 +14223,7 @@ } /* -infoObjectMethod slotobjects XOTclObjInfoSlotObjectsMethod { - {-argName "object" -required 1 -type object} +objectInfoMethod slotobjects XOTclObjInfoSlotObjectsMethod { {-argName "pattern" -required 0} } */ @@ -14263,8 +14245,7 @@ } /* -infoObjectMethod vars XOTclObjInfoVarsMethod { - {-argName "object" -required 1 -type object} +objectInfoMethod vars XOTclObjInfoVarsMethod { {-argName "pattern" -required 0} } */ @@ -14297,12 +14278,43 @@ /*************************** * Begin Class Info methods ***************************/ + /* -infoClassMethod heritage XOTclClassInfoHeritageMethod { - {-argName "class" -required 1 -type class} +classInfoMethod filterguard XOTclClassInfoFilterguardMethod { + {-argName "filter" -required 1} + } +*/ +static int XOTclClassInfoFilterguardMethod(Tcl_Interp *interp, XOTclClass *class, CONST char *filter) { + return class->opt ? GuardList(interp, class->opt->classfilters, filter) : TCL_OK; +} + +/* +classInfoMethod filtermethods XOTclClassInfoFiltermethodsMethod { + {-argName "-guards"} {-argName "pattern"} } */ +static int XOTclClassInfoFiltermethodsMethod(Tcl_Interp *interp, XOTclClass *class, + int withGuards, CONST char *pattern) { + return class->opt ? FilterInfo(interp, class->opt->classfilters, pattern, withGuards, 0) : TCL_OK; +} + +/* +classInfoMethod forward XOTclClassInfoForwardMethod { + {-argName "-definition"} + {-argName "name"} +} +*/ +static int XOTclClassInfoForwardMethod(Tcl_Interp *interp, XOTclClass *class, + int withDefinition, CONST char *pattern) { + return ListForward(interp, Tcl_Namespace_cmdTable(class->nsPtr), pattern, withDefinition); +} + +/* +classInfoMethod heritage XOTclClassInfoHeritageMethod { + {-argName "pattern"} +} +*/ static int XOTclClassInfoHeritageMethod(Tcl_Interp *interp, XOTclClass *cl, CONST char *pattern) { XOTclClasses *pl = ComputeOrder(cl, cl->order, Super); @@ -14350,8 +14362,7 @@ } /* -infoClassMethod instances XOTclClassInfoInstancesMethod { - {-argName "class" -required 1 -type class} +classInfoMethod instances XOTclClassInfoInstancesMethod { {-argName "-closure"} {-argName "pattern" -type objpattern} } @@ -14363,35 +14374,11 @@ } /* -classInfoMethod filtermethods XOTclClassInfoFiltermethodsMethod { - {-argName "-guards"} - {-argName "pattern"} -} -*/ -static int XOTclClassInfoFiltermethodsMethod(Tcl_Interp *interp, XOTclClass *class, - int withGuards, CONST char *pattern) { - return class->opt ? FilterInfo(interp, class->opt->classfilters, pattern, withGuards, 0) : TCL_OK; -} - -/* -infoClassMethod forward XOTclClassInfoForwardMethod { - {-argName "class" -required 1 -type class} - {-argName "-definition"} +classInfoMethod method XOTclClassInfoMethodMethod { + {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|parametersyntax|type|precondition|postcondition"} {-argName "name"} } */ -static int XOTclClassInfoForwardMethod(Tcl_Interp *interp, XOTclClass *class, - int withDefinition, CONST char *pattern) { - return ListForward(interp, Tcl_Namespace_cmdTable(class->nsPtr), pattern, withDefinition); -} - -/* -infoClassMethod method XOTclClassInfoMethodMethod { - {-argName "class" -type class} - {-argName "infomethodsubcmd" -type "args|body|definition|handle|parameter|type|precondition|postcondition"} - {-argName "name"} -} -*/ static int XOTclClassInfoMethodMethod(Tcl_Interp *interp, XOTclClass *class, int subcmd, CONST char *methodName) { Tcl_Namespace *nsPtr = class->nsPtr; @@ -14407,8 +14394,7 @@ } /* -infoClassMethod methods XOTclClassInfoMethodsMethod { - {-argName "object" -type class} +classInfoMethod methods XOTclClassInfoMethodsMethod { {-argName "-methodtype" -nrargs 1 -type "all|scripted|builtin|alias|forwarder|object|setter"} {-argName "-callprotection" -nrargs 1 -type "all|protected|public" -default public} {-argName "-nomixins"} @@ -14464,8 +14450,7 @@ } /* -infoClassMethod mixinof XOTclClassInfoMixinOfMethod { - {-argName "class" -required 1 -type class} +classInfoMethod mixinof XOTclClassInfoMixinOfMethod { {-argName "-closure"} {-argName "-scope" -required 0 -nrargs 1 -type "all|class|object"} {-argName "pattern" -type objpattern} @@ -14519,8 +14504,7 @@ } /* -infoClassMethod slots XOTclClassInfoSlotsMethod { - {-argName "class" -required 1 -type class} +classInfoMethod slots XOTclClassInfoSlotsMethod { } */ static int XOTclClassInfoSlotsMethod(Tcl_Interp *interp, XOTclClass *class) { @@ -14542,8 +14526,7 @@ } /* -infoClassMethod subclass XOTclClassInfoSubclassMethod { - {-argName "class" -required 1 -type class} +classInfoMethod subclass XOTclClassInfoSubclassMethod { {-argName "-closure"} {-argName "pattern" -type objpattern} } @@ -14571,8 +14554,7 @@ } /* -infoClassMethod superclass XOTclClassInfoSuperclassMethod { - {-argName "class" -required 1 -type class} +classInfoMethod superclass XOTclClassInfoSuperclassMethod { {-argName "-closure"} {-argName "pattern" -type tclobj} }