Index: generic/nsf.c =================================================================== diff -u -r5a560516f8b0b4388f892150b70e783e1d238310 -ra467cf37f204cc977b7af7519a0994c65f9ed10f --- generic/nsf.c (.../nsf.c) (revision 5a560516f8b0b4388f892150b70e783e1d238310) +++ generic/nsf.c (.../nsf.c) (revision a467cf37f204cc977b7af7519a0994c65f9ed10f) @@ -3109,9 +3109,9 @@ } else { /* * In most situations, we have a varTablePtr through the clauses - * above. However, if someone redefines e.g. the method - * "configure" or "objectparameter", we might find an object with - * an still empty varTable, since these are lazy initiated. + * above. However, if someone redefines e.g. the method "configure" or + * "objectparameter", we might find an object with an still empty + * varTable, since these are lazy initiated. */ varTablePtr = object->varTablePtr = VarHashTableCreate(); } @@ -3370,9 +3370,9 @@ } else { /* * In most situations, we have a varTablePtr through the clauses - * above. However, if someone redefines e.g. the method - * "configure" or "objectparameter", we might find an object with - * an still empty varTable, since these are lazy initiated. + * above. However, if someone redefines e.g. the method "configure" or + * "objectparameter", we might find an object with an still empty + * varTable, since these are lazy initiated. */ varTablePtr = object->varTablePtr = VarHashTableCreate(); } @@ -7960,6 +7960,9 @@ INCR_REF_COUNT2("paramDefsObj", listObj); for (paramPtr = paramsPtr; paramPtr->name; paramPtr++) { + if (paramPtr->flags & NSF_ARG_NOCONFIG) { + continue; + } if (paramPtr -> paramObj) { innerListObj = paramPtr->paramObj; } else { @@ -8078,7 +8081,9 @@ INCR_REF_COUNT2("paramDefsObj", listObj); for (paramPtr = paramsPtr; paramPtr->name; paramPtr++) { - Tcl_ListObjAppendElement(interp, listObj, paramPtr->nameObj); + if ((paramPtr->flags & NSF_ARG_NOCONFIG) == 0) { + Tcl_ListObjAppendElement(interp, listObj, paramPtr->nameObj); + } } return listObj; } @@ -10356,6 +10361,9 @@ paramPtr->nrArgs = 0; } else if (strncmp(option, "noconfig", 8) == 0) { + if (disallowedOptions != NSF_DISALLOWED_ARG_OBJECT_PARAMETER) { + return NsfPrintError(interp, "Parameter option 'noconfig' only allowed for object parameters"); + } paramPtr->flags |= NSF_ARG_NOCONFIG; } else if (strncmp(option, "args", 4) == 0) { @@ -21055,13 +21063,13 @@ } /* -objectInfoMethod slots NsfObjInfoSlotsMethod { +objectInfoMethod slotobjects NsfObjInfoSlotobjectsMethod { {-argName "-type" -required 0 -nrargs 1 -type class} {-argName "pattern" -required 0} } */ static int -NsfObjInfoSlotsMethod(Tcl_Interp *interp, NsfObject *object, +NsfObjInfoSlotobjectsMethod(Tcl_Interp *interp, NsfObject *object, NsfClass *type, CONST char *pattern) { Tcl_Obj *listObj = Tcl_NewListObj(0, NULL); @@ -21456,7 +21464,7 @@ } if (paramsPtr == parsedParam.paramDefs->paramsPtr) { /* - * The named parameter was NOT found + * The named parameter was NOT found, so return "". */ Tcl_SetObjResult(interp, NsfGlobalObjs[NSF_EMPTY]); return TCL_OK; @@ -21484,15 +21492,15 @@ } /* -classInfoMethod slots NsfClassInfoSlotsMethod { +classInfoMethod slots NsfClassInfoSlotobjectsMethod { {-argName "-closure"} {-argName "-source" -nrargs 1 -type "all|application|baseclasses"} {-argName "-type" -required 0 -nrargs 1 -type class} {-argName "pattern" -required 0} } */ static int -NsfClassInfoSlotsMethod(Tcl_Interp *interp, NsfClass *class, +NsfClassInfoSlotobjectsMethod(Tcl_Interp *interp, NsfClass *class, int withClosure, int withSource, NsfClass *type, CONST char *pattern) { NsfClasses *clPtr, *intrinsic, *precedenceList = NULL;