diff options
author | dgp <dgp@users.sourceforge.net> | 2020-04-01 05:37:15 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2020-04-01 05:37:15 (GMT) |
commit | f8ae8cc375adc04ed8d810255e0d282cce9ae35e (patch) | |
tree | f43ac91efe42293e217b071abb8e894774753869 /generic/tclTest.c | |
parent | db95c403f65ef389b9f090c0c9d5dbc540bed030 (diff) | |
download | tcl-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.c | 6 |
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)); |