diff options
author | Andrea Shepard <andrea@torproject.org> | 2012-10-01 01:48:52 -0700 |
---|---|---|
committer | Andrea Shepard <andrea@torproject.org> | 2012-10-10 00:44:46 -0700 |
commit | e1de2f1437ffe67ee0ae74ae6ac1d432f3981542 (patch) | |
tree | 91245d9a57a3c2f35828a3f137f871e627afb305 /src | |
parent | 184560c4f6fa8262fe1316d5e169a16b47b11e6b (diff) | |
download | tor-e1de2f1437ffe67ee0ae74ae6ac1d432f3981542.tar.gz tor-e1de2f1437ffe67ee0ae74ae6ac1d432f3981542.zip |
Add upcasts for circuitmux_policy_data_t and circuitmux_policy_circ_data_t to circuitmux.h
Diffstat (limited to 'src')
-rw-r--r-- | src/or/circuitmux.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h index f4eb73e391..a3eacaf7d4 100644 --- a/src/or/circuitmux.h +++ b/src/or/circuitmux.h @@ -76,6 +76,23 @@ struct circuitmux_policy_circ_data_s { uint32_t magic; }; +/* + * Upcast #defines for the above types + */ + +/** + * Convert a circuitmux_policy_data_t subtype to a circuitmux_policy_data_t. + */ + +#define TO_CMUX_POL_DATA(x) (&((x)->_base)) + +/** + * Convert a circuitmux_policy_circ_data_t subtype to a + * circuitmux_policy_circ_data_t. + */ + +#define TO_CMUX_POL_CIRC_DATA(x) (&((x)->_base)) + /* Consistency check */ void circuitmux_assert_okay(circuitmux_t *cmux); |