summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2020-04-01 05:37:15 (GMT)
committerdgp <dgp@users.sourceforge.net>2020-04-01 05:37:15 (GMT)
commitf8ae8cc375adc04ed8d810255e0d282cce9ae35e (patch)
treef43ac91efe42293e217b071abb8e894774753869 /generic/tclTest.c
parentdb95c403f65ef389b9f090c0c9d5dbc540bed030 (diff)
downloadtcl-f8ae8cc375adc04ed8d810255e0d282cce9ae35e.zip
tcl-f8ae8cc375adc04ed8d810255e0d282cce9ae35e.tar.gz
tcl-f8ae8cc375adc04ed8d810255e0d282cce9ae35e.tar.bz2
Adapt [testbytestring] to use TclGetBytesFromObj, which must be in internal
stubs to make that work.
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 0166522..17e59ff 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -5068,9 +5068,9 @@ TestbytestringObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "bytearray");
return TCL_ERROR;
}
- p = (const char *)Tcl_GetByteArrayFromObj(objv[1], &n);
- if ((p == NULL) || !Tcl_FetchIntRep(objv[1], properByteArrayType)) {
- Tcl_AppendResult(interp, "testbytestring expects bytes", NULL);
+
+ p = (const char *)TclGetBytesFromObj(interp, objv[1], &n);
+ if (p == NULL) {
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_NewStringObj(p, n));