Browse Source

srdb1: add new db-private generic pointer to struct db1_res

Richard Fuchs 12 years ago
parent
commit
8366a26fb8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/srdb1/db_res.h

+ 3 - 0
lib/srdb1/db_res.h

@@ -61,6 +61,7 @@ typedef struct db1_res {
 	int n;                 /**< Number of rows in current fetch */
 	int n;                 /**< Number of rows in current fetch */
 	int res_rows;          /**< Number of total rows in query   */
 	int res_rows;          /**< Number of total rows in query   */
 	int last_row;          /**< Last row                        */
 	int last_row;          /**< Last row                        */
+	void* ptr;             /**< For use by DB modules           */
 } db1_res_t;
 } db1_res_t;
 
 
 
 
@@ -78,6 +79,8 @@ typedef struct db1_res {
 #define RES_LAST_ROW(re)  ((re)->last_row)
 #define RES_LAST_ROW(re)  ((re)->last_row)
 /** Return the number of total result rows */
 /** Return the number of total result rows */
 #define RES_NUM_ROWS(re) ((re)->res_rows)
 #define RES_NUM_ROWS(re) ((re)->res_rows)
+/** Return the module-specific pointer */
+#define RES_PTR(re) ((re)->ptr)
 
 
 
 
 /**
 /**