Index: TODO =================================================================== diff -u -r3b2edfa776291682e0d251322997aad328b885df -r8db56ce1f1dff5e22768c59df1b9039e961c6267 --- TODO (.../TODO) (revision 3b2edfa776291682e0d251322997aad328b885df) +++ TODO (.../TODO) (revision 8db56ce1f1dff5e22768c59df1b9039e961c6267) @@ -2124,11 +2124,16 @@ - defined nsf::deprecated as tcl proc, using ::nsf::log - some minor refactoring +- "info parameter": return :switch as parameteroption for + C-defined cmds, when a nonpos-arg gets no arguments +- updated regression test + TODO: - "info method definition" for attributes? - check performance implications of value conflict checker +- explizites [::nsf::method delete] (sinngemäss), als ergänzung zum "{} {}"-idiom - extend coro regression test - C-interface Index: generic/nsf.c =================================================================== diff -u -r3b2edfa776291682e0d251322997aad328b885df -r8db56ce1f1dff5e22768c59df1b9039e961c6267 --- generic/nsf.c (.../nsf.c) (revision 3b2edfa776291682e0d251322997aad328b885df) +++ generic/nsf.c (.../nsf.c) (revision 8db56ce1f1dff5e22768c59df1b9039e961c6267) @@ -6846,6 +6846,8 @@ nameStringObj = Tcl_NewStringObj(pPtr->name, -1); if (pPtr->type) { ParamDefsFormatOption(interp, nameStringObj, pPtr->type, &colonWritten, &first); + } else if (isNonpos && pPtr->nrArgs == 0) { + ParamDefsFormatOption(interp, nameStringObj, "switch", &colonWritten, &first); } if (outputRequired) { ParamDefsFormatOption(interp, nameStringObj, "required", &colonWritten, &first); Index: tests/info-method.test =================================================================== diff -u -re756bf87414d3f6376327b3a126e5e8ae619302d -r8db56ce1f1dff5e22768c59df1b9039e961c6267 --- tests/info-method.test (.../info-method.test) (revision e756bf87414d3f6376327b3a126e5e8ae619302d) +++ tests/info-method.test (.../info-method.test) (revision 8db56ce1f1dff5e22768c59df1b9039e961c6267) @@ -325,11 +325,11 @@ {::C public method {bar baz y} {x:int y:upper} {return y}} ? {nx::Object info method parameter "info lookup methods"} \ - "-callprotection -incontext -methodtype -nomixins -path -source pattern:optional" + "-callprotection -incontext:switch -methodtype -nomixins:switch -path:switch -source pattern:optional" ? {o info method parameter "foo b"} "x:int y:upper" ? {nx::Object info method parameter ::nx::Object::slot::__info::lookup::methods} \ - "-callprotection -incontext -methodtype -nomixins -path -source pattern:optional" + "-callprotection -incontext:switch -methodtype -nomixins:switch -path:switch -source pattern:optional" ? {o info method parameter "::o::foo::b"} "x:int y:upper" ? {nx::Object info method handle "info"} "::nsf::classes::nx::Object::info" Index: tests/parameters.test =================================================================== diff -u -rf0295d889aaf71709c63243685897dc3f11048f1 -r8db56ce1f1dff5e22768c59df1b9039e961c6267 --- tests/parameters.test (.../parameters.test) (revision f0295d889aaf71709c63243685897dc3f11048f1) +++ tests/parameters.test (.../parameters.test) (revision 8db56ce1f1dff5e22768c59df1b9039e961c6267) @@ -566,12 +566,12 @@ "query instparams for scripted method 'method'" ? {Object info method parameter ::nsf::forward} \ - "object -per-object method -default -earlybinding -methodprefix -objframe -onerror -verbose target:optional args" \ + "object -per-object:switch method -default -earlybinding:switch -methodprefix -objframe:switch -onerror -verbose:switch target:optional args" \ "query parameter for C-defined cmd 'nsf::forward'" - + Object require method autoname ? {Object info method parameter autoname} \ - "-instance -reset name" \ + "-instance:switch -reset:switch name" \ "query parameter for C-defined method 'autoname'" # TODO: how to query the params/instparams of info subcommands?