Fossil SCM
Modify TH1/Tcl integration macros to avoid using a generic variable name.
Commit
63a9998ca1b42db409f08bca3a8d31467adb7fe0
Parent
359399307eec47e…
1 file changed
+8
-8
+8
-8
| --- src/th_tcl.c | ||
| +++ src/th_tcl.c | ||
| @@ -30,24 +30,24 @@ | ||
| 30 | 30 | ** arguments from TH1 to Tcl. |
| 31 | 31 | */ |
| 32 | 32 | #define USE_ARGV_TO_OBJV() \ |
| 33 | 33 | int objc; \ |
| 34 | 34 | Tcl_Obj **objv; \ |
| 35 | - int i; | |
| 35 | + int obji; | |
| 36 | 36 | |
| 37 | 37 | #define COPY_ARGV_TO_OBJV() \ |
| 38 | 38 | objc = argc-1; \ |
| 39 | 39 | objv = (Tcl_Obj **)ckalloc((unsigned)(objc * sizeof(Tcl_Obj *))); \ |
| 40 | - for(i=1; i<argc; i++){ \ | |
| 41 | - objv[i-1] = Tcl_NewStringObj(argv[i], argl[i]); \ | |
| 42 | - Tcl_IncrRefCount(objv[i-1]); \ | |
| 40 | + for(obji=1; obji<argc; obji++){ \ | |
| 41 | + objv[obji-1] = Tcl_NewStringObj(argv[obji], argl[obji]); \ | |
| 42 | + Tcl_IncrRefCount(objv[obji-1]); \ | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | -#define FREE_ARGV_TO_OBJV() \ | |
| 46 | - for(i=1; i<argc; i++){ \ | |
| 47 | - Tcl_DecrRefCount(objv[i-1]); \ | |
| 48 | - } \ | |
| 45 | +#define FREE_ARGV_TO_OBJV() \ | |
| 46 | + for(obji=1; obji<argc; obji++){ \ | |
| 47 | + Tcl_DecrRefCount(objv[obji-1]); \ | |
| 48 | + } \ | |
| 49 | 49 | ckfree((char *)objv); |
| 50 | 50 | |
| 51 | 51 | /* |
| 52 | 52 | ** Fetch the Tcl interpreter from the specified void pointer, cast to a Tcl |
| 53 | 53 | ** context. |
| 54 | 54 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -30,24 +30,24 @@ | |
| 30 | ** arguments from TH1 to Tcl. |
| 31 | */ |
| 32 | #define USE_ARGV_TO_OBJV() \ |
| 33 | int objc; \ |
| 34 | Tcl_Obj **objv; \ |
| 35 | int i; |
| 36 | |
| 37 | #define COPY_ARGV_TO_OBJV() \ |
| 38 | objc = argc-1; \ |
| 39 | objv = (Tcl_Obj **)ckalloc((unsigned)(objc * sizeof(Tcl_Obj *))); \ |
| 40 | for(i=1; i<argc; i++){ \ |
| 41 | objv[i-1] = Tcl_NewStringObj(argv[i], argl[i]); \ |
| 42 | Tcl_IncrRefCount(objv[i-1]); \ |
| 43 | } |
| 44 | |
| 45 | #define FREE_ARGV_TO_OBJV() \ |
| 46 | for(i=1; i<argc; i++){ \ |
| 47 | Tcl_DecrRefCount(objv[i-1]); \ |
| 48 | } \ |
| 49 | ckfree((char *)objv); |
| 50 | |
| 51 | /* |
| 52 | ** Fetch the Tcl interpreter from the specified void pointer, cast to a Tcl |
| 53 | ** context. |
| 54 |
| --- src/th_tcl.c | |
| +++ src/th_tcl.c | |
| @@ -30,24 +30,24 @@ | |
| 30 | ** arguments from TH1 to Tcl. |
| 31 | */ |
| 32 | #define USE_ARGV_TO_OBJV() \ |
| 33 | int objc; \ |
| 34 | Tcl_Obj **objv; \ |
| 35 | int obji; |
| 36 | |
| 37 | #define COPY_ARGV_TO_OBJV() \ |
| 38 | objc = argc-1; \ |
| 39 | objv = (Tcl_Obj **)ckalloc((unsigned)(objc * sizeof(Tcl_Obj *))); \ |
| 40 | for(obji=1; obji<argc; obji++){ \ |
| 41 | objv[obji-1] = Tcl_NewStringObj(argv[obji], argl[obji]); \ |
| 42 | Tcl_IncrRefCount(objv[obji-1]); \ |
| 43 | } |
| 44 | |
| 45 | #define FREE_ARGV_TO_OBJV() \ |
| 46 | for(obji=1; obji<argc; obji++){ \ |
| 47 | Tcl_DecrRefCount(objv[obji-1]); \ |
| 48 | } \ |
| 49 | ckfree((char *)objv); |
| 50 | |
| 51 | /* |
| 52 | ** Fetch the Tcl interpreter from the specified void pointer, cast to a Tcl |
| 53 | ** context. |
| 54 |