diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2016-12-07 17:30:16 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2016-12-09 17:36:25 +0100 |
| commit | a50b7cebd58520d7f7ddbb82214788bc794791ac (patch) | |
| tree | dcf212f69beda2084d6c5c68a314eccb0e693546 /lib/vty.h | |
| parent | 52c6b0e20a94e29126e3ddb180704d9d4c87e14f (diff) | |
lib: remove vty->index
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/vty.h')
| -rw-r--r-- | lib/vty.h | 31 |
1 files changed, 3 insertions, 28 deletions
@@ -29,14 +29,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #define VTY_BUFSIZ 512 #define VTY_MAXHIST 20 -#if defined(VTY_DEPRECATE_INDEX) && defined(__GNUC__) && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && \ - !defined(__ICC) -#define INDEX_WARNING __attribute__((deprecated)) -#else -#define INDEX_WARNING -#endif - /* VTY struct. */ struct vty { @@ -82,10 +74,6 @@ struct vty /* History insert end point */ int hindex; - /* For current referencing point of interface, route-map, - access-list etc... */ - void *index INDEX_WARNING; - /* qobj object ID (replacement for "index") */ uint64_t qobj_index; @@ -139,32 +127,19 @@ struct vty char address[SU_ADDRSTRLEN]; }; -#undef INDEX_WARNING - static inline void vty_push_context(struct vty *vty, - int node, uint64_t id, void *idx) + int node, uint64_t id) { vty->node = node; vty->qobj_index = id; -#if defined(VTY_DEPRECATE_INDEX) && defined(__GNUC__) && \ - (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - vty->index = idx; -#pragma GCC diagnostic pop -#else - vty->index = idx; -#endif } /* note: VTY_PUSH_CONTEXT(..., NULL) doesn't work, since it will try to * dereference "NULL->qobj_node.nid" */ #define VTY_PUSH_CONTEXT(nodeval, ptr) \ - vty_push_context(vty, nodeval, QOBJ_ID_0SAFE(ptr), NULL) + vty_push_context(vty, nodeval, QOBJ_ID_0SAFE(ptr)) #define VTY_PUSH_CONTEXT_NULL(nodeval) \ - vty_push_context(vty, nodeval, 0ULL, NULL) -#define VTY_PUSH_CONTEXT_COMPAT(nodeval, ptr) \ - vty_push_context(vty, nodeval, QOBJ_ID_0SAFE(ptr), ptr) + vty_push_context(vty, nodeval, 0ULL) #define VTY_PUSH_CONTEXT_SUB(nodeval, ptr) do { \ vty->node = nodeval; \ /* qobj_index stays untouched */ \ |
