Selaa lähdekoodia

tm: export function to get access to tm table

- to fix missing symbol in tmx for mode=debug, reported by Santiago Gimeno
(cherry picked from commit 181f81b2458ee04241b36c65ac1d95f38003250d)
Daniel-Constantin Mierla 15 vuotta sitten
vanhempi
commit
32ad357f75
4 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  1. 3 0
      modules/tm/h_table.c
  2. 3 0
      modules/tm/h_table.h
  3. 1 0
      modules/tm/tm_load.c
  4. 1 0
      modules/tm/tm_load.h

+ 3 - 0
modules/tm/h_table.c

@@ -74,6 +74,9 @@ static enum kill_reason kr;
    lives */
 struct s_table*  _tm_table;
 
+struct s_table* tm_get_table(void) {
+	return _tm_table;
+}
 
 void reset_kr() {
 	kr=0;

+ 3 - 0
modules/tm/h_table.h

@@ -467,6 +467,9 @@ enum kill_reason get_kr();
 
 #define get_tm_table() (_tm_table)
 
+typedef struct s_table* (*tm_get_table_f)(void);
+struct s_table* tm_get_table(void);
+
 struct s_table* init_hash_table();
 void   free_hash_table( );
 void   free_cell( struct cell* dead_cell );

+ 1 - 0
modules/tm/tm_load.c

@@ -237,6 +237,7 @@ int load_tm( struct tm_binds *tmb)
 	tmb->unref_cell = unref_cell;
 	tmb->prepare_to_cancel = prepare_to_cancel;
 	tmb->get_stats = tm_get_stats;
+	tmb->get_table = tm_get_table;
 
 #ifdef WITH_TM_CTX
 	tmb->tm_ctx_get = tm_ctx_get;

+ 1 - 0
modules/tm/tm_load.h

@@ -146,6 +146,7 @@ struct tm_binds {
 	unref_cell_f unref_cell;
 	prepare_to_cancel_f prepare_to_cancel;
 	tm_get_stats_f get_stats;
+	tm_get_table_f get_table;
 #ifdef WITH_TM_CTX
 	tm_ctx_get_f tm_ctx_get;
 #else