243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
|
data = Tcl_GetByteArrayFromObj(dataObj, len);
} else if (no_null) {
Tcl_AppendResult(interp, "no ", name, (char *) NULL);
return NULL;
}
if (*len < min) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf("Invalid length for \"%s\": must be >= %d", name, min));
return NULL;
} else if (max > 0 && *len > max) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf("Invalid length for \"%s\": must be <= %d", name, max));
return NULL;
}
return data;
}
/*
*-------------------------------------------------------------------
|
|
|
|
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
|
data = Tcl_GetByteArrayFromObj(dataObj, len);
} else if (no_null) {
Tcl_AppendResult(interp, "no ", name, (char *) NULL);
return NULL;
}
if (*len < min) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf("Invalid length for \"%s\": must be >= %" TCL_SIZE_MODIFIER "d", name, min));
return NULL;
} else if (max > 0 && *len > max) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf("Invalid length for \"%s\": must be <= %" TCL_SIZE_MODIFIER "d", name, max));
return NULL;
}
return data;
}
/*
*-------------------------------------------------------------------
|