Check-in [e0f22dda7b]
Not logged in

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

Overview
Comment:Enable use of the TH1_DELETE_INTERP environment variable to delete the TH1 interp on exit.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e0f22dda7b25cd992f3f1a09acb23ef89e5f7eb6
User & Date: mistachkin 2014-01-14 09:48:08.006
References
2014-01-16
22:08
Cherrypick MSVC/TH1 related fixes [42316a14e2], [354288db9c], [9dc0877d91], [fb29094a8f], [e0f22dda7b], [1aeb2726b0], [95292a13fa], [5e368e911d], [dd8d317670], and [f61958b183] from trunk. check-in: 93832bd9af user: mistachkin tags: branch-1.28
10:01
Cherrypick MSVC/TH1 related fixes [42316a14e2], [354288db9c], [9dc0877d91], [fb29094a8f], [e0f22dda7b], [1aeb2726b0], [95292a13fa], [5e368e911d], [dd8d317670], and [f61958b183] from trunk for review. check-in: 76442af7e1 user: mistachkin tags: branch-1.28
Context
2014-01-16
10:01
Cherrypick MSVC/TH1 related fixes [42316a14e2], [354288db9c], [9dc0877d91], [fb29094a8f], [e0f22dda7b], [1aeb2726b0], [95292a13fa], [5e368e911d], [dd8d317670], and [f61958b183] from trunk for review. check-in: 76442af7e1 user: mistachkin tags: branch-1.28
2014-01-14
12:50
Fix several issues with the TH1 unset command, including a memory leak. Add more tests. check-in: e4047acb76 user: mistachkin tags: th1UnsetVar
12:44
Add the ability to display content and diffs for UTF16 text files in the web interface. check-in: 5a66b6e785 user: drh tags: trunk
09:48
Enable use of the TH1_DELETE_INTERP environment variable to delete the TH1 interp on exit. check-in: e0f22dda7b user: mistachkin tags: trunk
09:45
For MSVC, disable optimizations when compiling for debugging. check-in: fb29094a8f user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
376
377
378
379
380
381
382
383
384
385

386
387
388
389

390
391
392
393
394
395
396
#endif
  free(g.zErrMsg);
  if(g.db){
    db_close(0);
  }
  /*
  ** FIXME: The next two lines cannot always be enabled; however, they
  **        are useful for tracking down TH1 memory leaks.
  */
  /*

  if( g.interp ){
    Th_DeleteInterp(g.interp); g.interp = 0;
  }
  assert( Th_GetOutstandingMalloc()==0 ); */

}

/*
** Convert all arguments from mbcs (or unicode) to UTF-8. Then
** search g.argv for arguments "--args FILENAME". If found, then
** (1) remove the two arguments from g.argv
** (2) Read the file FILENAME







|

<
>
|
|
|
|
>







376
377
378
379
380
381
382
383
384

385
386
387
388
389
390
391
392
393
394
395
396
397
#endif
  free(g.zErrMsg);
  if(g.db){
    db_close(0);
  }
  /*
  ** FIXME: The next two lines cannot always be enabled; however, they
  **        are very useful for tracking down TH1 memory leaks.
  */

  if( fossil_getenv("TH1_DELETE_INTERP")!=0 ){
    if( g.interp ){
      Th_DeleteInterp(g.interp); g.interp = 0;
    }
    assert( Th_GetOutstandingMalloc()==0 );
  }
}

/*
** Convert all arguments from mbcs (or unicode) to UTF-8. Then
** search g.argv for arguments "--args FILENAME". If found, then
** (1) remove the two arguments from g.argv
** (2) Read the file FILENAME
Changes to src/th_main.c.
1009
1010
1011
1012
1013
1014
1015

1016
1017
1018
1019
1020
1021
1022
1023
      g.interp = Th_CreateInterp(&vtab);
      created = 1;
    }
    if( forceReset || created ){
      th_register_language(g.interp);     /* Basic scripting commands. */
    }
#ifdef FOSSIL_ENABLE_TCL

    if( forceTcl || getenv("TH1_ENABLE_TCL")!=0 || db_get_boolean("tcl", 0) ){
      if( !g.tcl.setup ){
        g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */
      }
      th_register_tcl(g.interp, &g.tcl);  /* Tcl integration commands. */
    }
#endif
    for(i=0; i<sizeof(aCommand)/sizeof(aCommand[0]); i++){







>
|







1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
      g.interp = Th_CreateInterp(&vtab);
      created = 1;
    }
    if( forceReset || created ){
      th_register_language(g.interp);     /* Basic scripting commands. */
    }
#ifdef FOSSIL_ENABLE_TCL
    if( forceTcl || fossil_getenv("TH1_ENABLE_TCL")!=0 ||
        db_get_boolean("tcl", 0) ){
      if( !g.tcl.setup ){
        g.tcl.setup = db_get("tcl-setup", 0); /* Grab Tcl setup script. */
      }
      th_register_tcl(g.interp, &g.tcl);  /* Tcl integration commands. */
    }
#endif
    for(i=0; i<sizeof(aCommand)/sizeof(aCommand[0]); i++){