Index: TODO =================================================================== diff -u -rb41aa0b8fa5782016df832c2ce08a7aab5681dc2 -rbc86c5d5cba70c6f5db2b184c143a7dde00cca4c --- TODO (.../TODO) (revision b41aa0b8fa5782016df832c2ce08a7aab5681dc2) +++ TODO (.../TODO) (revision bc86c5d5cba70c6f5db2b184c143a7dde00cca4c) @@ -2249,6 +2249,12 @@ - fixed potential crash with missing parent namespace +- added shadowing for ::tcl::info::body to allow "info body" + to be called on ::nsf::procs +- commented nsfShadow.c +- added regression test + + TODO: - object parameter type forward: Index: generic/nsf.c =================================================================== diff -u -rb41aa0b8fa5782016df832c2ce08a7aab5681dc2 -rbc86c5d5cba70c6f5db2b184c143a7dde00cca4c --- generic/nsf.c (.../nsf.c) (revision b41aa0b8fa5782016df832c2ce08a7aab5681dc2) +++ generic/nsf.c (.../nsf.c) (revision bc86c5d5cba70c6f5db2b184c143a7dde00cca4c) @@ -9324,12 +9324,6 @@ /************************************************************************** * Begin Definition of Parameter procs (Tcl Procs with Parameter handling) **************************************************************************/ -typedef struct NsfProcClientData { - Tcl_Obj *procName; - NsfParamDefs *paramDefs; - int with_ad; -} NsfProcClientData; - /* *---------------------------------------------------------------------- * NsfProcStubDeleteProc -- @@ -9444,7 +9438,7 @@ * *---------------------------------------------------------------------- */ -static int +extern int NsfProcStub(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { NsfProcClientData *tcd = clientData; int result; Index: generic/nsfInt.h =================================================================== diff -u -rbc85b3848186ff8269496f53c45255a11c556f53 -rbc86c5d5cba70c6f5db2b184c143a7dde00cca4c --- generic/nsfInt.h (.../nsfInt.h) (revision bc85b3848186ff8269496f53c45255a11c556f53) +++ generic/nsfInt.h (.../nsfInt.h) (revision bc86c5d5cba70c6f5db2b184c143a7dde00cca4c) @@ -317,6 +317,7 @@ int length; } NsfStringIncrStruct; + /* * cmd flags */ @@ -518,6 +519,15 @@ struct NsfClasses *nextPtr; } NsfClasses; +/* + * needed in nsf.c and in nsfShadow + */ +typedef struct NsfProcClientData { + Tcl_Obj *procName; + NsfParamDefs *paramDefs; + int with_ad; +} NsfProcClientData; + typedef enum SystemMethodsIdx { NSF_c_alloc_idx, NSF_c_create_idx, @@ -587,7 +597,7 @@ NSF_METHOD, NSF_OBJECT, NSF_SETTER, NSF_VALUECHECK, NSF_GUARD_OPTION, NSF___UNKNOWN__, /* Partly redefined Tcl commands; leave them together at the end */ - NSF_EXPR, NSF_FORMAT, NSF_INFO, NSF_INFO_FRAME, NSF_INTERP, NSF_IS, + NSF_EXPR, NSF_FORMAT, NSF_INFO_BODY, NSF_INFO_FRAME, NSF_INTERP, NSF_IS, NSF_RENAME, NSF_SUBST } NsfGlobalNames; #if !defined(NSF_C) @@ -607,7 +617,7 @@ "method", "object", "setter", "valuecheck", "-guard", "__unknown__", /* tcl commands */ - "expr", "format", "info", "::tcl::info::frame", "interp", "::tcl::string::is", + "expr", "format", "::tcl::info::body", "::tcl::info::frame", "interp", "::tcl::string::is", "rename", "subst" }; #endif @@ -842,7 +852,6 @@ void NsfStringIncrInit(NsfStringIncrStruct *iss); void NsfStringIncrFree(NsfStringIncrStruct *iss); - /* Tcl uses 01 and 02, TclOO uses 04 and 08, so leave some space free for further extensions of tcl and tcloo... Index: tests/parameters.test =================================================================== diff -u -r570b3538965101b43ca08cf3c23a3acd826c14df -rbc86c5d5cba70c6f5db2b184c143a7dde00cca4c --- tests/parameters.test (.../parameters.test) (revision 570b3538965101b43ca08cf3c23a3acd826c14df) +++ tests/parameters.test (.../parameters.test) (revision bc86c5d5cba70c6f5db2b184c143a7dde00cca4c) @@ -1465,6 +1465,10 @@ ? {::ns1::foo -s=0} "::ns1-0" ? {::ns1::foo -s -s=0} "::ns1-0" ? {::ns1::baz -b true -- -b} "::ns1-1--b" + ? {info body ad_returnredirect} {::nsf::__unset_unknown_args + + return [namespace current]-[lsort [info vars]]-$html_p-$allow_complete_url_p + } Test parameter count 1000 ? {::ns1::pass1} "::ns1-0"