Fossil

Check-in [d6c6a433e7]
Login

Check-in [d6c6a433e7]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Cherrypick the changes [389f9fca5d] and [d0233e1792] to skip adding script commands that have a NULL name or function pointer.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d6c6a433e712a874ea0b89c6212b34d5d3778189
User & Date: mistachkin 2011-11-05 02:54:33.926
Context
2011-11-05
03:05
Always skip adding script commands that have a NULL name or function pointer. ... (check-in: 1b1fd23590 user: mistachkin tags: trunk)
02:54
Cherrypick the changes [389f9fca5d] and [d0233e1792] to skip adding script commands that have a NULL name or function pointer. ... (check-in: d6c6a433e7 user: mistachkin tags: trunk)
02:49
/json/user/save now returns the same as user/get, returning the new/updated state. ... (check-in: bf5de622e8 user: stephan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/th_tcl.c.
421
422
423
424
425
426
427


428
429
430
431
432
433
434
435
int th_register_tcl(
  Th_Interp *interp,
  void *pContext
){
  int i;
  /* Add the Tcl integration commands to TH1. */
  for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){


    void *ctx = aCommand[i].pContext;
    /* Use Tcl interpreter for context? */
    if( !ctx ) ctx = pContext;
    Th_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, 0);
  }
  return TH_OK;
}








>
>
|







421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
int th_register_tcl(
  Th_Interp *interp,
  void *pContext
){
  int i;
  /* Add the Tcl integration commands to TH1. */
  for(i=0; i<(sizeof(aCommand)/sizeof(aCommand[0])); i++){
    void *ctx;
    if ( !aCommand[i].zName || !aCommand[i].xProc ) continue;
    ctx = aCommand[i].pContext;
    /* Use Tcl interpreter for context? */
    if( !ctx ) ctx = pContext;
    Th_CreateCommand(interp, aCommand[i].zName, aCommand[i].xProc, ctx, 0);
  }
  return TH_OK;
}