Fossil SCM
minor doc additions.
Commit
236cf1359400683074daf36782dc117195705035
Parent
147c602d935c272…
1 file changed
+12
-3
M
src/th.c
+12
-3
| --- src/th.c | ||
| +++ src/th.c | ||
| @@ -18,13 +18,17 @@ | ||
| 18 | 18 | |
| 19 | 19 | typedef struct Th_Command Th_Command; |
| 20 | 20 | typedef struct Th_Frame Th_Frame; |
| 21 | 21 | typedef struct Th_Variable Th_Variable; |
| 22 | 22 | |
| 23 | +/* | |
| 24 | +** Holds client-provided "garbage collected" data for | |
| 25 | +** a Th_Interp instance. | |
| 26 | +*/ | |
| 23 | 27 | struct Th_GcEntry { |
| 24 | - void * pData; | |
| 25 | - void (*xDel)( Th_Interp *, void * ); | |
| 28 | + void * pData; /* arbitrary data */ | |
| 29 | + void (*xDel)( Th_Interp *, void * ); /* finalizer for pData */ | |
| 26 | 30 | }; |
| 27 | 31 | typedef struct Th_GcEntry Th_GcEntry; |
| 28 | 32 | |
| 29 | 33 | /* |
| 30 | 34 | ** Interpreter structure. |
| @@ -34,11 +38,16 @@ | ||
| 34 | 38 | char *zResult; /* Current interpreter result (Th_Malloc()ed) */ |
| 35 | 39 | int nResult; /* number of bytes in zResult */ |
| 36 | 40 | Th_Hash *paCmd; /* Table of registered commands */ |
| 37 | 41 | Th_Frame *pFrame; /* Current execution frame */ |
| 38 | 42 | int isListMode; /* True if thSplitList() should operate in "list" mode */ |
| 39 | - Th_Hash * paGc; /* holds client-provided data owned by this object */ | |
| 43 | + Th_Hash * paGc; /* Holds client-provided data owned by this | |
| 44 | + object. It would be more efficient to store | |
| 45 | + these in a list (we don't expect many | |
| 46 | + entries), but Th_Hash has the strong advantage | |
| 47 | + of being here and working. | |
| 48 | + */ | |
| 40 | 49 | #ifdef TH_USE_SQLITE |
| 41 | 50 | struct { |
| 42 | 51 | sqlite3_stmt ** aStmt; |
| 43 | 52 | int nStmt; |
| 44 | 53 | } stmt; /* list of prepared statements */ |
| 45 | 54 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -18,13 +18,17 @@ | |
| 18 | |
| 19 | typedef struct Th_Command Th_Command; |
| 20 | typedef struct Th_Frame Th_Frame; |
| 21 | typedef struct Th_Variable Th_Variable; |
| 22 | |
| 23 | struct Th_GcEntry { |
| 24 | void * pData; |
| 25 | void (*xDel)( Th_Interp *, void * ); |
| 26 | }; |
| 27 | typedef struct Th_GcEntry Th_GcEntry; |
| 28 | |
| 29 | /* |
| 30 | ** Interpreter structure. |
| @@ -34,11 +38,16 @@ | |
| 34 | char *zResult; /* Current interpreter result (Th_Malloc()ed) */ |
| 35 | int nResult; /* number of bytes in zResult */ |
| 36 | Th_Hash *paCmd; /* Table of registered commands */ |
| 37 | Th_Frame *pFrame; /* Current execution frame */ |
| 38 | int isListMode; /* True if thSplitList() should operate in "list" mode */ |
| 39 | Th_Hash * paGc; /* holds client-provided data owned by this object */ |
| 40 | #ifdef TH_USE_SQLITE |
| 41 | struct { |
| 42 | sqlite3_stmt ** aStmt; |
| 43 | int nStmt; |
| 44 | } stmt; /* list of prepared statements */ |
| 45 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -18,13 +18,17 @@ | |
| 18 | |
| 19 | typedef struct Th_Command Th_Command; |
| 20 | typedef struct Th_Frame Th_Frame; |
| 21 | typedef struct Th_Variable Th_Variable; |
| 22 | |
| 23 | /* |
| 24 | ** Holds client-provided "garbage collected" data for |
| 25 | ** a Th_Interp instance. |
| 26 | */ |
| 27 | struct Th_GcEntry { |
| 28 | void * pData; /* arbitrary data */ |
| 29 | void (*xDel)( Th_Interp *, void * ); /* finalizer for pData */ |
| 30 | }; |
| 31 | typedef struct Th_GcEntry Th_GcEntry; |
| 32 | |
| 33 | /* |
| 34 | ** Interpreter structure. |
| @@ -34,11 +38,16 @@ | |
| 38 | char *zResult; /* Current interpreter result (Th_Malloc()ed) */ |
| 39 | int nResult; /* number of bytes in zResult */ |
| 40 | Th_Hash *paCmd; /* Table of registered commands */ |
| 41 | Th_Frame *pFrame; /* Current execution frame */ |
| 42 | int isListMode; /* True if thSplitList() should operate in "list" mode */ |
| 43 | Th_Hash * paGc; /* Holds client-provided data owned by this |
| 44 | object. It would be more efficient to store |
| 45 | these in a list (we don't expect many |
| 46 | entries), but Th_Hash has the strong advantage |
| 47 | of being here and working. |
| 48 | */ |
| 49 | #ifdef TH_USE_SQLITE |
| 50 | struct { |
| 51 | sqlite3_stmt ** aStmt; |
| 52 | int nStmt; |
| 53 | } stmt; /* list of prepared statements */ |
| 54 |