Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | c01764b0d10c64480f8c3e24df329711d2f95b9d |
|---|---|
| Date: | 2012-07-20 18:54:11 |
| User: | stephan |
| Comment: | Fixed a c99ism and a missing return statement. |
Tags And Properties
- branch=th1-query-api inherited from [c3b10e12a1]
- sym-th1-query-api inherited from [c3b10e12a1]
Changes
Changes to src/th.c
2892 } 2892 } 2893 assert( NULL != pMan->interp ); 2893 assert( NULL != pMan->interp ); 2894 pBlob = (Blob *)Th_Malloc(pMan->interp, sizeof(Blob)); 2894 pBlob = (Blob *)Th_Malloc(pMan->interp, sizeof(Blob)); 2895 *pBlob = empty_blob; 2895 *pBlob = empty_blob; 2896 2896 2897 if( pMan->cursor >= pMan->nBuf-2 ){ 2897 if( pMan->cursor >= pMan->nBuf-2 ){ 2898 /* expand if needed */ 2898 /* expand if needed */ > 2899 void * re; 2899 x = pMan->nBuf + 5; 2900 x = pMan->nBuf + 5; 2900 if( pMan->cursor >= x ) { 2901 if( pMan->cursor >= x ) { 2901 assert( 0 && "This really should not happen." ); 2902 assert( 0 && "This really should not happen." ); 2902 x = pMan->cursor + 5; 2903 x = pMan->cursor + 5; 2903 } 2904 } 2904 void * re = Th_Realloc( pMan->interp, pMan->aBuf, x * sizeof(Blob*) ); | 2905 re = Th_Realloc( pMan->interp, pMan->aBuf, x * sizeof(Blob*) ); 2905 if(NULL==re){ 2906 if(NULL==re){ 2906 goto error; 2907 goto error; 2907 } 2908 } 2908 pMan->aBuf = (Blob **)re; 2909 pMan->aBuf = (Blob **)re; 2909 re = Th_Realloc( pMan->interp, pMan->aOutput, x * sizeof(Th_Vtab_OutputMetho 2910 re = Th_Realloc( pMan->interp, pMan->aOutput, x * sizeof(Th_Vtab_OutputMetho 2910 if(NULL==re){ 2911 if(NULL==re){ 2911 goto error; 2912 goto error; ................................................................................................................................................................................ 2972 2973 2973 int Th_Ob_PopAndFree( Th_Ob_Manager * pMan ){ 2974 int Th_Ob_PopAndFree( Th_Ob_Manager * pMan ){ 2974 Blob * b = Th_Ob_Pop( pMan ); 2975 Blob * b = Th_Ob_Pop( pMan ); 2975 if(!b) return 1; 2976 if(!b) return 1; 2976 else { 2977 else { 2977 blob_reset(b); 2978 blob_reset(b); 2978 Th_Free( pMan->interp, b ); 2979 Th_Free( pMan->interp, b ); > 2980 return 0; 2979 } 2981 } 2980 } 2982 } 2981 2983 2982 2984 2983 void Th_ob_cleanup( Th_Ob_Manager * man ){ 2985 void Th_ob_cleanup( Th_Ob_Manager * man ){ 2984 while( 0 == Th_Ob_PopAndFree(man) ){} 2986 while( 0 == Th_Ob_PopAndFree(man) ){} 2985 } 2987 }