Fossil SCM

Skip over Jim commands to create if they have a NULL name or function pointer.

mistachkin 2011-11-05 00:01 jimtcl
Commit 389f9fca5d2ffb9a102857522aeaf554c69b134b
1 file changed +1
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -435,10 +435,11 @@
435435
void *pContext
436436
){
437437
int i;
438438
/* Add the Tcl integration commands to Jim. */
439439
for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
440
+ if ( !aCommand[i].zName || !aCommand[i].xProc ) continue;
440441
void *ctx = aCommand[i].pContext;
441442
/* Use Tcl interpreter for context? */
442443
if( !ctx ) ctx = pContext;
443444
Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
444445
}
445446
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -435,10 +435,11 @@
435 void *pContext
436 ){
437 int i;
438 /* Add the Tcl integration commands to Jim. */
439 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
 
440 void *ctx = aCommand[i].pContext;
441 /* Use Tcl interpreter for context? */
442 if( !ctx ) ctx = pContext;
443 Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
444 }
445
--- src/th_tcl.c
+++ src/th_tcl.c
@@ -435,10 +435,11 @@
435 void *pContext
436 ){
437 int i;
438 /* Add the Tcl integration commands to Jim. */
439 for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
440 if ( !aCommand[i].zName || !aCommand[i].xProc ) continue;
441 void *ctx = aCommand[i].pContext;
442 /* Use Tcl interpreter for context? */
443 if( !ctx ) ctx = pContext;
444 Jim_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, NULL);
445 }
446

Keyboard Shortcuts

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