Fossil SCM

Modify TH1/Tcl integration macros to avoid using a generic variable name.

mistachkin 2013-10-27 04:48 trunk
Commit 63a9998ca1b42db409f08bca3a8d31467adb7fe0
1 file changed +8 -8
+8 -8
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -30,24 +30,24 @@
3030
** arguments from TH1 to Tcl.
3131
*/
3232
#define USE_ARGV_TO_OBJV() \
3333
int objc; \
3434
Tcl_Obj **objv; \
35
- int i;
35
+ int obji;
3636
3737
#define COPY_ARGV_TO_OBJV() \
3838
objc = argc-1; \
3939
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]); \
4343
}
4444
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
+ } \
4949
ckfree((char *)objv);
5050
5151
/*
5252
** Fetch the Tcl interpreter from the specified void pointer, cast to a Tcl
5353
** context.
5454
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button