summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorGary Guo <gary@garyguo.net>2026-08-11 14:55:56 +0100
committerMiguel Ojeda <ojeda@kernel.org>2026-10-02 21:05:01 +0200
commita52a7596c376ac7bce5a5322c526d96e2780ad17 (patch)
tree7bf7a31a43123a0509772a2dcee7170cb911b58a /tools/lib/python/kdoc/parse_data_structs.py
parent5ec807292c55eff56387f32d5b2a0a81f2926b81 (diff)
downloadlinux-next-a52a7596c376ac7bce5a5322c526d96e2780ad17.tar.gz
linux-next-a52a7596c376ac7bce5a5322c526d96e2780ad17.zip
rust: macros: vtable: add `#[optional]` attribute
For most users of the `#[vtable]` macro, the optional methods do not have a Rust-side default implementation; a `NULL` pointer is inserted into the vtable and the C subsystem does things differently when it sees `NULL`. Streamline this use case by providing a `#[optional]` attribute that does what the `build_error!(VTABLE_DEFAULT_ERROR)` boilerplate does. Signed-off-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20260811-vtable_macro-v1-2-50c5aab3c211@garyguo.net [ Rewrapped docs. Reworded message, comment and error for typos. Rebased. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions