summaryrefslogtreecommitdiff
path: root/doc/manpages/conf.py
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-05-21 04:48:30 +0200
committerDavid Lamparter <equinox@diac24.net>2019-05-21 05:42:13 +0200
commit3b18b6c03d0243d9d161d17b875b0bb4c6587f1e (patch)
treeeba4a1ac235f8155150d4922c2708a18fbb1b55b /doc/manpages/conf.py
parent0734f93b8ed51de625720346c953bd50e9f40487 (diff)
lib/table: remove nonsensical const, add pure
Passing the struct route_table *ptr as const doesn't really help; if anything it semantically would imply that the returned route_node is const too since constness should propagate (but it doesn't in C.) The right thing to do here - which actually helps the compiler optimize the code too - is to tag functions with __attribute__((pure)). The compiler does this automatically if it has the function body (and the body of all called functions) available. That should cover most "static inline" functions in headers, as well as functions in the same file. However, this doesn't work (at least without LTO) for extern functions. Hence, add "ext_pure" for this case. (Built-in "extern" to make lines shorter.) Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'doc/manpages/conf.py')
0 files changed, 0 insertions, 0 deletions