]> www.infradead.org Git - users/sagi/libnvme.git/commit
python/swig: Wrap swig-sensitive struct inside #ifwdef SWIG
authorMartin Belanger <martin.belanger@dell.com>
Thu, 27 Apr 2023 14:13:19 +0000 (10:13 -0400)
committerDaniel Wagner <wagi@monom.org>
Thu, 27 Apr 2023 14:24:40 +0000 (16:24 +0200)
commit1b04a3832663cd0e790638646d78c0ee1a83098a
tree5d2887c860d4bfc9cf81bdaa2a88b034949f8b30
parenteaa7ad4eb2247075d179e51bd457aecec2dfd955
python/swig: Wrap swig-sensitive struct inside #ifwdef SWIG

To suppress the warnings generated by swig when parsing anonymous
struct/union, we simply wrap the offending struct/union in a
"#ifndef SWIG" statement. This is an acceptable workaround because
we don't need to generate Python bindings for these structs. In
fact, we specifically tell swig to not generate wrappers for all
structs in types.h. Although swig does not generate wrappers for
those structs, it still warns when a struct doesn't have a name
and therefore we need to use this workaround.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
src/nvme/types.h