Fossil

Check-in [c01764b0]
Login

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

Overview
Comment:Fixed a c99ism and a missing return statement.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | th1-query-api
Files: files | file ages | folders
SHA1:c01764b0d10c64480f8c3e24df329711d2f95b9d
User & Date: stephan 2012-07-20 18:54:11
Context
2012-07-22
11:39
minor th1 doc and script code cleanups. check-in: 2b4b2a50 user: stephan tags: th1-query-api
2012-07-20
18:54
Fixed a c99ism and a missing return statement. check-in: c01764b0 user: stephan tags: th1-query-api
11:56
Removed unneeded th.c/blob.h dep (having it does not fix parallel builds). check-in: dff26b75 user: stephan tags: th1-query-api
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/th.c.

2892
2893
2894
2895
2896
2897
2898

2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
....
2972
2973
2974
2975
2976
2977
2978

2979
2980
2981
2982
2983
2984
2985
  }
  assert( NULL != pMan->interp );
  pBlob = (Blob *)Th_Malloc(pMan->interp, sizeof(Blob));
  *pBlob = empty_blob;

  if( pMan->cursor >= pMan->nBuf-2 ){
    /* expand if needed */

    x = pMan->nBuf + 5;
    if( pMan->cursor >= x ) {
      assert( 0 && "This really should not happen." );
      x = pMan->cursor + 5;
    }
    void * re = Th_Realloc( pMan->interp, pMan->aBuf, x * sizeof(Blob*) );
    if(NULL==re){
      goto error;
    }
    pMan->aBuf = (Blob **)re;
    re = Th_Realloc( pMan->interp, pMan->aOutput, x * sizeof(Th_Vtab_OutputMethods) );
    if(NULL==re){
      goto error;
................................................................................

int Th_Ob_PopAndFree( Th_Ob_Manager * pMan ){
  Blob * b = Th_Ob_Pop( pMan );
  if(!b) return 1;
  else {
    blob_reset(b);
    Th_Free( pMan->interp, b );

  }
}


void Th_ob_cleanup( Th_Ob_Manager * man ){
  while( 0 == Th_Ob_PopAndFree(man) ){}
}







>





|







 







>







2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
....
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
  }
  assert( NULL != pMan->interp );
  pBlob = (Blob *)Th_Malloc(pMan->interp, sizeof(Blob));
  *pBlob = empty_blob;

  if( pMan->cursor >= pMan->nBuf-2 ){
    /* expand if needed */
    void * re;
    x = pMan->nBuf + 5;
    if( pMan->cursor >= x ) {
      assert( 0 && "This really should not happen." );
      x = pMan->cursor + 5;
    }
    re = Th_Realloc( pMan->interp, pMan->aBuf, x * sizeof(Blob*) );
    if(NULL==re){
      goto error;
    }
    pMan->aBuf = (Blob **)re;
    re = Th_Realloc( pMan->interp, pMan->aOutput, x * sizeof(Th_Vtab_OutputMethods) );
    if(NULL==re){
      goto error;
................................................................................

int Th_Ob_PopAndFree( Th_Ob_Manager * pMan ){
  Blob * b = Th_Ob_Pop( pMan );
  if(!b) return 1;
  else {
    blob_reset(b);
    Th_Free( pMan->interp, b );
    return 0;
  }
}


void Th_ob_cleanup( Th_Ob_Manager * man ){
  while( 0 == Th_Ob_PopAndFree(man) ){}
}