Index: generic/gentclAPI.decls =================================================================== diff -u -r496ffe8fb5e5bdaba56fe3a939d32634bdbcb088 -r536cacc0e51390f46b6bde5874c823ea03e732e2 --- generic/gentclAPI.decls (.../gentclAPI.decls) (revision 496ffe8fb5e5bdaba56fe3a939d32634bdbcb088) +++ generic/gentclAPI.decls (.../gentclAPI.decls) (revision 536cacc0e51390f46b6bde5874c823ea03e732e2) @@ -139,8 +139,8 @@ {-argName "parameter" -type tclobj} } xotclCmd valuecheck XOTclValuecheckCmd { - {-argName "param" -type tclobj} {-argName "-nocomplain"} + {-argName "param" -type tclobj} {-argName "value" -required 0 -type tclobj} } # Index: generic/tclAPI.h =================================================================== diff -u -r496ffe8fb5e5bdaba56fe3a939d32634bdbcb088 -r536cacc0e51390f46b6bde5874c823ea03e732e2 --- generic/tclAPI.h (.../tclAPI.h) (revision 496ffe8fb5e5bdaba56fe3a939d32634bdbcb088) +++ generic/tclAPI.h (.../tclAPI.h) (revision 536cacc0e51390f46b6bde5874c823ea03e732e2) @@ -283,7 +283,7 @@ static int XOTclRelationCmd(Tcl_Interp *interp, XOTclObject *object, int relationtype, Tcl_Obj *value); static int XOTclSetInstvarCmd(Tcl_Interp *interp, XOTclObject *object, Tcl_Obj *variable, Tcl_Obj *value); static int XOTclSetterCmd(Tcl_Interp *interp, XOTclObject *object, int withPer_object, Tcl_Obj *parameter); -static int XOTclValuecheckCmd(Tcl_Interp *interp, Tcl_Obj *param, int withNocomplain, Tcl_Obj *value); +static int XOTclValuecheckCmd(Tcl_Interp *interp, int withNocomplain, Tcl_Obj *param, Tcl_Obj *value); enum { XOTclCAllocMethodIdx, @@ -1946,12 +1946,12 @@ &pc) != TCL_OK) { return TCL_ERROR; } else { - Tcl_Obj *param = (Tcl_Obj *)pc.clientData[0]; - int withNocomplain = (int )PTR2INT(pc.clientData[1]); + int withNocomplain = (int )PTR2INT(pc.clientData[0]); + Tcl_Obj *param = (Tcl_Obj *)pc.clientData[1]; Tcl_Obj *value = (Tcl_Obj *)pc.clientData[2]; parseContextRelease(&pc); - return XOTclValuecheckCmd(interp, param, withNocomplain, value); + return XOTclValuecheckCmd(interp, withNocomplain, param, value); } } @@ -2311,8 +2311,8 @@ {"parameter", 0, 0, convertToTclobj}} }, {"::xotcl::valuecheck", XOTclValuecheckCmdStub, 3, { - {"param", 0, 0, convertToTclobj}, {"-nocomplain", 0, 0, convertToString}, + {"param", 0, 0, convertToTclobj}, {"value", 0, 0, convertToTclobj}} },{NULL} }; Index: generic/xotcl.c =================================================================== diff -u -r7f903442026608a0b4e3ac62777ac87c468214fb -r536cacc0e51390f46b6bde5874c823ea03e732e2 --- generic/xotcl.c (.../xotcl.c) (revision 7f903442026608a0b4e3ac62777ac87c468214fb) +++ generic/xotcl.c (.../xotcl.c) (revision 536cacc0e51390f46b6bde5874c823ea03e732e2) @@ -12477,7 +12477,7 @@ {-argName "value" -required 0 -type tclobj} } */ -static int XOTclValuecheckCmd(Tcl_Interp *interp, Tcl_Obj *objPtr, int withNocomplain, Tcl_Obj *value) { +static int XOTclValuecheckCmd(Tcl_Interp *interp, int withNocomplain, Tcl_Obj *objPtr, Tcl_Obj *value) { ClientData checkedData; XOTclParam *paramPtr; Tcl_Obj *outObjPtr; Index: tests/parameters.xotcl =================================================================== diff -u -rb187bc23ce51a3c8a3f99010d1088dd3d3330fff -r536cacc0e51390f46b6bde5874c823ea03e732e2 --- tests/parameters.xotcl (.../parameters.xotcl) (revision b187bc23ce51a3c8a3f99010d1088dd3d3330fff) +++ tests/parameters.xotcl (.../parameters.xotcl) (revision 536cacc0e51390f46b6bde5874c823ea03e732e2) @@ -20,7 +20,7 @@ ? {::xotcl::valuecheck object o1} 1 ? {::xotcl::is o1 object} 1 ? {::xotcl::valuecheck class o1} {expected class but got "o1" for parameter value} -? {::xotcl::valuecheck class -nocomplain o1} 0 +? {::xotcl::valuecheck -nocomplain class o1} 0 ? {::xotcl::valuecheck class Test} 1 ? {::xotcl::valuecheck object,multivalued [list o1 Test]} 1 ? {::xotcl::valuecheck integer 1} 1