Index: TODO =================================================================== diff -u -r880487204ff2da18d2d25ebd727b9b4bbda86c8e -r2d4492a6bceacd7df7ef0a305ca78b42128da5ca --- TODO (.../TODO) (revision 880487204ff2da18d2d25ebd727b9b4bbda86c8e) +++ TODO (.../TODO) (revision 2d4492a6bceacd7df7ef0a305ca78b42128da5ca) @@ -4662,6 +4662,9 @@ to make serialzer usable for copying (-map is to coarse) - extended regression test +nsf.c: +- Eliminate all use of Tcl_GetStringFromObj() function. + ======================================================================== TODO: - introspection (e.g. "syntax" for unregistered cmds/methods) Index: generic/nsf.c =================================================================== diff -u -r880487204ff2da18d2d25ebd727b9b4bbda86c8e -r2d4492a6bceacd7df7ef0a305ca78b42128da5ca --- generic/nsf.c (.../nsf.c) (revision 880487204ff2da18d2d25ebd727b9b4bbda86c8e) +++ generic/nsf.c (.../nsf.c) (revision 2d4492a6bceacd7df7ef0a305ca78b42128da5ca) @@ -5068,7 +5068,6 @@ static Tcl_Obj * AutonameIncr(Tcl_Interp *interp, Tcl_Obj *nameObj, NsfObject *object, int instanceOpt, int resetOpt) { - int valueLength; Tcl_Obj *valueObj, *resultObj = NULL; int flogs = TCL_LEAVE_ERR_MSG; CallFrame frame, *framePtr = &frame; @@ -5166,9 +5165,9 @@ FREE_ON_STACK(Tcl_Obj*, ov); } else { - char *valueString = Tcl_GetStringFromObj(valueObj, &valueLength); + char *valueString = Tcl_GetString(valueObj); - Tcl_AppendLimitedToObj(resultObj, valueString, valueLength, INT_MAX, NULL); + Tcl_AppendLimitedToObj(resultObj, valueString, valueObj->length, INT_MAX, NULL); /*fprintf(stderr, "+++ append to obj done\n");*/ } } @@ -8584,7 +8583,8 @@ /*fprintf(stderr, "MakeProcError %p type %p refCount %d\n", procNameObj, procNameObj->typePtr, procNameObj->refCount);*/ - procName = Tcl_GetStringFromObj(procNameObj, &nameLen); + procName = Tcl_GetString(procNameObj); + nameLen = procNameObj->length; overflow = (nameLen > limit); Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (procedure \"%.*s%s\" line %d)",