i = 1;
while (i < objc)
{
- if (Tcl_GetIndexFromObj(interp, objv[i], options, "option",
+ if (Tcl_GetIndexFromObj(NULL, objv[i], options, NULL,
TCL_EXACT, &optIndex) != TCL_OK)
break;
i = 1;
while (i < objc)
{
- if (Tcl_GetIndexFromObj(interp, objv[i], options, "option",
+ if (Tcl_GetIndexFromObj(NULL, objv[i], options, NULL,
TCL_EXACT, &optIndex) != TCL_OK)
break;
pltcl_SPI_lastoid(ClientData cdata, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[])
{
+ /*
+ * Check call syntax
+ */
+ if (objc != 1)
+ {
+ Tcl_WrongNumArgs(interp, 1, objv, "");
+ return TCL_ERROR;
+ }
+
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(SPI_lastoid));
return TCL_OK;
}