diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-30 11:37:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-30 11:37:54 (GMT) |
commit | aa371355b1d31208dd1e1c3b5cae011d33a62290 (patch) | |
tree | 07701075dc01630cf4902d3d3ae324f4f6531f6d /generic/tclInt.h | |
parent | 4cbd0649efa1b88510c6873aa3f348b58d51b982 (diff) | |
download | tcl-aa371355b1d31208dd1e1c3b5cae011d33a62290.zip tcl-aa371355b1d31208dd1e1c3b5cae011d33a62290.tar.gz tcl-aa371355b1d31208dd1e1c3b5cae011d33a62290.tar.bz2 |
Optimize TclStringFirst/TclStringLast: Let it return a Tcl_Obj * in stead of an int, so its callers don't need to do the conversion any more.
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index be6f26e..49a72de 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4075,9 +4075,9 @@ MODULE_SCOPE int TclCompileAssembleCmd(Tcl_Interp *interp, MODULE_SCOPE Tcl_Obj * TclStringCat(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); -MODULE_SCOPE int TclStringFirst(Tcl_Obj *needle, Tcl_Obj *haystack, +MODULE_SCOPE Tcl_Obj * TclStringFirst(Tcl_Obj *needle, Tcl_Obj *haystack, int start); -MODULE_SCOPE int TclStringLast(Tcl_Obj *needle, Tcl_Obj *haystack, +MODULE_SCOPE Tcl_Obj * TclStringLast(Tcl_Obj *needle, Tcl_Obj *haystack, int last); MODULE_SCOPE Tcl_Obj * TclStringRepeat(Tcl_Interp *interp, Tcl_Obj *objPtr, int count, int flags); @@ -4817,13 +4817,13 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; */ #ifndef TCL_MEM_DEBUG -#define TclNewIntObj(objPtr, i) \ +#define TclNewIntObj(objPtr, w) \ do { \ TclIncrObjsAllocated(); \ TclAllocObjStorage(objPtr); \ (objPtr)->refCount = 0; \ (objPtr)->bytes = NULL; \ - (objPtr)->internalRep.wideValue = (Tcl_WideInt)(i); \ + (objPtr)->internalRep.wideValue = (Tcl_WideInt)(w); \ (objPtr)->typePtr = &tclIntType; \ TCL_DTRACE_OBJ_CREATE(objPtr); \ } while (0) |